local K=require((game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")):WaitForChild("\076\111\097\100\101\114"))local U=K("\112\108\097\121\101\114")local u=K("\078\101\116\119\111\114\107")return{ParameterGenerator=function()local K=U.generate(1)return K end,Functions={["\102\105\114\101 \101\118\101\110\116"]=function(K,U)u:FireAllClients("\066\082\069\078\067\072\077\082\075\095\070\073\082\069",U)end,["\102\105\114\101 \098\105\110\100\097\098\108\101"]=function(K,U)u:FireBindable("\066\082\069\078\067\072\077\082\075\095\070\073\082\069",U)end;["\099\114\101\097\116\101 \101\118\101\110\116"]=function(K,U)local e=u.CreateEvent("\066\069\078\067\072\077\065\082\075\095\067\082\069\065\084\069")assert(typeof(e)=="\073\110\115\116\097\110\099\101"and e:IsA("\082\101\109\111\116\101\069\118\101\110\116"),"\070\097\105\108\101\100 \116\111 \099\114\101\097\116\101 \082\101\109\111\116\101\069\118\101\110\116")end;["\099\114\101\097\116\101 \098\105\110\100\097\098\108\101"]=function(K,U)local e=u.CreateBindableEvent("\066\069\078\067\072\077\065\082\075\095\067\082\069\065\084\069")assert(typeof(e)=="\073\110\115\116\097\110\099\101"and e:IsA("\066\105\110\100\097\098\108\101\069\118\101\110\116"),"\070\097\105\108\101\100 \116\111 \099\114\101\097\116\101 \066\105\110\100\097\098\108\101\069\118\101\110\116")end;["\104\111\111\107 \101\118\101\110\116"]=function(K,U)local e e=u:HookEvent("\066\069\078\067\072\077\065\082\075\095\069\086\069\078\084",function()u:UnhookEvent("\066\069\078\067\072\077\065\082\075\095\069\086\069\078\084")end)assert(typeof(e)=="\073\110\115\116\097\110\099\101"and e:IsA("\082\101\109\111\116\101\069\118\101\110\116"),"\070\097\105\108\101\100 \116\111 \104\111\111\107 \082\101\109\111\116\101\069\118\101\110\116")end,["\098\105\110\100 \101\118\101\110\116"]=function(K,U)local e=u:BindEvent("\066\069\078\067\072\077\065\082\075\095\069\086\069\078\084",function()u:UnbindEvent("\066\069\078\067\072\077\065\082\075\095\069\086\069\078\084")end)assert(typeof(e)=="\073\110\115\116\097\110\099\101"and e:IsA("\066\105\110\100\097\098\108\101\069\118\101\110\116"),"\070\097\105\108\101\100 \116\111 \104\111\111\107 \066\105\110\100\097\098\108\101\069\118\101\110\116")end;pipeline=function(K,U)local e e=u:BindEvent("\066\069\078\067\072\077\065\082\075\095\066\073\078\068\065\066\076\069",function()e=nil end)assert(typeof(e)=="\073\110\115\116\097\110\099\101"and e:IsA("\066\105\110\100\097\098\108\101\069\118\101\110\116"),"\070\097\105\108\101\100 \116\111 \099\111\110\110\101\099\116 \101\118\101\110\116")u:FireBindable("\066\069\078\067\072\077\065\082\075\095\066\073\078\068\065\066\076\069")end,connection=function(K,U)local e=u:HookEvent("\066\069\078\067\072\077\065\082\075\095\072\079\079\075",function()print("\065\110\111\110\121\109\111\117\115 \102\117\110\099\116\105\111\110")end)assert(e,"\070\097\105\108\101\100 \116\111 \104\111\111\107 \101\118\101\110\116")e=u:UnhookEvent("\066\069\078\067\072\077\065\082\075\095\072\079\079\075")assert(e,"\070\097\105\108\101\100 \116\111 \117\110\104\111\111\107 \101\118\101\110\116")end,invocation=function(K,U)local e=u:BindFunction("\066\069\078\067\072\077\065\082\075\095\073\078\086\079\075\069",function()u:UnbindFunction("\066\069\078\067\072\077\065\082\075\095\073\078\086\079\075\069")return true end)assert(e,"\070\097\105\108\101\100 \116\111 \098\105\110\100 \102\117\110\099\116\105\111\110")local M=u:InvokeBindable("\066\069\078\067\072\077\065\082\075\095\073\078\086\079\075\069")assert(M and typeof(M)=="\098\111\111\108\101\097\110","\070\097\105\108\101\100 \116\111 \105\110\118\111\107\101 \066\105\110\100\097\098\108\101\070\117\110\099\116\105\111\110")end}}
local Loader = require(game:GetService("ReplicatedStorage"):WaitForChild("Loader"))
local Player = Loader("player")
local Network = Loader("Network")

return {
	["ParameterGenerator"] = function()
		local plr = Player.generate(1)
		return plr
	end,

	["Functions"] = {
		["fire event"] = function(profiler, plr)
			Network:FireAllClients("BRENCHMRK_FIRE", plr)
		end,

		["fire bindable"] = function(profiler, plr)
			Network:FireBindable("BRENCHMRK_FIRE", plr)
		end,

		["create event"] = function(profiler, plr)
			local result = Network.CreateEvent("BENCHMARK_CREATE")
			assert(
				typeof(result) == "Instance" and result:IsA("RemoteEvent"),
				"Failed to create RemoteEvent"
			)
		end,

		["create bindable"] = function(profiler, plr)
			local result = Network.CreateBindableEvent("BENCHMARK_CREATE")
			assert(
				typeof(result) == "Instance" and result:IsA("BindableEvent"),
				"Failed to create BindableEvent"
			)
		end,

		["hook event"] = function(profiler, plr)
			local result
			result = Network:HookEvent("BENCHMARK_EVENT", function()
				Network:UnhookEvent("BENCHMARK_EVENT")
			end)
			assert(
				typeof(result) == "Instance" and result:IsA("RemoteEvent"),
				"Failed to hook RemoteEvent"
			)
		end,

		["bind event"] = function(profiler, plr)
			local result = Network:BindEvent("BENCHMARK_EVENT", function()
				Network:UnbindEvent("BENCHMARK_EVENT")
			end)
			assert(
				typeof(result) == "Instance" and result:IsA("BindableEvent"),
				"Failed to hook BindableEvent"
			)
		end,

		["pipeline"] = function(profiler, plr)
			local result
			result = Network:BindEvent("BENCHMARK_BINDABLE", function()
				result = nil
			end)
			assert(
				typeof(result) == "Instance" and result:IsA("BindableEvent"),
				"Failed to connect event"
			)

			Network:FireBindable("BENCHMARK_BINDABLE")
		end,

		["connection"] = function(profiler, plr)
			local result = Network:HookEvent("BENCHMARK_HOOK", function()
				print("Anonymous function")
			end)
			assert(result, "Failed to hook event")

			result = Network:UnhookEvent("BENCHMARK_HOOK")
			assert(result, "Failed to unhook event")
		end,

		["invocation"] = function(profiler, plr)
			local event = Network:BindFunction("BENCHMARK_INVOKE", function()
				Network:UnbindFunction("BENCHMARK_INVOKE")
				return true
			end)
			assert(event, "Failed to bind function")

			local result = Network:InvokeBindable("BENCHMARK_INVOKE")
			assert(result and typeof(result) == "boolean", "Failed to invoke BindableFunction")
		end,
	},
}
