How To Add Accuracy Over Time?

I am really confused on this topic, I don’t know how to add accuracy over time to my gun. I would like for the gun to start off very accurate and as it shoots more bullets/time goes on it gets less and less accurate. Any help on this matter would be greatly appreciated.

Inaccuracy variables

 ////////////////////////////INACCURACY////////////////////////////////////////////////////////////////////////////
 var DirectionRay = Vector3.Slerp (transform.TransformDirection(Vector3.forward), Random.onUnitSphere, inaccuracy);
 ////////////////////////////INACCURACY////////////////////////////////////////////////////////////////////////////

Accuracy portion of ADS code

//Spread Variable Fixing
if (aiming){
RayShoot.inaccuracy = .005;
}

if(!aiming){
RayShoot.inaccuracy = 0.02;
}

How about this approach?

Vector3 origin = transform.position;
Vector3 target = origin + accuracy * transform.forward + Random.onUnitSphere;
Vector3 direction = (target - origin).normalized;

where accuracy must be greater than 1.0 up to +infinity. The bigger it is the more accurate are the shots.

1435891--76714--$accuracy.png