Advertisement
Samotage820

cc reception computer

Aug 5th, 2021 (edited)
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.14 KB | None | 0 0
  1. local function reset()
  2.     term.clear()
  3.     term.setCursorPos(1,1)
  4.     term.setTextColor(colors.lightGray)
  5.     print("-- SECURITY TERMINAL A5 --\n")
  6.     term.setTextColor(colors.white)
  7. end
  8.  
  9. while true do
  10.     reset()
  11.     print("Please enter password:")
  12.     input = read("*")
  13.     if input == "xen" then
  14.         reset()
  15.         textutils.slowPrint("Login successful. Welcome Operator Calhoun.\nSigned in personnel:\n")
  16.        
  17.         textutils.tabulate(
  18.             colors.lightGray, {"USER", "CLEARANCE", "OFFICE", "PASSWORD"},
  19.             colors.white, {"Calhoun", "SEC", "SEC-A5", "xen"},
  20.             colors.white, {"Freeman", "STAFF", "-", "-"},
  21.             colors.white, {"Johnson", "ADMIN", "-", "-"},
  22.             colors.white, {"Kleiner", "STAFF", "-", "-"},
  23.             colors.white, {"Mossman", "ADMIN", "-", "-"},
  24.             colors.white, {"Vance", "STAFF", "-", "-"}
  25.         )
  26.        
  27.         os.sleep(60)
  28.         reset()
  29.         textutils.slowPrint("SESSION TIMEOUT. Log in again to continue.")
  30.         os.sleep(3)
  31.     else
  32.         textutils.slowPrint("Password incorrect. Please try again.")
  33.         os.sleep(1)
  34.     end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement