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

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

function ViewportInit:Init(VP, Selected, CamCFrame)
	if (not VP) then return; end
	
	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
