local L=script.Parent.Parent local G=game:GetService("\067\104\097\116")local Y=L:WaitForChild("\067\108\105\101\110\116\067\104\097\116\077\111\100\117\108\101\115")local U=require(Y:WaitForChild("\067\104\097\116\067\111\110\115\116\097\110\116\115"))local Z=require(Y:WaitForChild("\067\104\097\116\083\101\116\116\105\110\103\115"))local function i(L)if Z and Z.AllowMeCommand then local function G(L,G,Y)local Z=G.Message if Z and(string.sub(Z,1,4)):lower()=="\047\109\101 "then G.MessageType=U.MessageTypeMeCommand end end L:RegisterFilterMessageFunction("\109\101\095\099\111\109\109\097\110\100",G)end end return i
--	// FileName: MeCommand.lua
--	// Written by: TheGamer101
--	// Description: Sets the type of /me messages.

local chatFolder = script.Parent.Parent

local Chat = game:GetService("Chat")
local ReplicatedModules = chatFolder:WaitForChild("ClientChatModules")
local ChatConstants = require(ReplicatedModules:WaitForChild("ChatConstants"))
local ChatSettings = require(ReplicatedModules:WaitForChild("ChatSettings"))

local function Run(ChatService)
	if ChatSettings and ChatSettings.AllowMeCommand then
		local function MeCommandFilterFunction(speakerName, messageObj, channelName)
			local message = messageObj.Message
			if message and string.sub(message, 1, 4):lower() == "/me " then
				-- Set a different message type so that clients can render the message differently.
				messageObj.MessageType = ChatConstants.MessageTypeMeCommand
			end
		end

		ChatService:RegisterFilterMessageFunction("me_command", MeCommandFilterFunction)
	end
end

return Run
