Advertisement
Guest User

Untitled

a guest
Apr 21st, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. me = game.Players.FirstNamer
  2.  
  3. if script.Parent.className ~= "HopperBin" then
  4. h = Instance.new("HopperBin",me.Backpack)
  5. h.Name = "PL thing"
  6. script.Parent = h
  7. end
  8.  
  9. sp = script.Parent
  10. enabled = false
  11.  
  12. sp.Selected:connect(function(mouse)
  13. mouse.Button1Down:connect(function()
  14. if enabled == false then
  15. bg = Instance.new("BodyGyro")
  16. bg.Parent = me.Character.Torso
  17. bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  18. bg.P = 8000
  19. if mouse.Target ~= nil then
  20. enabled = true
  21. targ = mouse.Target
  22. bg.cframe = CFrame.new(me.Character.Torso.Position, targ.Position)
  23. while enabled do
  24. bg.cframe = CFrame.new(me.Character.Torso.Position, targ.Position)
  25. wait()
  26. end
  27. else
  28. enabled = true
  29. bg.cframe = CFrame.new(me.Character.Torso.Position, mouse.Hit.p)
  30. while enabled do
  31. bg.cframe = CFrame.new(me.Character.Torso.Position, mouse.Hit.p)
  32. wait()
  33. end
  34. end
  35. else
  36. enabled = false
  37. bg:remove()
  38. end
  39. end)
  40. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement