Advertisement
OreSeur-

Reactor Startup

Jan 14th, 2021 (edited)
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.49 KB | None | 0 0
  1. -- ****************************************************** --
  2. -- ****************************************************** --
  3. -- **             Reactor Control Start                ** --
  4. -- **                 for Big Reactor                  ** --
  5. -- **              Written by CJ Wayland               ** --
  6. -- ****************************************************** --
  7. -- ****************************************************** --
  8.  
  9. --pastebin get uxt8RnbW startup
  10.  
  11. local args = { ... }
  12. local programName = "reactorControl"
  13. local programCode1 = "MLBY1YPY"
  14. local programCode2 = "4E7QiqMu"
  15. local testProgram = "waz7N1Eh"
  16. local testNew = "rTmdSTWY"
  17.  
  18. --for a on and off code codeVersion = 1
  19. --for a control rod code codeVersion = 2
  20. --for a test code codeVersion = 3
  21. --for a new test codeVersion = 4
  22. local codeVersion = 1
  23.  
  24.  --if it already exists then don't load again
  25.  --load again if asked to update
  26. if (fs.exists(programName) == false or args[1] == "update") then
  27.     shell.run("rm " .. programName)
  28.     if(codeVersion == 1) then
  29.         shell.run("pastebin get " .. programCode1 .. " " .. programName)
  30.     elseif(codeVersion == 2) then
  31.         shell.run("pastebin get " .. programCode2 .. " " .. programName)
  32.     elseif(codeVersion == 3) then
  33.         shell.run("pastebin get " .. testProgram .. " " .. programName)
  34.     elseif(codeVersion == 4) then
  35.         shell.run("pastebin get " .. testNew .. " " .. programName)
  36.     end
  37. end
  38.  
  39. print("Starting Reactor Program")
  40. shell.run(programName)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement