local H=require((game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")):WaitForChild("\078\101\118\101\114\109\111\114\101"))local A=H("\083\112\114\105\110\103")local Q={}Q.ClassName="\078\117\109\098\101\114\080\114\111\112\101\114\116\121\084\119\101\101\110\101\114"Q.__index=Q function Q.new(H,u)local T=setmetatable({},Q)T._object=H or error("\078\111 \111\098\106\101\099\116")T._property=u or error("\078\111 \112\114\111\112\101\114\116\121")T._currentState=A.new(T._object[T._property])T._currentState.Speed=20 return T end function Q.SetSpeed(A,H)A._speed=H or error("\078\111 \115\112\101\101\100")end function Q.Tween(A,H)A._currentState.Target=H end function Q.Update(H)local A=H._currentState.Value local Q=math.abs(A-H._currentState.Target)>=.001 if not Q then A=H._currentState.Target end H._object[H._property]=A return Q end return Q
--- Tweens numbers
-- @classmod NumberPropertyTweener

local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))

local Spring = require("Spring")

local NumberPropertyTweener = {}
NumberPropertyTweener.ClassName = "NumberPropertyTweener"
NumberPropertyTweener.__index = NumberPropertyTweener

function NumberPropertyTweener.new(object, property)
	local self = setmetatable({}, NumberPropertyTweener)

	self._object = object or error("No object")
	self._property = property or error("No property")
	self._currentState = Spring.new(self._object[self._property])
	self._currentState.Speed = 20

	return self
end

function NumberPropertyTweener:SetSpeed(speed)
	self._speed = speed or error("No speed")
end

function NumberPropertyTweener:Tween(target)
	self._currentState.Target = target
end

function NumberPropertyTweener:Update()
	local current = self._currentState.Value

	local stillUpdating = math.abs(current - self._currentState.Target) >= 1e-3
	if not stillUpdating then
		current = self._currentState.Target
	end

	self._object[self._property] = current
	return stillUpdating
end

return NumberPropertyTweener