STG ScriptsDocumentation
Busker System

Configuration

Every option in STG Busker System config.lua, from framework and target settings to the guitar case, music library, note minigame, levels and notifications.

All settings live in stg_busker/config.lua. The file stays editable in the escrow version. Restart the resource after a change.

General

STG.Framework = "auto"
STG.MoneyType = "$"
STG.Target = false

Prop

Type

Language

STG.Language = "en"

Available: en, de, fr, es, pt, it, nl, pl, sv, ar, jp, zh. To change a text, edit the matching file in stg_busker/locales/. The keys named in the prompts (E, X and G) are written in these texts, so update them if you translate.

Guitar case

STG.DonateModel = "qua_guitar_case"
STG.Distance = 20

Prop

Type

Using the guitar item shows a preview of the case where you aim. Turn it with the Left and Right arrow keys and left click to place it. Each player can have one case out. Using the item again while a case is placed shows a warning, and using it once more removes the old case.

Without target, these prompts show up near a case:

WhereKeys
At your own caseE collect donations, X remove the case, G open the music menu
At someone else's caseE donate
Away from your caseG open the music menu

Music

STG.songDistance = 20.0
STG.MusicVolume = 1.0

STG.MusicLibrary = {
    [1] = {
        label = "Undertale - Memories",
        src = "undertale.mp3",
        level = 1
    },
    -- ...
}

Prop

Type

Each STG.MusicLibrary entry is one song in the music menu:

Prop

Type

The menu lists songs from level 1 to 5. A performer can only start one song at a time, and the music stops when the song ends, when they press Finish Music or when they fail the minigame.

Adding a song

Put the .mp3 file in stg_busker/html/sound/.

Add a new entry to STG.MusicLibrary with a label, the file name as src and the level needed to play it.

Minigame

STG.DisableMinigame = false

STG.Multiple = {
    [1] = { x = 1, nextMultiple = 20, maxMiss = 10, loopSpeed = 1000 },
    [2] = { x = 2, maxMiss = 13, nextMultiple = 25, loopSpeed = 800 },
    [3] = { x = 3, maxMiss = 16, nextMultiple = 30, loopSpeed = 700 },
    [4] = { x = 4, maxMiss = 18, nextMultiple = 35, loopSpeed = 600 },
    [5] = { x = 5, maxMiss = 20, loopSpeed = 500 },
}

While a song plays, notes fly up the screen. Clicking a note counts as a hit and gives XP, letting it pass counts as a miss. A run of hits raises the multiplier from x1 up to x5, and too many misses end the song.

Set STG.DisableMinigame to true to play songs without notes. Every song is unlocked and no XP is earned.

Each STG.Multiple entry is one multiplier step:

Prop

Type

Levels

STG.XP = {
    [1] = { level = 1, xp = 250, earnXP = 4 },
    [2] = { level = 2, xp = 750, earnXP = 7 },
    [3] = { level = 3, xp = 1200, earnXP = 12 },
    [4] = { level = 4, xp = 2000, earnXP = 17 },
    [5] = { level = 5 },
}

Prop

Type

Level 5 is the highest level and earns no more XP, so it only needs level. Levels and XP are saved in the stg_busker table.

Notifications

STG.Notify = function(message)
    lib.notify({
        title = getMessage('notify_title'),
        description = message,
        type = "info"
    })
end

STG.HelpNotify = function(message)
    lib.showTextUI(message, { position = "right-center", icon = 'guitar' })
end

STG.HideHelpNotify = function()
    lib.hideTextUI()
end
  • Notify: replace the body to use your own notification system.
  • HelpNotify and HideHelpNotify: show and hide the key prompts near the guitar case. Replace them to use your own text UI.

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page