Skip to content

Guide

Through source code modifications, you can change Purse's behavior and appearance. Here are a few examples of what you can do with Purse.

Changing Equip Color

You can change the slot's equip color, which is blue, by modifying the SLOT_EQUIP_COLOR constant in its source.

The following code sample changes the equip color to red.

44
45
46
47
48
49
local SLOT_DRAGGABLE_COLOR = Color3.new(49 / 255, 49 / 255, 49 / 255)
local SLOT_EQUIP_COLOR = Color3.new(233 / 255, 90 / 255, 90 / 255) -- (1)!
local SLOT_EQUIP_THICKNESS = 0.1 -- Relative
local SLOT_FADE_LOCKED_DEFAULT = 0.50 -- Locked means undraggable
local slotFadeLocked = SLOT_FADE_LOCKED_DEFAULT * GuiService.PreferredTransparency -- ROBLOX deviation: use GuiService instead of UserGameSettings
local SLOT_BORDER_COLOR = Color3.new(1, 1, 1) -- Appears when dragging
  1. Changed from blue Color3.new(90 / 255, 142 / 255, 233 / 255) to red Color3.new(233 / 255, 90 / 255, 90 / 255)

Screenshot of the hotbar with a slot equipped with a red selection outline

Hotbar with a red equip outline

Increasing Hotbar Slots and Inventory Rows

Purse shows a set number of hotbar slots and inventory rows based on the device.

Screenshot of the hotbar and inventory with full size

Computer, console, and VR have 10 hotbar slots and 4 inventory rows

Screenshot of the hotbar and inventory with mini size

Phone and tablet devices have 3 hotbar slots and 2 inventory rows

It's possible to increase the number of hotbar slots and inventory rows shown by changing the constants in the source code.

Note

Formerly VR devices used different constants for hotbar slots and inventory rows but now use the same as computer and console devices.

HOTBAR_SLOTS_VR and INVENTORY_ROWS_VR are no longer used but are still included in the code. VR devices now use INVENTORY_ROWS_FULL and HOTBAR_SLOTS_FULL.

62
63
64
65
66
67
68
69
70
71
72
local HOTBAR_SLOTS_FULL = 10
local HOTBAR_SLOTS_VR = 6
local HOTBAR_SLOTS_MINI = 3
local HOTBAR_SLOTS_WIDTH_CUTOFF = 1024 -- Anything smaller is MINI
local HOTBAR_OFFSET_FROMBOTTOM = -30 -- Offset to make room for the Health GUI

local INVENTORY_ROWS_FULL = 4
local INVENTORY_ROWS_VR = 3
local INVENTORY_ROWS_MINI = 2
local INVENTORY_HEADER_SIZE = 40
local INVENTORY_ARROWS_BUFFER_VR = 40

Constants suffixed with _FULL are for computer, console, and VR devices while constants suffixed with _MINI are for phone and tablet devices.

The following code sample changes phone and tablet devices to have 5 hotbar slots.

62
63
64
65
66
local HOTBAR_SLOTS_FULL = 10
local HOTBAR_SLOTS_VR = 6
local HOTBAR_SLOTS_MINI = 5 -- (1)!
local HOTBAR_SLOTS_WIDTH_CUTOFF = 1024 -- Anything smaller is MINI
local HOTBAR_OFFSET_FROMBOTTOM = -30 -- Offset to make room for the Health GUI
  1. Changed from 3 hotbar slots to 5 hotbar slots

Screenshot of the hotbar and inventory with modified mini size

Increased hotbar slots on phone and tablet devices

Removing Topbar Icon

The topbar icon is decoupled from Purse's functionality, so you can remove it by disabling the TopbarIcon script. In addition, a ContextAction script is included to bind opening and closing the inventory to a keycode (set to backquote ` by default).

Screenshot of topbar icon enabled

Topbar icon enabled

Screenshot of topbar icon disabled

Topbar icon disabled

Your explorer window should look similar to the following when you disable the TopbarIcon script and enable the ContextAction script.

Explorer window showing TopbarIcon disabled and ContextAction enabled under Purse

Warning

If you do not enable the ContextAction script, players will not be able to open the backpack since the topbar icon which handles binding is disabled.