Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. wait(2)
  2.  
  3. local function mFloor(x)
  4. return x - x % 1;
  5. end
  6.  
  7. if script.Parent:WaitForChild("Owner").Value == "None" then
  8. script.Parent:Destroy()
  9. end
  10.  
  11. local Direction = script.Parent:WaitForChild("Direction").Value
  12. local Owner = script.Parent:WaitForChild("Owner").Value
  13. local Player = game.Players:GetFullName(Owner)
  14.  
  15. local Rise = 5
  16. local Follow = true
  17. local Pet = Instance.new("Part")
  18. local BodyPosition = Instance.new("BodyPosition")
  19. local BodyGyro = Instance.new("BodyGyro")
  20. local PlayerWorkspace = game.Workspace:GetFullName(Owner)
  21.  
  22. function RemoteEvent()
  23.  
  24. end
  25.  
  26. BodyPosition.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  27. BodyPosition.Parent = Pet
  28. Mesh = Instance.new("SpecialMesh")
  29. Mesh.MeshId = "http://www.roblox.com/asset/?id=37223772"
  30. Mesh.TextureId = "http://www.roblox.com/asset/?id=37223767"
  31. Mesh.MeshType = "FileMesh"
  32. Mesh.Scale = Vector3.new(1, 1, 1)
  33. Mesh.Parent = Pet
  34. Pet.BrickColor = BrickColor.new("Really black")
  35. Pet.Parent = game.Workspace:FindFirstChild(Owner)
  36. Pet.Name = "Pet"
  37. Pet.Shape = "Ball"
  38. Pet.formFactor = "Symmetric"
  39. Pet.Size = Vector3.new(1, 1, 1)
  40. Pet.TopSurface = 0
  41. Pet.Locked = true
  42. Pet.CanCollide = false
  43.  
  44. local Levitated = 0
  45. local LevitateDir = -1
  46.  
  47. while true do wait()
  48. pcall(function()
  49. Levitated = Levitated + LevitateDir / 20
  50. if Levitated >= 1 or Levitated <= -1 then
  51. LevitateDir = - LevitateDir
  52. end
  53.  
  54. local Vector = PlayerWorkspace.Torso.CFrame.lookVector
  55.  
  56. Part.CFrame = CFrame.new(Part.Position, Part.Position + Vector)
  57.  
  58. if (Follow == true) then
  59. BodyPosition.position = (Player.Character.Torso.CFrame * CFrame.new(4, Rise, 1.5)).p + Vector3.new(0, Levitated, 0)
  60. end
  61. end)
  62. end
  63.  
  64. game.JointsService.DescendantAdded:connect()
  65. game.Workspace.DescendantAdded:connect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement