Want more features on Pastebin? Sign Up, it's FREE!
Guest

Minecraft 'Computercraft' MOD - Password door

By: a guest on Dec 25th, 2011  |  syntax: Lua  |  size: 0.46 KB  |  views: 9,251  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. redstone.setOutput("left", true)
  2. correctpassword = "HetIsNiels"
  3. write("What is the password?   ")
  4.  
  5. password = read()
  6.  
  7. if password == (correctpassword) then
  8.  write("Password correct!")
  9.  redstone.setOutput("back", true)
  10.  sleep(5)
  11.  os.shutdown()
  12. elseif password == "edit" then
  13.  write("Starting computer modus...")
  14.  write("")
  15.  redstone.setOutput("left", false)
  16. else
  17.  write("Incorrect password! Shuting down the computer...")
  18.  sleep(5)
  19.  os.shutdown()
  20. end
clone this paste RAW Paste Data