Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getInput(message)
- io.write(message)
- io.flush()
- local userInput = io.read()
- return userInput;
- end
- function openDoor()
- local component = require("component")
- local redstone = component.redstone
- redstone.setOutput(require("sides").bottom, 15)
- end
- function auth(password)
- local userInput = getInput("Please Enter Password...")
- if userInput == password then
- return true
- else
- io.write("Password Incorrect")
- io.flush()
- return false
- end
- end
- if auth("Please!") then
- openDoor()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement