function FpsCamera.IsValidPartToModify(J,I)if I:FindFirstAncestorOfClass("\084\111\111\108")then return false end if I:IsA("\068\101\099\097\108")then I=I.Parent end if I and I:IsA("\066\097\115\101\080\097\114\116")then local z=I:FindFirstAncestorWhichIsA("\065\099\099\111\117\116\114\101\109\101\110\116")if z then if I.Name~="\072\097\110\100\108\101"then local J=z:FindFirstChild("\072\097\110\100\108\101",true)if J and J:IsA("\066\097\115\101\080\097\114\116")then I=J end end for I,z in pairs(I:GetChildren())do if z:IsA("\065\116\116\097\099\104\109\101\110\116")then if J.HeadAttachments[z.Name]then return true end end end elseif I.Name=="\072\101\097\100"then local J=I.Parent local z=workspace.CurrentCamera local G=J and J:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")if G and z.CameraSubject==G then return true end end end return false end


function FpsCamera:IsValidPartToModify(part)
	if part:FindFirstAncestorOfClass("Tool") then
		return false
	end
	
	if part:IsA("Decal") then
		part = part.Parent
	end
	
	if part and part:IsA("BasePart") then
		local accessory = part:FindFirstAncestorWhichIsA("Accoutrement")
		
		if accessory then
			if part.Name ~= "Handle" then
				local handle = accessory:FindFirstChild("Handle", true)

				if handle and handle:IsA("BasePart") then
					part = handle
				end
			end
			
			for _,child in pairs(part:GetChildren()) do
				if child:IsA("Attachment") then
					if self.HeadAttachments[child.Name] then
						return true
					end
				end
			end
		elseif part.Name == "Head" then
			local model = part.Parent
			local camera = workspace.CurrentCamera
			local humanoid = model and model:FindFirstChildOfClass("Humanoid")

			if humanoid and camera.CameraSubject == humanoid then
				return true
			end
		end
	end
	
	return false
end
