function Cooldown.new(V,B)local G=tick()local F={_endTick=G+V}setmetatable(F,{__index=Cooldown})if B then delay(V,B)end return F end function Cooldown.hasExpired(V)return V._endTick<tick()and true or false end return Cooldown

function Cooldown.new(cooldownTime, callbackFunction)
	local startTick = tick()

	local cooldownObject = {
		_endTick = startTick + cooldownTime
	}
	setmetatable(cooldownObject, {__index = Cooldown})

	if callbackFunction then
		delay(cooldownTime, callbackFunction)
	end

	return cooldownObject
end

function Cooldown:hasExpired()
	return self._endTick < tick() and true or false
end

return Cooldown
