Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon1 = peripheral.wrap("back")
- local status = "Off"
- local side = "left"
- function Time()
- mon1.clear()
- mon1.setCursorPos(1,1)
- mon1.write(textutils.formatTime(os.time(),true))
- mon1.setCursorPos(1,2)
- mon1.write("Tag ")
- mon1.write(textutils.serialize(os.day()),number)
- mon1.setCursorPos(1,3)
- mon1.write(status)
- end
- while true doTime()
- if redstone.getInput(side) then
- status = "ON"
- redstone.setOutput("bottom", true)
- sleep(1)
- redstone.setOutput("bottom", false)
- else
- status = "Off"
- sleep(1)
- end
- end
Advertisement