Increasing TP Generated upon dealing a critical strike using a plugin?

(This is the plugin in question)

I'm just really hoping someone with better programming knowledge than I have will see this and be able to tell me, using this plugin, how can I make it so dealing a critical strike will increase TP generated? It feels quite clear doing so will require either better programming knowledge than I have, and/or a better understanding of the terms and formulas than I have.

Currently, this is the (Default) formula used for TP generated by dealing damage:
Math.min(1, value * 4 / target.mhp) * user.tcr
Plugins required:
Yanfly Buff States Core
Yanfly Autopassive states or any other form of passive states

Make a state
No restriction / normal priority/ untick removal at end of battle and untick removal by restriction
Apply said state to the actor in question
Put the following into a notetag:

<Custom Confirm Effect>
if (target.result().critical) {
user.gainTp(1);
text = 'Passive skill: ' + user.name() + ' activates their special ability!'
SceneManager._scene._logWindow._lines.push(text);
}
</Custom Confirm Effect>

This adds 1 TP when the user peforms a critical. Adjust accordingly.
Have fun
Works perfectly, tyvm!

Original thread: https://forums.rpgmakerweb.com/threads/increasing-tp-generated-upon-dealing-a-critical-strike-using-a-plugin.83042/