Advertisement
9551

Untitled

May 23rd, 2021
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. local b = require "button"
  2. local m = peripheral.wrap("right") -- attaches a monitor on the right side!
  3. local redstoneside = "left"
  4. m.setCursorPos(1,1)
  5. m.write("on")
  6. m.setCursorPos(1,2)
  7. m.write("off")
  8. while true do
  9. local x = {os.pullEvent("monitor_touch")}
  10. if b.button(x,1,1,2,1) == true then
  11. rs.setOutput(redstoneside,"true")
  12. end
  13. if b.button(x,1,2,3,1) == true then
  14. rs.setOutput(redstoneside,"false)
  15. end
  16. end
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement