Hmm, maybe something like this?
print("Enter Password: ")
answer = read()
if answer == "password" then
print("Access Granted.")
redstone.setOutput("left",true)
sleep(5)
redstone.setOutput("left",false)
os.shutdown()
end
else
print("Access Denied.")
sleep(5)
os.shutdown()
end
I'm unsure of the syntax, but that's the logic.