except KeyboardInterrupt: print("\nStopped by user.")

# You might want to add more actions here, like moving the character # pyautogui.press('w') # Example: Forward movement

# Hypothetical farm function while True: # Example action: Left mouse click pyautogui.click(button='left') time.sleep(1) # Wait 1 second between actions