-- Decompiled with the Synapse X Luau decompiler.


local v1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
while not v1.Loaded do
	game:GetService("RunService").Heartbeat:Wait();
end;
local l__Main__1 = v1.GUI.Main;
local u2 = false;
local u3 = {};
local l__Format__4 = v1.Functions.Format;
function Update()
	local v2 = v1.StatService.Get();
	if not v2 then
		return;
	end;

		for v6, v7 in pairs(v1.Shared.Currency) do
		if v6 then

		else
			break;
		end;
		local v8 = v2[v6];
		local v9 = l__Main__1.Right:FindFirstChild(v6);
		if not v9 then
			v9 = v1.Assets.UI.Main.Currency:Clone();
			v9.Name = v6;
			v9.Icon.Image = v7.image;
			local l__gradient__10 = v7.gradient;
			l__gradient__10:Clone().Parent = v9.Amount;
			l__gradient__10:Clone().Parent = v9:FindFirstChild("UIStroke");
			v9.LayoutOrder = 99999 - v7.order;
			if v6 == "Gems" then
				v9.Add.Visible = true;
				v1.GFX.Button(v9.Add);
				v9.Add.Activated:Connect(function()
					if not u2 then
						u2 = true;
						v1.Signal.Fire("Exlusive Shop Tab", "Gems");
						u2 = false;
					end;
				end);
			end;
			v9.Parent = l__Main__1.Right;
		end;
		local v11 = u3[v6] or v8;
		if v11 < v8 then
			v1.Signal.Fire("Pop Up", v6, ("+%s %s"):format(l__Format__4.Short(v8 - v11), v6));
		end;
		u3[v6] = v8;
		if v9 then
			v9.Amount.Text = 1000000 < v8 and l__Format__4.Short(v8) or l__Format__4.Commas(v8);
		end;	
	end;
end;

	for v12, v13 in ipairs(l__Main__1.Right:GetChildren()) do
	if not v12 then
		break;
	end;
	if v13.ClassName == "Frame" and v13:FindFirstChild("Amount") then
		v13:Destroy();
	end;
end;
Update();
v1.Signal.Fired("Stat Changed"):Connect(function(p1)
	if v1.Shared.Currency[p1] then
		Update();
	end;
end);

