Advertisement
TangentDelta

TangentLock Ver. 2 Rev. B

Dec 25th, 2011
3,748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. --TangentLock
  2. --Ver. 2 rev. B
  3. --Last Revised 12/25/2011
  4. --Author TangentDelta (alias Hydrogen)
  5. --Revised by TangentDelta (alias Hydrogen)
  6. --Notes Thanks for the support guys :D
  7. --Platform ComputerCraft minecraft LUA virtual machine
  8.  
  9. code = "eggs"
  10. debug = "ham"
  11. output = "left"
  12. tries = 5
  13. write "Password: "
  14. for triescnt = 1,tries,1 do
  15.  password = read()
  16.  if password == debug then
  17.   print "Debug Activated"
  18.   break
  19.  end
  20.   if password == (code) then
  21.    print "Password Correct. Ending Session"
  22.    redstone.setOutput(output, true)
  23.    sleep(5)
  24.    redstone.setOutput(output, false)
  25.    os.shutdown()
  26.   else
  27.    print ("Password Incorrect. Tries left: ",tries-triescnt)
  28.    write "Password: "
  29.   end
  30.  if triescnt == tries then
  31.   print "Maximum Tries Reached."
  32.   sleep(2)
  33.   print "shutting Down"
  34.   sleep(1)
  35.   os.shutdown()
  36.   else
  37.  end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement