This is a very big system and what you’re asking for has been asked countless times before, just in less niche ways. Look up how to make a melee weapon system. I did one google search and I got this. If it isn’t what you’re looking for then you’ll have to use parts of it and develop your own system.