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

This was my first time using this site, so I wasn't expecting it to destroy the code so badly, here it is again, but more clean.

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