The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Fe Head Pet script pastebin roblox
By Fe Head Pet on 2024-11-27 08:00 am | Syntax: LUA | Views: 14



New Script | Raw | Show/Hide line no. | Copy text to clipboard
  1. --made by MyWorld#4430
  2. local petGui = Instance.new("ScreenGui")
  3. local drag = Instance.new("Frame")
  4. local label = Instance.new("TextLabel")
  5. local TextButton = Instance.new("TextButton")
  6. local otb = Instance.new("TextBox")
  7.  
  8. petGui.Name = "petGui"
  9. petGui.Parent = game:GetService("CoreGui")
  10. petGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  11.  
  12. drag.Name = "drag"
  13. drag.Parent = petGui
  14. drag.BackgroundColor3 = Color3.fromRGB(116, 116, 116)
  15. drag.BorderSizePixel = 0
  16. drag.Position = UDim2.new(0.5, -150, 0.5, -35)
  17. drag.Size = UDim2.new(0, 300, 0, 70)
  18. drag.Archivable = true
  19. drag.Active = true
  20. drag.Selectable = true
  21. drag.Draggable = true
  22.  
  23. label.Name = "label"
  24. label.Parent = drag
  25. label.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  26. label.BackgroundTransparency = 0.500
  27. label.BorderSizePixel = 0
  28. label.Size = UDim2.new(1, 0, 0, 20)
  29. label.Font = Enum.Font.SourceSans
  30. label.Text = "set pet owner"
  31. label.TextColor3 = Color3.fromRGB(255, 255, 255)
  32. label.TextScaled = true
  33. label.TextSize = 14.000
  34. label.TextWrapped = true
  35.  
  36. TextButton.Parent = label
  37. TextButton.BackgroundColor3 = Color3.fromRGB(91, 0, 0)
  38. TextButton.BorderSizePixel = 0
  39. TextButton.Position = UDim2.new(1, -50, 0, 0)
  40. TextButton.Size = UDim2.new(0, 50, 1, 0)
  41. TextButton.Font = Enum.Font.Ubuntu
  42. TextButton.Text = "X"
  43. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  44. TextButton.TextSize = 16.000
  45. TextButton.TextWrapped = true
  46.  
  47. TextButton.MouseButton1Click:Connect(function()
  48.  petGui:Destroy()
  49. end)
  50.  
  51. otb.Name = "otb"
  52. otb.Parent = drag
  53. otb.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  54. otb.BorderSizePixel = 0
  55. otb.Position = UDim2.new(0, 10, 0, 30)
  56. otb.Size = UDim2.new(1, -20, 1, -40)
  57. otb.Font = Enum.Font.SourceSans
  58. otb.PlaceholderText = "pet owner name"
  59. otb.Text = ""
  60. otb.TextColor3 = Color3.fromRGB(255, 255, 255)
  61. otb.TextSize = 20.000
  62. otb.TextWrapped = true
  63.  
  64. local plr = ""
  65.  
  66. local plrs = game:GetService("Players")
  67. local lp = plrs.LocalPlayer
  68.  
  69. otb.FocusLost:Connect(function(enter)
  70.  if enter then
  71.   local playername = otb.Text
  72.  
  73.   for i, v in pairs(plrs:GetPlayers()) do
  74.    if (string.lower(v.Name):sub(1, #playername) == string.lower(playername)) and (v ~= lp) then
  75.     plr = v.Name
  76.    end
  77.   end
  78.         otb.Text = plr
  79.  end
  80. end)
  81.  
  82. local ws = game:GetService("Workspace")
  83. local c = lp.Character
  84. local rs = game:GetService("RunService")
  85. local sg = game:GetService("StarterGui")
  86. local uis = game:GetService("UserInputService")
  87. function uc(p)
  88.  spawn(function()
  89.   while p and p.Parent and rs.Stepped:Wait() do
  90.    p.CanCollide = false
  91.   end
  92.  end)
  93. end
  94. if c and c.Parent then
  95.  local ch = c:FindFirstChildOfClass("Humanoid")
  96.  if ch and (ch.Health ~= 0) then
  97.   local fc = Instance.new("Model", ws)
  98.   local hed = Instance.new("Part", fc)
  99.   hed.Transparency = 1
  100.   hed.Name = "Head"
  101.   uc(hed)
  102.   local tor = Instance.new("Part", fc)
  103.   tor.Transparency = 1
  104.   tor.Name = "Torso"
  105.   uc(tor)
  106.   local nh = Instance.new("Humanoid", fc)
  107.   lp.Character = fc
  108.   local gh = nh:Clone()
  109.   gh.Parent = fc
  110.   nh:Destroy()
  111.   gh.Health = 0
  112.   lp.Character = c
  113.   fc:Destroy()
  114.   wait(6)
  115.   if c and c.Parent and ch and ch.Parent and (ch.Health ~= 0) then
  116.    local hed = c:FindFirstChild("Head")
  117.    if hed and (hed:IsA("Part") or hed:IsA("MeshPart")) then
  118.     uc(hed)
  119.     for i, v in pairs(c:GetChildren()) do
  120.      if not ((v == hed) or v:IsA("Humanoid")) then
  121.       v:Destroy()
  122.      end
  123.     end
  124.  
  125.     local bg = Instance.new("BodyGyro", hed)
  126.     bg.D = 50
  127.     bg.P = 200
  128.     bg.MaxTorque = Vector3.new(9e9, 9e9, 9e9)
  129.  
  130.     local bp = Instance.new("BodyPosition", hed)
  131.     bp.D = 50
  132.     bp.P = 200
  133.     bp.MaxForce = Vector3.new(9e9, 9e9, 9e9)
  134.  
  135.     while rs.Stepped:Wait() and ch and ch.Parent and hed and hed.Parent and bp and bp.Parent and bg and bg.Parent do
  136.      local c1 = plrs:FindFirstChild(plr)
  137.      if c1 and c1:IsA("Player") then
  138.       c1 = c1.Character
  139.       if c1 and c1.Parent then
  140.        c1 = c1:FindFirstChild("Head")
  141.        if c1 and (c1:IsA("Part") or c1:IsA("MeshPart")) then
  142.         bp.Position = (c1.CFrame * CFrame.new(2, 2, 2)).Position
  143.         bg.CFrame = c1.CFrame
  144.        end
  145.       end
  146.      end
  147.     end
  148.    end
  149.   end
  150.  end
  151. end



  • Recent Roblox Scripts