Guest User

Untitled

a guest
Jul 18th, 2016
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.pullEvent = os.pullEventRaw -- Prevents CTRL+T shortcut
  2.  
  3. term.clear() -- Clears the screen
  4. term.setCursorPos(1, 1) -- This places the print position to the top of screen
  5.  
  6. password = {"12345"} -- Here you define what password each user has, remember to put user1's password in the first row and so on.
  7.  
  8. write("Password: ")
  9. pass = read('*') -- This prevents people from reading the password as you put it in
  10.  
  11. for i=1, #password do -- Starts a loop
  12. if pass == password[i] then
  13. access = true
  14. end
  15. end
  16.  
  17. if access == true then
  18. print("Logging in...")
  19. sleep(1)
  20. print("Welcome")
  21. sleep(1)
  22.  
  23. term.clear() -- Clears the screen
  24. term.setCursorPos(1, 1)
  25.  
  26. shell.run("redpulse left 1 10")
  27.  
  28. term.clear() -- Clears the screen
  29. term.setCursorPos(1, 1)
  30. peripheral.wrap("TOP").write("Closing in.. 10")
  31. sleep(1)
  32. peripheral.wrap("TOP").clear() -- Clears the screen
  33. peripheral.wrap("TOP").setCursorPos(1, 1)
  34. peripheral.wrap("TOP").write("Closing in.. 9")
  35. sleep(1)
  36. peripheral.wrap("TOP").clear() -- Clears the screen
  37. peripheral.wrap("TOP").setCursorPos(1, 1)
  38. peripheral.wrap("TOP").write("Closing in.. 8")
  39. sleep(1)
  40. peripheral.wrap("TOP").clear() -- Clears the screen
  41. peripheral.wrap("TOP").setCursorPos(1, 1)
  42. peripheral.wrap("TOP").write("Closing in.. 7")
  43. sleep(1)
  44. peripheral.wrap("TOP").clear() -- Clears the screen
  45. peripheral.wrap("TOP").setCursorPos(1, 1)
  46. peripheral.wrap("TOP").write("Closing in.. 6")
  47. sleep(1)
  48. peripheral.wrap("TOP").clear() -- Clears the screen
  49. peripheral.wrap("TOP").setCursorPos(1, 1)
  50. peripheral.wrap("TOP").write("Closing in.. 5")
  51. sleep(1)
  52. peripheral.wrap("TOP").clear() -- Clears the screen
  53. peripheral.wrap("TOP").setCursorPos(1, 1)
  54. peripheral.wrap("TOP").write("Closing in.. 4")
  55. sleep(1)
  56. peripheral.wrap("TOP").clear() -- Clears the screen
  57. peripheral.wrap("TOP").setCursorPos(1, 1)
  58. peripheral.wrap("TOP").write("Closing in.. 3")
  59. sleep(1)
  60. peripheral.wrap("TOP").clear() -- Clears the screen
  61. peripheral.wrap("TOP").setCursorPos(1, 1)
  62. peripheral.wrap("TOP").write("Closing in.. 2")
  63. sleep(1)
  64. peripheral.wrap("TOP").clear() -- Clears the screen
  65. peripheral.wrap("TOP").setCursorPos(1, 1)
  66. peripheral.wrap("TOP").write("Closing in.. 1")
  67. peripheral.wrap("TOP").setCursorPos(1, 1)
  68. sleep(1)
  69. peripheral.wrap("TOP").write("Closed please wait.")
  70. peripheral.wrap("TOP").setCursorPos(1, 1)
  71. sleep(1)
  72. peripheral.wrap("TOP").write("Closed please wait..")
  73. peripheral.wrap("TOP").setCursorPos(1, 1)
  74. sleep(1)
  75. peripheral.wrap("TOP").write("Closed please wait...")
  76. peripheral.wrap("TOP").setCursorPos(1, 1)
  77.  
  78. else
  79. print("Incorrect password")
  80. sleep(2)
  81. os.reboot()
  82. end
Add Comment
Please, Sign In to add comment