instantiate prefab and link 3rd party gameobject script

Hi so basically I have a script that shoots but I want players to have stats and guns to have their own damage

So I have the bullet that is instantiated and the bullet works out the damage it does but I want it to work out the damage using the gun it is shot from and the person that shot it

Hierarchy example

Player1 > Character > Weapons > Assault_Rifle

I have a script on Assault_Rifle

	if (Input.GetButton("Fire1") && Time.time > nextShot && clipBullets > 0 && curReload == false) {
		nextShot = Time.time + gunStats.fireDelay;

		Rigidbody bulletInstance;
		bulletInstance = Instantiate(wepBullet, gunBarrel.transform.position, gunBarrel.transform.rotation) as Rigidbody;
		bulletInstance.AddForce(gunBarrel.transform.forward * bulletSpeed);
		gunBarrel.GetComponent<AudioSource>().Play();
		clipBullets = clipBullets - 1;
		ammoText.text = (clipBullets + " / " + gunStats.clipSize);
	}

script for weapon damage is on Assault_Rifle, script for % bonuses against species is on Character

make a Bullet script that has a public damage variable to set, then after Instantiating the bulletInstance just do:

Bullet b = bulletInstance.AddComponent();
b.Damage = 100.0f;//example value

Same concept if you have a “piercing effect”

b.PiercePercentage = 0.5f;

or simply a damage type enum

b.DamageType = DamageType.Piercing;

As for the stats part you would have to elaborate on how the stats would work or even be saved (per game?, hiscores? etc).