| Library | Install | Documentation | Examples | Contact Information |
|---|
Config Library simplifies saving and loading script settings in Roblox executor environments. It solves the common issue where standard JSON encoders convert complex Luau data types into null or strip them out completely.
By automatically serializing native Roblox objects into tagged string signatures prior to JSON encoding, the library preserves your settings and re-instantiates them into native objects upon loading.
💡Quick Start: The core functions of this library are
SaveConfigfor serializing and storing settings to disk, andLoadConfigfor retrieving and restoring them back into native Luau objects.
When saving, the library converts complex Luau types into serialized string signatures before translating the settings table into JSON.
Color3.fromRGB(255, 255, 255)(Raw Object)$\rightarrow$ "Color3_(255, 255, 255)"(Saved Signature)
When loading, the library decodes the JSON data back into a Lua table and scans for signature types, restoring each string into its original Roblox object.
"Vector3_(10, 50, 20)"(Saved Signature)$\rightarrow$ Vector3.new(10, 50, 20)(Restored Object)
The library automatically maps the following Roblox datatypes:
| Native Luau Object | Serialized String Signature |
|---|---|
Color3.fromRGB(...) |
"Color3_(...)" |
Vector3.new(...) |
"Vector3_(...)" |
Vector2.new(...) |
"Vector2_(...)" |
CFrame.new(...) |
"CFrame_(...)" |
Enum[...] |
"EnumItem_(...)" |
To read and write files locally, your executor environment must support the following standard filesystem API functions:
readfilewritefileisfileisfoldermakefolder
You can load this library into your script's environment by copying the code below.
local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/Exunys/Config-Library/main/Main.lua"))()Encodes a Lua table into a JSON-formatted string.
ConfigLibrary.Encode(Table: table) -> string| Parameter | Type | Description |
|---|---|---|
Table |
table |
The Lua table to encode. |
Returns: string — JSON-encoded string.
View Example
print(ConfigLibrary.Encode({Bool = true}))
-- Output: {"Bool":true}Decodes a JSON string and converts it back into a Lua table.
ConfigLibrary.Decode(Content: string) -> table| Parameter | Type | Description |
|---|---|---|
Content |
string |
The JSON string to decode. |
Returns: table — Decoded Lua table.
View Example
print(ConfigLibrary.Decode([[{"Bool":true}]])[1])
-- Output: trueIterates recursively through nested tables and executes a callback function for every index-value pair found.
ConfigLibrary:Recursive(Table: table, Callback: function)| Parameter | Type | Description |
|---|---|---|
Table |
table |
The target table (including nested sub-tables). |
Callback |
function |
Function called with parameters (index, value). |
View Example & Output
local TestTable = {
Bool = true,
Number = 123,
String = "Hello",
Color = Color3.fromRGB(255, 255, 255),
InnerTable = {
Color2 = Color3.fromRGB(150, 150, 150),
InnerInnerTable = {
Color3_ = Color3.fromRGB(100, 100, 100),
Vector3_ = Vector3.new(50, 200, 100),
Vector2_ = Vector2.new(10, 20),
InnerInnerInnerTable = {
Key = Enum.KeyCode.X
}
}
}
}
ConfigLibrary:Recursive(TestTable, warn)Converts a supported native Luau data type into the library's custom string signature.
ConfigLibrary.EditValue(Value: any) -> any| Parameter | Type | Description |
|---|---|---|
Value |
any |
The Luau value to convert. |
Returns: any — The converted signature string (or original value if unsupported).
View Example
print(ConfigLibrary.EditValue(Color3.fromRGB(50, 100, 200)))
-- Output: Color3_(50, 100, 200)Restores a serialized signature string back into its native Luau data type.
ConfigLibrary.RestoreValue(Value: any) -> any| Parameter | Type | Description |
|---|---|---|
Value |
any |
The signature string to parse. |
Returns: any — Native Luau object or original value.
View Example
print(ConfigLibrary.RestoreValue("Color3_(50, 100, 200)"))
-- Output: Color3 object (50, 100, 200)Performs a deep clone of the provided table and returns the new copy.
ConfigLibrary:CloneTable(Table: table) -> table| Parameter | Type | Description |
|---|---|---|
Table |
table |
The table to duplicate. |
Returns: table — Cloned instance.
View Example & Output
local TestTable = {
Bool = true,
Number = 123,
InnerTable = {
Key = Enum.KeyCode.X
}
}
local Clone = ConfigLibrary:CloneTable(TestTable)
print(TestTable == Clone) -- Output: falseMass-converts all values within a table (recursively) using the specified method.
ConfigLibrary:ConvertValues(Data: table, Method: "Edit" | "Restore") -> table| Parameter | Type | Description |
|---|---|---|
Data |
table |
The table containing values to convert. |
Method |
string |
"Edit" to apply signatures, or "Restore" to convert back to objects. |
Returns: table — Processed table.
View Example & Output
local ConvertedTable = ConfigLibrary:ConvertValues(TestTable, "Edit")
ConfigLibrary:Recursive(ConvertedTable, warn)Converts complex values in a table to signatures, encodes it to JSON, and writes it to disk. Generates required folders automatically if they do not exist.
ConfigLibrary:SaveConfig(Path: string, Data: table)| Parameter | Type | Description |
|---|---|---|
Path |
string |
File destination path (e.g., "Folder/Subfolder/Config.json"). |
Data |
table |
The configuration table to save. |
Reads a JSON file from disk, parses it into a Lua table, and restores all serialized signature strings back to native Luau objects.
ConfigLibrary:LoadConfig(Path: string) -> table| Parameter | Type | Description |
|---|---|---|
Path |
string |
File path to load. |
Returns: table — Restored configuration table.
View Example & Output
local LoadedConfig = ConfigLibrary:LoadConfig("a/b/c/d/test.json")
ConfigLibrary:Recursive(LoadedConfig, warn)local ConfigLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/Exunys/Config-Library/main/Main.lua"))()
local ESP_Settings = {
TextColor = Color3.fromRGB(255, 0, 0),
Outline = true,
OutlineColor = Color3.fromRGB(0, 0, 0),
Transparency = 0.7
}
ConfigLib:SaveConfig("My Cool Hub/Config.json", ESP_Settings)local ConfigLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/Exunys/Config-Library/main/Main.lua"))()
local ESP_Settings = ConfigLib:LoadConfig("My Cool Hub/Config.json")loadstring(game:HttpGet("https://raw.githubusercontent.com/Exunys/Config-Library/main/Main.lua"))():SaveConfig("test.json", {
b = "c",
d = {
e = "f",
g = {
h = "i",
j = {"k"}
}
}
})Generated JSON output (test.json):
{
"b": "c",
"d": {
"e": "f",
"g": {
"h": "i",
"j": ["k"]
}
}
}






