Connectdocs

ItemGroup

FieldTypeDescription
namestringGroup title, e.g. "Backpack".
types"inventory" | "weapon"Group type. Decides which number field each item uses.
data{ Item }The items in this group.

Group types

typesItem fieldUse for
inventorycountStackable items, materials, consumables
weaponmasteryWeapons, tools, anything with a level

Item

FieldTypeDescription
namestringItem name.
iconnumberRoblox asset ID. Shown as rbxassetid://{icon}.
countnumberAmount owned. Use in inventory groups.
masterynumberMastery level. Use in weapon groups.
imageOffsetoptional{ x, y }Top-left pixel of the crop inside a sprite sheet.
imageSizeoptional{ w, h }Size in pixels of the crop.

Inventory

Luau
{
    name = "Testing Inventory",
    types = "inventory",
    data = {
        { name = "Test 1", count = 1, icon = 732391129 },
        { name = "Test 2", count = 2, icon = 732391129 },
    }
}

Weapon

Luau
{
    name = "Testing Weapon",
    types = "weapon",
    data = {
        { name = "Test 1", mastery = 1, icon = 732391129 },
        { name = "Test 2", mastery = 2, icon = 732391129 },
    }
}

Sprite sheets

Some games pack many icons into one image, so different items share the same asset ID. Use imageOffset and imageSize to crop the right icon. They work like ImageRectOffset and ImageRectSize on an ImageLabel, so you can usually copy the values straight from the game's UI.

Luau
{ name = "Test 3", count = 3, icon = 732391129, imageOffset = {1, 1}, imageSize = {150, 150} }
Heads up

Watch the commas between fields. A missing comma before imageOffset is a syntax error and the whole script will not run.