Enable and Disable Gateway Scripts through system function?

Is there a system function or some other method of enabling or disabling a script within a project? I am aware I could use a boolean and IF statement but though I would check for something “built-in” that would do this.

Thanks

Tag events have an enable checkbox. Everything else you are on your own.