Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. --
  2. NamE = "Akira.OS"
  3. VersioN = "v2.1"
  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 = {"Akira"}
  16. password = {"6253"}
  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. end
  33. end
  34. --
  35. if access == true then
  36. term.setCursorPos(1,6)
  37. term.setTextColor(colors.yellow)
  38. textutils.slowPrint("Attempting to login!")
  39. sleep(1)
  40. textutils.slowPrint("...")
  41. sleep(1)
  42. term.setCursorPos(1,9)
  43. term.setTextColor(colors.green)
  44. textutils.slowPrint("Login succeeded!")
  45. textutils.slowPrint("...")
  46. term.clear()
  47. term.setCursorPos(1,1)
  48. term.setTextColor(colors.purple)
  49. textutils.slowPrint(NamE)
  50. term.setCursorPos(10,1)
  51. term.setTextColor(colors.blue)
  52. print(VersioN)
  53. term.setCursorPos(1,3)
  54. term.setTextColor(colors.white)
  55.  
  56. else
  57. term.setCursorPos(1,6)
  58. term.setTextColor(colors.yellow)
  59. textutils.slowPrint("Attempting to login!")
  60. sleep(1)
  61. textutils.slowPrint("...")
  62. sleep(1)
  63. term.setCursorPos(1,9)
  64. term.setTextColor(colors.red)
  65. textutils.slowPrint("Login failed!")
  66. sleep(1)
  67. textutils.slowPrint("Login credentials are incorrect!")
  68. sleep(1)
  69. term.setCursorPos(1,12)
  70. term.setTextColor(colors.yellow)
  71. textutils.slowPrint("Rebooting Akira.OS!")
  72. sleep(1)
  73. os.shutdown()
  74. --
  75. --if user == "Debug" and pass == "Admin" then
  76. -- term.setCursorPos(1,6)
  77. -- term.setTextColor(colors.yellow)
  78. -- textutils.slowPrint("Initiating Debug-Mode!")
  79. -- textutils.slowPrint("Please use with care!")
  80. -- sleep(2)
  81. -- term.clear()
  82. -- term.setCursorPos(1,1)
  83. -- term.setTextColor(colors.yellow)
  84. -- textutils.slowPrint(NamE)
  85. -- term.setCursorPos(10,1)
  86. -- term.setTextColor(colors.red)
  87. -- print("DEBUG-MODE")
  88. -- term.setCursorPos(1,3)
  89. -- term.setTextColor(colors.yellow)
  90. end
  91. --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement