The reason for making this script is because if someone crashes your server, as I am sure you have found this out, it goes into what I call a "crash-loop". Where it will try to restart, but after restarting it will only crash again by itself.
I figured out a way around this.
By using this...