SCode StudiosSCodeDocs
Tebex Store

Configuration

Configuration of SCode Crafting Tablet

All settings are in config.lua.

General

Lua
Config.Debug = false -- Enable/disable debug mode
Config.Framework = 'qbcore' -- 'qbcore' or 'esx'
Config.RequiredItem = 'tablet' -- The item needed to open/activate the script

The tablet opens with F6 (players can rebind it in Settings → Key Bindings → FiveM) or by using the Config.RequiredItem item. In both cases the player must carry that item.

Level system

Lua
Config.MaxLevel = 100
Config.BaseXP = 100
Config.XPMultiplier = 1.2
Config.LevelBonuses = {
    craftingSpeed = 0.02, -- 2% reduction per level
    materialSave = 0.01  -- 1% material save per level
}

The XP needed for a level is BaseXP × XPMultiplier ^ (level - 1). With the defaults, level 2 needs 120 XP, level 3 needs 144 XP and so on.

The crafting time of an item is baseTime × (1 - (level - 1) × craftingSpeed), with a minimum of 1 second.

XP and crafting time per category

Lua
Config.XPPerCraft = {
    weapons = 500,
    tools = 15,
    medical = 10,
    food = 12,
    armor = 20,
    other = 8
}

Config.CraftingTimes = {
    weapons = { baseTime = 5 }, -- Base crafting time in seconds
    tools = { baseTime = 5 },
    medical = { baseTime = 5 },
    food = { baseTime = 5 },
    armor = { baseTime = 5 },
    other = { baseTime = 5 }
}

UI

Lua
Config.UI = {
    EnableInfoButton = true, -- Enable/disable info button
    EnableChatSystem = true, -- Enable/disable chat system
}
Config.NotificationDuration = 8000 -- Duration of notifications in milliseconds

Categories

Each category has a label, an icon, an order and colours. The key (weapons, tools, …) must match a key in Config.Items, Config.XPPerCraft and Config.CraftingTimes.

Lua
Config.Categories = {
    weapons = {
        label = "Weapons",
        icon = "gun",
        order = 1,
        style = {
            color = "#FF4B4B",
            hoverColor = "#FF6B6B",
            activeColor = "#FF3131",
            iconColor = "#FFFFFF",
            borderColor = "rgba(255, 75, 75, 0.3)",
            background = "rgba(255, 75, 75, 0.1)"
        }
    },
    -- tools, medical, food, armor, other ...
}

Items and recipes

Items are listed per category. requiredLevel is optional (default 0).

Lua
Config.Items = {
    weapons = {
        {
            name = "weapon_smg",          -- item given to the player
            label = "SMG",
            image = "smg.png",            -- file in ui/img/
            description = "Light machine gun",
            requiredLevel = 15,
            requirements = {
                { item = "metal_parca", label = "Metal Part", amount = 20, image = "tablet.png" },
                { item = "ahsap", label = "Wood", amount = 8, image = "tablet.png" },
                { item = "yay", label = "Spring", amount = 5, image = "tablet.png" },
                { item = "elektronik", label = "Electronics", amount = 3, image = "tablet.png" }
            }
        },
    },
}

The default recipes:

Category

Item

Level

Materials

Weapons

weapon_pistol

0

1× tablet

Weapons

weapon_smg

15

20× metal_parca, 8× ahsap, 5× yay, 3× elektronik

Weapons

weapon_shotgun

10

15× metal_parca, 10× ahsap, 3× yay

Tools

lockpick

0

3× metal_parca, 1× yay

Tools

repairkit

0

5× metal_parca, 2× elektronik, 3× kaucuk

Medical

bandage

0

3× kumas, 1× alkol

Medical

medikit

0

3× bandage, 2× antibiyotik, 1× enjector

Food

burger

0

1× et, 1× ekmek, 1× domates

Food

energy_drink

0

1× su, 2× seker, 1× kafein

Armor

armor

0

10× kumas, 5× metal_parca

Armor

heavy_armor

0

15× kumas, 15× metal_parca, 5× kevlar

Other

radio

0

5× elektronik, 3× metal_parca, 2× plastik

Other

backpack

0

10× kumas, 5× deri, 2× metal_toka

The default pistol recipe uses the tablet itself as its material, so crafting it takes the player's tablet. Change it to your own materials before going live.

Texts

All tablet texts are in Config.Language (welcome text, the information page, buttons, categories, tooltips) and all notifications are in Config.Notifications. Edit them to translate the tablet.

Lua
Config.Notifications = {
    noPermission = 'You do not have permission to do this!',
    itemRequired = 'Crafting table required for this action!',
    notEnoughMaterials = 'You do not have enough materials!',
    craftingSuccess = '%s crafted successfully!',
    inventoryFull = 'Inventory is full!',
    levelRequired = 'Level %d required to craft this item!',
    globalLevelUp = 'Your global level increased! New level: %d',
    -- ...
}

Last updated: December 6, 2026