You can easily alter it to change the values depending on an enemy’s force. Mine’s set up to give the same force no matter what, but with that same principal you can exchange values as you need them.
Making the moveDirection = new Vector3(0, 1,-.5); variable react to another variable, such as movedirection = enemyKnockback. Which was set in a function (like mine, but mine right now just turns “slammed” on) as… lets say “(0, 1, 0)” I’m actually kind of surprised I found a way to do it myself ^^;;
UNFORTUNATELY it’s still messy code, but it works.