Talk:Lua Tutorials/@comment-80.203.121.128-20120818155107

The easy way to make a lock: Add a disk drive with a floppy in it, behind the computer (where intruders cant access it). Make a file on the floppy named startup, and write:

os.pullEvent=os.pullEventRaw

term.clear

term.setCursorPos(1,1)

while true do input=read("*")

if input == "password123" then

redstone.setOutput("left",true)

sleep(3)

redstone.setOutput("left",false)

term.clear

term.setCursorPos(1,1)

end

end

then just save (ctrl, s), and reboot (hold ctrl + r), and voila!