Is there a way to find when the user is going to crit? (Yanfly Action Sequence)

Hello there, trying to make different animations for critting.
I have the layout of how everything is done for the attack, but I want to do it differently if it is going to crit!

Is there a way to know? And how would the syntax go? ( I mean with an if else)
I am a programmer but still have little knowledge how everything works with rpg maker yet.

EXAMPLE:
If (User.AttackWillCrit = false){
//Do Regular Animation
}else{
//Do Crit Animation
}
EDIT:
If there is for example an "User.AttackWillCrit" how did you find this function and how could I know ALL of them.

Thanks in Advance 🙂!
You can use this check if your target takes damage from your critical attack:
If (target.result().critical){}
Hey! Didn't quite work, does it not work when using Yanfly Action Sequence??

Edit: Tried with a simpler one to test and it ALWAYS thrusts independent of the critical chance i set(0 or 100%)

Update:
<target action>
if target.result().critical
action effect
else
MOTION THRUST: user
end
</target action>
So i guess it only works well (in a state) before damage calculation, if you use Yanfly's Buffs & States plugin. For Action Sequence Packs, there might be another way to deal with this which i haven't found out too.
I've found it lol. I don't agree that it should work like this but i'll take what I have.

You actually need to do an hit for it be calculated. So you have to do action effect. Meaning a different effect will only be possible the moment he is striking. Not straight from the beginning.

But anyways thanks! Was your target.result().critical and different tries reading the exceptions that I understood!

<target action>
action effect
if target.result().critical
MOTION SLEEP: user
else
MOTION THRUST: user
end
</target action>

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-find-when-the-user-is-going-to-crit-yanfly-action-sequence.79088/