Advertisement
Guest User

Teleport

a guest
Oct 19th, 2019
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.16 KB | None | 0 0
  1. player = game.Players.LocalPlayer
  2. mouse = player:GetMouse()
  3. clicked = 1
  4.  
  5. a, b, c = 1, 2, 3
  6. a2, b2, c2 = 1, 2, 3
  7.  
  8. mouse.KeyDown:connect(function(key)
  9.     if key == "e" then
  10.     Set()
  11.     elseif (key == "q" and clicked == 1) then
  12.     One()
  13.     elseif (key == "q" and clicked == 2) then
  14.     Two()
  15.     end
  16. end)
  17.  
  18. function Set()
  19.         player = game.Players.LocalPlayer
  20.         character = player.Character
  21.         hmndrootpart = character:FindFirstChild("HumanoidRootPart")
  22.         a = hmndrootpart.Position.X
  23.         b = hmndrootpart.Position.Y
  24.         c = hmndrootpart.Position.Z
  25.         clicked = 1
  26. end
  27.  
  28. function One()
  29.         hmndrootpart = character:FindFirstChild("HumanoidRootPart")
  30.         a2 = hmndrootpart.Position.X
  31.         b2 = hmndrootpart.Position.Y
  32.         c2 = hmndrootpart.Position.Z
  33.         hmndrootpart.CFrame = CFrame.new(Vector3.new(a, b, c))
  34.         clicked = 2
  35. end
  36.  
  37. function Two()
  38.         player = game.Players.LocalPlayer
  39.         character = player.Character
  40.         print("two")
  41.         hmndrootpart = character:FindFirstChild("HumanoidRootPart")
  42.         hmndrootpart.CFrame = CFrame.new(Vector3.new(a2, b2, c2))
  43.         clicked = 1
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement