Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- m = peripheral.wrap("top")
- m.setTextScale(2)
- m.setCursorPos(1,1)
- m.set"back"groundColor(colors.green)
- m.write(" ON ")
- m.setCursorPos(1,2)
- m.set"back"groundColor(colors.red)
- m.write(" OFF")
- while true do
- event,side,x,y = os.pullEvent()
- if event == "monitor_touch" then
- if x == 1 and y == 1 then
- redstone.setOutput("back",true)
- end
- if x == 2 and y == 1 then
- redstone.setOutput("back",true)
- end
- if x == 3 and y == 1 then
- redstone.setOutput("back",true)
- end
- if x == 4 and y == 1 then
- redstone.setOutput("back",true)
- end
- if x == 1 and y == 2 then
- redstone.setOutput("back",false)
- end
- if x == 2 and y == 2 then
- redstone.setOutput("back",false)
- end
- if x == 3 and y == 2 then
- redstone.setOutput("back",false)
- end
- if x == 4 and y == 2 then
- redstone.setOutput("back",false)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment