///////////////////////////////////////
//Script to switch between two things//
///////////////////////////////////////
integer switch = 1; // int switch
one() // first function
{
switch = 2; // switch to two
llSay(0, "Switched to Two."

}
two() // second function
{
switch = 1; // switch back to one
llSay(0, "Switched to One."

}
default
{
state_entry()
{
while (TRUE)
{
if (switch = 1) {one();} // if switch is 1, go to function one
if (switch = 2) {two();} // if switch is 2, go to function two
}
}
}