Skip to content

Commit 94d961f

Browse files
authored
Add icon for debugging tools
Signed-off-by: GitHub <noreply@github.com>
1 parent 5ef7f79 commit 94d961f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
})

0 commit comments

Comments
 (0)