Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("left")
- while true do
- mon.clear()
- mon.setBackgroundColor(colors.green)
- mon.setCursorPos(2,2)
- mon.write("switch")
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- if side=="left" and (xPos==2 or xPos==3 or xPos==4 or xPos==5 or xPos==6 or xPos==7) and yPos==2 then
- redstone.setOutput("back", true)
- sleep(1)
- redstone.setOutput("back", false)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement