Lonely_Wanderer

magic

Apr 12th, 2021
544
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pyautogui
  2. import keyboard
  3.  
  4. w,h = pyautogui.size()
  5. w1 = w//2
  6. w=w//2
  7. h=h//2
  8.  
  9. def magic():
  10.     global w,h
  11.     while not keyboard.is_pressed("f"):
  12.         if keyboard.is_pressed("LEFT"):
  13.             w = w - 5
  14.             pyautogui.moveTo(w,h)
  15.             print("width: " + str(w-w1))
  16.             while keyboard.is_pressed("LEFT"): pass
  17.         if keyboard.is_pressed("RIGHT"):
  18.             w = w + 5
  19.             print("width: " + str(w-w1))
  20.             pyautogui.moveTo(w,h)
  21.             while keyboard.is_pressed("RIGHT"): pass
  22.        
  23.  
  24.  
  25. magic()
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×