SnowyShiro

Ctrl+ClickTP

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