SYNC_RATE:Connect(function()for A,x in ipairs(ActiveHitboxes)do if x.deleted then Handler:remove(x.object)else for A,X in ipairs(x.points)do if not x.active then X.LastPosition=nil else local A,o,F=X.solver:solve(X,x.debugMode)local H=workspace:Raycast(A,o,x.raycastParams)X.solver:lastPosition(X,F)if H then local A=H.Instance local o=not x.partMode and A:FindFirstAncestorOfClass("\077\111\100\101\108")local F=o and o:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")local Y=F or x.partMode and A if Y and not x.targetsHit[Y]then x.targetsHit[Y]=true x.OnHit:Fire(A,F,H,X.group)end end if x.endTime>0 then if x.endTime<=clock()then x.endTime=0 x:HitStop()end end x.OnUpdate:Fire(X.LastPosition)end end end end end)return Handler

SYNC_RATE:Connect(function()
	for Index, Object in ipairs(ActiveHitboxes) do
		if Object.deleted then
			Handler:remove(Object.object)
		else
			for _, Point in ipairs(Object.points) do
				if not Object.active then
					Point.LastPosition = nil
				else
					local rayStart, rayDir, RelativePointToWorld = Point.solver:solve(Point, Object.debugMode)
					local raycastResult = workspace:Raycast(rayStart, rayDir, Object.raycastParams)
					Point.solver:lastPosition(Point, RelativePointToWorld)

					if raycastResult then
						local hitPart = raycastResult.Instance
						local findModel = not Object.partMode and hitPart:FindFirstAncestorOfClass("Model")
						local humanoid = findModel and findModel:FindFirstChildOfClass("Humanoid")
						local target = humanoid or (Object.partMode and hitPart)

						if target and not Object.targetsHit[target] then
							Object.targetsHit[target] = true
							Object.OnHit:Fire(hitPart, humanoid, raycastResult, Point.group)
						end
					end
					
					if Object.endTime > 0 then
						if Object.endTime <= clock() then
							Object.endTime = 0
							Object:HitStop()
						end
					end
					
					Object.OnUpdate:Fire(Point.LastPosition)
				end
			end
		end
	end
end)

return Handler
