rhys19

Untitled

Jun 3rd, 2018
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. rednet.open("back")
  3. rednet.open("right")
  4. rednet.open("top")
  5. rednet.open("bottom")
  6. rednet.open("front")
  7. rednet.open("left")
  8. rs.setOutput("right", false) -- Change "right" to whatever side the door is on.
  9. print("Welcome to TiinTech Security System.") -- DO NOT MODIFY THIS. THIS IS THE EQUIVALENT OF A COPYRIGHT.
  10. print("Please enter the password.")
  11. local f = read("*")
  12. rednet.broadcast(f)
  13. local scrap, m = rednet.receive()
  14. if m == "use1good" then
  15. print("Access Granted.") -- Customize this message as you wish.
  16. local l = "right" -- Change "right" to whatever side the door is on.
  17. rs.setOutput(l,true)
  18. sleep(3)
  19. rs.setOutput(l,false)
  20. term.clear()
  21. term.setCursorPos(1,1)
  22. elseif m == "use2good" then
  23. print("Welcome, User 2.") -- Customize this message as you wish.
  24. local l = "right" -- Change "right" to whatever side the door is on.
  25. rs.setOutput(l,true)
  26. sleep(3)
  27. rs.setOutput(l,false)
  28. term.clear()
  29. term.setCursorPos(1,1)
  30. elseif m == "x" then
  31. print("Password denied.")
  32. print("Alarm activated.")
  33. rs.setOutput("back", true) -- Change this to whatever side the alarm is on.
  34. sleep(1)
  35. term.clear()
  36. term.setCursorPos(1,1)
  37. end
  38. shell.run("reboot")
Add Comment
Please, Sign In to add comment