local function b()local b=tick()-tweenStart if b>=TWEEN_DURATION then b=TWEEN_DURATION CamLock.Update=Update tweening=false end local n=GetCameraRotation()local Q=currentView.Ease(b,0,1,TWEEN_DURATION)local X=GetViewCFrame(tweenFromView,n)local P=GetViewCFrame(currentView,n)cam.CFrame=X:lerp(P,Q)end

local function UpdateWithTween()
	local duration = (tick() - tweenStart)
	if (duration >= TWEEN_DURATION) then
		duration = TWEEN_DURATION
		CamLock.Update = Update
		tweening = false
	end
	
	local camRotation = GetCameraRotation()
	local tweenAmount = currentView.Ease(duration, 0, 1, TWEEN_DURATION)
	local cf0 = GetViewCFrame(tweenFromView, camRotation)
	local cf1 = GetViewCFrame(currentView, camRotation)
	cam.CFrame = cf0:lerp(cf1, tweenAmount)
	
	-- If you like unreadable code, here's the above chunk (from camRotation) in one step:
	--cam.CFrame = GetViewCFrame(tweenFromView, GetCameraRotation()):lerp(GetViewCFrame(currentView, GetCameraRotation()), currentView.Ease(duration, 0, 1, TWEEN_DURATION))
	
end

