How do I simplify a stat shown on a players screen?

I need help simplifying the stats shown on a players screen.

I already have made this and it looks like this currently:
Screenshot_140

But, instead of it saying 10 035, I want it to be simplified to 10k. Same goes for 1 000 000, instead of it being that it’s 1M and so on.

I was wondering if anyone knew how to do this or how to do this.

Thanks.

I saw this script and been using it ever since. Hopefully this helps:

local Suffixes = {"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","NoTG","QdDR","uQDR","dQDR","tQDR","qdQDR","QnQDR","sxQDR","SpQDR","OQDDr","NQDDr","qQGNT","uQGNT","dQGNT","tQGNT","qdQGNT","QnQGNT","sxQGNT","SpQGNT", "OQQGNT","NQQGNT","SXGNTL"}                                              

function Convert(Input)
	local Negative = Input < 0
	Input = math.abs(Input)

	local Paired = false
	for i,v in pairs(Suffixes) do
		if not (Input >= 10^(3*i)) then
			Input = Input / 10^(3*(i-1))
			local isComplex = (string.find(tostring(Input),".") and string.sub(tostring(Input),4,4) ~= ".")
			Input = string.sub(tostring(Input),1,(isComplex and 4) or 3) .. (Suffixes[i-1] or "")
			Paired = true
			break;
		end
	end
	if not Paired then
		local Rounded = math.floor(Input)
		Input = tostring(Rounded)
	end
	if Negative then
		return "-"..Input
	end
	return Input
end
2 Likes

Thank you for your help, I managed to make changes to the script I already have and it works. Thanks.