default { state_entry() { llSetTimerEvent(1); } timer() { vector sun = llGetSunDirection(); if (sun.z < 0) state night; llLoopSound("night", 1.0); } } state night { state_entry() { llSetTimerEvent(60); } timer() { vector sun = llGetSunDirection(); if (sun.z > 0) state default; llLoopSound("day", 1.0); } touch_start(integer total_number) { llResetScript(); } }