--- Elder was h3re
---Decompiled with the Synapse X Luau decompiler.


local v1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));

while not v1.Loaded do
	game:GetService("RunService").Heartbeat:Wait();
end;

return function(p1, p2, p3, p4)
	local v2 = p1:FindFirstChildOfClass("UIGridLayout");
	local isGolden = v1.Directory.Eggs[p3].isGolden;
	for v7, v8 in ipairs(p4) do
		if not v7 then
			break;
		end;
		local v11 = v1.Assets.UI.EggInfo.Pet:Clone();
		local v13 = 0;
		for i,v in pairs(p4) do
			v13 = v13 + v[2];
		end
		local v12 = v8[2] / v13 * 100;
		v11.Thumbnail.Image = v1.Directory.Pets[v8[1]].thumbnail;
		v11.LayoutOrder = 9999 - v12;
		local v16, v17, v18 = Color3.toHSV((Color3.fromRGB(49, 255, 39):Lerp(Color3.fromRGB(255, 75, 39), (math.clamp(94.2467 * math.pow(0.9315, v12) / 100, 0, 1)))));
		v11.Thumbnail.Chance.TextColor3 = Color3.fromHSV(v16, v17, v18 * 2);
		if v12 < 1 then
			v11.Thumbnail.Chance.Text = math.round(v12 * 100) / 100 .. "%";
		else
			v11.Thumbnail.Chance.Text = math.round(v12) .. "%";
		end;
		v11.Thumbnail.Position = UDim2.new(0, 0, 0, 0);
		v11.Thumbnail.ImageTransparency = 0;
		v11.Parent = p1;
	end;
end;

