Advertisement
Guest User

ComputerCraft Password locked door with GUI

a guest
Feb 25th, 2016
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. --Coding By Bharhal from TwoGuysGaming
  2. --Stage One
  3. term.clear()
  4. term.setCursorPos(1,1)
  5. print("+-----Home------+")
  6. print("| BHARHAL'S |")
  7. print("|Enter Password:|")
  8. print("| HOUSE |")
  9. print("+---------------+")
  10. write("Password: ")
  11. local guiPass = read("*")
  12.  
  13. --Stage Two
  14. if guiPass == ("test") then
  15. print("correct!")
  16. sleep(1)
  17. term.clear()
  18. redstone.setOutput("left",true)
  19. sleep(6)
  20. redstone.setOutput("left",false)
  21. sleep(1)
  22. os.reboot()
  23. else
  24. term.clear()
  25. term.setCursorPos(1,1)
  26. print("+-----Home------+")
  27. print("|Pass incorrect!|")
  28. print("+---------------+")
  29. sleep(2)
  30. os.reboot()
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement