function numberToString(number) {
    var r = Math.round(number * 1000) / 1000;
    return ""+r;
}

function addCommas(nStr)
{
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}

function numberToStringFormatted(number) { 
    var number = Number(number);
    if(number > 1000000) {
        return number.toPrecision(3);
    } else {
        number = Math.round(number * 1000) / 1000;
        return addCommas(number);
    }
}
@@ -89,24 +89,539 @@
 rn %22%22+r;%0A%7D%0A%0A
+/**%0A * There are some difficulties with locales with this script's number%0A * output (when number %3E 1e21) and Clicker Heroes' input formatting. %0A * This function makes sure there are no decimal points in the output.%0A */%0Afunction numberToClickerHeroesPasteableString(number) %7B%0A    var b = Math.floor(Math.log(number)/Math.log(10));%0A    if(b %3E= 21) %7B%0A        var intPart;%0A        intPart = Math.round(number / Math.pow(10, b-10));%0A        return intPart + %22e%22 + (b-10);%0A    %7D else %7B%0A        return %22%22+number;%0A    %7D%0A%7D%0A%0A
 function add

Make sure there are no decimal points in the (pasteable) level change output.