Advertisement
Guest User

doorControl

a guest
Jul 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. local waiting = true
  4. while waiting do
  5. redstone.setOutput("back",true)
  6. print("Hello, what is the password to open the door?")
  7. password = read()
  8. if password == "Kake" then
  9.  redstone.setOutput("back",false)
  10.  print("Welcome. Door closing in...")
  11.  print("3")
  12.  sleep(1)
  13.  print("2")
  14.  sleep(1)
  15.  print("1")
  16.  sleep(1)
  17.  os.reboot()
  18.  waiting = false
  19. elseif password == "End" then
  20.  waiting = false
  21. else
  22.  print("Incorrect")
  23.  sleep(1)
  24.  term.clear()
  25.  term.setCursorPos(1,1)
  26.  end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement