Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Password = ""
- local Correct = "1234"
- local Redstone = "0"
- function Pass()
- term.clear()
- term.setCursorPos(1,1)
- print("Please enter the password")
- term.setCursorPos(1,3)
- print("Incorect Password !")
- term.setCursorPos(1,2)
- write("Password: ")
- Password = read()
- Detect()
- end
- function Detect()
- if Password == Correct then
- Corrects()
- else
- print("Incorect Password !")
- Pass()
- end
- end
- function Corrects()
- term.setCursorPos(1,3)
- term.clearLine()
- print("Correct Password !")
- redstone.setOutput("left", true)
- write("Press Enter to close the door")
- Redstone = read()
- redstone.setOutput("left", false)
- term.clear()
- term.setCursorPos(1,1)
- print("Please enter the password")
- write("Password: ")
- Password = read()
- Detect()
- end
- term.clear()
- term.setCursorPos(1,1)
- print("Please enter the password")
- write("Password: ")
- Password = read()
- Detect()
Add Comment
Please, Sign In to add comment