Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s=0
- m=0
- start=false
- on=true
- mon = peripheral.wrap("top")
- mon.setTextScale(3)
- while on == true do
- if redstone.getInput("right") == true
- then
- s = ( s + 1 )
- if s > 59
- then
- s = 0
- m = (m + 1)
- end
- end
- if redstone.getInput("left") == true
- then
- s = 0
- m = 0
- end
- mon.clear()
- mon.setCursorPos(2,2)
- mon.write("Time lapse:")
- mon.setCursorPos(3,3)
- if s < 10
- then
- mon.write( "0" .. m .. ":0".. s)
- else
- mon.write( "0" .. m ..":" .. s)
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement