Guest User

Untitled

a guest
Aug 8th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.24 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. shell.run("clear")
  3.  
  4. local back = "back"
  5. currentUsername = ("user")
  6. currentPass = ("pass")
  7. currentEdit = ("edit")
  8. loggedIn = false
  9.  
  10. while true do
  11. term.clear()
  12. term.setCursorPos(1,1)
  13. print("Default username is 'user'.")
  14. print("Default password is 'pass'.")
  15. print("")
  16. print ("username: ")
  17. username = read()
  18. print("")
  19. print ("password: ")
  20. pass = read("*")
  21.  
  22. if pass == (currentPass) and username == (currentUsername) then
  23. print ("correct password. Access granted.")
  24. sleep (1.5)
  25. loggedIn = true
  26. else
  27. print ("FUCK OFF YOU SHITBAG.")
  28. sleep (0.7)
  29. print ("goodbye :D")
  30. sleep (0.2)
  31. os.reboot()
  32. end
  33.  
  34. while loggedIn == true do
  35. shell.run("clear")
  36. print("-- BPO's Moonshine Still --")
  37. print("[0] All Pumps Off")
  38. print("[1] Pump #1 [3] Pump #3")
  39. print("[2] Pump #2 [4] Pump #4")
  40. print("[5] All Pumps On")
  41. print("[6] Lava [7] Lava Pump")
  42. print("[8] Water [9] Water Pump")
  43. print("[10] Change Username")
  44. print("[11] Change Password")
  45. print("[12] Change Edit Password")
  46. print("[#] Log Off ")
  47. print("")
  48. local event, p1 = os.pullEvent("key")
  49. c = 2
  50. if p1 == 200 and c > 2 then
  51. c = c - 1
  52. elseif p1 == 208 and c < 16 then
  53. c = c + 1
  54. elseif p1 == 28 then
  55. func = c - 2
  56. term.setCursorPos(c,7)
  57. print("<--")
  58. if func == "0" then
  59. redstone.setBundledOutput(back, 0)
  60. sleep (1)
  61. elseif func == "1" then
  62. redstone.setBundledOutput(back, colors.blue)
  63. sleep (1)
  64. elseif func == "2" then
  65. redstone.setBundledOutput(back, colors.green)
  66. sleep (1)
  67. elseif func == "3" then
  68. redstone.setBundledOutput(back, colors.red)
  69. sleep (1)
  70. elseif func == "4" then
  71. redstone.setBundledOutput(back, colors.white)
  72. sleep (1)
  73. elseif func == "5" then
  74. redstone.setBundledOutput(back, colors.blue+colors.green+colors.red+colors.white+colors.magenta+colors.orange+colors.pink+colors.gray)
  75. sleep (1)
  76. elseif func == "6" then
  77. redstone.setBundledOutput(back, colors.magenta)
  78. sleep (1)
  79. elseif func == "7" then
  80. redstone.setBundledOutput(back, colors.orange)
  81. sleep (1)
  82. elseif func == "8" then
  83. redstone.setBundledOutput(back, colors.pink)
  84. sleep (1)
  85. elseif func == "9" then
  86. redstone.setBundledOutput(back, colors.gray)
  87. sleep (1)
  88. elseif func == "10" then
  89. print("Password: ")
  90. pass = read("*")
  91. if pass == (currentPass) then
  92. print("Correct password.")
  93. print("What do you want the new username to be?")
  94. username = read("*")
  95. print("Username changed.")
  96. currentUsername = (username)
  97. print("")
  98. print("Your new username is now")
  99. print(currentUsername)
  100. sleep (2)
  101. else
  102. print("wrong password.")
  103. sleep (2)
  104. end
  105. elseif func == "11" then
  106. print("Old password: ")
  107. pass = read("*")
  108. if pass == (currentPass) then
  109. print("Correct password.")
  110. print("What do you want the new password to be?")
  111. pass = read("*")
  112. print("Password changed.")
  113. currentPass = (pass)
  114. print("")
  115. print("Your password is now")
  116. print(currentPass)
  117. sleep (2)
  118. else
  119. print("wrong password.")
  120. sleep (2)
  121. end
  122. elseif func == "12" then
  123. print("Default edit password is 'edit'.")
  124. print("Edit Password: ")
  125. edit = read("*")
  126. if edit == (currentPass) then
  127. print("Correct password.")
  128. print("What do you want the new edit password to be?")
  129. edit = read("*")
  130. print("Password changed.")
  131. currentEdit = (edit)
  132. print("")
  133. print("Your Edit password is now")
  134. print(currentEdit)
  135. sleep (2)
  136. else
  137. print("wrong password.")
  138. sleep (2)
  139. end
  140. elseif func == currentEdit then
  141. shell.run("edit","startup")
  142. elseif func == "14" then
  143. loggedIn = false
  144. print("logging off.")
  145. sleep (0.7)
  146. print("logging off. .")
  147. sleep (0.7)
  148. print("logging off. . .")
  149. sleep (0.6)
  150. os.shutdown()
  151. else
  152. os.reboot()
  153. end
  154. end
  155. end
  156. end
Add Comment
Please, Sign In to add comment