Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pullEvent = os.pullEvent --Makes a copy of os.pullEvent to pullEvent.
- os.pullEvent = os.pullEventRaw --Stops users using Ctrl+T to terminate program.
- term.clear() --Clear monitor.
- term.setCursorPos(1,1) --Sets cursor to top left position.
- local password = "The falcon doth soar high above" --This is the password.
- local passwordshort = "lemonparty" --I included a shorter version, too.
- local debugpassword = "admin mode go" --debugging mode, allows use of Ctrl+T again to terminate.
- write("Enter your password: ")
- local input = read() --Users input is assigned to variable input
- if input == debugpassword then
- os.pullEvent = pullEvent
- print("Hold Ctrl + T to break")
- sleep(5)
- elseif (input == password) or (input == passwordshort) then
- print("That is correct, you have 2 seconds to get inside.")
- redstone.setOutput("left", true)
- redstone.setOutput("back", true)
- else
- print("Nope.avi")
- end
- print("Closing in...")
- for i=0, 2, 1 do
- sleep(1)
- print(2-i)
- end
- os.shutdown() --Shut down the computer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement