This will do what you want:
Code:
function round(num, idp)
if idp and idp>0 then
local mult = 10^idp
return math.floor(num * mult + 0.5) / mult
end
return math.floor(num + 0.5)
end
function CoolNumber(num)
if num>999 then
return round(num/1e3,0).."K"
else
return num
end
end
The red number can be 0,1, ... while 0 means 18400 becomes 18k ... 1 means 18400 becomes 18.4k, etc.