Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- For the purpose of helping the community to see what an exploiter can see when you use remotes.
- local RS = game.ReplicatedStorage
- function FindRemotes()
- local RSDes = RS:GetDescendants() -- Gets Everything In Replicated Storage
- local RemoteList = {}
- for i = 1,#RSDes do
- if RSDes[i]:IsA("RemoteEvent") then
- table.insert(RemoteList,RSDes[i])
- end
- end
- end
- function ListenForCommunication(RE)
- --------------------------------------------- Server Side
- if script:IsA("Script") then
- --- Listen For Remote Function
- RE.OnServerInvoke:Connect(function(Data)
- DisplayData(RE,Data,"ServerInvoke")
- end)
- --- Listen For Remote Event
- RE.OnServerEvent:Connect(function(Data)
- DisplayData(RE,Data,"ServerEvent")
- end)
- end
- ---------------------------------------------- Client Side
- if script:IsA("LocalScript") then
- --- Listen For Remote Function
- RE.OnClientInvoke:Connect(function(Data)
- DisplayData(RE,Data,"ClientInvoke")
- end)
- --- Listen For Remote Event
- RE.OnClientEvent:Connect(function(Data)
- DisplayData(RE,Data,"ClientEvent")
- end)
- end
- end
- function DisplayData(RE,Data,EventType)
- if type(Data) == "table" then
- print("--------" .. RE.Name .. " " .. EventType)
- print("Table Data")
- for i = 1,#Data do
- print(Data[i])
- end
- end
- if type(Data) == "string" then
- print("--------" .. RE.Name .. " " .. EventType)
- print("StringData")
- print(Data)
- end
- if typeof(Data) == "Instance" then
- print("--------" .. RE.Name .. " " .. EventType)
- print("Instance Data")
- print("Name: " .. Data.Name)
- print("ClassName: " ..Data.ClassName)
- end
- end
- function StartListening()
- local RemoteList = FindRemotes()
- for i = 1,#RemoteList do
- ListenForCommunication(RemoteList[i])
- end
- game.ReplicatedStorage.DescendantAdded:Connect(function(Des)
- if Des.ClassName == "RemoteEvent" then
- ListenForCommunication(Des)
- end
- end)
- end
- StartListening()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement