This script is great, but it has a few problems:
1. When it runs away from combat, it stays in the location it ran to. Or, if it misclicks the screen and clicks outside of the gate, it doesn't run back to its previous position.
2. It would be much better if the script would click on the "X" straight away and not drag the mouse there so it would run much quicker and better.
3. Needs better runtime, it runs for like 2 hours then messes up.
Otherwise... It's great but please fix those ^^^.