Advertisement
Guest User

Akira.OS v1.5

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