Reset attribute cooldown

i have made a script that adds an attribute called NoJump to the player with a remove event, and another script that sets the jump power to 0 when the attribute exists, and it works, but if the no jump is called multiple times in a short amount of time, it gets deleted after 2 seconds ( only remote not remote2 ), how would i make it so it resets the cooldown every time the event is fired (im trying to achieve no jump in combat combo)
here is the script for the attribute

local remote = game.ReplicatedStorage.Events:WaitForChild("Combat")
local remote2 = game.ReplicatedStorage.Events:WaitForChild("downslam")

remote.OnServerEvent:Connect(function(plr)
	local char = plr.Character
	char:SetAttribute("NoJump", true)
	wait(2)
	char:SetAttribute("NoJump", nil)
end)

remote2.OnServerEvent:Connect(function(plr)
	local char = plr.Character
	char:SetAttribute("NoJump", true)
	wait(2.5)
	char:SetAttribute("NoJump", nil)
end)

You can store how many times the event has been fired globally and how many times it had been fired when it fires and compare them when task.wait runs its course.

PS: Newer task.wait is recommended to be used in newer projects instead of global wait.

local allCallCount = 0

remote.OnServerEvent:Connect(function(plr)
	allCallCount += 1
	local currentCallCount = allCallCount
	...
	task.wait(2)
	if currentCallCount == allCallCount then
		-- Code that will be run when cooldown ends.
	end
end)

remote2.OnServerEvent:Connect(function(plr)
	allCallCount += 1
	local currentCallCount = allCallCount
	...
	task.wait(2.5)
	if currentCallCount == allCallCount then
		-- Code that will be run when cooldown ends.
	end
end)