Hello! I have a script where it will show abbreviations, but when I have it at 0, it’ll do 0.0, or 100.0, how can I fix this so where it only does it when its at like 100.0QD Or something like that.
local abbrev = {"", "K", "M", "B", "T", "Qd", "Qn", "Sx", "Sp", "O", "N", "de", "Ud", "DD", "tdD", "qdD", "QnD", "sxD", "SpD", "OcD", "NvD", "Vgn", "UVg", "DVg", "TVg", "qtV", "QnV", "SeV", "SPG", "OVG", "NVG", "TGN", "UTG", "DTG", "tsTG", "qtTG", "QnTG", "ssTG", "SpTG", "OcTG", "NoAG", "UnAG", "DuAG", "TeAG", "QdAG", "QnAG", "SxAG", "SpAG", "OcAG", "NvAG", "CT", "INF"}
local function Format(value, idp)
local ex = math.floor(math.log(math.max(1, math.abs(value)), 1000))
local abbrevs = abbrev [1 + ex] or ("e+"..ex)
local normal = math.floor(value * ((10 ^ idp) / (1000 ^ ex))) / (10 ^ idp)
return ("%."..idp.."f%s"):format(normal, abbrevs)
end
while wait() do
local player = game.Players.LocalPlayer
script.Parent.Text = Format(player.leaderstats.Coins.Value,1)
end