Advertisement
squall78

startup

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