Posted 12 December 2012 - 10:46 PM
hi this is my first post and my first program so go easy on me.
computercraft is a little difficult for me as i don't really know lua.
but this is a simple computer password lock that asks your to input your password before you can access your computer and if you input the wrong one it will shutdown until you enter the correct password.
ps. sorry for the sloppy writing, i don't usually post or write much.
anyway here is the program/code.[attachment=772:password_lock.txt]
computercraft is a little difficult for me as i don't really know lua.
but this is a simple computer password lock that asks your to input your password before you can access your computer and if you input the wrong one it will shutdown until you enter the correct password.
ps. sorry for the sloppy writing, i don't usually post or write much.
anyway here is the program/code.[attachment=772:password_lock.txt]
1.shell.run("startup")
2. term.clear()
3. term.setCursorPos(1,1)
4. print("please enter your password: ")
5. a = read("*")
6. if a == "" then --insert the password you want here
7. print("Access Granted")
8. else
9. print("Access Denied")
10. sleep(2)
11. print("shutting down until you can remember your password")
12. sleep(2)
13. os.shutdown()
14.end