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