Logomsdoors

Addons

How to create and install custom addons for msdoors.

Introduction

Addons are custom Lua scripts that add new UI elements and features directly into the msdoors menu under the Addons tab. Anyone can create and share addons.

Your executor must support the file system (isfolder, listfiles, readfile) for addons to work.


Installing an Addon

Place your addon file (.lua, .luau or .txt) inside the following folder on your executor:

msdoors/addons/

The folder is created automatically the first time msdoors loads. Just drop your file in and rerun the script.


Creating an Addon

An addon is a Lua file that returns a table with at least a Name and an Elements list.

Minimal example

return {
    Name = "MyAddon",
    Title = "My First Addon",
    Description = "A basic addon.",
    Author = "YourName",
    Version = "1.0",
    Side = "Left",
    Elements = {}
}
FieldTypeRequiredDescription
NamestringInternal identifier (no spaces)
TitlestringDisplay name shown in the menu
DescriptionstringShort description shown below the title
Authorstring or tableAuthor name(s)
VersionstringVersion shown in the menu
SidestringWhich side to appear on: "Left" or "Right". Alternates automatically if not set.
Gamenumber or tableRestrict addon to specific PlaceId(s)
ElementstableList of UI elements to render

Side

By default addons alternate sides automatically (Left, Right, Left, Right...). You can force a specific side with the Side field:

Side = "Left"
Side = "Right"

If Side is not set or is invalid, the addon uses the next available side automatically.


Game Restriction

To make an addon only load in a specific game, use the Game field:

Game = 6516141723
Game = { 6516141723, 1234567890 }

If the current PlaceId doesn't match, the addon silently skips loading.


Elements

Every item in Elements is a table with a Type, optional Name, and Arguments.

{
    Type = "Toggle",
    Name = "MyToggle",
    Arguments = {
        Text = "Enable something",
        Default = false,
        Callback = function(value)
            print("Toggle is now:", value)
        end
    }
}

The Name field is used as an internal key and must be unique within the addon. Elements that don't need a key (like Label, Divider, Button) don't require it.


Element Types

Label

Displays a line of text.

{
    Type = "Label",
    Arguments = {
        Text = "This is a label.",
        DoesWrap = true
    }
}

Divider

Adds a horizontal separator line, optionally with text.

{
    Type = "Divider",
    Arguments = {
        Text = "Section"
    }
}

Button

A clickable button.

{
    Type = "Button",
    Arguments = {
        Text = "Click me",
        Func = function()
            print("Button clicked!")
        end,
        DoubleClick = false,
        Risky = false
    }
}

Toggle

An on/off switch. Saves its state.

{
    Type = "Toggle",
    Name = "MyToggle",
    Arguments = {
        Text = "Enable feature",
        Default = false,
        Callback = function(value)
            print("Toggled:", value)
        end
    }
}

To read the toggle value anywhere:

Toggles.MyAddon_MyToggle.Value

Slider

A number slider between a min and max value.

{
    Type = "Slider",
    Name = "MySlider",
    Arguments = {
        Text = "Speed",
        Min = 0,
        Max = 100,
        Default = 50,
        Rounding = 0,
        Suffix = "studs/s",
        Callback = function(value)
            print("Slider value:", value)
        end
    }
}

To read the slider value:

Options.MyAddon_MySlider.Value

Input

A text input field.

{
    Type = "Input",
    Name = "MyInput",
    Arguments = {
        Text = "Enter a name",
        Default = "",
        Placeholder = "Type here...",
        Finished = true,
        Callback = function(value)
            print("Input:", value)
        end
    }
}

A dropdown selector with a list of options.

{
    Type = "Dropdown",
    Name = "MyDropdown",
    Arguments = {
        Text = "Select mode",
        Values = { "Mode A", "Mode B", "Mode C" },
        Default = "Mode A",
        Callback = function(value)
            print("Selected:", value)
        end
    }
}

Multi-select dropdown:

{
    Type = "Dropdown",
    Name = "MyMultiDropdown",
    Arguments = {
        Text = "Select modes",
        Values = { "Mode A", "Mode B", "Mode C" },
        Multi = true,
        Callback = function(value)
            for k, v in pairs(value) do
                print(k, v)
            end
        end
    }
}

ColorPicker

A color picker.

{
    Type = "ColorPicker",
    Name = "MyColor",
    Arguments = {
        Default = Color3.fromRGB(255, 0, 0),
        Title = "Pick a color",
        Callback = function(value)
            print("Color:", value)
        end
    }
}

KeyPicker

A keybind picker.

{
    Type = "KeyPicker",
    Name = "MyKeybind",
    Arguments = {
        Text = "Activate",
        Default = "F",
        Mode = "Toggle",
        Callback = function(value)
            print("Keybind active:", value)
        end
    }
}

Mode can be "Toggle", "Hold", or "Always".


DependencyBox

A container that only shows its children when a parent toggle is enabled.

{
    Type = "Toggle",
    Name = "ShowExtra",
    Arguments = {
        Text = "Show extra options",
        Default = false
    },
    Elements = {
        {
            Type = "DependencyBox",
            Elements = {
                {
                    Type = "Slider",
                    Name = "ExtraSlider",
                    Arguments = {
                        Text = "Extra value",
                        Min = 0,
                        Max = 10,
                        Default = 5
                    }
                }
            }
        }
    }
}

Nesting Elements

Any element that returns a container (like DependencyBox) supports child Elements:

{
    Type = "DependencyBox",
    Elements = {
        { Type = "Label", Arguments = { Text = "Only visible when parent toggle is on." } },
        { Type = "Button", Arguments = { Text = "Hidden button", Func = function() end } }
    }
}

Full Addon Example

return {
    Name = "ExampleAddon",
    Title = "Example Addon",
    Description = "Shows every element type.",
    Author = "msdoors",
    Version = "1.0",
    Side = "Right",
    Elements = {
        {
            Type = "Label",
            Arguments = { Text = "This addon is just an example.", DoesWrap = true }
        },
        {
            Type = "Divider",
            Arguments = { Text = "Controls" }
        },
        {
            Type = "Toggle",
            Name = "FeatureEnabled",
            Arguments = {
                Text = "Enable feature",
                Default = false,
                Callback = function(value)
                    print("Feature:", value)
                end
            }
        },
        {
            Type = "Slider",
            Name = "FeatureSpeed",
            Arguments = {
                Text = "Speed",
                Min = 1,
                Max = 200,
                Default = 16,
                Suffix = " studs/s",
                Callback = function(value)
                    print("Speed set to", value)
                end
            }
        },
        {
            Type = "Dropdown",
            Name = "FeatureMode",
            Arguments = {
                Text = "Mode",
                Values = { "Normal", "Fast", "Slow" },
                Default = "Normal",
                Callback = function(value)
                    print("Mode:", value)
                end
            }
        },
        {
            Type = "ColorPicker",
            Name = "FeatureColor",
            Arguments = {
                Default = Color3.fromRGB(0, 200, 255),
                Title = "Color",
                Callback = function(value)
                    print("Color:", value)
                end
            }
        },
        {
            Type = "KeyPicker",
            Name = "FeatureKey",
            Arguments = {
                Text = "Keybind",
                Default = "F",
                Mode = "Toggle"
            }
        },
        {
            Type = "Button",
            Arguments = {
                Text = "Run something",
                Func = function()
                    print("Button pressed!")
                end
            }
        }
    }
}

Tips

  • Name no addon e em cada elemento não pode ter espaços — são removidos automaticamente.
  • Toggles e Options ficam disponíveis globalmente como Toggles.AddonName_ElementName e Options.AddonName_ElementName.
  • Se o addon tiver erro de sintaxe ou crashar, uma caixa de erro aparece na aba Addons com um botão Copy Error.
  • Addons carregam depois que o msdoors termina de inicializar, então você pode usar valores de shared normalmente.

On this page