Advertisement
Lladnar45

Battery Switch Over

Oct 4th, 2022
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.91 KB | None | 0 0
  1. -- Switch From Battery to Turbines To No Power
  2. monitor = peripheral.wrap("right")
  3. while true do
  4.     term.clear()
  5.     term.setCursorPos(1,1)
  6.     print("Boot Successfully")
  7.     os.sleep(3)
  8.     write("Checking Power Sources")
  9.     os.sleep(2)
  10.     write(".")
  11.     os.sleep(2)
  12.     write(".")
  13.     os.sleep(2)
  14.     write(".")
  15.     print("Power Sources Found:")
  16.     print("Generator: Successfully Connected")
  17.     os.sleep(2)
  18.     print("Backup Power: Successfully Connected")
  19.     os.sleep(2)
  20.     print("Fusion Power: Successfully Connected")
  21.     os.sleep(2)
  22.     print("Fulmination Generators: Successfully Connected")
  23.     os.sleep(2)
  24.     print("Reactor: Successfully Connected")
  25.     os.sleep(3)
  26.     print("Welcome back, ADMIN, what would you like to do?")
  27.     monitor.setBackgroundColor(colors.black)
  28.     monitor.setCursorPos(1,7)
  29.     monitor.setTextScale(1.5)
  30.     monitor.write("Currently Powered By Generators")
  31.     redstone.setBundledOutput("back", colors.red)
  32.     poweredby = "Gen"
  33.     input = read()
  34.     if input == "Switch" or "switch" or "s" then
  35.         print("Which PPS (Primary Power Source) Would You Prefer To Use")
  36.         input = read()
  37.         if input == "Gen" or "G" or "gen" or "g" or "Generator" or "generator" and poweredby != "Gen" then
  38.             write("Switching PPS to Generator Mode")
  39.             os.sleep(2)
  40.             monitor.clear()
  41.             monitor.setBackgroundColor(colors.black)
  42.             monitor.setCursorPos(1,7)
  43.             monitor.setTextScale(1.5)
  44.             monitor.write("Currently Powered By Generators")
  45.             write(".")
  46.             os.sleep(2)
  47.             redstone.setBundledOutput("back", colors.red)
  48.             write(".")
  49.             os.sleep(2)
  50.             write(".")
  51.             os.sleep(1)
  52.             print("PPS Successfully Switched")
  53.         end
  54.         if input == "Gen" or "G" or "gen" or "g" or "Generator" or "generator" and poweredby == "Gen" then
  55.             print("The PPS is already set to Generator Mode")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement