Random Hit Damage boost

Ok, I'm trying to make a really cool gun with lots of features in it for EvilLab2 (OMG, for fans of EvilLab,yes, there IS gonna be another one, with more custom weapons
), and one of the things i wanted to add was a random hit damage booster for one of the guns. So, how would i make the code for this function(IE, where and how do i make the game generate a random number,make it to a hit damage boost, then display the boost to the hit damage in a client message), and should i put it on Laser, Scope, SwitchAmmo, or some other function made only for the use of this weapon? Any ideas greatfully recieved 

