Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local x, y, xsize, ysize
- local idChannel = 125
- local msg = "close"
- term.setBackgroundColor(colors.red)
- term.clear()
- modem = peripheral.wrap("bottom")
- while true do
- event, side, xpos, ypos = os.pullEvent("monitor_touch")
- if msg == "close" then
- msg = "open"
- term.setBackgroundColor(colors.green)
- term.clear()
- elseif msg == "open" then
- msg = "close"
- term.setBackgroundColor(colors.red)
- term.clear()
- end
- modem.transmit(idChannel,idChannel,msg)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement