Arena nameplate script, help needed!

I have a script which I use in arena to change enemy names to 1, 2 and 3 but it doesnt seem to work with ELVUI. Am I able to do the same thing within ELVUI or is there a way to fix the script? Please someone help me, I'd really like to keep using ELVUI but being able to use this script is even more important for me.

/run local U=UnitIsUnit hooksecurefunc("CompactUnitFrame_UpdateName",function(F)if IsActiveBattlefieldArena()and F.unit:find("nameplate")then for i=1,5 do if U(F.unit,"arena"..i)then F.name:SetText(i)F.name:SetTextColor(1,1,0)break end end end end)