Advertisement
Guest User

Minecraft 'Computercraft' MOD - Password door

a guest
Dec 25th, 2011
13,107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement