RandomModule - Tons of Random Functions

Hey there,

I’ve been learning and improving my scriptings skills as of late, so I decided to create this fun little project, RandomModule. Not really made to be a super serious project, but who knows? If you do end up using it, enjoy!


What is RandomModule?

Its main purpose is to provide developers with more random functions, as there’s some stuff that no one wants to put the extra work in just to generate something random, or just due to Roblox being somewhat limiting in certain aspects.

Features:

Just a bit of everything. :)

See features here

randomName:

Tired of creating insanely large tables of names, and scouring the internet for as much info as possible? Well fear no more because RandomModule lets you generate a completely random name through a huge dataset of ~30k first names, gathered from a 2022 US census.
RandomModule.randomName()

randomNameStartsWith:

You get the drift, same as the last but you can input a string for what you want the random name to start with, such as "A" or "B".
RandomModule.randomNameStartsWith(string)

randomJoke:

Returns a random dad joke, the dataset for this contains ~1.5k jokes.
RandomModule.randomJoke()

randomQuote:

Returns a quote, whether it be inspirational or just downright intriguing, dataset contains ~4k quotes.
RandomModule.randomQuote()

randomColor3:

Returns a completely random Color3 value, so you can easily generate a random color with a single command!
RandomModule.randomColor3()

randomPlayer:

Returns both a random Roblox player username, along with their UserId.
RandomModule.randomPlayer()

randomInteger:

Returns a random number from specificed range. I'm aware math.random exists for this, but it is limited to 32-bit numbers, RandomModule's versions however, can go up to 64-bit by using Random.new if necessary. So just all of that simplified, really.
RandomModule.randomInteger(min, max)

randomDecimal:

Exact same as last one, but can return decimals rather than just whole numbers (no more pesky dividing math.random values and such).
RandomModule.randomDecimal(min, max)

randomVector3:

Not necessarily a super useful one, but it generates a random Vector3 value within specified range (if no range is specified, the range will be random as well).
RandomModule.randomVector3(xmin, xmax, ymin, ymax, zmin, zmax)

Setup:

Pretty simple setup, download the module from the creator store, and place it just about anywhere, it's a ModuleScript so should be simple enough.

https://create.roblox.com/store/asset/17412911019

image

Usage:

Also very simple, require it from any script and use commands as seen in the Features Section.


Thanks for reading. This was just a small endeavor I made pretty quickly, moreso to practice my scripting and such.
(I used pretty large datasets by the way so if there are any unforseen mistakes or data that needs to be removed in any dataset, please tell me, thanks.)

Might update this and add more features if anyone asks for it, but for now…

Cya.

:wink:

9 Likes

image


Wouldn’t it be possible to use HttpService for this? (You can call it once, cache the results, and pull from those)

8 Likes

Its silly but modules should avoid needing security settings on, and even though using http service would be better, this also isnt a bad solution. Plus you can edit the database how you like.

3 Likes

I don’t think that requiring each module is necessary on startup…

2 Likes

Seems kinda useful but I’d rather not require a module just for getting a random name. Some more useful functions that a lot of developers commonly use in a more efficient way would be nice to include.

1 Like

Right, I totally agree. Random names was just one of the ideas I had, I’m planning to of course add more useful functions later to provide more purpose to the module, just can’t seem to think of any currently.

If you have any ideas other than the current ones (random name, color, joke, etc.) that are as you say, more commonly used/useful, then feel free to provide anything.

would probably want to add random rotation