I’ve followed a tutorial on youtube but it doesn’t seem as it works on numbers above 100T then it returns 100000000.0K again. Any wonders why? Here is the code
local player = game.Players.LocalPlayer
local NumeralDictionarys =
{
K = 4,
M = 7,
B = 10,
T = 13,
q = 16,
Q = 19,
s = 22,
S = 25,
O = 28,
N = 31,
D = 34
}
while wait() do
local Number = tostring(math.floor(player:WaitForChild(“MoneyFolder”).Money.Value))
local chosenAbbreviation
for NumeralDictionary, digits in pairs(NumeralDictionarys) do
if #Number >= digits and #Number < (digits + 3) then
print(NumeralDictionary)
chosenAbbreviation = NumeralDictionary
break
end
end
if chosenAbbreviation ~= nil then
local digits = NumeralDictionarys[chosenAbbreviation]
local rounded = math.floor(player.MoneyFolder.Money.Value / 10 ^ (digits - 2)) * 10 ^ (digits - 2)
script.Parent.Text = string.format("%.1f", rounded / 10 ^ (digits - 1)).. chosenAbbreviation
else
script.Parent.Text = Number
end
end