Advertisement
djgaven588

Rednet Door

Dec 10th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. rednet.open("back")
  2. local password = "1337"
  3. local rednetOpenMsg = "Sieve Area, Unlocked!"
  4. local rednetFailedMsg = "Sieve Area, Failed Login!"
  5. p = peripheral.wrap("top")
  6. term.clear()
  7. p.clear()
  8. term.setCursorPos(1,1)
  9. p.setCursorPos(1,1)
  10. term.setTextColor(colors.white)
  11. p.setTextColor(colors.white)
  12. p.write("+=====================================+")
  13. p.setCursorPos(1,2)
  14. p.write(": :")
  15. p.setCursorPos(1,3)
  16. p.write(": Djgaven588's Sieve Setup :")
  17. p.setCursorPos(1,4)
  18. p.write(": :")
  19. p.setCursorPos(1,5)
  20. p.write("+=====================================+")
  21. print("Please Enter Password: ")
  22. local input = read("*")
  23. if input == password then
  24. redstone.setOutput("left", true)
  25. term.setTextColor(colors.green)
  26. print("Access Granted!")
  27. rednet.broadcast(rednetOpenMsg, "passwordLog")
  28. sleep(5)
  29. redstone.setOutput("left", false)
  30. else
  31. term.setTextColor(colors.red)
  32. print("Access Denied.")
  33. rednet.broadcast(rednetFailedMsg, "passwordLog")
  34. sleep(3)
  35. end
  36. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement