Advertisement
Comi1212

My code

Dec 20th, 2020
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. from pynput.mouse import Controller
  2. from pynput import mouse
  3. import time
  4. import random
  5.  
  6.  
  7. mouse = Controller()
  8.  
  9.  
  10. def on_click(x, y, button, pressed):
  11. btn = button.name
  12.  
  13. if btn == 'left':
  14. if pressed:
  15. mouse.click(Button.left)
  16. time.sleep(random.uniform(0.01,0.05))
  17. mouse.click(Button.left)
  18. time.sleep(random.uniform(0.055,0.095))
  19.  
  20.  
  21.  
  22.  
  23. with mouse.Listener(
  24. on_click=on_click
  25. ) as listener:
  26. listener.join()
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement