jassm11

Untitled

Sep 30th, 2018
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. local Player = game:GetService("Players").LocalPlayer
  2.  
  3. local Char = Player.Character
  4. local Event = Char:WaitForChild("UserInput_Event")
  5.  
  6. local UIS = game:GetService("UserInputService")
  7.  
  8. local input = function(io,a)
  9. if a then return end
  10. local io = {KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}
  11. Event:FireServer(io)
  12. end
  13. UIS.InputBegan:Connect(input)
  14. UIS.InputEnded:Connect(input)
  15. local Changed = false
  16. local Mouse = Player:GetMouse()
  17. local h,t = Mouse.Hit,Mouse.Target
  18. while wait(1/30) do
  19. if h~=Mouse.Hit or t~=Mouse.Target then
  20. Event:FireServer({isMouse=true,Target=Mouse.Target,Hit=Mouse.Hit})
  21. h,t=Mouse.Hit,Mouse.Target
  22. end
  23. end
Add Comment
Please, Sign In to add comment