function BrioUtils.merge(B,H)assert(Brio.isBrio(B),"\078\111\116 \097 \098\114\105\111")assert(Brio.isBrio(H),"\078\111\116 \097 \098\114\105\111")if B:IsDead()or H:IsDead()then return Brio.DEAD end local t=B._values local E={}for B=1,t.n,1 do E[B]=t[B]end local g=H._values for B=1,g.n,1 do E[t.n+B]=g[B]end local W=Maid.new()local d=Brio.new(unpack(E,1,t.n+g.n))W:GiveTask((B:GetDiedSignal()):Connect(function()d:Kill()end))W:GiveTask((H:GetDiedSignal()):Connect(function()d:Kill()end))W:GiveTask((d:GetDiedSignal()):Connect(function()W:DoCleaning()end))return d end return BrioUtils

function BrioUtils.merge(brio, otherBrio)
	assert(Brio.isBrio(brio), "Not a brio")
	assert(Brio.isBrio(otherBrio), "Not a brio")

	if brio:IsDead() or otherBrio:IsDead() then
		return Brio.DEAD
	end

	local values = brio._values
	local current = {}
	for i=1, values.n do
		current[i] = values[i]
	end

	local otherValues = otherBrio._values
	for i=1, otherValues.n do
		current[values.n+i] = otherValues[i]
	end

	local maid = Maid.new()
	local newBrio = Brio.new(unpack(current, 1, values.n + otherValues.n))

	maid:GiveTask(brio:GetDiedSignal():Connect(function()
		newBrio:Kill()
	end))
	maid:GiveTask(otherBrio:GetDiedSignal():Connect(function()
		newBrio:Kill()
	end))

	maid:GiveTask(newBrio:GetDiedSignal():Connect(function()
		maid:DoCleaning()
	end))

	return newBrio
end

return BrioUtils
