I've gotten about this far:
shell.run("clear")
print "Please type in the code to open the door to the next room:"
unlockCode = "<Variable content>"
userCode = io.read()
if userCode == unlockCode then
shell.run("redpulse(5)")
else
print "Wrong answer! The program will restart!"
win.Sleep(100)
shell.run("reboot")
end
But something's not right.
For some reason the program exits before the user can even input the string...












