Advertisement
Guest User

door

a guest
Jun 25th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. side = "back"
  2.  
  3. function pass1()
  4. term.clear()
  5. term.setCursorPos(1, 1)
  6. print("Please Enter Password:")
  7. input = read()
  8.  if input == "password" then
  9.   print("Password Accepted!")
  10.   sleep(2)
  11.   pass2()
  12.  else
  13.   print("Password Denied!")
  14.   sleep(2)
  15.  end
  16. end
  17.  
  18. function pass2()
  19. term.clear()
  20. term.setCursorPos(1, 1)
  21. print("Please Enter 2nd Password:")
  22. input = read()
  23. if input == "stargate" then
  24. print("2nd Password Accepted!")
  25. sleep(2)
  26. redstone()
  27. else
  28. print("Password Denied!")
  29. print("Falling Back!")
  30. sleep(2)
  31. pass1()
  32. end
  33. end
  34.  
  35. function redstone()
  36. redstone.setOutput(side, true)
  37. sleep(2)
  38. redstone.setOutput(side, false)
  39. end
  40.  
  41. while true do
  42. pass1()
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement