Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.wrap("bottom")
- while true do
- monitor.setBackgroundColor(colors.green)
- monitor.setCursorPos(2,2)
- monitor.write("Plant")
- monitor.setCursorPos(2,3)
- monitor.write(" ")
- monitor.setCursorPos(2,4)
- monitor.write("Seeds")
- local event, side, xPos, yPos = os.pullEvent("monitor_touch")
- if ( (xPos >= 1) and (xPos <= 7) and ( (yPos >= 2) or (yPos <= 4) ) ) then
- shell.run("plantSeeds")
- end
- monitor.setBackgroundColor(colors.black)
- monitor.clear()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement