Guest User

Untitled

a guest
Dec 21st, 2017
7,593
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. EnablePrimaryMouseButtonEvents (true)
  2. function OnEvent(event, arg, family)
  3. if (event == "PROFILE_ACTIVATED") then
  4. EnablePrimaryMouseButtonEvents(true)
  5. click = 0
  6. end
  7.  
  8. if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
  9. recoil = not recoil
  10. end
  11.  
  12. if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
  13. click = 1
  14. Click()
  15. end
  16.  
  17. if (event == "M_RELEASED" and arg == 3) then
  18. Click()
  19. end
  20.  
  21. if (event == "MOUSE_BUTTON_RELEASED" and arg == 1) then
  22. Stopclick()
  23. end
  24. end
  25.  
  26. function Click()
  27. PressAndReleaseMouseButton(1)
  28. Sleep (7)
  29. MoveMouseRelative(0, 2)
  30. if click == 0 then
  31. Stopclick()
  32. elseif click == 1 then SetMKeyState(3)
  33. else Stopclick()
  34. end
  35. end
  36. function Stopclick()
  37. click = 0
  38. end
Add Comment
Please, Sign In to add comment