ahmed0saber

A bot for clicker heroes in Python

May 5th, 2021
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. #A bot for this game https://www.kongregate.com/games/Playsaurus/clicker-heroes
  2. from pyautogui import *
  3. import pyautogui
  4. import time
  5. import keyboard
  6. import random
  7. import win32api ,win32con
  8.  
  9. def click(x,y):
  10.     win32api.SetCursorPos((x,y))
  11.     time.sleep(0.02)
  12.     win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0)
  13.     time.sleep(0.02)
  14.     win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0)
  15. time.sleep(2)
  16. while keyboard.is_pressed('q') == False:
  17.     click(830, 400)
  18.  
Advertisement
Add Comment
Please, Sign In to add comment