Thread:Spawn(function()while true do for h,C in ipairs(ActiveHitboxes)do if C.deleted then Handler:remove(C.object)else for h,I in ipairs(C.points)do if not C.active then I.LastPosition=nil else local h,F,b,O=I.solver:solve(I,((game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")):WaitForChild("\067\108\105\101\110\116\083\101\116\116\105\110\103\115")).Debug.Value)local function y(h,C,I)local F=workspace:Raycast(h,C,I)if F then local h=F.Instance if h.Parent:IsA("\065\099\099\111\117\116\114\101\109\101\110\116")then table.insert(I.FilterDescendantsInstances,h)F=nil end end return F end local S=y(h,F,C.raycastParams)I.solver:lastPosition(I,b)if S then local h=S.Instance local F=not C.partMode and h:FindFirstAncestorOfClass("\077\111\100\101\108")local b=F and F:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")local y=b or C.partMode and h if y and not C.targetsHit[y]then C.targetsHit[y]=true if O~=nil and typeof(O)=="\073\110\115\116\097\110\099\101"then O.Color=Color3.fromRGB(85,255,0)end C.OnHit:Fire(h,b,S,I.group)end end if C.endTime>0 then if C.endTime<=clock()then C.endTime=0 C:HitStop()end end C.OnUpdate:Fire(I.LastPosition)end end end end Thread:Wait(.028)end end)return Handler

Thread:Spawn(function()
	while true do
		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, debugPart = Point.solver:solve(Point, game:GetService("ReplicatedStorage"):WaitForChild("ClientSettings").Debug.Value)

						local function castFunction(rayStart, rayDir, params)
							local resultOfCast = workspace:Raycast(rayStart, rayDir, params)

							if resultOfCast then
								local hitInstance = resultOfCast.Instance

								if hitInstance.Parent:IsA("Accoutrement") then
									table.insert(params.FilterDescendantsInstances, hitInstance)
									resultOfCast = nil
								end
							end

							return resultOfCast
						end

						local raycastResult = castFunction(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
								
								if debugPart ~= nil and typeof(debugPart) == "Instance" then
									debugPart.Color = Color3.fromRGB(85, 255, 0)
								end
								
								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
		
		Thread:Wait(0.028)
	end
end)

return Handler
