Skip to content

Commit 5ef7f79

Browse files
authored
Add icon for toggling CoreGui backpack
Signed-off-by: GitHub <[email protected]>
1 parent 76867d1 commit 5ef7f79

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--!strict
2+
3+
local StarterGui = game:GetService("StarterGui")
4+
local ReplicatedStorage = game:GetService("ReplicatedStorage")
5+
6+
local Icon = require(ReplicatedStorage.Packages.topbarplus)
7+
8+
local icon = Icon.new()
9+
icon:setLabel("Toggle CoreGui Backpack")
10+
icon:align("Right")
11+
icon:bindEvent("deselected", function()
12+
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, not StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack))
13+
end)
14+
icon:oneClick()

0 commit comments

Comments
 (0)