Advertisement
jonnathonchristopher

password

Dec 8th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. local side = "left"
  2. local password = "bacon"
  3. local opentime = 5
  4. while true do
  5. term.clear()
  6. term.setCursorPos(1,1)
  7. write("Password: ")
  8. local input = read("*")
  9. if input == password then
  10. term.clear()
  11. term.setCursorPos(1,1)
  12. print("Password correct!")
  13. rs.setOutput(side,true)
  14. sleep(opentime)
  15. rs.setOutput(side,false)
  16. else
  17. print("Password incorrect!")
  18. sleep(2)
  19. end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement