How in a script, can you make a tool, in which you have created parts in stick together to the point where it doesn't glitch, or damage you when you equip it?
In the past players have used welding to make complex tools.
Now that solid modeling has been released so we can make many parts into a single part, however, it is now the best way to make complex tools.
As for not damaging yourself, that is simply how you code. You should do a check to make sure that the person the tool has touched is not yourself before damaging them.