local function k(k,K,V)local H=Ray.new(k,K)local b=false local r,t,N,S table.insert(V,Workspace.Effects)repeat r,t,N=Workspace:FindPartOnRayWithIgnoreList(H,V)if r then S=r.Parent:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")if S and S.Health<=0 then S=nil end if S then b=true else if r.CanCollide and r.Transparency<1 then b=true else table.insert(V,r)b=false end end else b=true end until b return r,t,N,S end
-- functions

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
