I'm not the most efficient of programmers, but one way to do it is:
code:
var ScriptEnabled = false;
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
if(Message == "start!") ScriptEnabled = true;
if(Message == "stop!") ScriptEnabled = false;
}
function <your function>(<your parameters>) {
if(ScriptEnabled) {
... //Code goes in here
}
}
You will need to repeat the last function for every function in your script.