Advertisement
Guest User

startup

a guest
Mar 18th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. --Username
  2. shell.run("clear")
  3. os.pullEvent = os.pullEventRaw
  4. x = 1
  5. while true do
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. write("Username: ")
  9. local input = read()
  10. if input == "Sam" then --replace "Sam" with the username you want
  11.   term.clear()
  12.   --Password
  13. os.pullEvent = os.pullEventRaw
  14. y = 1
  15. while true do
  16. term.clear()
  17. term.setCursorPos(1,1)
  18. write("Password: ")
  19. local input = read("*")
  20. if input == "5151" then --replace "5151" with the password you want.
  21.   term.clear()
  22.   term.setCursorPos(1,1)
  23.   print("Opening door...")
  24.   rs.setOutput("right",true)
  25.   sleep(5)
  26.   rs.setOutput("right",false)
  27.   shell.run("reboot")
  28. else if input == "debug" then
  29.   term.clear()
  30.   term.setCursorPos(1,1)
  31.   print("Entering Console Development Mode")
  32.   error()
  33. else if y == 4 then
  34.   print("Password Entered Incorrect 3 Times")
  35.   print("Locked For 5 Minute")
  36.   sleep(300)
  37.   y = 1
  38. else  print("Password Incorrect")
  39.   y = y + 1
  40.   sleep(2)
  41. end
  42. end
  43. end
  44. end
  45. else if input == "debug" then
  46.   term.clear()
  47.   term.setCursorPos(1,1)
  48.   print("Entering Console Development Mode")
  49.   error()
  50. else if x == 4 then
  51.   print("Username Entered Incorrect 3 Times")
  52.   print("Locked For 1 Minute")
  53.   sleep(50)
  54.   x = 1
  55. else  print("Username Incorrect")
  56.   x = x + 1
  57.   sleep(2)
  58. end
  59. end
  60. end
  61. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement