Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[ Code written by SolWarriorDjango ]--
- --[ An advanced redstone door lock for the ComputerCraft Minecraft mod. Can be used on any CC computer ]--
- --[ SIDE -> Replace with the side that you want the redstone signal to be emitted ]--
- --[ PASSWORD -> Replace with your password, can be changed later ]--
- --[ DEBUGPASSWORD -> Replace with a password to use a back boor ]--
- os.pullEvent = os.pullEventRaw --[ Prevents closing the program with Ctrl+T ]--
- term.clear()
- term.setCursorPos(1,1)
- password = "PASSWORD" --[ Sets the password ]--
- debug = "DEBUGPASSWORD" --[ Sets debugging password ]--
- write("Password: ")
- input = read("*") --[ Input the password ]--
- term.clear() --[ Clearing the terminal, and... ]--
- term.setCursorPos(1,1) --[ ...THEN setting the cursor position ]--
- if input == password then
- print("Password Accepted!") --[ If the input is correct! ]--
- rs.setOutput("SIDE",true) --[ Change this and the setOutput to the side the door is on ]--
- sleep(2) --Pause for 2 seconds
- rs.setOutput("SIDE",false)
- os.shutdown() --[ Shut down the computer ]--
- elseif input == debug then
- exit() --[ Exits the program ]--
- else
- print("Password Denied!") --[ If the input is incorrect! (Oh No!) ]--
- sleep(2)
- os.shutdown() --[ Shut down the computer ]--
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement