Advertisement
Guest User

Untitled

a guest
Aug 13th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. --
  2. NamE = "Akira.OS"
  3. VersioN = "v1.2"
  4. os.pullEvent = os.pullEventRaw
  5. --
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. term.setTextColor(colors.purple)
  9. textutils.slowPrint("Akira.LoginSystem")
  10. term.setCursorPos(19,1)
  11. term.setTextColor(colors.blue)
  12. print(VersioN)
  13. sleep(1)
  14. --
  15. username = {"ShexianKyoto", "Yinxian", "OMGitsMing"}
  16. password = {"BabyGirl", "-", "-"}
  17.  
  18. term.setCursorPos(1,3)
  19. term.setTextColor(colors.purple)
  20. term.write("Username: ")
  21. term.setTextColor(colors.blue)
  22. user = read()
  23.  
  24. term.setTextColor(colors.purple)
  25. term.write("Password: ")
  26. term.setTextColor(colors.blue)
  27. pass = read("*")
  28.  
  29. for i=1, #username do
  30. if user == username[i] and pass == password[i] then
  31. access = true
  32. elseif user == "Debug" and pass == "Admin" then
  33. term.setCursorPos(1,6)
  34. term.setTextColor(colors.yellow)
  35. textutils.slowPrint("Initiating Debug-Mode!")
  36. textutils.slowPrint("Please use with care!")
  37. sleep(2)
  38. term.clear()
  39. term.setCursorPos(1,1)
  40. term.setTextColor(colors.yellow)
  41. textutils.slowPrint(NamE)
  42. term.setCursorPos(10,1)
  43. term.setTextColor(colors.red)
  44. print("DEBUG-MODE")
  45. term.setCursorPos(1,3)
  46. term.setTextColor(colors.yellow)
  47. end
  48. end
  49. --
  50. if access == true then
  51. term.setCursorPos(1,6)
  52. term.setTextColor(colors.yellow)
  53. textutils.slowPrint("Attempting to login!")
  54. sleep(1)
  55. textutils.slowPrint("...")
  56. sleep(1)
  57. term.setCursorPos(1,9)
  58. term.setTextColor(colors.green)
  59. textutils.slowPrint("Login succeeded!")
  60. textutils.slowPrint("...")
  61. term.clear()
  62. term.setCursorPos(1,1)
  63. term.setTextColor(colors.purple)
  64. textutils.slowPrint(NamE)
  65. term.setCursorPos(10,1)
  66. term.setTextColor(colors.blue)
  67. print(VersioN)
  68. term.setCursorPos(1,3)
  69. term.setTextColor(colors.white)
  70. else
  71. term.setCursorPos(1,6)
  72. term.setTextColor(colors.yellow)
  73. textutils.slowPrint("Attempting to login!")
  74. sleep(1)
  75. textutils.slowPrint("...")
  76. sleep(1)
  77. term.setCursorPos(1,9)
  78. term.setTextColor(colors.red)
  79. textutils.slowPrint("Login failed!")
  80. sleep(1)
  81. textutils.slowPrint("Incorrect username and or password!")
  82. sleep(1)
  83. term.setCursorPos(1,12)
  84. term.setTextColor(colors.yellow)
  85. textutils.slowPrint("Rebooting Akira.OS!")
  86. sleep(1)
  87. os.reboot()
  88. end
  89. --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement