local counter = 0 function frame() while counter < 100 do counter = counter + 1 if counter == 50 then log.write("Halfway there") end end local x = counter gfx.fillRect(0, 0, x, x, color.indigo) end