local function p(p,W)local S local a,w=pcall(function()S=TextService:FilterStringAsync(p,W,Enum.TextFilterContext.PublicChat)end)if a then return S elseif w then print("\069\114\114\111\114 \102\105\108\116\101\114\105\110\103 \109\101\115\115\097\103\101\058",w)end return false end local function W(p,W)local S local a,w=pcall(function()S=p:GetNonChatStringForUserAsync(W)end)if a then return S elseif w then print("\069\114\114\111\114 \102\105\108\116\101\114\105\110\103 \109\101\115\115\097\103\101\058",w)end return false end local function S(S,a,w)local U=p(S,a)if U then local p=W(U,w)return p end return false end

local function getTextObject(message, fromPlayerId)
	local textObject
	local success, errorMessage = pcall(function()
		textObject = TextService:FilterStringAsync(message, fromPlayerId, Enum.TextFilterContext.PublicChat)
	end)
	if success then
		return textObject
	elseif errorMessage then
		print("Error filtering message:", errorMessage)
	end
	return false
end

local function getFilteredMessage(textObject, toPlayerId)
	local filteredMessage
	local success, errorMessage = pcall(function()
		filteredMessage = textObject:GetNonChatStringForUserAsync(toPlayerId)
	end)
	if success then
		return filteredMessage
	elseif errorMessage then
		print("Error filtering message:", errorMessage)
	end
	return false
end

local function filterText(text, fromPlayerId, toPlayerId)
	local textObject = getTextObject(text, fromPlayerId)
	if textObject then
		local filteredObject = getFilteredMessage(textObject, toPlayerId)
		return filteredObject
	end
	return false
end
