No. You cannot modify the script. It's a built-in script called "crossing.gs", and I have tried to modify it. If you do so, the script will not run at all!
Boat's ATLS system works great! And use the BNSF50 (for USA) crossings, you will find that there is a new version that allows you to set the delay from lights flashing to gates closing, when the bells ring, etc.
I use ATLS in the 2-direction 4 trigger system, but I often use more than the required 4 triggers, placing additional triggers at different distances from the crossing, and setting train priority for them. This way, if I have a train that is moving slowly, I set its priority to 2, and it will only activate the crossing when the train hits the priority 2 triggers. If it's a faster train, I set priority to 1, and it activates the more distant triggers.
The only thing I do not like about the ATLS system is that it cannot detect the direction of the train, just that a trigger has been hit. So, if you stop the train on the crossing, or before it reaches the crossing, and then reverse the train, you will get odd results.
I am hoping to work on Boat's script and come up with a way to detect train direction. That would pretty much make the system perfect!
But don't hold your breath for this.
FW