Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- redstone.setOutput("left", true)
- correctpassword = "codered"
- pin = "0759"
- write("What is the current situation? ")
- logtime = (os.time())
- local input = read("*")
- if input == (correctpassword) then
- write("Password correct!")
- redstone.setOutput("right", true)
- sleep(5)
- redstone.setOutput("right", false)
- write("Are you sure? Enter pin ")
- input = read("*")
- if input == (pin) then
- write("Access granted.")
- redstone.setOutput("bottom", true)
- else
- write("Incorrect! Your attempt has been logged...")
- local file = fs.open("log", "w")
- file.write("Last attempt:"..logtime)
- file.close()
- print("Logged.")
- sleep(5)
- os.shutdown()
- end
- elseif input == "editit" then
- write("Launching editing mode...")
- write("")
- end
Advertisement
Add Comment
Please, Sign In to add comment