Money conversion System

local Player = game.Players.LocalPlayer
local leaderstats = Player:WaitForChild("Data")

local Money = leaderstats:WaitForChild("Money")


local abbreviations = {"", "K", "M", "B", "T", "Qa", "Qi", "Sx", "Sp"}

function FormatMoney(value, idp)
	local ex = math.floor(math.log(math.max(1, math.abs(value)),100))
	local abbrevs = abbreviations [1 + ex] or ("e+"..ex)
	local normal = math.floor(value * ((10 ^ idp) / (1000 ^ ex))) / (10 ^ idp)

	return ("%."..idp.."f%s"):format(normal, abbrevs)
end


script.Parent.Text = FormatMoney(Money.Value, 1) 

Money:GetPropertyChangedSignal("Value"):Connect(function()
	script.Parent.Text = FormatMoney(Money.Value, 1) 
end)

So I have a script that converts the money, I need to make so that here is an additional zero, which is on the screenshot was not. That is, to be only 10!
Снимок экрана 2023-05-16 в 20.19.19

Since idp is set to 1 in your script, the money value will be rounded to the nearest whole number. Applying the format will add a zero after the decimal point if the original value (for example, 10) had no decimal places, making 10.0.

try this:

function FormatMoney(value, idp)
	local ex = math.floor(math.log(math.max(1, math.abs(value)), 100))
	local abbrevs = abbreviations[1 + ex] or ("e+" .. ex)
	local normal = math.floor(value * ((10 ^ idp) / (1000 ^ ex))) / (10 ^ idp)

	local formattedValue
	if normal == math.floor(normal) then
		formattedValue = ("%d%s"):format(normal, abbrevs)
	else
		formattedValue = ("%." .. idp .. "f%s"):format(normal, abbrevs)
	end

	return formattedValue
end