local F=script.Parent local u=require(F.Track)local A={}function A.new(F,A)local l={}for F,I in pairs(F:GetChildren())do local H=require(I)l[I.Name]=u.new(A,H,I)end function l.SetOrigin(u,F)for u,A in pairs(l)do if type(A)=="\116\097\098\108\101"then A:SetOrigin(F)end end end function l.StopAll()for F,u in pairs(l)do if type(u)=="\116\097\098\108\101"then u:Stop()end end end return l end return A
--[[
	TweenSequence Editor Animator
]]

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
