I Tried To Recreate This Damage Function By Looking Into Msatd Damage Script (Real One) see inside to see how it works
no need to credit or something