Corbinhol

Door Code

Feb 3rd, 2023 (edited)
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. local redstoneSide = "back";
  2. local passcode = "8008135";
  3.  
  4. while true do
  5. redstone.setOutput("back", false);
  6. shell.run("clear");
  7. print("==============================")
  8. term.setTextColor(colors.red);
  9. print(" High Security Area")
  10. term.setTextColor(colors.white);
  11. print(" Authorized Personel Only")
  12. print("==============================")
  13. io.write("Password: ")
  14. local input = io.read();
  15. if input == passcode then
  16. shell.run("clear");
  17. print("==============================")
  18. term.setTextColor(colors.green);
  19. print(" Access Granted")
  20. term.setTextColor(colors.white);
  21. print(" Opening Door!")
  22. print("==============================")
  23. redstone.setOutput("back", true);
  24. os.sleep(5);
  25. else
  26. shell.run("clear");
  27. print("==============================")
  28. term.setTextColor(colors.red);
  29. print(" Incorrect Password")
  30. term.setTextColor(colors.white);
  31. print(" Please Try Again")
  32. print("==============================")
  33. os.sleep(2);
  34. end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment