local tab ={}
local highest
function rank()
for i,v ipairs(getElementsByType("player")) do
tab=v;
end
highest = tab[1];
for i,v ipairs(tab) do
if(getElementData(tab,your data)> getElementData(highest,your data) then
highest = tab;
end
end
Player with highest score will be in variable highest