local g=script.Parent local o=require(g.Track)local B={}function B.new(g,B)local u={}for g,W in pairs(g:GetChildren())do local I=require(W)u[W.Name]=o.new(B,I,W)end function u.SetOrigin(o,g)for o,B in pairs(u)do if type(B)=="\116\097\098\108\101"then B:SetOrigin(g)end end end function u.StopAll()for g,o in pairs(u)do if type(o)=="\116\097\098\108\101"then o:Stop()end end end return u end return B


local TweenSequenceUtils = script.Parent
local Track = require(TweenSequenceUtils.Track)

local Animator = {}

function Animator.new(tweens, root)
	local newAnimator = {}

	for _, tween in pairs(tweens:GetChildren()) do
		local tweenTable = require(tween)
		newAnimator[tween.Name] = Track.new(root, tweenTable, tween)
	end
	
	function newAnimator:SetOrigin(origin)
		for _, animation in pairs(newAnimator) do
			if type(animation) == "table" then
				animation:SetOrigin(origin)
			end
		end
	end

	function newAnimator.StopAll()
		for _, animation in pairs(newAnimator) do
			if type(animation) == "table" then
				animation:Stop()
			end
		end
	end

	return newAnimator
end

return Animator
