MV Showing Custom Popups w/ LTBS

Hi, I'm using Lecode's Tactical Battle System and just successfully implemented an Action XP Gain system in my project. It works wonderfully (e.g. gaining XP after an attack). However, I'm having trouble getting a popup to show above the actor to show how much XP was gained from that action. The plugin command "LeTBS ShowPopup" doesn't work because apparently it was a WIP plugin and so that feature was never fully imlpemented. Luckily, I think I've found an alternate solution. I noticed that when a unit counterattacks, a popup shows up that says "Counter". So I looked into the code and found this:
JavaScript:
BattleManagerTBS.processCounterAttack = function (targets, subject, action) {
    if (!action) return;
    this.setCursorCell(subject.getCell());
    targets.forEach(function (entity) {
        if (entity) {
            var dist = LeUtilities.distanceBetweenCells(subject.getCell(), entity.getCell());
            if (dist <= 1 && Math.random() < action.itemCnt(entity.battler()) && action.isPhysical()) {
                var skill = $dataSkills[entity.battler().attackSkillId()];
                entity.battler().clearResult();
                entity.lookAt(subject.getCell());
                entity.addTextPopup("Counter");
                entity.startSequence("counter");
                this.forceAction(skill, entity);
            }
        }
    }.bind(this));
};
Basically, the .addTextPopup() function is what I'm looking for. However, when I try to use it in the <Custom Establish Effect> notetag in my Action XP Gain state, nothing happens. I'm sure it's because my syntax is incorrect. This is what my code looks like:
JavaScript:
<Custom Establish Effect>
if (user.isActor() && target.result()) {
  if (target.isEnemy() && target.result().hpDamage > 0) {
    var XP = (Math.min(target.result().hpDamage, target.oldHp) / target.mhp) * target.exp();
    user.gainExp(XP);
    BattleManagerTBS.entity.addTextPopup(XP);
  }
}
</Custom Establish Effect>
I get the following error: TypeError: Cannot read property 'addTextPopup' of undefined

It's probably because the 1st half of BattleManagerTBS.entity.addTextPopup(XP); is incorrect. I just can't figure out what it's supposed to be. I also looked into LeTBS_DamagePopupEX.js for the .addTextPopup() function, which is the following:
JavaScript:
TBSEntity.prototype.addTextPopup = function (text) {
    this._sprite.addTextPopup(arguments);
};
So I tried TBSEntity.addTextPopup(XP); as well and got a different error: TypeError: TBSEntity.addTextPopup is not a function
Ok, I think I'm getting warmer! When I tried BattleManagerTBS.activeEntity()._sprite.addTextPopup in the console, I got the following:
JavaScript:
ƒ () {
    this.addExtraPopup("text", arguments[0]);
}
But when I try BattleManagerTBS.activeEntity()._sprite.addTextPopup("Hello") I get an "undefined". I think I have to supply something for the arguments[0] part, but idk what should go there...

Edit: This is the .addExtraPopup() function (different from .addTextPopup()) found in LeTBS_DamagePopupEX.js.
JavaScript:
TBSEntity_Sprite.prototype.addExtraPopup = function (type, args) {
    var sprite = new Sprite_Damage();
    sprite.x = this.x;
    sprite.y = this.y - this.height;
    sprite.extraSetup(type, args);
    this._popups.push(sprite);
    BattleManagerTBS.getLayer("movableInfo").addChild(sprite);
};
This is .addTextPopup() which is different parent than one in previous post: (TBSEntity vs TBSEntity_Sprite)
JavaScript:
TBSEntity_Sprite.prototype.addTextPopup = function () {
    this.addExtraPopup("text", arguments[0]);
};

Edit2: OMFG!! I DID IT!! YES!! 🙏😤😂
Solution: BattleManagerTBS.activeEntity().addTextPopup("insert_text_here");
Ok, I think I'm getting warmer! When I tried BattleManagerTBS.activeEntity()._sprite.addTextPopup in the console, I got the following:
JavaScript:
ƒ () {
    this.addExtraPopup("text", arguments[0]);
}
But when I try BattleManagerTBS.activeEntity()._sprite.addTextPopup("Hello") I get an "undefined". I think I have to supply something for the arguments[0] part, but idk what should go there...

Edit: This is the .addExtraPopup() function (different from .addTextPopup()) found in LeTBS_DamagePopupEX.js.
JavaScript:
TBSEntity_Sprite.prototype.addExtraPopup = function (type, args) {
    var sprite = new Sprite_Damage();
    sprite.x = this.x;
    sprite.y = this.y - this.height;
    sprite.extraSetup(type, args);
    this._popups.push(sprite);
    BattleManagerTBS.getLayer("movableInfo").addChild(sprite);
};
This is .addTextPopup() which is different parent than one in previous post: (TBSEntity vs TBSEntity_Sprite)
JavaScript:
TBSEntity_Sprite.prototype.addTextPopup = function () {
    this.addExtraPopup("text", arguments[0]);
};

Edit2: OMFG!! I DID IT!! YES!! 🙏😤😂
Solution: BattleManagerTBS.activeEntity().addTextPopup("insert_text_here");
Well thats neat. I disabled those pop ups for myself as I could not get them to do anything useful! This plugin is amazing but sometimes you got to dig a bit

Original thread: https://forums.rpgmakerweb.com/threads/showing-custom-popups-w-ltbs.138351/