BeastmodeJD

Reactor_Controller

Mar 20th, 2020
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. reactor = peripheral.wrap("BigReactors-Reactor_0")
  2. while (true) do
  3.     print("To turn on the reactor remotly please type 'on' and to turn it off type 'off'. To eject waste type 'eject'.")
  4.     input = read();
  5.     if (input == "on") then
  6.         reactor.setActive(true)
  7.     elseif (input == "off") then
  8.         reactor.setActive(false)
  9.     elseif (input == "eject") then
  10.         reactor.doEjectWaste()
  11.     else
  12.         print("Not a valid command!")
  13.         sleep(5)
  14.         os.reboot()
  15.     end
  16.     print("Done!")
  17.     sleep(5)
  18.     os.reboot()
  19. end
Advertisement
Add Comment
Please, Sign In to add comment