Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not fs.exists("/Fsociety/data/side") then
- print("ERROR NO SIDE FILE")
- os.reboot()
- end
- sideFile = fs.open("/Fsociety/data/side","r")
- modemSide = sideFile.readLine()
- NotAllowed = sideFile.readLine()
- Allowed = sideFile.readLine()
- sideFile.close()
- --------------------------------------------
- -- --
- -- Output System from --
- -- Security System V0.1 --
- -- By Fsociety --
- -- --
- --------------------------------------------
- local m = peripheral.wrap(modemSide)
- m.open(101)
- local key = nil
- rs.setOutput(NotAllowed,true)
- while true do
- local event , param1 , param2 , param3 , param4 = os.pullEvent()
- m.transmit(100,100,param4)
- if event == "modem_message" then
- if param3 == 55 and param4 == "User allowed" then
- rs.setOutput(Allowed,true)
- rs.setOutput(NotAllowed,false)
- elseif param3 == 55 and param4 ~= "User allowed" then
- rs.setOutput(Allowed,false)
- rs.setOutput(NotAllowed,true)
- elseif param3 ~= 55 then
- while true do
- rs.setOutput(NotAllowed,false)
- sleep(0.5)
- rs.setOutput(NotAllowed,true)
- sleep(0.5)
- term.setTextColor(colors.red)
- print("ERROR BAD CHANNEL CONTACT ADMINISTRATOR")
- end
- end
- end
- sleep(0.1)
- end
Add Comment
Please, Sign In to add comment