function PartUtility.GetCharacterFromInstance_R(j)local H=j:FindFirstAncestorOfClass("\077\111\100\101\108")if H and H:FindFirstChild("\072\117\109\097\110\111\105\100")then return H elseif H then PartUtility.GetCharacterFromInstance_R(H)end end function PartUtility.MakeInvisible(j)for j,H in pairs(j:GetDescendants())do if H:IsA("\066\097\115\101\080\097\114\116")then H:SetAttribute("\073\110\105\116\105\097\108\084\114\097\110\115\112\097\114\101\110\099\121",H.Transparency)H.Transparency=1 end end end function PartUtility.RestoreVisibility(j)for j,H in pairs(j:GetDescendants())do if H:IsA("\066\097\115\101\080\097\114\116")then H.Transparency=H:GetAttribute("\073\110\105\116\105\097\108\084\114\097\110\115\112\097\114\101\110\099\121")and H:GetAttribute("\073\110\105\116\105\097\108\084\114\097\110\115\112\097\114\101\110\099\121")or 0 end end end function PartUtility.MakeVisible(j)for j,H in pairs(j:GetDescendants())do if H:IsA("\066\097\115\101\080\097\114\116")then H.Transparency=0 end end end return PartUtility

function PartUtility.GetCharacterFromInstance_R(part)
	local model = part:FindFirstAncestorOfClass("Model")
	if model and model:FindFirstChild("Humanoid") then
		return model
	elseif model then
		PartUtility.GetCharacterFromInstance_R(model)
	end
end

function PartUtility.MakeInvisible(model)
	for _, child in pairs(model:GetDescendants()) do
		if child:IsA("BasePart") then
			child:SetAttribute("InitialTransparency",child.Transparency)
			child.Transparency = 1
		end
	end
end

function PartUtility.RestoreVisibility(model)
	for _, child in pairs(model:GetDescendants()) do
		if child:IsA("BasePart") then
			child.Transparency = child:GetAttribute("InitialTransparency") and child:GetAttribute("InitialTransparency") or 0
		end
	end
end

function PartUtility.MakeVisible(model)
	for _, child in pairs(model:GetDescendants()) do
		if child:IsA("BasePart") then
			child.Transparency = 0
		end
	end
end

return PartUtility
