Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Title: TangentLockLite
- --Version: 1
- --Last Revised: N/A
- --Last Revised By: N/A
- --Author: TangentDelta (alias Hydrogen)
- --Platform: ComputerCraft LUA Virtual Machine
- --Notes: Please don't claim this as yours, give me credit!
- password = "hello" --this is your password to "unlock" the door
- print "TangentLockLite Ver. 1" --tells you what version it is
- write "Password: " --puts a pretty "Password: " on the screen, so you know what you're doing
- input = read() --make a prompt where you can type stuff in, and stores it to the "input" variable
- if input == password then --if what you type in is equal to your password, it does the following
- redstone.setOutput ("back", true) --makes the back of the computer turn on a redstone pulse
- sleep (5) --pause for 5 seconds
- os.shutdown() --makes the computer turn off
- else --but if the password isn't correct
- print "Incorrect Password" --let's you know that the password is wrong
- sleep (2) --pause for 2 seconds
- os.shutdown() --makes the computer turn off
- end --the end of the program
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement