It also gives you a prompt to enter a time amount (in seconds) for how long the door will stay open!
PS; look through the entire thing. If you see anything with { }, then edit what is inside (and remove the brackets).
Enjoy!
EDIT: updated, Espen changed around some of the code to make it better.
Also, because someone requested the code instead of the archive, here it is.
local function clearScreen()
term.clear()
term.setCursorPos(1, 1)
end
while true do
clearScreen()
print ("Type password to enter {LOCATION}!")
if read("*") == "{PASSWORD}" then
clearScreen()
print("Correct Password!")
print("Open door for how long?")
local a = read()
clearScreen()
print("Opening door!")
sleep (1)
redstone.setOutput("{SIDE OF DOOR}",true)
clearScreen()
sleep (a)
else
clearScreen()
print("Incorrect Password, please try again.")
sleep (5)
end
end












