Merch Booth

The MerchBooth developer module lets you offer avatar assets, game passes, and developer products for sale directly within your experience. Players can browse items, preview assets on their own avatar, purchase items, and instantly use or equip them — all without leaving your experience. This can help you monetize your experience and gain revenue through the 40% affiliate fee associated with selling other creators' items.

Module Usage

Installation

To use the MerchBooth module in an experience:

  1. Visit the MerchBooth marketplace page, click the green Get button, and confirm the transaction.

  2. In Studio, open the Toolbox (ViewToolbox).

  3. Select your toolbox Inventory section.

  4. Locate the module item and click it or drag-and-drop it into the 3D view.

  5. In the Explorer window, move the entire MerchBooth folder into ServerScriptService. Upon running the experience, the module will distribute itself to various services and begin running.

Configuration

The module is preconfigured to work for most use cases, but it can be easily customized through the configure function. For example, to create a lighter theme and disable the default Filter button in the upper-left area of the catalog view:

  1. In StarterPlayerScripts, create a new LocalScript and rename it to ConfigureMerchBooth.

  2. Paste the following code into the new script.

    LocalScript - ConfigureMerchBooth

    1local ReplicatedStorage = game:GetService("ReplicatedStorage")
    2
    3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
    4
    5MerchBooth.configure({
    6 backgroundColor = Color3.fromRGB(220, 210, 200),
    7 textSize = 17,
    8 textFont = Enum.Font.Fondamento,
    9 textColor = Color3.fromRGB(20, 20, 20),
    10 useFilters = false
    11})
    12

Adding Items

What's a merch booth without merch? The following sections outline how to add avatar assets, passes, and developer products to your merch booth.

Avatar Assets

Items such as layered clothing and rigid accessories must be added through their asset ID located on the item's detail page in the Avatar Shop.

  1. Create a Script within ServerScriptService and paste in the following code.

    Script - Add Avatar Assets

    1local ReplicatedStorage = game:GetService("ReplicatedStorage")
    2
    3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
    4
    5local items = {
    6
    7}
    8
    9for _, assetId in ipairs(items) do
    10 local success, errorMessage = pcall(function()
    11 MerchBooth.addItemAsync(assetId)
    12 end)
    13 if not success then
    14 print(errorMessage)
    15 end
    16end
    17
  2. Copy item asset IDs from their Avatar Shop website URL. For example, the ID of Roblox Baseball Cap is 607702162.

  3. Paste each copied ID into a comma-delimited list within the items table. By default, items appear in the catalog view in alphabetical order, but you can customize sorting using setCatalogSort.

    Script - Add Avatar Assets

    1local ReplicatedStorage = game:GetService("ReplicatedStorage")
    2
    3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
    4
    5local items = {
    6 607702162, -- Roblox Baseball Cap
    7 4819740796, -- Robox
    8 1374269, -- Kitty Ears
    9 11884330, -- Nerd Glasses
    10 10476359, -- Paper Hat
    11}
    12
    13for _, assetId in ipairs(items) do
    14 local success, errorMessage = pcall(function()
    15 MerchBooth.addItemAsync(assetId)
    16 end)
    17 if not success then
    18 print(errorMessage)
    19 end
    20end
    21

Passes

Adding passes requires pass IDs which can be located in the Creator Dashboard.

  1. Create a a Script within ServerScriptService and paste in the following code.

    Script - Add Passes

    1local ReplicatedStorage = game:GetService("ReplicatedStorage")
    2
    3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
    4
    5local items = {
    6
    7}
    8
    9for _, assetId in ipairs(items) do
    10 local success, errorMessage = pcall(function()
    11 MerchBooth.addItemAsync(assetId)
    12 end)
    13 if not success then
    14 print(errorMessage)
    15 end
    16end
    17
  2. Navigate to the Creator Dashboard and select the experience.

  3. In the left column, click Associated Items, then select PASSES.

  4. Right-click a pass and select Copy Asset ID.

  5. Paste each copied ID into a comma-delimited list within the items table and include InfoType.GamePass as the second parameter for addItemAsync to indicate that the items are passes. By default, items will appear in the catalog view in alphabetical order, but sorting can be customized via setCatalogSort.

    Script - Add Passes

    1local ReplicatedStorage = game:GetService("ReplicatedStorage")
    2
    3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
    4
    5local items = {
    6 4343758, -- ColdFyre Armor
    7 28521575, -- Slime Shield
    8}
    9
    10for _, assetId in ipairs(items) do
    11 local success, errorMessage = pcall(function()
    12 MerchBooth.addItemAsync(assetId, Enum.InfoType.GamePass)
    13 end)
    14 if not success then
    15 print(errorMessage)
    16 end
    17end
    18

Developer Products

Adding developer products requires product IDs which can be located in the Creator Dashboard.

  1. Create a Script within ServerScriptService and paste in the following code.

    Script - Add Developer Products

    1local ReplicatedStorage = game:GetService("ReplicatedStorage")
    2
    3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
    4
    5local items = {
    6
    7}
    8
    9for _, assetId in ipairs(items) do
    10 local success, errorMessage = pcall(function()
    11 MerchBooth.addItemAsync(assetId)
    12 end)
    13 if not success then
    14 print(errorMessage)
    15 end
    16end
    17
  2. Navigate to the Creator Dashboard and select the experience.

  3. In the left column, click Associated Items, then select DEVELOPER PRODUCTS.

  4. Right-click a product and select Copy Asset ID.

  5. Paste each copied ID into a comma-delimited list within the items table and include InfoType.Product as the second parameter for addItemAsync to indicate that the items are developer products. By default, items appear in the catalog view in alphabetical order, but you can customize sorting using setCatalogSort.

    Script - Add Developer Products

    1local ReplicatedStorage = game:GetService("ReplicatedStorage")
    2
    3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
    4
    5local items = {
    6 1236602053, -- Mana Refill
    7 1257880672, -- Healing Potion
    8}
    9
    10for _, assetId in ipairs(items) do
    11 local success, errorMessage = pcall(function()
    12 MerchBooth.addItemAsync(assetId, Enum.InfoType.Product)
    13 end)
    14 if not success then
    15 print(errorMessage)
    16 end
    17end
    18

Custom Catalog Button

By default, a right-side catalog button lets users open the booth at any time.

In some cases, it may be useful to remove this button and connect your own:

  1. Create a new button as outlined in Buttons and Text Input.

  2. Create a LocalScript as a child of the button object.

  3. Paste the following code into the new script.

    LocalScript - Custom Catalog Button

    1local ReplicatedStorage = game:GetService("ReplicatedStorage")
    2
    3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
    4
    5-- Remove the default catalog button
    6MerchBooth.toggleCatalogButton(false)
    7
    8-- Connect the custom button
    9script.Parent.Activated:Connect(function()
    10 MerchBooth.openMerchBooth()
    11end)
    12

Shoppable Regions

A helpful way to drive purchases in your experience is to automatically show the merch booth when a user enters an area.

To create a shoppable region:

  1. Create an Anchored block that encompasses the detection region.

    Block to detect when players approach the front of the shop counter
  2. Apply the tag ShopRegion to the block so that CollectionService detects it (the Tag Editor plugin may be helpful).

  3. Disable the part's CanCollide and CanQuery properties so that objects do not physically collide with it and raycasts do not detect it. Also set its Transparency to the maximum to hide it from users in the experience.

  4. Insert a new LocalScript under StarterPlayerScripts.

  5. In the new script, paste the following code which uses the Touched and TouchEnded events to detect when users enter/leave the region and calls openMerchBooth and closeMerchBooth to open/close the booth GUI.

    LocalScript

    1local Players = game:GetService("Players")
    2local ReplicatedStorage = game:GetService("ReplicatedStorage")
    3local CollectionService = game:GetService("CollectionService")
    4
    5local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
    6
    7-- Remove the default catalog button
    8MerchBooth.toggleCatalogButton(false)
    9
    10-- Iterate through all tagged parts
    11for _, region in ipairs(CollectionService:GetTagged("ShopRegion")) do
    12 region.Touched:Connect(function(otherPart)
    13 local character = Players.LocalPlayer.Character
    14 if character and character:FindFirstChild("HumanoidRootPart") == otherPart then
    15 MerchBooth.openMerchBooth()
    16 end
    17 end)
    18
    19 region.TouchEnded:Connect(function(otherPart)
    20 local character = Players.LocalPlayer.Character
    21 if character and character:FindFirstChild("HumanoidRootPart") == otherPart then
    22 MerchBooth.closeMerchBooth()
    23 end
    24 end)
    25end
    26

Proximity Prompts

As an alternative to the 2D catalog view, you can add proximity prompts over in-experience objects. This encourages users to discover items in the 3D environment, preview them on their own avatar, purchase them, and instantly equip them. See addProximityButton for details.

Changing the Equip Effect

By default, the merch booth shows a generic sparkle effect when a user equips an item from it. To change the effect, set particleEmitterTemplate to your own instance of a ParticleEmitter in a configure call.

LocalScript - ConfigureMerchBooth

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5local myParticleEmitter = Instance.new("ParticleEmitter")
6myParticleEmitter.SpreadAngle = Vector2.new(22, 22)
7myParticleEmitter.Lifetime = NumberRange.new(0.5, 1.5)
8myParticleEmitter.Shape = Enum.ParticleEmitterShape.Sphere
9myParticleEmitter.Transparency = NumberSequence.new(0, 1)
10myParticleEmitter.RotSpeed = NumberRange.new(200, 200)
11
12MerchBooth.configure({
13 particleEmitterTemplate = myParticleEmitter
14})
15

GUI Visibility

By default, the merch booth hides all ScreenGuis and CoreGuis when its UI appears, including the chat, leaderboard, and others included by Roblox. If you want to disable this behavior, set hideOtherUis to false in a configure call.

LocalScript - ConfigureMerchBooth

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.configure({
6 hideOtherUis = false
7})
8

Character Movement

It can be advantageous to prevent a character from moving while they are in the merch booth. This can be done by setting disableCharacterMovement to true in a configure call.

LocalScript - ConfigureMerchBooth

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.configure({
6 disableCharacterMovement = true
7})
8

API Reference

Types

Item

Items in the merch booth are represented by a dictionary with the following key-value pairs. Items can be gathered through the getItems function or the itemAdded event.

Key Type Description
assetId number Catalog ID of the item, as passed to addItemAsync.
title string Item title as it appears in the catalog.
price number Item price in Robux.
description string Item description as it appears in the catalog.
assetType string String representing the item's accessory type.
isOwned bool Whether the current user owns the item.
creatorName string Item creator as shown in the catalog.
creatorType CreatorType Creator type for the item.

Enums

MerchBooth.Controls

Used along with setControlKeyCodes to customize the keys and gamepad buttons for interacting with the merch booth.

Name Summary
ProximityPrompts Key and/or gamepad button to open the item view when proximity prompts are configured.
OpenMerchBooth Key and/or gamepad button to open the merch booth.
CloseMerchBooth Key and/or gamepad button to close the merch booth.
Filter Key and/or gamepad button to use the default Filter pulldown in the upper-left area of the catalog view.
ViewItem Key and/or gamepad button to open a specific merch booth item view.
LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.setControlKeyCodes(MerchBooth.Controls.ProximityPrompts, {
6 keyboard = Enum.KeyCode.Q,
7 gamepad = Enum.KeyCode.ButtonL1
8})
9

Functions

configure

configure(config:table)

Overrides default client-side configuration options through the following keys/values in the config table. This function can only be called from a LocalScript.

Appearance

Key Description Default
backgroundColor Main background color of the window (Color3). [0, 0, 0]
cornerRadius Corner radius for the main window (UDim). (0, 16)
cornerRadiusSmall Corner radius for elements inside the window (UDim). (0, 8)
textFont Font of "main text" such as prices, descriptions, and other general info (Font). Gotham
textSize Size of the main text. 14
textColor Color of the main text (Color3). [255, 255, 255]
secondaryTextColor Color used for some variations of the main text (Color3). [153, 153, 158]
headerFont Font of the header text used for the window title (Font). GothamSemibold
headerTextSize Size of the header text used for the window title. 18
titleFont Font of the title text used for item names on the item detail page (Font). GothamBold
titleTextSize Size of the title text used for item names on the item detail page. 28
buttonColor Background color for larger buttons in a clickable state, such as the main purchase button in item view (Color3). [255, 255, 255]
buttonTextColor Text color for larger buttons in a clickable state, such as the main purchase button in item view (Color3). [0, 0, 0]
secondaryButtonColor Background color for smaller buttons such as the price buttons in catalog view or the Try On button (Color3). [34, 34, 34]
secondaryButtonTextColor Text color for smaller buttons such as the price buttons in catalog view or the Try On button (Color3). [255, 255, 255]
inactiveButtonColor Background color for all buttons in an un-clickable state (Color3). [153, 153, 158]
inactiveButtonTextColor Text color for all buttons in an un-clickable state (Color3). [255, 255, 255]
particleEmitterTemplate Optional custom ParticleEmitter instance that appears and plays on equip.

Proximity Prompts

Key Description Default
proximityButtonActivationDistance Maximum distance a player's character can be from the prompt adornee for the prompt to appear. 10
proximityButtonExclusivity ProximityPromptExclusivity specifying which prompts can be shown at the same time. OnePerButton
proximityButtonOffset Pixel offset applied to the prompt's UI (Vector2). (0, 0)
proximityButtonPulseCount How many "pulses" occur around proximity buttons before stopping. 3

Behavior

Key Description Default
useFilters Toggles on/off the Filter button shown in the catalog. true
disableCharacterMovement If true, prevents character from moving while the merch booth is open. false
hideOtherUis If true, the merch booth hides all ScreenGuis and CoreGuis when its UI appears. true
closeWhenFarFromPrompt If true and if the player has opened an item view through a proximity prompt, the merch booth will automatically close when the player moves further away from the prompt object than its activation distance. true
LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.configure({
6 backgroundColor = Color3.fromRGB(255, 255, 255),
7 textSize = 16,
8 textFont = Enum.Font.Roboto,
9 textColor = Color3.fromRGB(20, 20, 20),
10 hideOtherUis = false,
11})
12

addItemAsync

addItemAsync(assetId:number, productType:InfoType, hideFromCatalog:boolean)

Asyncronously adds an item to the merch booth so that it's eligible for purchase in the experience. assetId is the item's asset ID, productType is the item's InfoType enum, and hideFromCatalog can be used to hide the item in the catalog view.

See Adding Items for details, as usage varies slightly for assets versus game passes or developer products.

Script - Add Avatar Assets

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5local items = {
6 607702162, -- Roblox Baseball Cap
7 4819740796, -- Robox
8 1374269, -- Kitty Ears
9 11884330, -- Nerd Glasses
10 10476359, -- Paper Hat
11}
12
13for _, assetId in ipairs(items) do
14 local success, errorMessage = pcall(function()
15 MerchBooth.addItemAsync(assetId)
16 end)
17 if not success then
18 print(errorMessage)
19 end
20end
21
Script - Add Passes

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5local items = {
6 4343758, -- ColdFyre Armor
7 28521575, -- Slime Shield
8}
9
10for _, assetId in ipairs(items) do
11 local success, errorMessage = pcall(function()
12 MerchBooth.addItemAsync(assetId, Enum.InfoType.GamePass)
13 end)
14 if not success then
15 print(errorMessage)
16 end
17end
18
Script - Add Developer Products

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5local items = {
6 1236602053, -- Mana Refill
7 1257880672, -- Healing Potion
8}
9
10for _, assetId in ipairs(items) do
11 local success, errorMessage = pcall(function()
12 MerchBooth.addItemAsync(assetId, Enum.InfoType.Product)
13 end)
14 if not success then
15 print(errorMessage)
16 end
17end
18

getItems

getItems():table

Returns a dictionary representing all of the currently registered items. Each key is an item's asset ID as a string, and each key's value is an Item. This function can only be called from a Script.

Script

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5local success, errorMessage = pcall(function()
6 MerchBooth.addItemAsync(4819740796)
7end)
8if success then
9 local items = MerchBooth.getItems()
10 print(items)
11end
12

removeItem

removeItem(assetId:number)

Unregisters an item previously added with addItemAsync, removing its tile in the catalog view and any proximity prompts assigned to it. This function can only be called from a Script.

Script

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5local success, errorMessage = pcall(function()
6 MerchBooth.addItemAsync(4819740796)
7end)
8if success then
9 -- After some time, remove the item
10 task.wait(5)
11 MerchBooth.removeItem(4819740796)
12end
13

addProximityButton

addProximityButton(adornee: BasePart|Model|Attachment, assetId: number)

Adds a proximity prompt over the given adornee that will trigger the display of an item's purchase view, given its asset ID. This can be used as an alternative to the 2D catalog view, encouraging users to discover items in the 3D environment.

Note that an item must be added via addItemAsync before a proximity button can be assigned to it. See also removeProximityButton to remove the proximity prompt from an object.

Script

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5local success, errorMessage = pcall(function()
6 MerchBooth.addItemAsync(4819740796)
7end)
8if success then
9 local item = workspace:FindFirstChild("Robox")
10 if item then
11 MerchBooth.addProximityButton(item, 4819740796)
12 end
13end
14

removeProximityButton

removeProximityButton(adornee: BasePart|Model|Attachment)

Removes a proximity prompt generated through addProximityButton. This function can only be called from a Script.

Script

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5local success, errorMessage = pcall(function()
6 MerchBooth.addItemAsync(4819740796)
7end)
8if success then
9 local item = workspace:FindFirstChild("Robox")
10 if item then
11 MerchBooth.addProximityButton(item, 4819740796)
12 end
13
14 -- After some time, remove the prompt
15 task.wait(5)
16 MerchBooth.removeProximityButton(item)
17end
18

setCatalogSort

setCatalogSort(sortFunction:function):boolean

Sets the sorting function sortFunction to be used in the catalog view. The provided sorting function can use logic based on Item info such as price or title. This function can only be called from a LocalScript.

Here are some examples for sorting the catalog:

Price Low-to-High

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.setCatalogSort(function(a, b)
6 return a.price < b.price
7end)
8
Price High-to-Low

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.setCatalogSort(function(a, b)
6 return a.price > b.price
7end)
8
Price Low-to-High & Alphabetical

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.setCatalogSort(function(a, b)
6 return if a.price == b.price then a.title < b.title else a.price < b.price
7end)
8

setControlKeyCodes

setControlKeyCodes(control:MerchBooth.Controls, keyCodes:table)

Configures the key and button values for interactions with the merch booth. The first parameter must be a MerchBooth.Controls enum and the second parameter a table containing the keys keyboard and/or gamepad with corresponding KeyCode enums.

Enum (control) Default keyCodes Keys/Values
MerchBooth.Controls.ProximityPrompts keyboard = Enum.KeyCode.E
gamepad = Enum.KeyCode.ButtonY
MerchBooth.Controls.OpenMerchBooth gamepad = Enum.KeyCode.ButtonY
MerchBooth.Controls.CloseMerchBooth gamepad = Enum.KeyCode.ButtonB
MerchBooth.Controls.Filter gamepad = Enum.KeyCode.ButtonX
MerchBooth.Controls.ViewItem gamepad = Enum.KeyCode.ButtonA
LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.setControlKeyCodes(MerchBooth.Controls.ProximityPrompts, {
6 keyboard = Enum.KeyCode.Q,
7 gamepad = Enum.KeyCode.ButtonL1,
8})
9

openMerchBooth

openMerchBooth():

Opens the merch booth window (if closed) and navigates to the catalog view. This function can only be called from a LocalScript.

LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5local success, errorMessage = pcall(function()
6 MerchBooth.addItemAsync(assetId)
7end)
8if not success then
9 print(errorMessage)
10end
11
12MerchBooth.openMerchBooth()
13

openItemView

openItemView(itemId:number)

Navigates to the single item view of the given itemId, opening the merch booth window if it is currently closed. This function can only be called from a LocalScript.

LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5local success, errorMessage = pcall(function()
6 MerchBooth.addItemAsync(4819740796)
7end)
8if success then
9 MerchBooth.openItemView(4819740796)
10end
11

toggleCatalogButton

toggleCatalogButton(enabled:boolean)

Toggles on/off the catalog button on the right side of the screen. This is useful when implementing a custom button or limiting the merch booth's appearance to regions or proximity prompts. Can only be called from a LocalScript.

LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.toggleCatalogButton(false)
6

isMerchBoothOpen

isMerchBoothOpen():Tuple

Returns true if either the catalog or the item view is open. If the item view is open, the item's asset ID is returned as the second value. This function can only be called from a LocalScript.

LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5local success, errorMessage = pcall(function()
6 MerchBooth.addItemAsync(4819740796)
7end)
8if success then
9 MerchBooth.openItemView(4819740796)
10
11 local isOpen, itemId = MerchBooth.isMerchBoothOpen()
12 print(isOpen, itemId)
13end
14

closeMerchBooth

closeMerchBooth():

Closes the merch booth window. This function can only be called from a LocalScript.

LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.closeMerchBooth()
6

isMerchBoothEnabled

isMerchBoothEnabled():boolean

This function may be used in tandem with setEnabled to check whether the merch booth is currently enabled or not. Can only be called from a LocalScript.

setEnabled

setEnabled(enabled:boolean)

Sets whether the entire merch booth is enabled or not. When disabled, this function removes the entire UI, including proximity prompts, and disconnects all events. This function can only be called from a LocalScript.

LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5local isEnabled = MerchBooth.isMerchBoothEnabled()
6if isEnabled then
7 MerchBooth.setEnabled(false)
8end
9

Events

itemAdded

itemAdded(assetId:number, itemInfo:table):RBXScriptSignal

Fires when an item is added through addItemAsync. This event can only be connected in a Script.

Parameters
assetId: number Item asset ID.
itemInfo: table Dictionary of Item info such as price or title.
Script

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.itemAdded:Connect(function(assetId, itemInfo)
6 print("Item added with asset ID of", assetId)
7 print(itemInfo)
8end)
9

itemRemoved

itemRemoved(assetId:number):RBXScriptSignal

Fires when an item is removed through removeItem. This event can only be connected in a Script.

Parameters
assetId: number Item asset ID.
Script

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.itemRemoved:Connect(function(assetId)
6 print("Item removed with asset ID of", assetId)
7end)
8

merchBoothOpened

merchBoothOpened():RBXScriptSignal

Fires when either the catalog or item detail view are opened.

LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.merchBoothOpened:Connect(function()
6 print("Booth view opened")
7end)
8

merchBoothClosed

merchBoothClosed():RBXScriptSignal

Fires when either the catalog or item detail view are closed.

LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.merchBoothClosed:Connect(function()
6 print("Booth view closed")
7end)
8

catalogViewOpened

catalogViewOpened():RBXScriptSignal

Fires when the catalog view is opened.

LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.catalogViewOpened:Connect(function()
6 print("Catalog view opened")
7end)
8

catalogViewClosed

catalogViewClosed():RBXScriptSignal

Fires when the catalog view is closed.

LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.catalogViewClosed:Connect(function()
6 print("Catalog view closed")
7end)
8

itemViewOpened

itemViewOpened():RBXScriptSignal

Fires when the item detail view is opened.

LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.itemViewOpened:Connect(function()
6 print("Item view opened")
7end)
8

itemViewClosed

itemViewClosed():RBXScriptSignal

Fires when the item detail view is closed.

LocalScript

1local ReplicatedStorage = game:GetService("ReplicatedStorage")
2
3local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
4
5MerchBooth.itemViewClosed:Connect(function()
6 print("Item view closed")
7end)
8