Terminate a running script in gateway

The easiest way is absolutely to restart the gateway.

That said, some changes we made in the 8.X line might make this possible, depending on your exact version: