How do I abbreviate cash above Billions in Zednov's Tycoon Kit?
Asked by
3 years ago Edited 3 years ago
So in Zednov's tycoon kit, theres a script called settings. This abbreviates 1,000 cash into 1K and 1,000,000 into 1M, and 1,000,000,000 into 1B. But there is nothing above that. I'd like for someone to help me with making 1T, 1Qd, 1Qn, to like De or something. I would love to know how to do this since the script looks confusing as hell and I have no idea how to script:
Script:
01 | function module:ConvertComma(num) |
02 | local x = tostring (num) |
04 | local important = (#x- 9 ) |
05 | return x:sub( 0 ,(important)).. "," ..x:sub(important+ 1 ,important+ 3 ).. "," ..x:sub(important+ 4 ,important+ 6 ).. "," ..x:sub(important+ 7 ) |
07 | local important = (#x- 6 ) |
08 | return x:sub( 0 ,(important)).. "," ..x:sub(important+ 1 ,important+ 3 ).. "," ..x:sub(important+ 4 ) |
10 | return x:sub( 0 ,(#x- 3 )).. "," ..x:sub((#x- 3 )+ 1 ) |
16 | function module:ConvertShort(Filter_Num) |
17 | local x = tostring (Filter_Num) |
20 | local important = (#x- 9 ) |
21 | return x:sub( 0 ,(important)).. "." ..(x:sub(#x- 7 ,(#x- 7 ))).. "B+" |
23 | local important = (#x- 6 ) |
24 | return x:sub( 0 ,(important)).. "." ..(x:sub(#x- 5 ,(#x- 5 ))).. "M+" |
26 | return x:sub( 0 ,(#x- 3 )).. "." ..(x:sub(#x- 2 ,(#x- 2 ))).. "K+" |
--End of script
As you see, theres only K+, M+, and B+... I need higher ones...