Talk:Lua Tutorials/@comment-66.142.188.23-20120815161118

So i made my variation of a password protected door...but it shutdowns after a milisecond when i get on the computer.Here it is: os.pullEvent = os.pullEventRawpassword = "captain123"override = "benisawesome" function clearterm.clearterm.setCursorPos(1,1)end clearwrite"Please enter password: "input = read("*") if input == password thenclearprint("Welcome!")sleep(1)print("door open, please proceed.")rs.setOutput("left",true)sleep(3)rs.setOutput("left",true)os.shutdownend if imput == override thenclearsleep(1)print("...")sleep(1)clearprint("..")sleep(1)clearprint(".")sleep(1)clearprint(" ")sleep(1)clearprint("...")sleep(1)clearprint("..")sleep(1)clearprint(".")sleep(1)clearprint(" ")sleep(2)clearprint ("Yes he is!")sleep(2)clearprint("Override accepted.")rs.setOutput("left",true)sleep(3)rs.setOutput("left",false)os.shutdownend elseclearprint("Sorry, Wrong Password")sleep(3)os.shutdown