Advertisement
182days

Piano Tiles Bot

Dec 8th, 2023
773
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.68 KB | None | 0 0
  1. #Piano Tiles Bot
  2. #https://www.crazygames.com/game/magic-piano-tiles
  3. from pyautogui import *
  4. import pyautogui
  5. import time
  6. import keyboard
  7. import random
  8. import win32api, win32con
  9.  
  10. def click(x,y):
  11.     win32api.SetCursorPos((x,y))
  12.     win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0)
  13.     time.sleep(0.09)
  14.     win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0)
  15.    
  16. while keyboard.is_pressed('q') == False:
  17.     if pyautogui.pixel(415, 350)[0] == 0:
  18.         click(415, 350)
  19.     if pyautogui.pixel(483, 350)[0] == 0:
  20.         click(483, 350)
  21.     if pyautogui.pixel(562, 350)[0] == 0:
  22.         click(562, 350)
  23.     if pyautogui.pixel(623, 350)[0] == 0:
  24.         click(623, 350)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement