Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- m = peripheral.wrap("front")
- term.redirect(m)
- m.clear()
- m.setTextColor(colors.purple)
- m.setCursorPos(1,1)
- m.write("Reator")
- m.setTextColor(colors.green)
- m.setCursorPos(1,3)
- m.write("On")
- m.setTextColor(colors.red)
- m.setCursorPos(1,5)
- m.write("Off")
- local event, side, x, y = os.pullEvent("monitor_touch")
- if x == 1 and y == 3 then
- m.clear()
- m.setTextColor(colors.purple)
- m.setCursorPos(1,1)
- m.write("Reator")
- m.setTextColor(colors.green)
- m.setCursorPos(1,3)
- m.write("On")
- m.setTextColor(colors.red)
- m.setCursorPos(1,5)
- m.write("Off")
- m.setCursorPos(5,3)
- m.setTextColor(colors.yellow)
- m.write("X")
- sleep(10)
- end
- if x == 1 and y == 5 then
- m.clear()
- m.setTextColor(colors.purple)
- m.setCursorPos(1,1)
- m.write("Reator")
- m.setTextColor(colors.green)
- m.setCursorPos(1,3)
- m.write("On")
- m.setTextColor(colors.red)
- m.setCursorPos(1,5)
- m.write("Off")
- m.setCursorPos(5,5)
- m.setTextColor(colors.yellow)
- m.write("X")
- sleep(10)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement