You could event this, but coming from playing the game just now, I can tell you that it wouldn't be an accurate representation of the system.
In essence, you just run your character into enemies and deal damage to them as long as you are pushing, but there's more to it.
If you just run into an enemy head on, you will take damage. You need to graze the enemy from the sides of their graphic, relative to which way they're facing(up/down or sideways) in order to deal damage to them without taking damage yourself. And you and your enemies take more damage when run into from behind.
Bosses worked under differing principles, such as having fireballs, waves, and other attack patterns out on the field that you needed to dodge or navigate before being able to run into them to deal damage. And then it would repeat.
That being said, this would require a pixel movement system, some way of defining safe and unsafe hitboxes on enemies, and defining combat areas at the very least.
..So yeah, this probably isn't as simply made as one might think.
Exactly, therefor i would love to fins a script that does just as you say.