for v=1,NumberOfHotbarSlots,1 do local R=MakeSlot(HotbarFrame,v)R.Frame.Visible=false if not LowestEmptySlot then LowestEmptySlot=R end end InventoryIcon.selected:Connect(function()if not GuiService.MenuIsOpen then BackpackScript.OpenClose()end end)InventoryIcon.deselected:Connect(function()if InventoryFrame.Visible then BackpackScript.OpenClose()end end)LeftBumperButton=NewGui("\073\109\097\103\101\076\097\098\101\108","\076\101\102\116\066\117\109\112\101\114")LeftBumperButton.Size=UDim2.new(0,40,0,40)LeftBumperButton.Position=UDim2.new(0,-LeftBumperButton.Size.X.Offset,.5,-LeftBumperButton.Size.Y.Offset/2)RightBumperButton=NewGui("\073\109\097\103\101\076\097\098\101\108","\082\105\103\104\116\066\117\109\112\101\114")RightBumperButton.Size=UDim2.new(0,40,0,40)RightBumperButton.Position=UDim2.new(1,0,.5,-RightBumperButton.Size.Y.Offset/2)
-- Make all the Hotbar Slots
for i = 1, NumberOfHotbarSlots do
	local slot = MakeSlot(HotbarFrame, i)
	slot.Frame.Visible = false

	if not LowestEmptySlot then
		LowestEmptySlot = slot
	end
end

InventoryIcon.selected:Connect(function()
	if not GuiService.MenuIsOpen then
		BackpackScript.OpenClose()
	end
end)
InventoryIcon.deselected:Connect(function()
	if InventoryFrame.Visible then
		BackpackScript.OpenClose()
	end
end)

LeftBumperButton = NewGui("ImageLabel", "LeftBumper")
LeftBumperButton.Size = UDim2.new(0, 40, 0, 40)
LeftBumperButton.Position = UDim2.new(0, -LeftBumperButton.Size.X.Offset, 0.5, -LeftBumperButton.Size.Y.Offset / 2)

RightBumperButton = NewGui("ImageLabel", "RightBumper")
RightBumperButton.Size = UDim2.new(0, 40, 0, 40)
RightBumperButton.Position = UDim2.new(1, 0, 0.5, -RightBumperButton.Size.Y.Offset / 2)
