My tool is spammable. I need help!

I watched a youtube tutorial about making a magic tool and made one myself! My problem is that the tool is spammable. I added a debounce script and it worked! But if you re-equip the tool, the debounce will not work. My tool uses a Tool.Equipped function in order to activate the script that actually shoots the projectile.

here are both the scripts

Tool.Equipped

local Tool = script.Parent

Tool.Equipped:Connect(function()
	script.Equip.Disabled = false
end)

Tool.Unequipped:Connect(function()
	wait(5)
	script.Equip.Disabled = true
end)
	

the script that leads into a remote function (the script is disabled until the player equips the tool)

local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local Debounce = true
local mouseDown = false



-- ANimation---

local player = game.Players.LocalPlayer

local character = player.Character or player.CharacterAdded:Wait()

local humanoid = character:WaitForChild("Humanoid")





local animInstance = Instance.new("Animation")

animInstance.AnimationId = "rbxassetid://6715952610" -- Animation

local SlashAnim = humanoid:LoadAnimation(animInstance)  -- SlashAnim You Can Change Name



--Sound--



local Sound = script:WaitForChild("SlashSound") -- Name of Sound 
local Player = Game.Players.LocalPlayer
local Mouse = Player:GetMouse()
Mouse.Button1Down:Connect(function()
	if Debounce == true then
		Debounce = false
			
		--Animation--
			
		SlashAnim:Play() -- Animation Work
			
		--Sound--
			
		Sound:Play() -- Sound Work
			
		----------
			
		script.RemoteEvent:FireServer(plr)
		wait(10) -- Cooldown
		Debounce = true
		script.Parent.Name = "Skull Blast"--change name to whatever tool you're using
			
			end
	end)

When you unequip the tool the wait will continue even if you requip the tool, causing it to disable the script if it is equipped before the 5 seconds ends.

that was one of the solutions I tried. Problem is that I want players to use tools in order to do tool combos. It would be confusing if a player tried to do a lightning fast combo and ended up using the previous tool again (assuming the player just equipped the tool and didn’t click)

Have you tried not disabling the script and seeing if the debounce will work when you equip it, respecting that the 10 seconds has passed.

I tried that. The debounce worked as it should