Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function countdown()
- monitor.clear()
- monitor = peripheral.wrap("left")
- monitor.setCursorPos(1,1)
- local m = 59
- local s = 60
- repeat
- if m > 0 then
- if s > 0 then
- s = s - 1
- else
- j = 59
- m = m - 1
- end
- else
- if s > 0 then
- s = s - 1
- end
- end
- monitor.setCursorPos(1,1)
- monitor.write("La turtle parte tra:")
- monitor.setCursorPos(2,1)
- monitor.write(m..":"..s)
- until m == 0 and s == 60
- sleep(1)
- monitor.clear()
- monitor.setCursorPos(4,1)
- monitor.write("Turtle partita")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement