Most scripts are written in Lua (for use with AutoTouch or similar automation apps) or as macros for PC-based emulators (e.g., BlueStacks with auto-clickers). They rely on screen pixel recognition, color detection, or memory manipulation (less common due to security).
"Nice script, Silas," the message read. "But a farm without a farmer is just a desert of data." The Harvest Moon hayday bot script