Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local countdown = 120
- local mon = peripheral.wrap("top")
- mon.setTextScale(2)
- while countdown > 0 do
- countdown = countdown - 1
- local minutes = math.floor(countdown / 60)
- local seconds = string.format("%02d", countdown % 60)
- mon.clear()
- mon.setCursorPos(1,1)
- mon.write(minutes..":"..seconds)
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement