How to make my soccer system better?

I’m currently thinking about the best way to make a soccer system; modular or not. The way my old system worked was a tool-based system like this:

Detect input → charge kick power → detect when ball is touched by leg → set network ownership to player → apply physics on client-side

This whole system was redundant to me, considering the fact that I was just copy and pasting this code with minor adjustments (so that I could create different techniques of kicking the ball). I’m looking for any ideas on what the best way to create an easily modifiable/expandable soccer system or just a way to modularize this somehow.