optionlist

Lets you set a new optionlist for the specific toggle

local combat = window:Page({Name = "Combat", Icon = "rbxassetid://0"});
local main_combat = combat:Section({Name = "Main", Side = "Left", Size = 100});

local toggle = main_combat:Toggle({
    Name = "Kill",
    Flag = "kill_state",
    Default = false, -- if no default is provided it will default to false
    Callback = function(state)
        print(`Kill is now {state}`)
    end,
})
-- a list lets you add any ui element to it but it will be in the
-- small settings icon next to the toggle instead of the section directly
local list = toggle:OptionList({}) 
local toggle = list:Toggle({
    Name = "Bring",
    Flag = "bring_state",
    Default = false, 
    Callback = function(state)
        print(`Bring is now {state}`)
    end,
})

Last updated