Hi, sorry that there is nothing to 'fix' but rather I am asking for help on this. I really don't know where to start on the script and if someone could at least lead me in the right direction so I know how to abbreviate large numbers, that'd be great.
Something similar to what berezaa does in Miner's Haven or 2PGFT.
Here is a little function I wrote.
function Convert(num) local x = tostring(num) if #x>=13 then local num1 = (#x-12) return x:sub(0,(num1)).."."..(x:sub(#x-10,(#x-10))).."Q+" --Quadrillion elseif #x>=10 then local num1 = (#x-9) return x:sub(0,(num1)).."."..(x:sub(#x-7,(#x-7))).."B+" --Billion elseif #x>= 7 then local num1 = (#x-6) return x:sub(0,(num1)).."."..(x:sub(#x-5,(#x-5))).."M+" --Million elseif #x>=4 then return x:sub(0,(#x-3)).."."..(x:sub(#x-2,(#x-2))).."K+" --Thousand else return num end end Convert()-- whatever your currencys Heiracy is
The simplest way is to use if statements, but this also means you'll need two different values.
One will be either the IntValue or NumberValue for how much cash (or ore, experience, ) the player has. Put this probably inside the PlayerGui. The other should be the StringValue (since it contains letters in addition to numbers) that goes on the leaderboard.
Whenever the player gets cash, increment the IntValue. Next have something in the script kind of like this:
Cash = Player.PlayerGui.IntValue AbbreviatedCash = YourLeaderStatsHere.StringValue ... Cash = Cash+50 If Cash > 1000 then AbbreviatedCash =math.floor (Cash/1000).."K" elseif Cash >1000000 then AbbreviatedCash = math.floor(Cash/1000000).."M" elseif Cash < 0 then AbbreviatedCash = "You're broke" else AbbreviatedCash = Cash end
Something like that, hope this works and helps :D