local U=nil;(coroutine.wrap(function()U=require(game.ReplicatedStorage:WaitForChild("\082\101\115\111\117\114\099\101\115"))end))()local o={}local N={}function o.Get(o)local q=N[o]if q then local N=q[1]local R=U.StatService.Get(N)if R then local U=R.Pets[q[2]]if U and U.uid==o then return U,N end end end for q,R in pairs(game.Players:GetPlayers())do local y=U.StatService.Get(R)if y then for U,q in ipairs(y.Pets)do if not U then break end if q.uid==o then N[o]={R,U}return q,R,y end end end end end function o.AllEquipped(o)local N={}for U,o in ipairs((U.StatService.Get(o)).Pets)do if not U then break end if o.e then table.insert(N,o)end end return N end function o.GetNowStrength(o)local N=U.StatService.Get(o)if not N then return end local q=0 for U,o in ipairs(N.Pets)do if not U then break end if o.e then q=q+o.em end end return q end function o.GetBestStrength(o)local N=U.StatService.Get(o)if not N then return end table.sort(N.Pets,function(U,o)if math.abs(U.em-o.em)<1 then return U.idt<o.idt end return o.em<U.em end)local q=0 local R=0 for U,o in ipairs(N.Pets)do if not U then break end if q<N.MaxEquipped then q=q+1 R=R+o.em end end return R end function o.AllBestEquipped(N)if not U.StatService.Get(N)then return end return o.GetNowStrength(N)==o.GetBestStrength(N)end task.defer(function()while task.wait(300)do N={}end end)return o


local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
end)();
local v1 = {};
local u2 = {};
function v1.Get(p1)
	local v2 = u2[p1];
	if v2 then
		local v3 = v2[1];
		local v4 = u1.StatService.Get(v3);
		if v4 then
			local v5 = v4.Pets[v2[2]];
			if v5 and v5.uid == p1 then
				return v5, v3;
			end;
		end;
	end;
	for v6, v7 in pairs(game.Players:GetPlayers()) do
		local v8 = u1.StatService.Get(v7);
		if v8 then

				for v9, v10 in ipairs(v8.Pets) do
				if not v9 then
					break;
				end;
				if v10.uid == p1 then
					u2[p1] = { v7, v9 };
					return v10, v7, v8;
				end;			
			end;
		end;
	end;
end;
function v1.AllEquipped(p2)
	local v12 = {};

		for v13, v14 in ipairs(u1.StatService.Get(p2).Pets) do
		if not v13 then
			break;
		end;
		if v14.e then
			table.insert(v12, v14);
		end;	
	end;
	return v12;
end;
function v1.GetNowStrength(p3)
	local v16 = u1.StatService.Get(p3);
	if not v16 then
		return;
	end;
	local v17 = 0;

		for v18, v19 in ipairs(v16.Pets) do
		if not v18 then
			break;
		end;
		if v19.e then
			v17 = v17 + v19.em;
		end;	
	end;
	return v17;
end;
function v1.GetBestStrength(p4)
	local v21 = u1.StatService.Get(p4);
	if not v21 then
		return;
	end;
	table.sort(v21.Pets, function(p5, p6)
		if math.abs(p5.em - p6.em) < 1 then
			return p5.idt < p6.idt;
		end;
		return p6.em < p5.em;
	end);
	local v22 = 0;
	local v23 = 0;

		for v24, v25 in ipairs(v21.Pets) do
		if not v24 then
			break;
		end;
		if v22 < v21.MaxEquipped then
			v22 = v22 + 1;
			v23 = v23 + v25.em;
		end;	
	end;
	return v23;
end;
function v1.AllBestEquipped(p7)
	if not u1.StatService.Get(p7) then
		return;
	end;
	return v1.GetNowStrength(p7) == v1.GetBestStrength(p7);
end;
task.defer(function()
	while task.wait(300) do
		u2 = {};	
	end;
end);
return v1;
