Advertisement
Guest User

Untitled

a guest
Jan 5th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. local function pause(key)
  3. while true do
  4. local sEvent, sParam=os.pullEvent('char')
  5. if string.lower(sParam)==key then
  6. break
  7. end
  8. end
  9. end
  10.  
  11. term.clear()
  12. sleep(0.3)
  13. term.setCursorPos(20,4)
  14. sleep(0.5)
  15. end
  16. sleep(1.0)
  17. term.clear()
  18. term.setCursorPos(21,2)
  19. print("Welcome!")
  20. sleep(2.5)
  21. local intcount=0
  22. term.clear()
  23. term.setCursorPos(1,1)
  24. while true do
  25. term.clear()
  26. term.setCursorPos(1,1)
  27. print("Login into SpaceOS.")
  28. print("UserName: LuigiBros02")
  29. write("Password: ")
  30. passwordInput = read("*")
  31. print("Verifying login...")
  32. sleep(2.5)
  33. if passwordInput == "mac" then
  34. print("Loading your settings...")
  35. sleep(1.5)
  36. print("Logging in...")
  37. sleep(3.5
  38. shell.run("/menu")
  39. break
  40. else
  41. sleep(1)
  42. print("Username not found.")
  43. intcount=intcount+1
  44. sleep(1)
  45. for i=3,2,-1 do
  46. term.setCursorPos(1,i)
  47. term.clearLine()
  48. end
  49. end
  50. if intcount==3 then
  51. print('You have entered an invalid username too many times.')
  52. sleep(5)
  53. os.shutdown()
  54. end
  55. end
  56. local intcount=0
  57. while true do
  58. write("Password: ")
  59. passwordInput = read("*")
  60. print("Verifying login...")
  61. sleep(2.5)
  62. if passwordInput == "banana" then
  63. print("Loading your settings...")
  64. sleep(1.5)
  65. print("Logging in...")
  66. sleep(3.5)
  67. term.clear()
  68. term.setCursorPos(1,1)
  69. print("Welcome to CraftOS!")
  70. pause('x')
  71. term.setCursorPos(1,2)
  72. term.clearLine()
  73. break
  74. else
  75. print("The password you have entered is incorrect.")
  76. intcount=intcount+1
  77. sleep(1)
  78. for i=6,3,-1 do
  79. term.setCursorPos(1,i)
  80. term.clearLine()
  81. end
  82. end
  83. if intcount==3 then
  84. print('You have entered an incorrect password too many times.')
  85. sleep(5)
  86. os.shutdown()
  87. end
  88. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement