How to add debounce to my charged attack

I need to add a debounce to my punch script that uses 3 different animations to make a charged effect. The problem is that you can just go around the charging by spam clicking.
local anim = script:WaitForChild(“Punch”)
local anim1 = script:WaitForChild(“PunchReady1”)
local anim2 = script:WaitForChild(“PunchLaunch”)
local anim3 = script:WaitForChild(“PunchHold”)

local Punchdo = humanoid:LoadAnimation(anim)
local PunchReady = humanoid:LoadAnimation(anim1)
local PunchLaunch = humanoid:LoadAnimation(anim2)
local PunchHold = humanoid:LoadAnimation(anim3)
local debounce = false

script.Parent.Activated:Connect(function()
if not debounce then
debounce = true

Holding.Value = true			
PunchReady:Play()
PunchReady.Stopped:Wait()
	PunchHold:Play()
	
	wait (2)
debounce = false
	
end	

end)

script.Parent.Deactivated:Connect(function()



Holding.Value = false
PunchHold:Stop()
PunchLaunch:Play()



end)

At the beginning of your functions you can do it like this

--//Values//--
Debounce = false
--//Functions//--
function Test()
     if Debounce == true then
          return
     end
     Debounce = true
     print("I am not a spam bot")
     wait(10)
     Debounce = false
end

Basically the script starts with “Debounce” as false but once that function is triggered it will check if debounce is true, if it is, then it will run return which stops the function if it isnt, then it will set it to true so only it cant be ran multiple times at once, after that, insert your code, and then make a wait time on how long you want your cooldown to be, and then set “Debounce” back to false