Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("monitor_73")
- redstoneSide = "right"
- --don't change anything under this
- local skip = false
- local isOpen = false
- function sleepz()
- sleep(2)
- end
- function touch()
- os.pullEvent("monitor_touch")
- end
- while (true) do
- redstone.setOutput(redstoneSide, isOpen)
- if (isOpen) then
- mon.setBackgroundColor(colors.lime)
- else
- mon.setBackgroundColor(colors.red)
- end
- if (skip) then skip = false else isOpen = false end
- mon.clear()
- if (parallel.waitForAny(sleepz, touch) == 2) then
- skip = true
- isOpen = true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement