skare

Untitled

Jul 16th, 2015
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. --Lock Ver 2.0; script by fxstriker.
  2. function reset()
  3. term.clear()
  4. term.setCursorPos(1,1)
  5. end
  6.  
  7. function lockout()
  8. l = l + 1
  9. reset()
  10. print("-1 of 3 Attempt's")
  11. sleep(1)
  12. if l == 3 then
  13. reset()
  14. wait = 60
  15. while wait > 0 do
  16. sleep(1)
  17. reset()
  18. print("System Locked.")
  19. rednet.open("right")
  20. rednet.broadcast("qsdry")
  21. print(wait)
  22. wait = wait - 1
  23. end
  24. else
  25. loginUser()
  26. end
  27. loginUser()
  28. end
  29.  
  30. --loginUser()
  31.  
  32. function loginUser()
  33. reset()
  34. print("Please enter username: ")
  35. username = read()
  36. if username == "admin" then --username goes here change "Admin" w/quotes
  37. print("Correct.")
  38. sleep(1)
  39. loginPw()
  40. else
  41. reset()
  42. print("Wrong Username")
  43. lockout()
  44. end
  45. end
  46.  
  47. function loginPw()
  48. reset()
  49. print("Please enter password: ")
  50. password = read("*")
  51. if password == "rkwe3x2" then --password goes here change "password" w/ quotes
  52. print("Login sucesfull.")
  53. sleep(1)
  54. else
  55. reset()
  56. print("Wrong Password.")
  57. lockout()
  58. end
  59. end
  60.  
  61. os.pullEvent = os.pullEventRaw
  62. l = 0
  63. loginUser()
  64. reset()
  65. --Code to run after authentication goes here.
Advertisement
Add Comment
Please, Sign In to add comment