Spa0x

Click TP Script

Jul 9th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. --Credit to v3rmillion
  2. player1=game.Players.LocalPlayer
  3.  
  4. q=Instance.new('HopperBin', player1.Backpack)
  5. q.Name = 'Click Teleport'
  6.  
  7.  
  8. bin = q
  9.  
  10.  
  11.  
  12. function teleportPlayer(pos)
  13. local player = game.Players.LocalPlayer
  14. if player == nil or player.Character == nil then return end
  15. player.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(pos.x, pos.y + 7, pos.z))
  16. end
  17.  
  18.  
  19. enabled = true
  20. function onButton1Down(mouse)
  21. if not enabled then
  22. return
  23. end
  24.  
  25. local player = game.Players.LocalPlayer
  26. if player == nil then return end
  27.  
  28.  
  29. enabled = false
  30. local cf = mouse.Hit
  31. local v = cf.lookVector
  32.  
  33. teleportPlayer(cf.p)
  34.  
  35. wait()
  36. enabled = true
  37.  
  38. end
  39.  
  40. function onSelected(mouse)
  41. mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
  42. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  43. end
  44.  
  45. bin.Selected:connect(onSelected)
Advertisement
Add Comment
Please, Sign In to add comment