Posted 16 February 2012 - 07:51 AM
First make a program called startup to prevent the lock from being terminated… (btw — means its somthing different like the edit means that in the screen then write the code :D/>/>)
———————
edit startup
———————
while true do
shell.run "lock"
end
———————
now for the lock itself :D/>/>…
———————
edit lock
———————
pass = "password"
write "Password: "
read = ("*")
if input == pass then
print "Welcome!"
rs.setOutput("back" true)
rs.setOutput("right" true)
rs.setOutput("left" true)
sleep(3.5)
rs.setOutput("back" false)
rs.setOutput("right" false)
rs.setOutput("left" false)
else
print "Incorrect Password!"
sleep(2)
os.reboot()
end
———————
———————
edit startup
———————
while true do
shell.run "lock"
end
———————
now for the lock itself :D/>/>…
———————
edit lock
———————
pass = "password"
write "Password: "
read = ("*")
if input == pass then
print "Welcome!"
rs.setOutput("back" true)
rs.setOutput("right" true)
rs.setOutput("left" true)
sleep(3.5)
rs.setOutput("back" false)
rs.setOutput("right" false)
rs.setOutput("left" false)
else
print "Incorrect Password!"
sleep(2)
os.reboot()
end
———————