local A=game.Players.LocalPlayer local J=A.leaderstats.Gold local X=script.Parent local function o()local A=J.Value if A>999 then if A>=1000000 then X.Text=string.format("\037\046\049\102\077",A/1000000)elseif A>=1000 then X.Text=string.format("\037\046\049\102\075",A/1000)end else X.Text=tostring(A)end end J.Changed:Connect(o)o()

local player = game.Players.LocalPlayer
local goldValue = player.leaderstats.Gold
local textLabel = script.Parent

local function updateText()
	local gold = goldValue.Value
	if gold > 999 then
		if gold >= 1000000 then
			textLabel.Text = string.format("%.1fM", gold / 1000000)
		elseif gold >= 1000 then
			textLabel.Text = string.format("%.1fK", gold / 1000)
		end
	else
		textLabel.Text = tostring(gold)
	end
end

goldValue.Changed:Connect(updateText)
updateText()
