Hi, that should work:
Code:function onlyFiveSeconds() { self endon("fiveSeconds"); while (1) { self waittill("EVENT"); self iprintlnbold("Hello in less then 5 seconds!"); } } function killThread() { wait 5; self notify("fiveSeconds"); } spawnplayer() // some random function { self onlyFiveSeconds() self killThread(); }