xxangel17xx

lua multi pass lock

Sep 10th, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.19 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2.  
  3. local side = "left"
  4. apass = "0001"
  5. bpass = "0002"
  6. cpass = "0003"
  7. adpass = "194977"
  8.  
  9. term.clear()
  10. sleep(1)
  11. print("Welcome please enter your access codes")
  12. print("Password 1 of 3")
  13. write("Code: ")
  14. local input = read("*")
  15. if input == apass then
  16. sleep(1)
  17. print("Password 2 of 3")
  18. write("Code: ")
  19. local input = read("*")
  20.  
  21. if input == bpass then
  22. sleep(1)
  23. print("Password 3 of 3")
  24. write("Code: ")
  25. local input = read("*")
  26.  
  27. if input == cpass then
  28. sleep(3)
  29. term.clear()
  30.  
  31. print("verifying passwords please wait...")
  32. sleep(1.5)
  33. print("password 1: correct")
  34. sleep(1)
  35. print("password 2: correct")
  36. sleep(1)
  37. print("password 3: correct")
  38. sleep(1)
  39. print("passwords verifyed")
  40. sleep(0.5)
  41. term.clear()
  42. print("unlock process initiated")
  43.  rs.setOutput(side,true)
  44.  sleep(6)
  45.  rs.setOutput(side,false)
  46.  os.reboot()
  47.  end
  48.  end
  49.  end
  50. if input == passwordadmin then
  51.  term.clear()
  52.  term.setCursorPos(1,1)
  53.  print("Password correct!")
  54.  print("Computer unlocking...")
  55.  print("Please type 'reboot' or 'shutdown' before leaving")
  56.  os.pullEvent(terminate)
  57.  
  58. else
  59.  term.clear()
  60.  term.setCursorPos(1,1)
  61.  print("Password incorrect!")
  62.  sleep(2)
  63.  os.reboot()
  64. end
Advertisement
Add Comment
Please, Sign In to add comment