-- Decompiled with the Synapse X Luau decompiler.

local l__LocalPlayer__1 = game.Players.LocalPlayer;
local l__TweenService__2 = game:GetService("TweenService");
local l__TextService__3 = game:GetService("TextService");
local v4 = require(game:GetService("ReplicatedStorage"):WaitForChild("ClientModules"):WaitForChild("NumberConvert"));
local v5 = require(game:GetService("ReplicatedStorage"):WaitForChild("ClientModules"):WaitForChild("GetPlatform"));
if game:GetService("ReplicatedStorage"):WaitForChild("GameData"):WaitForChild("InGame").Value == false then
	script.Parent:WaitForChild("UIPadding").PaddingRight = UDim.new(0, 72);
end;
for v6, v7 in pairs(script:WaitForChild("StatModules"):GetChildren()) do
	local v8 = Instance.new("IntValue");
	v8.Name = v7.Name .. "Val";
	v8.Parent = v7;
	v8.Value = 0;
	local u1 = require(v7);
	local u2 = 0;
	local u3 = script.Parent:FindFirstChild(v7.Name);
	local function v9(p1)
		if p1 ~= nil then
			p1 = tonumber(p1);
		else
			p1 = u1.value;
		end;
		if type(p1) ~= "number" then
			return;
		end;
		if v5() == "console" then
			script.Parent.UIScale.Scale = 1.5;
		end;
		if not u2 then
			return;
		end;
		u2 = p1;
		u3.Size = UDim2.new(0, l__TextService__3:GetTextSize(tostring(p1), 40, "Oswald", Vector2.new(999, 999)).X, 1.5, 0);
		u3.TextSize = 40;
		if u2 < p1 then
			u3.TextColor3 = u3:GetAttribute("FadeIncrease");
			u3.SoundIncrease:Play();
		elseif p1 < u2 then
			u3.TextColor3 = u3:GetAttribute("FadeDecrease");
			u3.SoundDecrease:Play();
			if v7.Name == "Boosts" then
				script.Parent.BoostActive.Visible = true;
				u3.Visible = false;
			end;
		end;
		l__TweenService__2:Create(u3, TweenInfo.new(0.7, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut), {
			Size = UDim2.new(0, l__TextService__3:GetTextSize(tostring(p1), 30, "Oswald", Vector2.new(999, 999)).X, 1, 0), 
			TextSize = 30, 
			TextColor3 = Color3.new(1, 1, 1)
		}):Play();
		l__TweenService__2:Create(u3, TweenInfo.new(0.7, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut), {
			TextColor3 = Color3.new(1, 1, 1)
		}):Play();
		l__TweenService__2:Create(v8, TweenInfo.new(0.4, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
			Value = tonumber(p1)
		}):Play();
		if p1 <= 0 then
			task.delay(0.4, function()
				u3.Visible = false;
			end);
		else
			u3.Visible = true;
			task.delay(0.41, function()
				u3.Visible = true;
			end);
		end;
		if v7.Name == "Boosts" and p1 < u2 then
			script.Parent.BoostActive.Visible = true;
			task.delay(0.5, function()
				u3.Visible = false;
			end);
		end;
	end;
	v8.Changed:Connect(function(p2)
		u3.Text = v4(p2);
	end);
	if v7.Name == "Gold" then
		local u4 = tick();
		game:GetService("ReplicatedStorage"):WaitForChild("Bricks"):WaitForChild("GetGold").OnClientEvent:Connect(function(p3)
			u4 = tick() + 0.5;
			local v10, v11 = workspace.CurrentCamera:WorldToScreenPoint(p3);
			local v12 = script.Parent.Parent.Gold:Clone();
			v12.Visible = true;
			v12.Name = "GoldLive";
			v12.Position = UDim2.new(0, v10.X, 0, v10.Y);
			v12.Parent = script.Parent.Parent;
			game.Debris:AddItem(v12, 0.5);
			u3.Visible = true;
			local l__AbsolutePosition__13 = u3.Icon.AbsolutePosition;
			local l__AbsoluteSize__14 = u3.Icon.AbsoluteSize;
			l__TweenService__2:Create(v12, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.In), {
				Size = UDim2.new(0, l__AbsoluteSize__14.X, 0, l__AbsoluteSize__14.Y), 
				Position = UDim2.new(0, l__AbsolutePosition__13.X + l__AbsoluteSize__14.X / 2, 0, l__AbsolutePosition__13.Y + l__AbsoluteSize__14.Y / 2)
			}):Play();
		end);
		u1.event.Event:Connect(function(p4)
			task.wait(0.2);
			task.wait((math.max(u4 - tick(), 0)));
			if u4 ~= u4 then
				return;
			end;
			v9();
		end);
	else
		u1.event.Event:Connect(v9);
	end;
	v9();
end;