Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local capacitor = "back"
- local reactor = "left"
- local lavaGenerator = "right"
- function checkPower()
- rs.getInput(capacitor)
- end
- function goodCheck()
- term.clear()
- term.setCursorPos(1,1)
- print("capacitor good")
- print("reactor offline")
- print("lava offline")
- rs.setOutput(reactor,true)
- rs.setOutput(lavaGenerator,false)
- end
- function powerReactor()
- rs.setOutput(reactor,false)
- term.clear()
- term.setCursorPos(1,1)
- print("capacitor low charge")
- print("Reactor Online")
- print("lavaGenerators offline")
- end
- function powerLava()
- term.clear()
- term.setCursorPos(1,1)
- print("capactor nearing Depletion!")
- print("EMERGANCY!")
- print("reactor: malfunction detected")
- print("lava generators: online")
- rs.setOutput(lavaGenerator,true)
- end
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("booting Power Management System v .01")
- print(" B.P.M.S. MADE BY TIB TIB INDUSTRIES ")
- sleep(2)
- if checkPower > "4" then
- goodCheck
- else
- os.sleep(1)
- end
- if checkPower <= "4" then
- powerReactor
- os.sleep(1)
- else
- os.sleep(1)
- end
- if checkPower < "2" then
- powerLava
- os.sleep(1)
- else
- os.sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment