Skip to content

Inventory UI

Slot grid with rarity colors, search, item details and equip.

  • Rarity colors for Common, Rare, Epic, Legendary and Mythic.
  • Search box filters slots as you type.
  • Fire the SetItems BindableEvent with your item list to refresh it.
  • Equip fires ReplicatedStorage.InventoryEquip for your server.

56 GUI objects · InventoryController LocalScript, 115 lines

Preview the InventoryController script
local gui = script.Parent
-- Inventory UI controller. Free kit from rbxtoolshub.com.
-- Fill it from your own data: fire the "SetItems" BindableEvent inside this ScreenGui with a list like ITEMS.
-- Equipping fires ReplicatedStorage.InventoryEquip (a RemoteEvent you create) with the item name.

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local RARITY_COLORS = {
	Common = Color3.fromRGB(156, 163, 175),
	Rare = Color3.fromRGB(59, 130, 246),
	Epic = Color3.fromRGB(168, 85, 247),
	Legendary = Color3.fromRGB(245, 158, 11),
	Mythic = Color3.fromRGB(239, 68, 68),
}

local ITEMS = {
	{ Name = "Wooden Sword", Icon = "🗡️", Rarity = "Common", Amount = 1, Description = "A trusty starter blade." },
	{ Name = "Dragon Egg", Icon = "🥚", Rarity = "Legendary", Amount = 1, Description = "Something is moving inside." },
	{ Name = "Health Potion", Icon = "🧪", Rarity = "Rare", Amount = 12, Description = "Restores 50 health." },
	{ Name = "Golden Apple", Icon = "🍎", Rarity = "Epic", Amount = 3, Description = "Doubles your speed for 30 seconds." },
	{ Name = "Magic Wand", Icon = "🪄", Rarity = "Mythic", Amount = 1, Description = "Casts a random spell." },
}
local MAX_SLOTS = 50
local equipped = ITEMS[1] and ITEMS[1].Name or nil

local inventory = gui:WaitForChild("Inventory")
local grid = inventory:WaitForChild("Slots")
local template = grid:WaitForChild("SlotTemplate")
local details = inventory:WaitForChild("Details")
local search = inventory:WaitForChild("Search")
local capacity = inventory:WaitForChild("Header"):WaitForChild("Capacity")
local openButton = gui:WaitForChild("OpenInventory")
local closeButton = inventory:WaitForChild("Header"):WaitForChild("Close")

template.Visible = false
local selected = nil

local function showDetails(item)
	selected = item
	details.Visible = item ~= nil
…