How to make a camera offset shake smoothly fade out?

I am making an explosion camera shake that adjusts based on how close you are to the explosion, and I want to make this camera shake script I found smoother, I tried just subtracting the shakeintensity but it leads to inconsistent results because the shakeintensity is always changing based on the magnitude to the blast radius. Is there a simple solution to this?

This is the shake function

function Shaker.Shake(player, shakeIntensity, shakeTime)
	local character = player.Character
	local oldOffset = character.Humanoid.CameraOffset
	if player.PlayerGui then
		player.PlayerGui.HurtGui.ExplosionFlash.BackgroundTransparency = 0.7
		TweenService:Create(player.PlayerGui.HurtGui.ExplosionFlash,, {BackgroundTransparency = 1}):Play()
	for i = 0, shakeTime do
		local offset =,1), math.random(-1,1), math.random(-1,1))
		character.Humanoid.CameraOffset = character.Humanoid.CameraOffset:Lerp(offset, shakeIntensity * 0.25)
		if shakeIntensity > 0 then
			shakeIntensity = shakeIntensity - 0.03
		TweenService:Create(character.Humanoid,, {CameraOffset = oldOffset}):Play()
	TweenService:Create(character.Humanoid,, {CameraOffset = oldOffset}):Play()

Also I do NOT want to use EZ camera shaker.