Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("top")
- m.clear()
- m.setBackgroundColor(colors.green)
- m.clear()
- m.setCursorPos(2,3)
- m.write("OPEN")
- function Toggle()
- redstone.setOutput("bottom",true)
- m.clear()
- m.setBackgroundColor(colors.red)
- m.clear()
- m.setCursorPos(2,3)
- m.write("OPENED")
- sleep(2.5)
- redstone.setOutput("bottom",false)
- m.clear()
- m.setBackgroundColor(colors.green)
- m.clear()
- m.setCursorPos(2,3)
- m.write("OPEN")
- end
- while true do
- event,side,x,y = os.pullEvent()
- if event == "monitor_touch" then
- Toggle()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment