DraRex368

ROBCO Secure

Feb 7th, 2026
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.91 KB | None | 0 0
  1. --========================================================--
  2. --   ROBCO INDUSTRIES (TM) UNIFIED OPERATING SYSTEM
  3. --   SECURE FUNCTIONS MODULE — UNLOCKED BY HACKING
  4. --========================================================--
  5.  
  6. local secure = {}
  7.  
  8. local ui = require("robco/ui")
  9. local speaker = require("robco/speaker")
  10.  
  11. ------------------------------------------------------------
  12. -- MENU OPTIONS (DEFAULT FALLOUT STYLE)
  13. ------------------------------------------------------------
  14. local OPTIONS = {
  15.     "UNLOCK DOOR",
  16.     "DISABLE TURRETS",
  17.     "ACTIVATE SECURITY PROTOCOLS",
  18.     "DOWNLOAD LOGS",
  19.     "SYSTEM DIAGNOSTICS",
  20.     "SHUTDOWN TERMINAL"
  21. }
  22.  
  23. ------------------------------------------------------------
  24. -- ACTION HANDLERS
  25. ------------------------------------------------------------
  26. local function action_unlockDoor()
  27.     ui.drawHeader()
  28.     term.setCursorPos(3, 10)
  29.     print("DOOR UNLOCKED.")
  30.     sleep(1.5)
  31. end
  32.  
  33. local function action_disableTurrets()
  34.     ui.drawHeader()
  35.     term.setCursorPos(3, 10)
  36.     print("TURRET SYSTEMS DISABLED.")
  37.     sleep(1.5)
  38. end
  39.  
  40. local function action_activateSecurity()
  41.     ui.drawHeader()
  42.     term.setCursorPos(3, 10)
  43.     print("SECURITY PROTOCOLS ACTIVATED.")
  44.     sleep(1.5)
  45. end
  46.  
  47. local function action_downloadLogs()
  48.     ui.drawHeader()
  49.     term.setCursorPos(3, 10)
  50.     print("DOWNLOADING LOGS...")
  51.     sleep(1.5)
  52.     term.setCursorPos(3, 11)
  53.     print("TRANSFER COMPLETE.")
  54.     sleep(1.5)
  55. end
  56.  
  57. local function action_diagnostics()
  58.     ui.drawHeader()
  59.     term.setCursorPos(3, 10)
  60.     print("RUNNING SYSTEM DIAGNOSTICS...")
  61.     sleep(1.5)
  62.     term.setCursorPos(3, 11)
  63.     print("ALL SYSTEMS FUNCTIONAL.")
  64.     sleep(1.5)
  65. end
  66.  
  67. local function action_shutdown()
  68.     ui.drawHeader()
  69.     term.setCursorPos(3, 10)
  70.     print("SHUTTING DOWN...")
  71.     sleep(2)
  72.     os.shutdown()
  73. end
  74.  
  75. ------------------------------------------------------------
  76. -- OPTION DISPATCH TABLE
  77. ------------------------------------------------------------
  78. local ACTIONS = {
  79.     [1] = action_unlockDoor,
  80.     [2] = action_disableTurrets,
  81.     [3] = action_activateSecurity,
  82.     [4] = action_downloadLogs,
  83.     [5] = action_diagnostics,
  84.     [6] = action_shutdown
  85. }
  86.  
  87. ------------------------------------------------------------
  88. -- SECURE MENU
  89. ------------------------------------------------------------
  90. function secure.openMenu()
  91.     while true do
  92.         ui.drawHeader()
  93.         term.setCursorPos(3, 8)
  94.         print("SECURE FUNCTIONS MENU:")
  95.  
  96.         local y = 10
  97.         for i, opt in ipairs(OPTIONS) do
  98.             term.setCursorPos(3, y)
  99.             print(i .. ". " .. opt)
  100.             y = y + 1
  101.         end
  102.  
  103.         ui.prompt()
  104.         local choice = tonumber(read())
  105.  
  106.         if choice and ACTIONS[choice] then
  107.             ACTIONS[choice]()
  108.         else
  109.             ui.statusLine("INVALID SELECTION")
  110.             sleep(1)
  111.         end
  112.     end
  113. end
  114.  
  115. return secure
Advertisement
Add Comment
Please, Sign In to add comment