This is the same command as the 1.9 command; but it removes the generic.attackSpeed attribute, due to 1.7.2-1.8 not having it. Also, because the AttributeModifiers tag was introduced in 1.7.2, you cannot use this sword without making a modded tag for it in the versions before 1.7.2.
Link to 1.9 version --> https://minecraftcommand.science/commands/32768