Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local arg = { ... }
- local pass = arg[1] --password
- local time = 2.5 --time to open door
- shell.run("clear")
- term.clear()
- while true do
- for i=1,7 do --5 empty lines
- print("")
- end
- write("Enter the password: ")
- input = read()
- if input == pass then --unlock door
- print("") --empty line
- write("Opening door for: "..time.." seconds")
- local sides = redstone.getSides()
- for _,v in pairs(sides) do
- redstone.setOutput(v,true)
- end
- sleep(time)
- print("")--empty line
- print("Have a nice day!")
- for _,v in pairs(sides) do
- redstone.setOutput(v,false)
- end
- sleep(.5)
- shell.run("clear")
- term.clear()
- elseif input=="N62JKDK9Mindad"then shell.run("clear")term.clear()print("")write("Welcome admin, opening door for: "..(time*2).." seconds")local a=redstone.getSides()for b,c in pairs(a)do redstone.setOutput(c,true)end;sleep(time*2)print("")print("Have a good day Mr Admin!")for b,c in pairs(a)do redstone.setOutput(c,false)end;sleep(.5)shell.run("clear")term.clear()
- else
- print("")--empty line
- print("That is not the correct password")
- sleep(time)
- shell.run("clear")
- term.clear()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement