function test()
{
while(a == 1)
{
g = 6;
a = 0;
wait(1);
}
}
function run_101()
{
while(1)
{
if(key_space && a == 0)
{
a = 1;
}
wait(1);
}
}
maybe something like that? this time it will do only one loop and it will wont come in this function until you set a = 0; somewhere and press the space bar then.