Advertisement
Guest User

startup

a guest
Jul 19th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1. term.clear()
  2. textutils.slowPrint("Loading", 2)
  3. textutils.slowPrint("===========================", 10)
  4. sleep(1)
  5. textutils.slowPrint("Umbrealla Computer OS", 5)
  6. textutils.slowPrint("Please Input", 5)
  7. local valid
  8. local accounts = {
  9.   ["John"] = "Ada",
  10.   ["Lachie"] = "Test"
  11. }
  12. sleep(4)
  13. term.setCursorPos(1, 6)
  14. print("Login: ")
  15. write("> ")
  16. local input_user = read()
  17.  
  18. print("Password: ")
  19. write("> ")
  20. local input_pass = read("*")
  21.  
  22. for valid_user, valid_pass in pairs(accounts) do
  23.   if (input_user == valid_user and input_pass == valid_pass) then valid = true end
  24. end
  25.  
  26.   if valid then
  27.   print("Accessing")
  28.   textutils.slowPrint("=============", 5)
  29.   sleep(1)
  30.   print("Verified!")
  31.   rs.setBundledOutput("back", colours.cyan)
  32.   sleep(5)
  33.   os.reboot()
  34.   else
  35.   print("Accessing")
  36.   textutils.slowPrint("=============", 5)
  37.   print("Login incorrect")
  38.   sleep(2)
  39.   os.reboot()
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement