Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --original design: https://pastebin.com/kx1j3yYg
- --I simply adapted this code to create a lock for your ComputerCraft computer. I DO NOT TAKE CREDIT FOR THE ORIGINAL CODE, ONLY
- --THE ADAPTATIONS.
- --This is under no guarantee to work. I am not liable for the loss of your files on your computer.
- local oldPull = os.pullEvent; -- Prevents CTRL-T
- os.pullEvent = os.pullEventRaw; -- Prevents CTRL-T
- term.clear()
- term.setCursorPos(1,1)
- password = "1234" --Put your password here
- write("Password: ")
- input = read("*")
- if input == password then
- print("Access granted")
- break
- end
- else
- print("Access denied")
- sleep(3)
- os.reboot()
- end
- os.pullEvent = oldPull;
Advertisement
Add Comment
Please, Sign In to add comment