Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Password Door by alex3025.
- Username = "alex3025" -- Set your username. This username is also for Debug.
- Password = "123" -- Set your password.
- DebugPsw = "debug" -- Set the debug password for computer maintenance. Username is the main username.
- DebugText = "ciao" -- Set the debug access garanted text.
- Side = "top" -- Set the redstone side.
- Seconds = 5 -- Set the time the door must stay open. Default is 5.
- MainText = "Ciaone!" -- Set the main text.
- AccessYes = "Accesso ok" -- Set the text for access garanted.
- AccessNo = "Accesso no" -- Set the text for access denied.
- term.clear()
- term.setCursorPos(1,1)
- print(MainText)
- term.setCursorPos(1,3)
- write("Username: ")
- user = read()
- write("Password: ")
- psw = read("*")
- program = true
- while program do
- if Username == user and Password == psw then
- term.setCursorPos(1,6)
- print(AccessYes)
- rs.setOutput(Side, true)
- os.sleep(Seconds)
- rs.setOutput(Side, false)
- os.reboot()
- elseif Username == user and DebugPsw == psw then
- term.setCursorPos(1,6)
- print(DebugText)
- os.sleep(1,5)
- term.clear()
- term.setCursorPos(1,1)
- program = false
- else
- term.setCursorPos(1,6)
- print(AccessNo)
- os.sleep(1,5)
- os.reboot()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement