Guest User

1

a guest
Oct 25th, 2017
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. --Disable Manual Termination
  2. os.pullEvent = os.pullEventRaw
  3. --Declare Variables
  4. local username;
  5. local password;
  6. id = "Crysys";
  7. key = "thewhiterabbit";
  8. override= "6552180573395";
  9. alarmSide = "back";
  10. alarmTimeout = "3";
  11. doorSide = "bottom";
  12. doorTimeout = "5";
  13. errorTimeout = "1";
  14. delay = "1";
  15. --Display Data Requests, Get Inputs
  16. term.clear();
  17. term.setCursorPos(1,1);
  18. print("Nuclear Facility - Access Verification Required");
  19. print("");
  20. print("Username:");
  21. term.setCursorPos(11,3);
  22. username = read();
  23. print("Password:");
  24. term.setCursorPos(11,4);
  25. password = read("*");
  26. --Handle Inputs
  27. if username == id and password == key then
  28. term.clear();
  29. term.setCursorPos(1,1);
  30. print("Access Granted");
  31. rs.setOutput(alarmSide, true);
  32. sleep(alarmTimeout);
  33. rs.setOutput(alarmSide, false);
  34. sleep(delay);
  35. rs.setOutput(doorSide, true);
  36. sleep(doorTimeout);
  37. rs.setOutput(doorSide, false);
  38. os.reboot();
  39. elseif username == id and password == override then
  40. term.clear();
  41. term.setCursorPos(1,1);
  42. print("Maintanence Mode ENABLED");
  43. print("");
  44. else
  45. print("Login FAILED");
  46. sleep(errorTimeout);
  47. os.reboot();
  48. end
Add Comment
Please, Sign In to add comment