Advertisement
TangentDelta

TangentLockLite Ver. 1

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