local s = peripheral.wrap('speaker_2')
local mc = peripheral.wrap('monitor_2')
local ml = peripheral.wrap('monitor_1')
local mr = peripheral.wrap('monitor_0')
local tl = peripheral.wrap('BigReactors-Turbine_0')
local tr = peripheral.wrap('BigReactors-Turbine_1')
local cb = peripheral.wrap('chatBox_1')
s.speak("System Engaged")
mc.setBackgroundColor(colors.green)
ml.setBackgroundColor(colors.red)
ml.clear()
ml.setCursorPos(1,1)
mr.setBackgroundColor(colors.red)
mr.clear()
mr.setCursorPos(1,1)
mc.clear()
mc.setCursorPos(1,1)
tr.setActive(false)
tl.setActive(false)
while true do
mc.clear()
ml.clear()
mr.clear()
local al = rs.getInput("left")
local input = io.read()
function airlock()
mc.setTextColor(32768)
if al == true then
mc.setTextScale(3)
mc.write(al)
end
if al == false then
mc.setTextScale(3)
mc.write("Unsealed")
end
end
airlock()
if input == "restart" then
s.speak("restarting")
mc.setBackgroundColor(colors.red)
off()
sleep(5)
os.reboot()
break
end
function off()
mc.setBackgroundColor(colors.red)
mc.clear()
ml.setBackgroundColor(colors.red)
ml.clear()
mr.setBackgroundColor(colors.red)
mr.clear()
end
if input == "shutdown" then
s.speak("Shutting Down")
off()
sleep(0)
break
end
if input == "startup left" then
ml.setBackgroundColor(colors.green)
ml.clear()
tl.setActive(true)
end
if input == "startup right" then
mr.setBackgroundColor(colors.green)
mr.clear()
tr.setActive(true)
end
if input == "shutoff left" then
ml.setBackgroundColor(colors.red)
ml.clear()
tl.setActive(false)
end
if input == "shutoff right" then
mr.setBackgroundColor(colors.red)
mr.clear()
tr.setActive(false)
end
if input == "?" then
print()
print("Commands")
print()
print("?")
print("Shutdown")
print("Restart")
print("Startup Left")
print("Startup Right")
print("Shutoff Left")
print("Shutoff Right")
end
end