you can do a flag like this:
first put a flag (that isnt used by the game) and at the beginning of the script, check its status. if it's off, continue the script normally, if its on, skip the script.
and at the end of the script, set it to on, so it only happens once.
For example (not actual...