Skip to main content
handle:OverrideValue(value, priority?) forces a control to act as if it has a certain value, without changing what the user sees in the menu. Whatever the user picked still shows in the UI; the rest of Limerence reads your value instead. Use this when you want to temporarily turn a feature on or off (or push a slider somewhere) without fighting the user’s own setting.
  • The higher the priority, the more it wins. Default is 0.
  • Multiple overrides can be active at once. When the highest-priority one is released, the next-highest takes over.
  • A bolt icon appears next to the control’s name while any override is active. Hover text is "{script} is overriding this value." where {script} is that script’s api.name. Multiple scripts: "A and B are overriding this value."
Also documented on ElementHandle.

OverrideHandle

The handle lets you change or undo the override.
override:Release()              -- undo the override
override:IsReleased()           -- true if already released
override:GetValue()             -- current forced value
override:SetValue(newValue)     -- change the forced value
override:GetPriority()          -- current priority
override:SetPriority(newPrio)   -- change the priority

On unload

You don’t have to call :Release() yourself. Overrides are removed when your script unloads, same as legitbot influence handles.

Example

local trigger = api.ui.find("legitbot.trigger.enabled")
local force = trigger:OverrideValue(true, 50)

-- Later, when your condition expires:
force:Release()

Example: change priority based on game state

local fovEl = api.ui.find("legitbot.aim.fov")
local fovOverride = fovEl:OverrideValue(180, 10)

-- Boost the priority while some flag is true, drop it back when false.
local active = false
api.utility.connect(SomeSignal, function(state)
    if state and not active then
        fovOverride:SetPriority(100)
        active = true
    elseif not state and active then
        fovOverride:SetPriority(10)
        active = false
    end
end)

-- No need to clean up, it's released for you when the script unloads.