--[[local u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));

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


return function(p1, p2, p3, p4)
	--print(p1, p2, p3, p4)
	local v2 = p1:FindFirstChildOfClass("UIGridLayout");
	local l__isGolden__3 = u1.Directory.Eggs[p3].isGolden;
	--local v4, v5, v6 = ipairs(p4);
	for v5, v6 in ipairs(p4) do
		local v7, v8 = v5, v6
		if not v7 then
			break;
		end;
		local v9 = u1.Directory.Pets[tostring(v8[1])];
		local l__rarity__10 = v9.rarity;
		local v11 = u1.Assets.UI.EggInfo.Pet:Clone();
		local v12 = (function()
			local v13 = 0;
			for v14, v15 in ipairs(p4) do
				v13 = v13 + v15[2];
			end;
			return v8[2] / v13 * 100;
		end)();
		v11.Thumbnail.Image = l__isGolden__3 and v9.goldenThumbnail or v9.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
	
	
	--[[print(p1, p2, p3, p4)
	local v2 = p1:FindFirstChildOfClass("UIGridLayout");
	local l__isGolden__3 = v1.Directory.Eggs[p3].isGolden;
	--local v4, v5, v6 = ipairs(p4);
	for v5, v6 in ipairs(p4) do
		local v7, v8 = v5, v6
		if not v7 then
			break;
		end;
		local v9 = v1.Directory.Pets[tostring(v8[1])];
		local l__rarity__10 = v9.rarity;
		local v11 = v1.Assets.UI.EggInfo.Pet:Clone();
		local v12 = (function()
			local v13 = 0;
			for v14, v15 in ipairs(p4) do
				v13 = v13 + v15[2];
			end;
			return v8[2] / v13 * 100;
		end)();
		v11.Thumbnail.Image = l__isGolden__3 and v9.goldenThumbnail or v9.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]]--
	
	--while true do
	--	local v7, v8 = v4(v5, v6);
	--	if not v7 then
	--		break;
	--	end;
	--	local v9 = v1.Directory.Pets[v8[1]];
	--	local l__rarity__10 = v9.rarity;
	--	local v11 = v1.Assets.UI.EggInfo.Pet:Clone();
	--	local v12 = (function()
	--		local v13 = 0;
	--		for v14, v15 in ipairs(p4) do
	--			v13 = v13 + v15[2];
	--		end;
	--		return v8[2] / v13 * 100;
	--	end)();
	--	v11.Thumbnail.Image = l__isGolden__3 and v9.goldenThumbnail or v9.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;