File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ --!strict
2+
3+ local Players = game :GetService ("Players" )
4+ local ReplicatedStorage = game :GetService ("ReplicatedStorage" )
5+
6+ local Icon = require (ReplicatedStorage .Packages .topbarplus )
7+
8+ local player = Players .LocalPlayer :: Player
9+
10+ local toolIcon = Icon .new ()
11+ toolIcon :setLabel ("Backpack Options" )
12+ toolIcon :align ("Right" )
13+ toolIcon :setDropdown ({
14+ Icon .new ()
15+ :setLabel ("Add Tool" )
16+ :bindEvent ("deselected" , function ()
17+ local backpack = player :FindFirstChildOfClass ("Backpack" ) :: Backpack
18+ local tool = Instance .new ("Tool" )
19+ tool .Parent = backpack
20+ end )
21+ :oneClick (),
22+ Icon .new ()
23+ :setLabel ("Add HopperBin" )
24+ :bindEvent ("deselected" , function ()
25+ local backpack = player :FindFirstChildOfClass ("Backpack" ) :: Backpack
26+ local hopperBin = Instance .new ("HopperBin" )
27+ hopperBin .Parent = backpack
28+ end )
29+ :oneClick (),
30+ Icon .new ()
31+ :setLabel ("Clear Backpack" )
32+ :bindEvent ("deselected" , function ()
33+ local backpack = player :FindFirstChildOfClass ("Backpack" ) :: Backpack
34+ backpack :ClearAllChildren ()
35+ end )
36+ :oneClick (),
37+ })
You can’t perform that action at this time.
0 commit comments