Guest User

Untitled

a guest
Dec 16th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. term.clear()
  2.  
  3. term.setCursorPos(1,1)
  4.  
  5.  
  6.  
  7. password = "[your passord]" --Sets the password
  8.  
  9. debug = "debug" --Sets debugging password
  10.  
  11. write("Enter your password: ")
  12.  
  13. input = read() --Input the password
  14.  
  15.  
  16.  
  17. term.clear() --Clearing the terminal, and...
  18.  
  19. term.setCursorPos(1,1) --...THEN setting the cursor position
  20.  
  21. if input == password then
  22.  
  23. print("Password Correct!") --If the input is correct!
  24.  
  25. rs.setOutput("left",true) --Change this and the setOutput to the side the door is on
  26.  
  27. sleep(2) --Pause for 5 seconds
  28.  
  29. rs.setOutput("left",false)
  30.  
  31. os.shutdown() --Shut down the computer
  32.  
  33. elseif input == debug then
  34.  
  35. exit() --Exits the program
  36.  
  37. else
  38.  
  39. print("Password Incorrect!") --If the input is incorrect! (Oh Noes!)
  40.  
  41. sleep(2)
  42.  
  43. os.shutdown() --Shut down the computer
  44.  
  45. end --Ends the 'if' block
Add Comment
Please, Sign In to add comment