Advertisement
squidingtin

Q clip & E Teleport

Apr 21st, 2019
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. player = game.Players.LocalPlayer
  2. mouse = player:GetMouse()
  3. function onKeyPress(inputObject, gameProcessedEvent)
  4.     if inputObject.KeyCode == Enum.KeyCode.E then
  5.         local pos = mouse.Hit+Vector3.new(0,2.5,0)
  6.                 pos = CFrame.new(pos.X,pos.Y,pos.Z)
  7.                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = pos
  8.     elseif inputObject.KeyCode == Enum.KeyCode.Q then
  9.         T = mouse.Target
  10.     if T.CanCollide == false then
  11.         T.CanCollide = true
  12.         print(T.CanCollide)
  13.     else
  14.         T.CanCollide = false
  15.     end  
  16.  end
  17. end
  18.  
  19. game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement