Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- rednet.open("left")
- m = peripheral.wrap("front")
- term.redirect(m)
- m.clear()
- function Normal()
- 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")
- end
- function Danger()
- m.clear()
- m.setTextColor(colors.purple)
- m.setCursorPos(1,1)
- m.write("Reator")
- m.setTextColor(colors.red)
- m.setCursorPos(1,3)
- m.write("DANGER")
- m.setTextColor(colors.red)
- m.setCursorPos(1,5)
- m.write("Off")
- end
- Normal()
- event, side, x, y = os.pullEvent("monitor_touch")
- if x > 0 and x < 4 and y == 3 and code == 1 then
- 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(0.2)
- end
- if x > 0 and x < 3 and y == 5 then
- 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(0.2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement