Need help with "infinite" cash abbreviations

Hey, I’m making a clicking game and there are upgrades, one of them makes x2 clicks every time you purchase it. So players will get a high amount of cash quite fast and I also have cash abbreviations (example: $100K) they work but I need basically infinite and I have no idea how to do that.

I have tried looking in the devforum but didn’t seem to have any information on how to get “infinite” cash abbreviations.

Btw cash are clicks.

Here’s the whole script:

local ClicksCounter = script.Parent
local Values = game.Players.LocalPlayer:WaitForChild("Values") or game.Players.LocalPlayer.Values
local ClickString = Values:WaitForChild("ClickString")

local Abbreviations = { -- Clicks Abbreviations
k = 4,
M = 7,
B = 10,
T = 13,
qd = 16,
Qn = 19,
sx = 22,
Sp = 25,
O = 28,
N = 31,
de = 34,
Ud = 37,
DD = 40,
tdD = 43,
qdD = 46,
QnD = 49,
sxD = 52,
SpD = 55,
OcD = 58,
NvD = 61,
Vgn = 64,
UVg = 67,
DVg = 70,
TVg = 73,
qtV = 76,
QnV = 79,
SeV = 82,
SPG = 85,
OVG = 88,
NVG = 91,
TGN = 94,
UTG = 97,
DTG = 100,
tsTG = 103,
qtTG = 106,
QnTG = 109,
ssTG = 112,
SpTG = 115,
OcTG = 118,
NoTG = 121,
QdDR = 124,
uQDR = 127,
dQDR = 130,
tQDR = 133,
qdQDR = 136,
QnQDR = 139,
sxQDR = 142,
SpQDR = 145,
OQDDr = 148,
NQDDr = 151,
qQGNT = 154,
uQGNT = 157,
dQGNT = 160,
tQGNT = 163,
qdQGNT = 166,
QnQGNT = 169,
sxQGNT = 172,
SpQGNT = 175,
OQQGNT = 178,
NQQGNT = 181,
SXGNTL = 184
}

ClickString:GetPropertyChangedSignal("Value"):Connect(function()
	local AbbreviatedNumber
	for i, v in pairs(Abbreviations) do
		local FloorNumber = tostring(math.floor(tonumber(ClickString.Value)))
		if #FloorNumber >= v and #FloorNumber < (v + 3) then
			AbbreviatedNumber = i
		--else
		--	AbbreviatedNumber = nil
		end

		if AbbreviatedNumber then
			local digits = Abbreviations[AbbreviatedNumber]
			local roundedNum = math.floor(tonumber(ClickString.Value) / 10 ^ (digits - 2)) * 10 ^ (digits - 2)

			ClicksCounter.Text = "Clicks: " .. string.format("%.1f", roundedNum / 10 ^ (digits - 1)) .. AbbreviatedNumber
		else
			ClicksCounter.Text = "Clicks: " .. ClickString.Value
		end
	end
end)

Every replies are appreciated!

1 Like

Infinity isn’t a number, its a concept. Even if you keep getting insane amount of numbers with a trillion zeros, it will never hit infinite, if you want it scalable, you could do the formula

1.00x10^100

and continue to use that after a certain point, like a number with 300 digits, It is a solution though may not will well understood with a younger audience

Not infinite, (example: in this game called circle simulator image and it can get so much higher) and at a certain point it could be scientific numbers.

Why don’t you just add a barrier to stop players from getting so much?

Because the game would be too short.

Edit: could auto generating abbreviations work?

1 Like

How? You literally have so many units they can get.

Yes, but the people who grind the clicks and upgrades will get past that point.

Well good for them. They’re just people who don’t enjoy the rest of the game and want to be better than the others.

It’s the whole point of the game, it’s a simulator.

1 Like

Make the game harder to progress/play, not only do the numbers lose value after just a few abbreviations it’s also just a sign of bad game design if the gameplay is “too short” without having to rely on these crazy numbers.

There are many games that don’t even go in the millions, let alone numbers with 223 digits. Usually, good simulators keep people busy without relying on extreme values. Bee Swarm Simulator is an example.

I would recommend using this module to shorten numbers originally used in Miner’s Haven (later open-sourced) by berezaa (if I understood your question correctly)

You can also find more info on it by searching

1 Like

You should add rebirths, that could help keep some of the numbers down…

You can’t have “infinite” abbreviations. There’s not a repeating pattern. Even most of the ones you’ve listed here are non-standard and confusing.

Above like 34 digits (which is decillion anyways, not sure why you have a ‘p’ there), abandon abbreivation and just use scientific notation like @Wizard101fire90 originally suggested.

Thanks! But mine works already.

Yes adding rebirths would be good.

I think I’ll use them. Also I didn’t think there were real prefixes for such high numbers.

Names of large numbers - Wikipedia gives a good overview of which ones are standard. Using anything non-standard (or even some at the tail end of that list) is going to be super confusing.

I ended up putting berezaa’s Miners heaven prefixes and after I’ll put scientific numbers.