I have this code
local plr = game:GetService('Players').LocalPlayer
local backpack = plr:WaitForChild("Backpack")
for i, v in pairs(backpack:GetChildren()) do
if v:IsA("Tool") then
v:Destroy()
end
end
that was given to me by ColdFoxy07(big thanks) and I have This code that I edited
local cooldown = false --//r
local button = script.Parent
local plr = game:GetService('Players').LocalPlayer
local tool = game.ReplicatedStorage.ACS_Engine.HOOD["Micro UZI"]
button.Activated:Connect(function()
if cooldown == false then
cooldown = true
script.Parent.Parent.Visible = false
plr.Backpack:FindFirstChildWhichIsA('Tool'):Destroy()
local clone = tool
clone.Parent = plr.Backpack
wait(0.5)
script.Parent.Parent.Parent.ClassH.Visible = true
wait(3)
script.Parent.Parent.Parent.ClassH.Visible = false
cooldown = false
end
end)
and Im trying to put the two together. but it doesent work here is the code( that I made trying to put the two together)
local cooldown = false --//r
local button = script.Parent
local plr = game:GetService('Players').LocalPlayer
local tool = game.ReplicatedStorage.ACS_Engine.HOOD["Micro UZI"]
local backpack = plr:WaitForChild("Backpack")
button.Activated:Connect(function()
if cooldown == false then
cooldown = true
script.Parent.Parent.Visible = false
for i, v in pairs(backpack:GetChildren()) do
if v:IsA("Tool") then
v:Destroy()
local clone = tool
clone.Parent = plr.Backpack
wait(0.5)
script.Parent.Parent.Parent.ClassH.Visible = true
wait(3)
script.Parent.Parent.Parent.ClassH.Visible = false
cooldown = false
end
end
end)
Could anyone help thanks!

2 comments
Dude your a legend!!!! thanks!
Thanks :)