Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pfpChans = {"5678"}
- local ftaChans = {}
- local subIDs = {"0000001"}
- term.clear()
- term.setCursorPos(1,1)
- print("FunRide Broadcasting Subscription/Free to Air Encryption")
- print("This computer's ID is: "..os.getComputerID())
- local modem = peripheral.find("modem")
- if not modem then
- print("Modem required!")
- return
- end
- modem.open(5555)
- while true do
- e = {os.pullEvent()}
- if e[1] == "modem_message" and e[3] == 5555 and e[5]:sub(1,17) == "request_subscrip_" then
- print("Someone just requested subscription")
- id2 = e[5]:gsub("request_subscrip_","")
- id = tonumber(id2)
- for i,v in pairs(pfpChans) do
- if tonumber(v) == id then
- sleep(0.5)
- modem.transmit(5555,id,tostring(id).."_PFP")
- print("They found a matching PFP channel ID!")
- end
- end
- for i,v in pairs(ftaChans) do
- if tonumber(v) == id then
- sleep(0.5)
- modem.transmit(5555,id,tostring(id).."_FTA")
- print("They found a matching FTA channel ID!")
- end
- end
- elseif e[1] == "modem_message" and e[3] == 5555 and e[5]:sub(1,11) == "verify_sub_" then
- print("Someone is verifying their subscription!")
- chan2 = e[5]:gsub("verify_sub_","")
- chan = tonumber(chan2)
- verifyYes = 0
- for i,v in pairs(subIDs) do
- if tonumber(v) == chan then
- sleep(0.5)
- print("Their subscription was found!")
- modem.transmit(5555,e[4],"verify_yes_"..e[4])
- verifyYes = 1
- end
- end
- if verifyYes == 0 then
- sleep(0.5)
- print("They didn't find a subscription D:")
- modem.transmit(555,e[4],"verify_no_"..e[4])
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment