Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. function OnEvent(event, arg)
  2. OutputLogMessage("event = %s, arg = %d\n", event, arg)
  3. if (event == "PROFILE_ACTIVATED") then
  4. EnablePrimaryMouseButtonEvents(true)
  5. elseif event == "PROFILE_DEACTIVATED" then
  6. ReleaseMouseButton(2) -- to prevent it from being stuck on
  7. end
  8. if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
  9. recoil = not recoil
  10. if (recoil == true) then
  11. OutputLogMessage("Recoil is On\n")
  12. else
  13. OutputLogMessage("Recoil is Off\n")
  14. end
  15. end
  16. if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
  17. if recoil then
  18. repeat
  19.  
  20. MoveMouseRelative(-5, 18)
  21. Sleep(10)
  22. MoveMouseRelative(5, -18)
  23. Sleep(21)
  24.  
  25. until not IsMouseButtonPressed(1)
  26.  
  27. end
  28. end
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement