You cannot actually enable/disable/reset script triggers using features of the database.
You can use a global variable to enable/disable triggers if you write your scripts to check the value of such a variable and exit immediately if the value set indicates that you want triggers disabled.
I routinely write trigger performed scripts in this format:
If [Not $$TriggersOff ]
Put All other script steps here
So if I need to check and see if triggers are enabled, I check the value of this global variable. And resetting $triggers is done with a single set variable step to modify this variable. I don't really see the need for any custom functions here as the script steps are quite simple and straight forward.