nij55

E 2 tp

Mar 20th, 2020
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. -- getting needed locals
  2. local p = game.Players.LocalPlayer
  3. local mouse = p:GetMouse()
  4. local char = p.Character
  5. -- click and keydown functions
  6. local enabled = false
  7.  
  8. mouse.KeyDown:connect(function(key)
  9.     key = key:lower()
  10.     if key == "e" then
  11.         enabled = true
  12.     end
  13. end)
  14.  
  15. mouse.KeyUp:connect(function(key)
  16.     key = key:lower()
  17.     if key == "e" then
  18.         enabled = false
  19.     end
  20. end)
  21.  
  22. mouse.Button1Down:connect(function()
  23.     if char and enabled == true then
  24.         char.HumanoidRootPart.CFrame = mouse.Hit + Vector3.new(0,7,0)
  25.     end
  26. end)
Add Comment
Please, Sign In to add comment