-- LUA Script - precede every function and global member with lowercase name of script + '_main' -- Default script - does nothing. g_timerExpired = false function countdown_init( e ) end local runTimer = true local tenMinuteTimer = 10 * 60 local timeLastPass = nil function countdown_main( e ) TextColor( 5, 95, 5, os.date( "Time Left %X", tenMinuteTimer ) , 252, 3, 47 ) if not runTimer then return end local timeNow = g_Time if timeLastPass == nil then timeLastPass = timeNow return end local timeDiff = timeNow - timeLastPass if timeDiff > 1000 then tenMinuteTimer = tenMinuteTimer - 1 timeLastPass = timeNow - ( timeDiff - 1000 ) end if tenMinuteTimer <= 0 then g_timerExpired = true runTimer = false end end