Kartik Scripts

Server Widgets

Add your own lines to the HUD: a reputation bar, a bounty, a job counter, anything. They show in the Server widgets group, which players can move like the rest.

🛠️ From config

Config.CustomWidgets = {
    {
        id = 'rep',
        label = 'Reputation',
        type = 'bar',
        icon = 'trophy',
        color = '#e3b65a',
        max = 100,
        source = { export = { 'my-rep-script', 'GetReputation' } },
        interval = 5000,
    },
    {
        id = 'bounty',
        label = 'Bounty',
        type = 'text',
        icon = 'crosshair',
        source = { state = 'bounty' },
    },
}
FieldWhat it does
typebar (needs a number), text or badge
iconstar, trophy, crosshair, shield, skull, coffee, pill, footprints, heart, eye, flame, snowflake, leaf, moon and more
max, suffixFor bars and numbers
source.exportA client export that returns a number, a string, or { value = 50, text = '50 / 100' }
source.stateA key in LocalPlayer.state
intervalHow often to read it, in milliseconds

🔌 From a script

exports['kartik-hud']:RegisterWidget({ id = 'wanted', label = 'Wanted', type = 'text', icon = 'skull', color = '#d9534a' })
exports['kartik-hud']:SetWidget('wanted', 3, '3 stars')
exports['kartik-hud']:RemoveWidget('wanted')

From the server, use exports['kartik-hud']:SetWidget(source, id, value, text).

On this page