local generoMuda = function(nomeDoAlvo, textArea)
local genero = tfm.get.room.playerList[nomeDoAlvo] and tfm.get.room.playerList[nomeDoAlvo].gender or 0
for k in textArea:gmatch('%-%(%w+%|%w+%|%w+%)') do
local k = (k:gsub('%(', '%%('):gsub('%)', '%%)'))
if genero == 0 then
textArea = textArea:gsub(k, k:match('%-%%%((%w+)%|%w+%|%w+%%%)'))
elseif genero == 1 then
textArea = textArea:gsub(k, k:match('%-%%%(%w+%|(%w+)%|(%w+)%%%)'))
else
textArea = textArea:gsub(k, k:match('%-%%%(%w+%|%w+%|(%w+)%%%)'))
end
end
return textArea
end
Editor is loading...