A curated collection of high-performance Roblox utility functions, featuring optimized snippets for number manipulation, string operations, cryptography, and more. Each module is thoroughly tested and ready for production use.
Installation • Features • Usage • Contributing • License
This repository includes various modules for:
- Number formatting and manipulation
- Color manipulation and transitions
- Mathematical operations
- String operations
- Cryptographic functions
- Model manipulation
- Interpolation functions
- Random generation utilities
Each module is self-contained and can be required independently. Here's a quick overview of available modules:
Abbreviate
- Converts numbers to abbreviated string format (e.g., 1000 -> "1K")AddZeroes
- Pads numbers with leading zerosFormatNumber
- Formats numbers with comma separatorsGrid
- Snaps numbers to a gridNearestMultiple
- Rounds numbers to nearest multipleMap
- Maps a number from one range to another
ColorHSL
- HSL color conversion and manipulationGammaColorTransition
- Color transitions with gamma correction
CosineInterpolation
- Smooth interpolation using cosineCubicInterpolation
- Cubic curve interpolationHermiteInterpolation
- Hermite curve interpolationLinearInterpolation
- Linear interpolation between values
Base64
- Base64 encoding and decodingMD5
- MD5 hash generationHexCode
- Random hex code generation
Acronym
- Generates acronyms from stringsGrammar
- Basic grammar correctionLevenshtein
- Calculates Levenshtein distance between strings
AngleBetween
- Calculates angle between vectorsModelMover
- Utility for moving modelsReflection
- Calculates reflection vectors
Chance
- Probability and random number utilitiesGenerateRarity
- Weighted random rarity generation
ClassifyScript
- Identifies script typesisWithin
- Range checking utility
- Clone this repository or download the desired modules
- Place the modules as
ModuleScript
instances in Roblox Studio - Require the modules as needed
local Abbreviate = require(game:GetService("ReplicatedStorage").Abbreviate)
local formatted = Abbreviate(1500) -- Returns "1.5K"
local Map = require(game:GetService("ReplicatedStorage").Map)
local mapped = Map(50, 0, 100, 0, 1) -- Maps 50 from range 0-100 to range 0-1
Contributions are welcome! Please read CONTRIBUTING.md for details on how to submit pull requests, add new snippets, and improve existing ones.
This project is licensed under the MIT License with an additional attribution notice - see the LICENSE file for details. While attribution is appreciated, it is not required for using these snippets in your projects.
*All by @DindinYT37 on Twitter or @dindinyt on Discord.