local p=game:GetService("\082\117\110\083\101\114\118\105\099\101")if not p:IsStudio()then return end local g=script:FindFirstAncestorOfClass("\080\108\117\103\105\110")local F=script.Components local s=script.Packages local r=require(s.Roact)local u=require(F.MainPlugin)local n=g:CreateToolbar("\080\097\099\107\101\116 \080\114\111\102\105\108\101\114")local m=n:CreateButton("\079\112\101\110 \080\114\111\102\105\108\101\114","\079\112\101\110 \080\114\111\102\105\108\101\114 \071\114\097\112\104","\114\098\120\097\115\115\101\116\105\100\058\047\047\049\048\050\056\051\052\048\055\048\057\055")local R=n:CreateButton("\079\112\101\110 \067\104\097\114\116","\079\112\101\110 \080\105\101 \067\104\097\114\116","\114\098\120\097\115\115\101\116\105\100\058\047\047\049\048\050\056\051\052\048\054\048\055\055")local i=r.createElement(u,{PacketProfiler=m;PacketChart=R})local h=r.mount(i,nil,"\080\097\099\107\101\116\080\114\111\102\105\108\101\114")g.Unloading:Connect(function()r.unmount(h)end)
local RunService = game:GetService("RunService")
if not RunService:IsStudio() then
	return
end

local Plugin = script:FindFirstAncestorOfClass("Plugin")

local Components = script.Components
local Packages = script.Packages

local Roact = require(Packages.Roact)
local MainPlugin = require(Components.MainPlugin)

local Toolbar = Plugin:CreateToolbar("Packet Profiler")

local PacketProfiler = Toolbar:CreateButton("Open Profiler", "Open Profiler Graph", "rbxassetid://10283407097")
local PacketChart = Toolbar:CreateButton("Open Chart", "Open Pie Chart", "rbxassetid://10283406077")

local Main = Roact.createElement(MainPlugin, {
	PacketProfiler = PacketProfiler,
	PacketChart = PacketChart,
})

local Handle = Roact.mount(Main, nil, "PacketProfiler")

Plugin.Unloading:Connect(function()
	Roact.unmount(Handle)
end)