Advertisement
HowToRoblox

InputDetector

Jul 17th, 2021
2,348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. local uis = game:GetService("UserInputService")
  2.  
  3. local mouse = game.Players.LocalPlayer:GetMouse()
  4.  
  5.  
  6. local re = game.ReplicatedStorage:WaitForChild("IceMagicActivated")
  7.  
  8.  
  9.  
  10. uis.InputBegan:Connect(function(inp, processed)
  11.  
  12.     if processed then return end
  13.  
  14.  
  15.     if inp.KeyCode == Enum.KeyCode.G then
  16.  
  17.         re:FireServer(mouse.Hit)
  18.     end
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement