local t=game.Players.LocalPlayer local D=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")for t,G in pairs((script:WaitForChild("\083\116\097\116\077\111\100\117\108\101\115")):GetChildren())do local x=Instance.new("\073\110\116\086\097\108\117\101")x.Name=G.Name.."\086\097\108"x.Parent=G x.Value=0 local V=require(G)local i=script.Parent:FindFirstChild(G.Name)local function S(t)if t~=nil then t=tonumber(t)else t=V.value end if type(t)~="\110\117\109\098\101\114"then return end local G=tonumber(i.Text)i.Size=UDim2.new(1,0,.3,0)if G<t then i.TextColor3=i:GetAttribute("\070\097\100\101\073\110\099\114\101\097\115\101")i.SoundIncrease:Play()elseif t<G then i.TextColor3=i:GetAttribute("\070\097\100\101\068\101\099\114\101\097\115\101")i.SoundDecrease:Play()end;(D:Create(i,TweenInfo.new(.7,Enum.EasingStyle.Quart,Enum.EasingDirection.InOut),{Size=UDim2.new(1,0,.25,0);TextColor3=Color3.new(1,1,1)})):Play();(D:Create(x,TweenInfo.new(.4,Enum.EasingStyle.Sine,Enum.EasingDirection.Out),{Value=tonumber(t)})):Play()if t<=0 then i.Visible=false return end i.Visible=true end x.Changed:Connect(function(t)i.Text=tostring(t)end)if G.Name=="\071\111\108\100"then local t=tick()local G=true V.event.Event:Connect(function()if t<=tick()then t=tick()+.2 end G=false end);(((game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")):WaitForChild("\066\114\105\099\107\115")):WaitForChild("\071\101\116\071\111\108\100")).OnClientEvent:Connect(function(x)t=tick()+.5 G=false print("\121\101\097\104")local V,S=workspace.CurrentCamera:WorldToScreenPoint(x)local L=script.Parent.Parent.Gold:Clone()L.Visible=true L.Name="\071\111\108\100\076\105\118\101"L.Position=UDim2.new(0,V.X,0,V.Y)L.Parent=script.Parent.Parent local K=i.Icon.AbsolutePosition local j=i.Icon.AbsoluteSize;(D:Create(L,TweenInfo.new(.5,Enum.EasingStyle.Quart,Enum.EasingDirection.In),{Size=UDim2.new(0,j.X,0,j.Y);Position=UDim2.new(0,K.X+j.X/2,0,K.Y+j.Y/2)})):Play()game.Debris:AddItem(L,.5)end);(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Heartbeat:Connect(function()if G==false and t<=tick()then G=true S()end end)else V.event.Event:Connect(S)end S()end wait(5)pcall(function()(script.Parent.Parent:WaitForChild("\073\109\097\103\101\076\097\098\101\108")):TweenPosition(UDim2.new(.85,0,.8,0),"\079\117\116","\081\117\097\100",1)script.Parent:TweenPosition(UDim2.new(1,0,1,0),"\079\117\116","\081\117\097\100",2)end)


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);
