[OPEN SOURCE] [N2Abbreviate] Advanced Number Abbreviate Module (VERY SIMPLE TO USE)

This Module has been designed to make a number look clearer and more beautiful.

Besides Other Number Abbreviation Modules,
It Has 3 Features.

FEATURES

Let Our Sample Number Be 1120

Basically Convert:
1K

Medium Convert:
1.1K

Advanced Convert:
1.12K

HOW TO USE

Let’s see how simple it is to use!

local N2Abbreviate = require(game:GetService("ReplicatedStorage").N2Abbreviate_Module)

print(N2Abbreviate.Convert(number,difficulty))

print(N2Abbreviate.Convert(1120,"Basically"))
print(N2Abbreviate.Convert(1120,"Medium"))
print(N2Abbreviate.Convert(1120,"Advanced"))

Don’t Forget to Write Your Opinions. :slight_smile:

9 Likes
3 Likes

So this will make my numbers shorter? 39382, 39.3K
And can you explain more on the topic? Like, where the script goes and what the script is
Just for the new players

Im going to try this out, thanks

if u have number example 41245 and u converted ur number and Selected Advanced Difficulty Module Returning 41.24K else U Selected Medium Difficulty Module Returning 41.2K

Example How To Use:

local N2Abbreviate = require(game:GetService("ReplicatedStorage").N2Abbreviate_Module)

print(N2Abbreviate.Convert(41245,"Advanced"))

Output: 41.2K

Wouldn’t that be 41.24K, it is advanced

1 Like

oh yes my fault .-.-.-.-.-.-.-.-

1 Like

Suggestions

Instead of using keys such as “Advanced”, “Medium”, and “Basically”, it would be more beneficial and useful as a resource to be able to use custom amounts. Switching the key to a “PlaceValue”, with the “PlaceValue” representing what people would be able to round their number to, would add a lot more functionality.

For example, you would have something like:

N2Abbreviate.Convert(Number,PlaceValue)

You would call

N2Abbreviate.Convert(1234.5,10)

And the result would be “1230”.

Some more examples
N2Abbreviate.Convert(1234.5,100) -- 1200
N2Abbreviate.Convert(1234.5,10) -- 1230
N2Abbreviate.Convert(1234.5,1) -- 1235
N2Abbreviate.Convert(1234.5,.1) -- 1234.5
N2Abbreviate.Convert(1234.5,.01) -- 1234.50

Additional Functionality

Resources are all about usefulness. It is important that they enhance the developer’s experience, and save them time.

If you could specify what these features are, that would be appreciated.

Some functionality that would improve my experience as a programmer would be to return two values when the function is called:

local AbbreviatedNum, LetterNum = N2Abbreviate.Convert(1234.5,1000)

--Would return "AbbreviatedNum = 1000", "LetterNum = 1k"

Having both the exact rounded number, along with the “simplified” number (adding a letter to represent zeroes) would add usefulness.

The suggestion you gave was confusing even to me at first reading. It will take a long time for someone who knows little about this subject to learn it.

By Three Features, I meant Basic, Medium and Advanced.

As you said, many people use the abbreviation to remove zeros, it would be meaningless if I added zeros, but I’m planning to add new features soon, but these will be different challenges.

If this is open source, this should have a GitHub documentation/ source code, right?

the source code is in the module… :stuck_out_tongue:

Yes, I get that, but most people wouldn’t want the hassle of going on their computers, waiting a minute for it to load completely, wait 30 seconds for Roblox studio to open, and then wait 10 seconds for the place to open, grab the module and see the source code.

I forgot the password to my Github account and wrote it open source as I didn’t obfuscate the module in any way.

for a module as simple as this a github is kinda unwarrented, typically modules that have githubs need advanced documentation.

1 Like

I agree with your points, the argument is closed.

1 Like

.-.-…-.-.-.-.
yeah u right :stuck_out_tongue:

Why should anyone use this over this?

2 Likes

I’d definitely use this module over what you linked because of this module’s simplicity.

1 Like

In addition to being much simpler to use, new features will come.

in comma abbreviations will come tomorrow

And as a different reason for using it, I can say that since it’s open source, you can develop it yourself. It’s 20 lines of code and it’s extremely easy to change.