Talk:Computer/@comment-76.107.69.98-20120815004205/@comment-96.51.131.185-20120819192434

To have that to work you would want to have two redstone paths connecting to the computer. I'm going to pretend that the redstone tha opens the door connects on the left, and the redstone that opens the trapdoor connects on the right. The code would look something like:

term.clear term.setCursorPos(1,1)

password = "password" write("Enter your password") input = read(*)

if input == password then. --checks to see if password matches redstone.setOutput("left", true) --if it matches, it opens door sleep(5) --the computer waits 5 seconds redstone.setOutput("left", false) --computer then closes door else -- if it doesn't match redstone.setOutput("right", true) --computer opens trapdoor sleep(5) --computer waits 5 seconds redstone.setOutput("right, false) --computer closes trapdoor. end

You can also connect a tesla coil the the trapdoor redstone to give the player a zap in the hole.