local function Y(Y,s,G)local U=Ray.new(Y,s)local n=false local X,k,K,W table.insert(G,Workspace.Effects)repeat X,k,K=Workspace:FindPartOnRayWithIgnoreList(U,G)if X then W=X.Parent:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")if W and W.Health<=0 then W=nil end if W then n=true else if X.CanCollide and X.Transparency<1 then n=true else table.insert(G,X)n=false end end else n=true end until n return X,k,K,W end


local function Raycast(position, direction, ignore)
	local ray		= Ray.new(position, direction)
	local success	= false
	local h, p, n, humanoid
	
	table.insert(ignore, Workspace.Effects)
	
	repeat
		h, p, n	= Workspace:FindPartOnRayWithIgnoreList(ray, ignore)
		
		if h then
			humanoid	= h.Parent:FindFirstChildOfClass("Humanoid")
			if humanoid and humanoid.Health <= 0 then
				humanoid	= nil
			end
			if humanoid then
				success	= true
			else
				if h.CanCollide and h.Transparency < 1 then
					success	= true
				else
					table.insert(ignore, h)
					success	= false
				end
			end
		else
			success	= true
		end
	until success
	
	return h, p, n, humanoid
end
