You've got yourself an infinite loop.
Try this (I also fixed some grammar and stuff) :
function servercmdSell(%this, %name, %item, %amount){
if(!isObject(%this.player))
return;
%tool = 0;
while(%tool <= 4){
if(firstWord(%this.player.tool[%tool].uiName) $= %item){
for(%i=0;%i<ClientGroup.getCount();%i++){
%cl = ClientGroup.getObject(%i);
if(strstr(strlwr(%cl.name),strlwr(%name)) != -1){
%Customer = %cl;
messageclient(%Customer,"", "\c0" @ %this.name @ " \c6wants to sell you their \c0" @ %item @ " \c6 for \c0" @ %amount @ "\c6.");
}
}
}
%tool++;
}
}