Cardwell

Piston door Ver 0.4

Jun 15th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. local side = "left"
  2.  
  3. ps = "bacon"
  4.  
  5. local opentime = 5
  6.  
  7. while true do
  8.  
  9. term.clear()
  10.  
  11. term.setCursorPos(1,1)
  12.  
  13. write(" Please Enter Password: ")
  14.  
  15. local input = read("*")
  16.  
  17. if input == ps
  18.  
  19. then term.clear()
  20.  
  21. term.setCursorPos(1,1)
  22.  
  23. print("Password correct!")
  24.  
  25. rs.setOutput(side,true)
  26.  
  27. sleep(opentime)
  28.  
  29. rs.setOutput(side,false)
  30.  
  31. else
  32.  
  33. print("Password incorrect!")
  34.  
  35. sleep(2)
  36.  
  37. end
  38.  
  39. end
Add Comment
Please, Sign In to add comment