Set up a battle event page for each enemy in the troop. Set the condition to Enemy HP (X) <= 0%, where X is the EnemyID you set this page up for. Then enter the following Event commands:
◆Script:for (var i = 1; i <= $gameParty.aliveMembers().length; i++) { //Sets a loop to award Exp to each alive party member.
: : var Difference = ($gameActors.actor(i).level + 5).clamp(0, 11); //See below for full explanation.
: : var Multiplier = [5, 4.3, 3.7, 3.2, 2.8, 2.4, 2, 1.8, 1.6, 1.4, 1.2, 1][Difference]; //Multiplier amounts can be changed and/or added to.
: : var ExPts = 80 * Multiplier / $gameParty.aliveMembers().length; //80 is the amount of Base Exp enemy is worth. Change to suit.
: : $gameActors.actor(i).gainExp(ExPts); //Awards proper Exp per formula each time an enemy dies up until the last one.
: :};
◆Control Variables:#0001 EnemiesDefeated += 1 //Keeps count of enemies defeated.
◆If:EnemiesDefeated = 2 //The value here should be the number of enemies minus 1. Condition runs when only 1 enemy is left.
◆Change Enemy State:Entire Troop, + Immortal //"Entire Troop" at this point is the last enemy.
◆
:End
◆If:#1 Bat is affected by Immortal //This was page #1 in my example. The enemy denoted here should match enemy the page is made for.
◆Change Enemy State:Entire Troop, - Immortal //Allows battle to end now that last enemy is defeated and Exp is awarded for it.
◆
:End
Difference was set up based on an example provided by a user who originally asked for the script. They had set up tiers for level differences as follows: actor - enemy = -6, actor - enemy = -5, actor - enemy = -4, ..., actor - enemy = 4, and actor - enemy > 4, so that there were 11 differences in level that earned unique multipliers. Since their differences started at -6, a modifier of +6 was applied to compute difference. Since the var Difference returned a NaN error if the enemy level was referenced globally, I just plugged in the actual enemy level (something you should be able to decide upon if you're making each page for the target enemy) as a minus, and then combined with the modifier of +6 (because the clamp starts at 0...so shift -6 up to 0, -5 up to 1, etc.) In this example, the enemy is level 1, so actor - enemy + modifier = actor - 1 + 6, which reduces to actor + 5.
Multiplier was also set up according to the specific original request. If they had wanted 12 level differences with unique multipliers, that's easily added in by giving one more value in the [Multiplier list] and setting upper bound of clamp to 12.