local z=require(game.ReplicatedStorage.CharacterClone)local i={}local function P(P)if P then P.Archivable=true P:WaitForChild("\072\117\109\097\110\111\105\100")local J=z.new(P)local L=z.new(P)dualWorld.PortalA:AddToWorld(J.Clone)dualWorld.PortalB:AddToWorld(L.Clone)table.insert(i,J)table.insert(i,L)end end game.Players.PlayerAdded:Connect(function(z)z.CharacterAdded:Connect(P)end)wait(1)for z,i in next,game.Players:GetPlayers()do P(i.Character)i.CharacterAdded:Connect(P)end;(game:GetService("\082\117\110\083\101\114\118\105\099\101")).RenderStepped:Connect(function(z)for z=1,#i,1 do i[z]:Update()end end)


local characterClone = require(game.ReplicatedStorage.CharacterClone)
local clones = {}

local function onCharacter(character)
	if (character) then
		character.Archivable = true
		character:WaitForChild("Humanoid") -- weird bug
		
		local cloneA = characterClone.new(character)
		local cloneB = characterClone.new(character)
		dualWorld.PortalA:AddToWorld(cloneA.Clone)
		dualWorld.PortalB:AddToWorld(cloneB.Clone)
		table.insert(clones, cloneA)
		table.insert(clones, cloneB)
	end
end

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(onCharacter)
end)

wait(1)

for _, player in next, game.Players:GetPlayers() do
	onCharacter(player.Character)
	player.CharacterAdded:Connect(onCharacter)
end

game:GetService("RunService").RenderStepped:Connect(function(dt)
	for i = 1, #clones do
		clones[i]:Update()
	end
end)
