function methods.InternalApplyRobloxFilter(E,y,C,e)local c=false if c then local c=E:GetSpeaker(y)local s=e and E:GetSpeaker(e)if c==nil then return nil end local O=c:GetPlayer()local o=s and s:GetPlayer()if O==nil then return C end if allSpaces(C)then return C end local t=tick()local N=0 while true do local y,e=pcall(function()if o then return Chat:FilterStringAsync(C,O,o)else return Chat:FilterStringForBroadcast(C,O)end end)if y then return e else warn("\069\114\114\111\114 \102\105\108\116\101\114\105\110\103 \109\101\115\115\097\103\101\058",e)end N=N+1 if N>MAX_FILTER_RETRIES or tick()-t>MAX_FILTER_DURATION then E:InternalNotifyFilterIssue()return nil end local c=FILTER_BACKOFF_INTERVALS[math.min(#FILTER_BACKOFF_INTERVALS,N)]local s=c+(math.random()*2-1)*c wait(s)end else if not StudioMessageFilteredCache[C]then StudioMessageFilteredCache[C]=true wait()end return C end return nil end
--///////////////// Internal-Use Methods
--//////////////////////////////////////
--DO NOT REMOVE THIS. Chat must be filtered or your game will face
--moderation.
function methods:InternalApplyRobloxFilter(speakerName, message, toSpeakerName) --// USES FFLAG
	local runFilter = false
	if runFilter then
		local fromSpeaker = self:GetSpeaker(speakerName)
		local toSpeaker = toSpeakerName and self:GetSpeaker(toSpeakerName)

		if fromSpeaker == nil then
			return nil
		end

		local fromPlayerObj = fromSpeaker:GetPlayer()
		local toPlayerObj = toSpeaker and toSpeaker:GetPlayer()

		if fromPlayerObj == nil then
			return message
		end

		if allSpaces(message) then
			return message
		end

		local filterStartTime = tick()
		local filterRetries = 0
		while true do
			local success, message = pcall(function()
				if toPlayerObj then
					return Chat:FilterStringAsync(message, fromPlayerObj, toPlayerObj)
				else
					return Chat:FilterStringForBroadcast(message, fromPlayerObj)
				end
			end)
			if success then
				return message
			else
				warn("Error filtering message:", message)
			end
			filterRetries = filterRetries + 1
			if filterRetries > MAX_FILTER_RETRIES or (tick() - filterStartTime) > MAX_FILTER_DURATION then
				self:InternalNotifyFilterIssue()
				return nil
			end
			local backoffInterval = FILTER_BACKOFF_INTERVALS[math.min(#FILTER_BACKOFF_INTERVALS, filterRetries)]
			-- backoffWait = backoffInterval +/- (0 -> backoffInterval)
			local backoffWait = backoffInterval + ((math.random() * 2 - 1) * backoffInterval)
			wait(backoffWait)
		end
	else
		--// Simulate filtering latency.
		--// There is only latency the first time the message is filtered, all following calls will be instant.
		if not StudioMessageFilteredCache[message] then
			StudioMessageFilteredCache[message] = true
			wait()
		end
		return message
	end

	return nil
end
