Basic UI Examples

This is a simple lua that adds elements to the Lynx Menu

Lua Script:

ui.Modal("Hello World!", "This modal will display a toast upon click", function()
    client.showToast("Hello World!")
end)

local checkbox = ui.Checkbox("Auto Meme", "Repeats what the users says", "auto_meme", false);

--[[ 
You can call checkbox.setValue(true); or 
checkbox.setValue(false) to force change the value of the checkbox
]]

events.addCallback("incoming_message", function(message)
    if (not checkbox.getValue()) then
        return
    end

    client.sendMessage(message.text, message.chat_jid);
end)

Last updated

Was this helpful?