local A=game:GetService("\067\104\097\116")local i={Name="\067\104\097\116";Description="\067\114\101\097\116\101\115 \097 \098\117\098\098\108\101 \099\104\097\116 \119\105\116\104 \067\104\097\116\083\101\114\118\105\099\101\058\067\104\097\116\040\041",Location="\080\108\097\121\101\114"}i.Execute=function(V,j,M)if j=="\099\111\109\109\097\110\100"then(i.API.sendModalToPlayer(V,"\087\104\097\116\'\115 \116\104\101 \109\101\115\115\097\103\101\063")).Event:Connect(function(j)if j~=false then local K K,j=i.API.filterText(V,j)if K then i.API.doThisToPlayers(V,M,function(i)if i.Character then A:Chat(i.Character,j)end end)else i.Remotes.Event:FireClient(V,"\110\101\119\077\101\115\115\097\103\101","",{From="\083\121\115\116\101\109";Content="\089\111\117\114 \098\117\098\098\108\101 \099\104\097\116 \114\101\113\117\101\115\116 \116\111 \""..(tostring(M).."\" \102\097\105\108\101\100 \116\111 \102\105\108\116\101\114\044 \112\108\101\097\115\101 \114\101\116\114\121 \108\097\116\101\114\046")})end end end)end end return i
local Chat = game:GetService("Chat")
local module = {
	Name = "Chat",
	Description = "Creates a bubble chat with ChatService:Chat()",
	Location = "Player",
}

module.Execute = function(Client, Type, Attachment)			
	if Type == "command" then
		module.API.sendModalToPlayer(Client, "What's the message?").Event:Connect(function(Input)
			if Input ~= false then
				local Status
				Status, Input = module.API.filterText(Client, Input)
				if Status then
					module.API.doThisToPlayers(Client, Attachment, function(Player)
						if Player.Character then
							Chat:Chat(Player.Character, Input)
						end
					end)
				else
					module.Remotes.Event:FireClient(Client, "newMessage", "", {From = "System", Content = "Your bubble chat request to \"" .. tostring(Attachment) .. "\" failed to filter, please retry later."})
				end
			end
		end)
	end
end

return module