The clicker script automatically attacks every 50 ms (that's as fast as the game will register clicks) while in a battle. It also clicks during dungeon encounters to open chests and begin boss fights.