Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- rednet.open("back")
- rs.setOutput("right", false) -- Change "right" to whatever side the door is on.
- print("Welcome to TiinTech Security System.") -- DO NOT MODIFY THIS. THIS IS THE EQUIVALENT OF A COPYRIGHT.
- print("Please enter the password.")
- local f = read("*")
- rednet.broadcast(f)
- local scrap, m = rednet.receive()
- if m == "use1good" then
- print("Access Granted.") -- Customize this message as you wish.
- local l = "right" -- Change "right" to whatever side the door is on.
- rs.setOutput(l,true)
- sleep(3)
- rs.setOutput(l,false)
- term.clear()
- term.setCursorPos(1,1)
- elseif m == "use2good" then
- print("Welcome, User 2.") -- Customize this message as you wish.
- local l = "right" -- Change "right" to whatever side the door is on.
- rs.setOutput(l,true)
- sleep(3)
- rs.setOutput(l,false)
- term.clear()
- term.setCursorPos(1,1)
- elseif m == "x" then
- print("Password denied.")
- print("Alarm activated.")
- rs.setOutput("back", true) -- Change this to whatever side the alarm is on.
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- end
- shell.run("reboot")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement