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!