Advertisement
Guest User

Click TP tool

a guest
Nov 2nd, 2019
4,848
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1.  
  2. bin=Instance.new("HopperBin",game:service'Players'.LocalPlayer.Backpack)
  3. bin.Name = "Teleport"
  4.  
  5. function teleportPlayer(pos)
  6.  
  7. local player = game:service'Players'.LocalPlayer
  8. if player == nil or player.Character == nil then return end
  9.  
  10. local char = player.Character
  11.  
  12. char:MoveTo(pos)
  13.  
  14. end
  15.  
  16.  
  17. enabled = true
  18. function onButton1Down(mouse)
  19. if not enabled then
  20. return
  21. end
  22.  
  23. local player = game:service'Players'.LocalPlayer
  24. if player == nil then return end
  25. local cf = mouse.Hit
  26. teleportPlayer(cf.p)
  27.  
  28. end
  29.  
  30. function onSelected(mouse)
  31. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  32. end
  33.  
  34. bin.Selected:connect(onSelected)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement