Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local b = require "button"
- local m = peripheral.wrap("right") -- attaches a monitor on the right side!
- local redstoneside = "left"
- m.setCursorPos(1,1)
- m.write("on")
- m.setCursorPos(1,2)
- m.write("off")
- while true do
- local x = {os.pullEvent("monitor_touch")}
- if b.button(x,1,1,2,1) == true then
- rs.setOutput(redstoneside,"true")
- end
- if b.button(x,1,2,3,1) == true then
- rs.setOutput(redstoneside,"false)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement