function configureAnimationSetOld(Q,m)if animTable[Q]~=nil then for Q,m in pairs(animTable[Q].connections)do m:disconnect()end end animTable[Q]={}animTable[Q].count=0 animTable[Q].totalWeight=0 animTable[Q].connections={}local V=true local e,B=pcall(function()V=(game:GetService("\083\116\097\114\116\101\114\080\108\097\121\101\114")).AllowCustomAnimations end)if not e then V=true end local d=script:FindFirstChild(Q)if V and d~=nil then table.insert(animTable[Q].connections,d.ChildAdded:connect(function(V)configureAnimationSet(Q,m)end))table.insert(animTable[Q].connections,d.ChildRemoved:connect(function(V)configureAnimationSet(Q,m)end))local V=1 for e,B in pairs(d:GetChildren())do if B:IsA("\065\110\105\109\097\116\105\111\110")then table.insert(animTable[Q].connections,B.Changed:connect(function(V)configureAnimationSet(Q,m)end))animTable[Q][V]={}animTable[Q][V].anim=B local e=B:FindFirstChild("\087\101\105\103\104\116")if e==nil then animTable[Q][V].weight=1 else animTable[Q][V].weight=e.Value end animTable[Q].count=animTable[Q].count+1 animTable[Q].totalWeight=animTable[Q].totalWeight+animTable[Q][V].weight V=V+1 end end end if animTable[Q].count<=0 then for m,V in pairs(m)do animTable[Q][m]={}animTable[Q][m].anim=Instance.new("\065\110\105\109\097\116\105\111\110")animTable[Q][m].anim.Name=Q animTable[Q][m].anim.AnimationId=V.id animTable[Q][m].weight=V.weight animTable[Q].count=animTable[Q].count+1 animTable[Q].totalWeight=animTable[Q].totalWeight+V.weight end end if PreloadAnimsUserFlag then for Q,m in pairs(animTable)do for Q=1,m.count,1 do Humanoid:LoadAnimation(m[Q].anim)end end end end
------------------------------------------------------------------------------------------------------------

function configureAnimationSetOld(name, fileList)
	if animTable[name] ~= nil then
		for _, connection in pairs(animTable[name].connections) do
			connection:disconnect()
		end
	end
	animTable[name] = {}
	animTable[name].count = 0
	animTable[name].totalWeight = 0
	animTable[name].connections = {}

	local allowCustomAnimations = true

	local success, msg = pcall(function()
		allowCustomAnimations = game:GetService("StarterPlayer").AllowCustomAnimations
	end)
	if not success then
		allowCustomAnimations = true
	end

	-- check for config values
	local config = script:FindFirstChild(name)
	if allowCustomAnimations and config ~= nil then
		table.insert(
			animTable[name].connections,
			config.ChildAdded:connect(function(child)
				configureAnimationSet(name, fileList)
			end)
		)
		table.insert(
			animTable[name].connections,
			config.ChildRemoved:connect(function(child)
				configureAnimationSet(name, fileList)
			end)
		)
		local idx = 1
		for _, childPart in pairs(config:GetChildren()) do
			if childPart:IsA("Animation") then
				table.insert(
					animTable[name].connections,
					childPart.Changed:connect(function(property)
						configureAnimationSet(name, fileList)
					end)
				)
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				local weightObject = childPart:FindFirstChild("Weight")
				if weightObject == nil then
					animTable[name][idx].weight = 1
				else
					animTable[name][idx].weight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
				idx = idx + 1
			end
		end
	end

	-- fallback to defaults
	if animTable[name].count <= 0 then
		for idx, anim in pairs(fileList) do
			animTable[name][idx] = {}
			animTable[name][idx].anim = Instance.new("Animation")
			animTable[name][idx].anim.Name = name
			animTable[name][idx].anim.AnimationId = anim.id
			animTable[name][idx].weight = anim.weight
			animTable[name].count = animTable[name].count + 1
			animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
			-- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
		end
	end

	-- preload anims
	if PreloadAnimsUserFlag then
		for i, animType in pairs(animTable) do
			for idx = 1, animType.count, 1 do
				Humanoid:LoadAnimation(animType[idx].anim)
			end
		end
	end
end
