Trigger to record unit's weapon damage?

Is there a script to obtain a units weapon damage + bonuses, without desyncing everyone obviously. I need a multi player friendly script to simply record a units damage + bonuses.

HELP