Basic defensive/autopilot helper for slither.io
This userscript provides a basic defensive autopilot for Slither.io.
It attempts to detect nearby snakes and automatically steers your snake away from danger by sending simulated mouse movements. The goal is not to play aggressively or farm mass, but to help avoid accidental collisions.
Because the internal variables of the Slither.io client change frequently, this script is built as a template. It includes multiple fallback methods to read player and snake positions, but depending on the current game version you may need to adjust a few variable names inside the script (mainly in getGameObjects() and worldToCanvas()).
Features include:
Automatic defensive steering
Simple threat detection
Configurable safe distance, sensitivity, and loop interval
Optional debug overlay
Lightweight and easy to modify
This script is intended for educational and experimental purposes. Use it responsibly and be aware that automated gameplay may not be allowed by the game's terms of service.