Mr_redstone5230

1234

Nov 25th, 2017
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. local Password = ""
  2. local Correct = "1234"
  3. local Redstone = "0"
  4.  
  5. function Pass()
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. print("Please enter the password")
  9. term.setCursorPos(1,3)
  10. print("Incorect Password !")
  11. term.setCursorPos(1,2)
  12. write("Password: ")
  13. Password = read()
  14. Detect()
  15. end
  16.  
  17. function Detect()
  18. if Password == Correct then
  19. Corrects()
  20. else
  21. print("Incorect Password !")
  22. Pass()
  23. end
  24. end
  25.  
  26. function Corrects()
  27. term.setCursorPos(1,3)
  28. term.clearLine()
  29. print("Correct Password !")
  30. redstone.setOutput("left", true)
  31. write("Press Enter to close the door")
  32. Redstone = read()
  33. redstone.setOutput("left", false)
  34. term.clear()
  35. term.setCursorPos(1,1)
  36. print("Please enter the password")
  37. write("Password: ")
  38. Password = read()
  39. Detect()
  40. end
  41.  
  42.  
  43.  
  44. term.clear()
  45. term.setCursorPos(1,1)
  46. print("Please enter the password")
  47. write("Password: ")
  48. Password = read()
  49. Detect()
Add Comment
Please, Sign In to add comment