local Y=game:GetService("\082\117\110\083\101\114\118\105\099\101")function ViewportInit.Init(m,Y,F,W)if not Y then return end Y:ClearAllChildren()local A=F:Clone()if not A.PrimaryPart then for Y,F in pairs(A:GetChildren())do if F:IsA("\066\097\115\101\080\097\114\116")then A.PrimaryPart=F break end end end A:SetPrimaryPartCFrame(CFrame.new(Vector3.new(),W.Position))A.Parent=Y local l=Instance.new("\067\097\109\101\114\097")Y.CurrentCamera=l l.Parent=Y local e=W l.CFrame=e return A,l end return ViewportInit
--//Const
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
