Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- shell.run("clear")
- local back = "back"
- currentUsername = ("user")
- currentPass = ("pass")
- currentEdit = ("edit")
- loggedIn = false
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("Default username is 'user'.")
- print("Default password is 'pass'.")
- print("")
- print ("username: ")
- username = read()
- print("")
- print ("password: ")
- pass = read("*")
- if pass == (currentPass) and username == (currentUsername) then
- print ("correct password. Access granted.")
- sleep (1.5)
- loggedIn = true
- else
- print ("FUCK OFF YOU SHITBAG.")
- sleep (0.7)
- print ("goodbye :D")
- sleep (0.2)
- os.reboot()
- end
- function menu()
- shell.run("clear")
- print("-- BPO's Moonshine Still --")
- print("[0] All Pumps Off")
- print("[1] Pump #1 [3] Pump #3")
- print("[2] Pump #2 [4] Pump #4")
- print("[5] All Pumps On")
- print("[6] Lava [7] Lava Pump")
- print("[8] Water [9] Water Pump")
- print("[10] Change Username")
- print("[11] Change Password")
- print("[12] Change Edit Password")
- print("[#] Log Off ")
- print("")
- term.setCursorPos(10,c)
- print("<--")
- end
- while loggedIn == true do
- local event, p1 = os.pullEvent("key")
- c = 2
- menu()
- if p1 == 200 and c > 2 then
- c = c - 1
- menu()
- elseif p1 == 208 and c < 16 then
- c = c + 1
- menu()
- end
- func = c-2
- if p1 == 28 then
- if func == 0 then
- redstone.setBundledOutput(back, 0)
- sleep (1)
- elseif func == 1 then
- redstone.setBundledOutput(back, colors.blue)
- sleep (1)
- elseif func == 2 then
- redstone.setBundledOutput(back, colors.green)
- sleep (1)
- elseif func == 3 then
- redstone.setBundledOutput(back, colors.red)
- sleep (1)
- elseif func == 4 then
- redstone.setBundledOutput(back, colors.white)
- sleep (1)
- elseif func == 5 then
- redstone.setBundledOutput(back, colors.blue+colors.green+colors.red+colors.white+colors.magenta+colors.orange+colors.pink+colors.gray)
- sleep (1)
- elseif func == 6 then
- redstone.setBundledOutput(back, colors.magenta)
- sleep (1)
- elseif func == 7 then
- redstone.setBundledOutput(back, colors.orange)
- sleep (1)
- elseif func == 8 then
- redstone.setBundledOutput(back, colors.pink)
- sleep (1)
- elseif func == 9 then
- redstone.setBundledOutput(back, colors.gray)
- sleep (1)
- elseif func == 10 then
- print("Password: ")
- pass = read("*")
- if pass == (currentPass) then
- print("Correct password.")
- print("What do you want the new username to be?")
- username = read("*")
- print("Username changed.")
- currentUsername = (username)
- print("")
- print("Your new username is now")
- print(currentUsername)
- sleep (2)
- else
- print("wrong password.")
- sleep (2)
- end
- elseif func == 11 then
- print("Old password: ")
- pass = read("*")
- if pass == (currentPass) then
- print("Correct password.")
- print("What do you want the new password to be?")
- pass = read("*")
- print("Password changed.")
- currentPass = (pass)
- print("")
- print("Your password is now")
- print(currentPass)
- sleep (2)
- else
- print("wrong password.")
- sleep (2)
- end
- elseif func == 12 then
- print("Default edit password is 'edit'.")
- print("Edit Password: ")
- edit = read("*")
- if edit == (currentPass) then
- print("Correct password.")
- print("What do you want the new edit password to be?")
- edit = read("*")
- print("Password changed.")
- currentEdit = (edit)
- print("")
- print("Your Edit password is now")
- print(currentEdit)
- sleep (2)
- else
- print("wrong password.")
- sleep (2)
- end
- elseif func == currentEdit then
- shell.run("edit","startup")
- elseif func == 14 then
- loggedIn = false
- print("logging off.")
- sleep (0.7)
- print("logging off. .")
- sleep (0.7)
- print("logging off. . .")
- sleep (0.6)
- os.shutdown()
- else
- os.reboot()
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment