local function V(V,B,I,b)if not I or typeof(I)~="\116\097\098\108\101"then error("\067\097\108\108 \105\110 \067\097\115\116\066\108\097\099\107\108\105\115\116 \102\097\105\108\101\100\033 \066\108\097\099\107\108\105\115\116 \116\097\098\108\101 \105\115 \101\105\116\104\101\114 \110\105\108\044 \111\114 \105\115 \110\111\116 \097\099\116\117\097\108\108\121 \097 \116\097\098\108\101\046",0)end local K=Ray.new(V,B)local D,J,W,g=nil,V+B,Vector3.new(0,1,0),Enum.Material.Air local j=false repeat D,J,W,g=Workspace:FindPartOnRayWithIgnoreList(K,I,false,b)if D then if D.CanCollide==false and not D.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")or D.Name=="\077\105\115\115\105\108\101"or D.Name=="\072\097\110\100\108\101"or D.Name=="\069\102\102\101\099\116"or D.Name=="\066\117\108\108\101\116"or D.Name=="\076\097\115\101\114"or string.lower(D.Name)=="\119\097\116\101\114"or D.Name=="\082\097\105\108"or D.Name=="\065\114\114\111\119"or D.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")and D.Parent.Humanoid.Health==0 then table.insert(I,D)j=false else j=true end else j=true end until j return D,J,W,g end

local function CastWithBlacklistAndNoHumPenetration(origin, direction, blacklist, ignoreWater)
	if not blacklist or typeof(blacklist) ~= "table" then
		-- This array is faulty
		error("Call in CastBlacklist failed! Blacklist table is either nil, or is not actually a table.", 0)
	end
	local castRay = Ray.new(origin, direction)
	local hitPart, hitPoint, hitNormal, hitMaterial = nil, origin + direction, Vector3.new(0,1,0), Enum.Material.Air
	local success = false	
	repeat
		hitPart, hitPoint, hitNormal, hitMaterial = Workspace:FindPartOnRayWithIgnoreList(castRay, blacklist, false, ignoreWater)
		if hitPart then
			if ((hitPart.CanCollide == false and not hitPart.Parent:FindFirstChild("Humanoid"))
			or hitPart.Name == "Missile"
			or hitPart.Name == "Handle"
			or hitPart.Name == "Effect"
			or hitPart.Name == "Bullet"
			or hitPart.Name == "Laser"
			or string.lower(hitPart.Name) == "water"
			or hitPart.Name == "Rail"
			or hitPart.Name == "Arrow"
			or (hitPart.Parent:FindFirstChild("Humanoid") and hitPart.Parent.Humanoid.Health == 0)) then
				table.insert(blacklist, hitPart)
				success	= false
			else
				success	= true
			end
		else
			success	= true
		end
	until success
	return hitPart, hitPoint, hitNormal, hitMaterial
end
