-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDestroyTool.txt
More file actions
34 lines (29 loc) · 814 Bytes
/
DestroyTool.txt
File metadata and controls
34 lines (29 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
local tool = Instance.new("Tool", game.Players.LocalPlayer.Backpack)
tool.Name = "DestroyTool"
tool.CanBeDropped = false
tool.RequiresHandle = false
local equipped = false
local Mouse = game.Players.LocalPlayer:GetMouse()
local box = Instance.new("SelectionBox", game.StarterGui)
box.Adornee = nil
box.Color3 = Color3.fromRGB(255, 255, 255)
box.SurfaceColor3 = Color3.fromRGB(255, 255, 255)
box.LineThickness = 0.1
Mouse.Button1Down:Connect(function()
if equipped == true then
Mouse.Target:Destroy()
end
end)
tool.Equipped:Connect(function()
equipped = true
box.Parent = game.Workspace
while equipped == true do
wait(0.1)
box.Adornee = Mouse.Target
end
end)
tool.Unequipped:Connect(function()
equipped = false
box.Adornee = nil
box.Parent = game.StarterGui
end)