Advertisement
Scriptorz5

Anchor Tool

May 7th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. if not script.Parent:IsA("HopperBin") then
  2. User = "atu1000"
  3. TOOOL=Instance.new("HopperBin",game.Players[User].Backpack)
  4. script.Parent=TOOOL
  5. tool=script.Parent
  6. function click(mouse)
  7. if mouse.Target:IsA("BasePart") then
  8. if mouse.Target.Name~="Base" then
  9. if mouse.Target.Anchored==true then
  10. mouse.Target.Anchored=false
  11. end
  12. if mouse.Target.Anchored==false then
  13. mouse.Target.Anchored=true
  14. end
  15. end
  16. end
  17. end
  18. function onSelected(mouse)
  19. mouse.Button1Down:connect(function() click(mouse) end)
  20. end
  21. tool.Selected:connect(onSelected)
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement