Password Randomizer Module

It does exactly what it sounds like
Very Easy to use, requires no setup, comes with a variety
What more could you ask for?

Currently there’s only one function:
Module.Password(Type, Length)

Example:

local module = require(workspace.Randomizer) -- Require the Module

-- Start Scripting!

local Length = 10

local StringOnly = module.Password("String", Length)
local NumOnly = module.Password("Number", Length)
local Mix = module.Password("Mix", Length)

print(StringOnly)
print(NumOnly)
print(Mix)

print("-------------")


-- tip: if you only want the lower letter. use string.lower()
print(string.lower(StringOnly))
print(string.lower(Mix))

Output:
image

Links:
Module Link
Randomizer (1.1 KB)

Ps.
The module is Open sauce and no credit needed if you plan to use it in your own project
the script inside module is very basic. I only make this for self improvement lol

7 Likes

It’d be nice if this would actually hash actual passwords into random strings (e.g “mYpAsSword” => “12mdasol21js”), because otherwise this isn’t really a password module it’s just a random string generator :V

3 Likes

well password is just a random line of string you use to verify thing

the main use for this module is for the escape type game that you don’t want the player to just remember the password and speedrun the entire game
or the code for secret door that change between the server

anyway what you saying is a like a string scrambler which I have made at one point as a component for my other project
if you interested

2 Likes

Idk why I’d need this module. You can just do this. That way you can even specify which characters you want to use.

local randomstring = {}

randomstring.characters = {
	mix = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
	letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
	numbers = "1234567890",
}

function randomstring.generate(length, characters)
	local t = {}
	for i = 1, length do
		local n = math.random(1, #characters)
		table.insert(t, string.sub(characters, n, n))
	end
	return table.concat(t, "")
end



print(randomstring.generate(50, randomstring.characters.letters)) -- preset character list
print(randomstring.generate(5, "!$%&/()=?")) -- custom character list
3 Likes