how would i combine these

i have a script using UnityEngine;
using System.Collections;

public class damage : MonoBehaviour { 
	public int maxHealth = 100; 
	public int curHealth = 100;
	
	//initialization 
	void Start () { } 
	
	// Update 
	void Update () { 
		if (curHealth <1){ 
			Destroy(gameObject); 
		} 
	} 
	void OnCollisionEnter(Collision col) { 
		if (col.gameObject.tag == "bullet"){ 
			curHealth -= 20;
			Destroy(col.other);
		} 
	} 
}

but i was going to include a secondery weapon tagged photon that does more damage how would i do so thanks =)

You’ve got your structure backwards.

Damage calculation and dealing belongs on the bullet. The damageable object should simply have a public damage function that can be called by whatever is doing the damage.

This structure will make everything much simpler. You simply increase the damage on the bullet for different guns. Here is some code

public class Life : MonoBehaviour { 
    public int maxHealth = 100; 
    public int curHealth = 100;
 
    public void Damage (int noOfPoints){
        curHealth -= noOfPoints;
        if (curHealth <1){ 
            Destroy(gameObject); 
        } 
    }
}

public class Bullet : MonoBehaviour {
    public float damage = 20;

    void OnCollisionEnter(Collision col) { 
        col.gameObject.SendMessage("Damage", damage, SendMessageOptions.DontRequireReciever);
        Destroy(gameObject);
    } 
}

add this in this script

if (col.gameObject.tag == "photon"){
    curHealth -= 40;
    Destroy(col.other);
}

then modify your bullet to make it a photon… change his tag.
Make it a prefab then find the script that launch the bullet…