local function x(x,e)local P local S,j=pcall(function()P=TextService:FilterStringAsync(x,e,Enum.TextFilterContext.PublicChat)end)if S then return P elseif j then print("\069\114\114\111\114 \102\105\108\116\101\114\105\110\103 \109\101\115\115\097\103\101\058",j)end return false end local function e(x,e)local P local S,j=pcall(function()P=x:GetNonChatStringForUserAsync(e)end)if S then return P elseif j then print("\069\114\114\111\114 \102\105\108\116\101\114\105\110\103 \109\101\115\115\097\103\101\058",j)end return false end local function P(P,S,j)local s=x(P,S)if s then local x=e(s,j)return x end return false end
-- Applying text filter
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
