local D=game:GetService("\082\117\110\083\101\114\118\105\099\101")function ViewportInit.Init(f,D,J,I)if not D then return end D:ClearAllChildren()local z=J:Clone()if not z.PrimaryPart then for D,J in pairs(z:GetChildren())do if J:IsA("\066\097\115\101\080\097\114\116")then z.PrimaryPart=J break end end end z:SetPrimaryPartCFrame(CFrame.new(Vector3.new(),I.Position))z.Parent=D local T=Instance.new("\067\097\109\101\114\097")D.CurrentCamera=T T.Parent=D local g=I T.CFrame=g return z,T end return ViewportInit

local RS = game:GetService("RunService");

function ViewportInit:Init(VP, Selected, CamCFrame)
	if (not VP) then return; end

	VP:ClearAllChildren();
	
	local Obj = Selected:Clone();
	
	if (not Obj.PrimaryPart) then
		for i,v in pairs(Obj:GetChildren()) do
			if (v:IsA("BasePart")) then
				Obj.PrimaryPart = v;
				break;
			end
		end	
	end

	Obj:SetPrimaryPartCFrame(CFrame.new(Vector3.new(), CamCFrame.Position))
	Obj.Parent = VP;

	local Camera = Instance.new("Camera");
	VP.CurrentCamera = Camera;
	Camera.Parent = VP;

	local cf = CamCFrame
	Camera.CFrame = cf


	return Obj, Camera;
end

return ViewportInit
