--// Hash: f1e25cc5a70586bc0cb2ccfb248fa3890a7efaf8846040164a31a46176c8dcdb35134e7badd64ce621fc28380cb315c7
-- Decompiled with the Synapse X Luau decompiler.


local l__LocalPlayer__1 = game.Players.LocalPlayer;
local l__TweenService__2 = game:GetService("TweenService");
for v3, v4 in pairs(script:WaitForChild("StatModules"):GetChildren()) do
	local v5 = Instance.new("IntValue");
	v5.Name = v4.Name .. "Val";
	v5.Parent = v4;
	v5.Value = 0;
	local u1 = require(v4);
	local u2 = script.Parent:FindFirstChild(v4.Name);
	local function v6(p1)
		if p1 ~= nil then
			p1 = tonumber(p1);
		else
			p1 = u1.value;
		end;
		if type(p1) ~= "number" then
			return;
		end;
		local v7 = tonumber(u2.Text);
		u2.Size = UDim2.new(1, 0, 0.3, 0);
		if v7 < p1 then
			u2.TextColor3 = u2:GetAttribute("FadeIncrease");
			u2.SoundIncrease:Play();
		elseif p1 < v7 then
			u2.TextColor3 = u2:GetAttribute("FadeDecrease");
			u2.SoundDecrease:Play();
		end;
		l__TweenService__2:Create(u2, TweenInfo.new(0.7, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut), {
			Size = UDim2.new(1, 0, 0.25, 0), 
			TextColor3 = Color3.new(1, 1, 1)
		}):Play();
		l__TweenService__2:Create(v5, TweenInfo.new(0.4, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
			Value = tonumber(p1)
		}):Play();
		if p1 <= 0 then
			u2.Visible = false;
			return;
		end;
		u2.Visible = true;
	end;
	v5.Changed:Connect(function(p2)
		u2.Text = tostring(p2);
	end);
	if v4.Name == "Gold" then
		local u3 = tick();
		local u4 = true;
		u1.event.Event:Connect(function()
			if u3 <= tick() then
				u3 = tick() + 0.2;
			end;
			u4 = false;
		end);
		game:GetService("ReplicatedStorage"):WaitForChild("Bricks"):WaitForChild("GetGold").OnClientEvent:Connect(function(p3)
			u3 = tick() + 0.5;
			u4 = false;
			print("yeah");
			local v8, v9 = workspace.CurrentCamera:WorldToScreenPoint(p3);
			local v10 = script.Parent.Parent.Gold:Clone();
			v10.Visible = true;
			v10.Name = "GoldLive";
			v10.Position = UDim2.new(0, v8.X, 0, v8.Y);
			v10.Parent = script.Parent.Parent;
			local l__AbsolutePosition__11 = u2.Icon.AbsolutePosition;
			local l__AbsoluteSize__12 = u2.Icon.AbsoluteSize;
			l__TweenService__2:Create(v10, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.In), {
				Size = UDim2.new(0, l__AbsoluteSize__12.X, 0, l__AbsoluteSize__12.Y), 
				Position = UDim2.new(0, l__AbsolutePosition__11.X + l__AbsoluteSize__12.X / 2, 0, l__AbsolutePosition__11.Y + l__AbsoluteSize__12.Y / 2)
			}):Play();
			game.Debris:AddItem(v10, 0.5);
		end);
		game:GetService("RunService").Heartbeat:Connect(function()
			if u4 == false and u3 <= tick() then
				u4 = true;
				v6();
			end;
		end);
	else
		u1.event.Event:Connect(v6);
	end;
	v6();
end;
wait(5);
pcall(function()
	script.Parent.Parent:WaitForChild("ImageLabel"):TweenPosition(UDim2.new(0.85, 0, 0.8, 0), "Out", "Quad", 1);
	script.Parent:TweenPosition(UDim2.new(1, 0, 1, 0), "Out", "Quad", 2);
end);
