Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --ID : 4
- local mon = peripheral.wrap("back")
- rednet.open("right")
- while true do
- local event, button, xPos, yPos = os.pullEvent("monitor_touch")
- --print(xPos..yPos)
- if (xPos > 2 and xPos < 8) and (yPos > 4 and yPos < 7) then
- print("> On")
- rednet.send(5,"On")
- rednet.send(2,"Man")
- elseif (xPos > 10 and xPos < 18) and (yPos > 4 and yPos < 7) then
- print("> Auto")
- rednet.send(5,"Off")
- rednet.send(2,"Auto")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement