local Y={}local Q=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local a=game:GetService("\082\117\110\083\101\114\118\105\099\101")local J=game:GetService("\080\108\097\121\101\114\115")local h={}local F={}local d=a:IsStudio()local P=a:IsServer()local H local function r(...)local Y=table.pack(...)local Q=math.min(10,Y.n)for Q=1,Q,1 do local a=Y[Q]local J=typeof(Y[Q])if J=="\115\116\114\105\110\103"then Y[Q]=string.format("\037\113\091\037\100\093",#a<=18 and a or a:sub(1,15).."\046\046\046",#a)elseif J=="\073\110\115\116\097\110\099\101"then local h,F=pcall(function()return a.ClassName end)Y[Q]=h and string.format("\037\115\060\037\115\062",J,F)or J else Y[Q]=J end end return table.concat(Y,"\044 ",1,Q)..(Y.n>Q and string.format("\044 \046\046\046 \040\037\100 \109\111\114\101\041",Y.n-Q)or"")end local W={}local j=0 local Z=0 local R,w,U if P then R=Instance.new("\070\111\108\100\101\114",Q)R.Name="\067\111\109\109\117\110\105\099\097\116\105\111\110"w=Instance.new("\070\111\108\100\101\114",R)w.Name="\070\117\110\099\116\105\111\110\115"U=Instance.new("\070\111\108\100\101\114",R)U.Name="\069\118\101\110\116\115"else R=Q:WaitForChild("\067\111\109\109\117\110\105\099\097\116\105\111\110")w=R:WaitForChild("\070\117\110\099\116\105\111\110\115")U=R:WaitForChild("\069\118\101\110\116\115")end



local Network = {}

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")

local EventHandlers = {}
local FunctionHandlers = {}

local IsStudio = RunService:IsStudio()
local IsServer = RunService:IsServer()

local LoggingNetwork
local function GetParamString(...)
	local tab = table.pack(...)
	local n = math.min(10, tab.n)
	
	for index = 1, n do 
		local value = tab[index]
		local valueType = typeof(tab[index])
		
		if valueType == "string" then
			tab[index] = string.format("%q[%d]", #value <= 18 and value or value:sub(1, 15) .. "...", #value)
		elseif valueType == "Instance" then
			local success, className = pcall(function() return value.ClassName end)
			tab[index] = success and string.format("%s<%s>", valueType, className) or valueType
		else
			tab[index] = valueType
		end
	end
	
	return table.concat(tab, ", ", 1, n) .. (tab.n > n and string.format(", ... (%d more)", tab.n - n) or "")
end

local DeferredHandlers = {}

local ReceiveCounter = 0
local InvokeCounter = 0

local Communication,FunctionsFolder,EventsFolder

if IsServer then
	Communication = Instance.new("Folder",ReplicatedStorage)
	Communication.Name = "Communication"
	FunctionsFolder = Instance.new("Folder",Communication)
	FunctionsFolder.Name = "Functions"
	EventsFolder = Instance.new("Folder",Communication)
	EventsFolder.Name = "Events"
else
	Communication = ReplicatedStorage:WaitForChild("Communication")
	FunctionsFolder = Communication:WaitForChild("Functions")
	EventsFolder = Communication:WaitForChild("Events")
end