Advertisement
7889

Ctrl+Click Teleport

Aug 3rd, 2023
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | Gaming | 0 0
  1. local UIS = game:GetService("UserInputService")
  2. local Player = game.Players.LocalPlayer
  3. local Mouse = Player:GetMouse()
  4. function GetCharacter()
  5. return game.Players.LocalPlayer.Character
  6. end
  7. function Teleport(pos)
  8. local Char = GetCharacter()
  9. if Char then
  10. Char:MoveTo(pos)
  11. end
  12. end
  13. UIS.InputBegan:Connect(function(input)
  14. if input.UserInputType == Enum.UserInputType.MouseButton1 and UIS:IsKeyDown(Enum.KeyCode.LeftControl) then
  15. Teleport(Mouse.Hit.p)
  16. end
  17. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement