Run it
Copy the script and paste it into your executor.
Players = :()
StarterGui = :()
UserInputService = :()
VoiceChatService = :()
player = Players.LocalPlayer
MAX_HOTBAR =
clickThreshold =
SLOT_SIZE =
SLOT_PADDING =
INV_SLOT_SIZE =
hotbarList = {}
inventoryList = {}
currentSearchText =
canMoveIcons =
canMoveHotbar =
(() StarterGui:(.CoreGuiType.Backpack, ) )
screenGui = .()
screenGui.Name =
screenGui.ResetOnSpawn =
screenGui.IgnoreGuiInset =
screenGui.Parent = player:()
renderUI
()
(() StarterGui:(.CoreGuiType.Backpack, ) )
screenGui
screenGui:()
baseOffsetX =
isVoiceEnabled =
(() isVoiceEnabled = VoiceChatService:(player.UserId) )
isVoiceEnabled baseOffsetX = baseOffsetX +
topbarContainer = .()
topbarContainer.Name =
topbarContainer.Size = .(, , , )
topbarContainer.Position = .(, baseOffsetX, , )
topbarContainer.BackgroundTransparency =
topbarContainer.Parent = screenGui
toggleBtn = .()
toggleBtn.Name =
toggleBtn.Size = .(, , , )
toggleBtn.Position = .(, , , )
toggleBtn.BackgroundColor3 = .(, , )
toggleBtn.BackgroundTransparency =
toggleBtn.Text =
toggleBtn.TextScaled =
toggleBtn.Parent = topbarContainer
.(, toggleBtn).CornerRadius = .(, )
settingsBtn = .()
settingsBtn.Name =
settingsBtn.Size = .(, , , )
settingsBtn.Position = .(, , , )
settingsBtn.BackgroundColor3 = .(, , )
settingsBtn.BackgroundTransparency =
settingsBtn.Text =
settingsBtn.TextScaled =
settingsBtn.Parent = topbarContainer
.(, settingsBtn).CornerRadius = .(, )
(gui)
stroke = .()
stroke.Color = .(, , )
stroke.Thickness =
stroke.ApplyStrokeMode = .ApplyStrokeMode.Border
stroke.Parent = gui
(toggleBtn)
(settingsBtn)
(frame, triggerObjects, conditionFunc)
dragging, dragStart, startPos
_, obj (triggerObjects)
obj.InputBegan:((input)
() (input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch)
dragging =
dragStart = input.Position
startPos = frame.Position
)
UserInputService.InputChanged:((input)
dragging (input.UserInputType == .UserInputType.MouseMovement input.UserInputType == .UserInputType.Touch)
delta = input.Position - dragStart
frame.Position = .(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
)
UserInputService.InputEnded:((input)
input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch
dragging =
)
settingsPanel = .()
settingsPanel.Name =
settingsPanel.Size = .(, , , )
settingsPanel.Position = .(, -, , -)
settingsPanel.BackgroundColor3 = .(, , )
settingsPanel.BackgroundTransparency =
settingsPanel.Visible =
settingsPanel.Parent = screenGui
.(, settingsPanel).CornerRadius = .(, )
(settingsPanel)
setLayout = .()
setLayout.Padding = .(, )
setLayout.HorizontalAlignment = .HorizontalAlignment.Center
setLayout.Parent = settingsPanel
setPadding = .()
setPadding.PaddingTop = .(, )
setPadding.Parent = settingsPanel
setLabel = .()
setLabel.Size = .(, , , )
setLabel.BackgroundTransparency =
setLabel.Text =
setLabel.TextColor3 = .(, , )
setLabel.Font = .Font.Code
setLabel.TextSize =
setLabel.Parent = settingsPanel
(name, text, callback)
frame = .()
frame.Size = .(, , , )
frame.BackgroundTransparency =
frame.Parent = settingsPanel
label = .()
label.Size = .(, , , )
label.BackgroundTransparency =
label.Text = text
label.TextColor3 = .(, , )
label.Font = .Font.Code
label.TextSize =
label.TextXAlignment = .TextXAlignment.Left
label.Parent = frame
btn = .()
btn.Size = .(, , , )
btn.Position = .(, , , )
btn.BackgroundColor3 = .(, , )
btn.Text =
btn.TextColor3 = .(, , )
btn.Font = .Font.Code
btn.Parent = frame
.(, btn).CornerRadius = .(, )
state =
btn.MouseButton1Click:(()
state = state
btn.BackgroundColor3 = state .(, , ) .(, , )
btn.Text = state
(state)
)
(labelName, getVal, setVal, minVal, maxVal)
frame = .()
frame.Size = .(, , , )
frame.BackgroundTransparency =
frame.Parent = settingsPanel
label = .()
label.Size = .(, , , )
label.BackgroundTransparency =
label.Text = labelName
label.TextColor3 = .(, , )
label.Font = .Font.Code
label.TextSize =
label.TextXAlignment = .TextXAlignment.Left
label.Parent = frame
minusBtn = .()
minusBtn.Size = .(, , , )
minusBtn.Position = .(, , , )
minusBtn.Text =
minusBtn.BackgroundColor3 = .(, , )
minusBtn.TextColor3 = .(, , )
minusBtn.Parent = frame
.(, minusBtn).CornerRadius = .(, )
valLabel = .()
valLabel.Size = .(, , , )
valLabel.Position = .(, , , )
valLabel.BackgroundTransparency =
valLabel.Text = (())
valLabel.TextColor3 = .(, , )
valLabel.Font = .Font.Code
valLabel.TextSize =
valLabel.Parent = frame
plusBtn = .()
plusBtn.Size = .(, , , )
plusBtn.Position = .(, , , )
plusBtn.Text =
plusBtn.BackgroundColor3 = .(, , )
plusBtn.TextColor3 = .(, , )
plusBtn.Parent = frame
.(, plusBtn).CornerRadius = .(, )
minusBtn.MouseButton1Click:(()
current = ()
current > minVal
(current - )
valLabel.Text = (())
renderUI ()
)
plusBtn.MouseButton1Click:(()
current = ()
current < maxVal
(current + )
valLabel.Text = (())
renderUI ()
)
(, () SLOT_SIZE , (v) SLOT_SIZE = v , , )
(, () MAX_HOTBAR , (v)
MAX_HOTBAR = v
#hotbarList > MAX_HOTBAR
.(inventoryList, .(hotbarList))
, , )
(, , (state) canMoveIcons = state )
(, , (state) canMoveHotbar = state )
revertContainer = .()
revertContainer.Size = .(, , , )
revertContainer.BackgroundTransparency =
revertContainer.Parent = settingsPanel
revertBtn = .()
revertBtn.Size = .(, , , )
revertBtn.BackgroundColor3 = .(, , )
revertBtn.Text =
revertBtn.TextColor3 = .(, , )
revertBtn.Font = .Font.Code
revertBtn.TextSize =
revertBtn.Parent = revertContainer
.(, revertBtn).CornerRadius = .(, )
(revertBtn)
revertBtn.MouseButton1Click:(revertToDefault)
(topbarContainer, {toggleBtn, settingsBtn}, () canMoveIcons )
invContainer = .()
invContainer.Name =
invContainer.Size = .(, , , )
invContainer.Position = .(, , , )
invContainer.BackgroundColor3 = .(, , )
invContainer.BackgroundTransparency =
invContainer.BorderSizePixel =
invContainer.Visible =
invContainer.Parent = screenGui
.(, invContainer).CornerRadius = .(, )
(invContainer)
dropBox = .()
dropBox.Name =
dropBox.Size = .(, , , )
dropBox.Position = .(, , , )
dropBox.BackgroundColor3 = .(, , )
dropBox.BackgroundTransparency =
dropBox.Visible =
dropBox.Parent = invContainer
.(, dropBox).CornerRadius = .(, )
(dropBox)
dropBoxText = .()
dropBoxText.Size = .(, , , )
dropBoxText.Position = .(, , , )
dropBoxText.BackgroundTransparency =
dropBoxText.Text =
dropBoxText.TextColor3 = .(, , )
dropBoxText.Font = .Font.Code
dropBoxText.TextSize =
dropBoxText.TextScaled =
dropBoxText.Parent = dropBox
dropWarning = .()
dropWarning.Size = .(, -, , )
dropWarning.Position = .(, , , )
dropWarning.BackgroundTransparency =
dropWarning.Text =
dropWarning.TextColor3 = .(, , )
dropWarning.Font = .Font.Code
dropWarning.TextSize =
dropWarning.TextWrapped =
dropWarning.TextXAlignment = .TextXAlignment.Center
dropWarning.Parent = dropBox
toggleBtn.MouseButton1Click:(()
invContainer.Visible = invContainer.Visible
dropBox.Visible = invContainer.Visible
)
settingsBtn.MouseButton1Click:(() settingsPanel.Visible = settingsPanel.Visible )
searchIcon = .()
searchIcon.Size = .(, , , )
searchIcon.Position = .(, , , )
searchIcon.BackgroundTransparency =
searchIcon.Text =
searchIcon.TextScaled =
searchIcon.Parent = invContainer
searchInput = .()
searchInput.Size = .(, -, , )
searchInput.Position = .(, , , )
searchInput.BackgroundColor3 = .(, , )
searchInput.BackgroundTransparency =
searchInput.TextColor3 = .(, , )
searchInput.Text =
searchInput.PlaceholderText =
searchInput.Font = .Font.Code
searchInput.TextSize =
searchInput.ClearTextOnFocus =
searchInput.Parent = invContainer
.(, searchInput).CornerRadius = .(, )
(searchInput)
invScroll = .()
invScroll.Size = .(, , , -)
invScroll.Position = .(, , , )
invScroll.BackgroundTransparency =
invScroll.BorderSizePixel =
invScroll.ScrollBarThickness =
invScroll.Parent = invContainer
gridLayout = .()
gridLayout.CellSize = .(, INV_SLOT_SIZE, , INV_SLOT_SIZE)
gridLayout.CellPadding = .(, , , )
gridLayout.HorizontalAlignment = .HorizontalAlignment.Center
gridLayout.SortOrder = .SortOrder.LayoutOrder
gridLayout.Parent = invScroll
gridPadding = .()
gridPadding.PaddingTop = .(, )
gridPadding.Parent = invScroll
hotbarFrame = .()
hotbarFrame.Name =
hotbarFrame.AnchorPoint = .(, )
hotbarFrame.Position = .(, , , )
hotbarFrame.BackgroundColor3 = .(, , )
hotbarFrame.BackgroundTransparency =
hotbarFrame.Parent = screenGui
.(, hotbarFrame).CornerRadius = .(, )
(hotbarFrame)
listLayout = .()
listLayout.FillDirection = .FillDirection.Horizontal
listLayout.HorizontalAlignment = .HorizontalAlignment.Center
listLayout.VerticalAlignment = .VerticalAlignment.Center
listLayout.Padding = .(, SLOT_PADDING)
listLayout.Parent = hotbarFrame
(hotbarFrame, {hotbarFrame}, () canMoveHotbar )
(pos, guiObject)
guiObject.Visible
tl = guiObject.AbsolutePosition
br = tl + guiObject.AbsoluteSize
pos.X >= tl.X pos.X <= br.X pos.Y >= tl.Y pos.Y <= br.Y
(tool)
tool
tool.CanBeDropped =
tool.Parent =
handle = tool:()
handle handle:()
character = player.Character
hrp = character character:()
hrp
.()
handle.AssemblyLinearVelocity = (hrp.CFrame.LookVector * ) + .(, , )
()
character = player.Character player.CharacterAdded:()
backpack = player:()
currentTools = {}
_, item (backpack:()) item:() currentTools[item] =
_, item (character:()) item:() currentTools[item] =
i = #hotbarList, , - currentTools[hotbarList[i]] .(hotbarList, i)
i = #inventoryList, , - currentTools[inventoryList[i]] .(inventoryList, i)
tool (currentTools)
.(hotbarList, tool) .(inventoryList, tool)
#hotbarList < MAX_HOTBAR
.(hotbarList, tool)
.(inventoryList, tool)
renderUI = ()
_, child (invScroll:()) child:() child:()
_, child (hotbarFrame:()) child:() child:()
hotbarWidth = (MAX_HOTBAR * SLOT_SIZE) + ((MAX_HOTBAR - ) * SLOT_PADDING) +
hotbarFrame.Size = .(, hotbarWidth, , SLOT_SIZE + )
character = player.Character player.CharacterAdded:()
humanoid = character:()
(tool, parentFrame)
btn = .()
btn.Name = tool.Name
btn.Text = tool.Name
btn.TextColor3 = .(, , )
btn.Font = .Font.Code
btn.TextScaled =
btn.Parent = parentFrame
corner = .()
corner.CornerRadius = .(, )
corner.Parent = btn
stroke = .()
stroke.ApplyStrokeMode = .ApplyStrokeMode.Border
stroke.Parent = btn
parentFrame == hotbarFrame
btn.Size = .(, SLOT_SIZE, , SLOT_SIZE)
btn.BackgroundColor3 = .(, , )
btn.BackgroundTransparency =
stroke.Thickness =
tool.Parent == character
btn.BackgroundColor3 = .(, , )
stroke.Color = .(, , )
stroke.Color = .(, , )
btn.Size = .(, INV_SLOT_SIZE, , INV_SLOT_SIZE)
btn.BackgroundColor3 = .(, , )
btn.BackgroundTransparency =
stroke.Thickness =
tool.Parent == character
stroke.Color = .(, , )
btn.BackgroundColor3 = .(, , )
stroke.Color = .(, , )
dragging =
dragInput, dragStart, ghostBtn
lastClickTick =
btn.InputBegan:((input)
dragging (input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch)
dragging =
dragInput = input
dragStart = input.Position
)
UserInputService.InputChanged:((input)
dragging input == dragInput
delta = input.Position - dragStart
delta.Magnitude >= clickThreshold
ghostBtn
ghostBtn = .()
ghostBtn.Size = btn.Size
ghostBtn.Text = tool.Name
ghostBtn.TextScaled =
ghostBtn.Font = .Font.Code
ghostBtn.BackgroundColor3 = .(, , )
ghostBtn.BackgroundTransparency =
ghostBtn.ZIndex =
ghostBtn.AnchorPoint = .(, )
.(, ghostBtn).CornerRadius = .(, )
ghostBtn.Parent = screenGui
btn.TextTransparency =
btn.BackgroundTransparency =
ghostBtn.Position = .(, input.Position.X, , input.Position.Y)
)
UserInputService.InputEnded:((input)
dragging input == dragInput
dragging =
delta = input.Position - dragStart
ghostBtn
dropPos = input.Position
ghostBtn:()
ghostBtn =
(dropPos, dropBox)
invIdx = .(inventoryList, tool)
invIdx .(inventoryList, invIdx)
hotIdx = .(hotbarList, tool)
hotIdx .(hotbarList, hotIdx)
(tool)
(dropPos, hotbarFrame)
.(hotbarList, tool)
invIdx = .(inventoryList, tool)
invIdx .(inventoryList, invIdx)
#hotbarList >= MAX_HOTBAR
.(inventoryList, .(hotbarList, ))
.(hotbarList, tool)
(dropPos, invContainer)
.(inventoryList, tool)
hotIdx = .(hotbarList, tool)
hotIdx .(hotbarList, hotIdx)
.(inventoryList, tool)
()
delta.Magnitude < clickThreshold
parentFrame == invScroll
currentTick = ()
currentTick - lastClickTick <
#hotbarList < MAX_HOTBAR
invIdx = .(inventoryList, tool)
invIdx
.(inventoryList, invIdx)
.(hotbarList, tool)
()
lastClickTick =
lastClickTick = currentTick
tool.Parent == character humanoid:()
humanoid:(tool)
()
dragInput =
)
_, tool (hotbarList) (tool, hotbarFrame)
_, tool (inventoryList)
currentSearchText == .(.(tool.Name), currentSearchText, , )
(tool, invScroll)
.updateUI = renderUI
()
()
()
searchInput:():(()
currentSearchText = .(searchInput.Text)
()
)
()
backpack = player:()
backpack.ChildAdded:(update)
backpack.ChildRemoved:(update)
player.Character
player.Character.ChildAdded:(update)
player.Character.ChildRemoved:(update)
player.CharacterAdded:(()
.()
()
()
)
()
()A script designed to extend the standard hotbar slots for mobile

Universal