local r=game:GetService("\083\116\097\116\115")local N=require(script.Parent.Parent.storage.constants)local j=require(script.Parent.Parent.components.notification.notification)local E=require(script.Parent.Parent.packages.states)local L=(r:WaitForChild("\070\114\097\109\101\082\097\116\101\077\097\110\097\103\101\114")):WaitForChild("\082\101\110\100\101\114\065\118\101\114\097\103\101")local q=((r:WaitForChild("\078\101\116\119\111\114\107")):WaitForChild("\083\101\114\118\101\114\083\116\097\116\115\073\116\101\109")):WaitForChild("\068\097\116\097 \080\105\110\103")local function v()while task.wait(5)do local r=math.round((1000/L:GetValue())*10)/10 local N=math.round(q:GetValue()*10)/10 if N>150 and E.PingCheck:get()then j({title="\080\105\110\103",description="\087\101 \110\111\116\105\099\101\100 \121\111\117\114 \080\105\110\103 \105\115 \104\105\103\104\046  \089\111\117 \109\097\121 \101\120\112\101\114\105\101\110\099\101 \108\097\116\101\110\099\121 \105\115\115\117\101\115\046",duration=8,type="\119\097\114\110\105\110\103"})return end if r<=30 and E.FPSCheck then j({title="\070\080\083",description="\087\101 \110\111\116\105\099\101\100 \121\111\117\114 \070\080\083 \105\115 \108\111\119\046 \084\114\121 \102\114\101\101\105\110\103 \117\112 \115\111\109\101 \114\101\115\111\117\114\099\101\115 \111\110 \121\111\117\114 \099\111\109\112\117\116\101\114\046",duration=8,type="\119\097\114\110\105\110\103"})return end end end if not N._IS_DEV then v()end
-- < Services >
local Stats = game:GetService("Stats")

-- < Imports >
local Constants = require(script.Parent.Parent.storage.constants)
local Notification = require(script.Parent.Parent.components.notification.notification)
local States = require(script.Parent.Parent.packages.states)

-- < Variables >
local Frames = Stats:WaitForChild("FrameRateManager"):WaitForChild("RenderAverage")
local Ping = Stats:WaitForChild("Network"):WaitForChild("ServerStatsItem"):WaitForChild("Data Ping")

-- < Handling >
local function main()
	while task.wait(5) do
		local fps = math.round((1_000 / Frames:GetValue()) * 10) / 10
		local ping = math.round(Ping:GetValue() * 10) / 10

		if ping > 150 and States.PingCheck:get() then
			Notification({
				title = "Ping",
				description = "We noticed your Ping is high.  You may experience latency issues.",
				duration = 8,
				type = "warning",
			})

			return
		end

		if fps <= 30 and States.FPSCheck then
			Notification({
				title = "FPS",
				description = "We noticed your FPS is low. Try freeing up some resources on your computer.",
				duration = 8,
				type = "warning",
			})

			return
		end
	end
end

if not Constants._IS_DEV then
	main()
end
