Bullet Script :

Code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Bullet : MonoBehaviour {

   public float damage;
   private GameObject enemyTriggered;

// Use this for initialization
void Start () {
       Destroy(gameObject, 5);
}

// Update is called once per frame
void OnCollisionEnter ()
   {
       Destroy(gameObject);
}

   void OnTriggerEnter(Collider other)
   {
       if(other.tag == "Enemy")
       {
           enemyTriggered = other.gameObject;
           enemyTriggered.GetComponent<Enemy>().health -= damage;
           Destroy(this.gameObject);
       }
   }

}


Gun Script :

Code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Collections;
using UnityEngine.UI;


public class Gun : MonoBehaviour {

   public Transform bulletSpawn;
   public Rigidbody bullet;
   public float bulletSpeed;
   public float fireRate = 15f;
   public ParticleSystem muzzleFlash;
   public int curAmmo;
   public int fullAmmo = 30;
   public int backupAmmo;
   public float reloadTime = 3.0f;
   public float curReloadTime;
   public bool isReloading;

   private float nextTimeToFire = 0f;

   public Text curAmmoText;
   public Text backupAmmoText;

   public void Start()
   {
       curAmmo = 15;
       backupAmmo = 90;
   }

   //Update is called once per frame
   void Update()
   {
       curAmmoText.text = curAmmo.ToString();
       backupAmmoText.text = backupAmmo.ToString();

       if (Input.GetButton("Fire1") && !isReloading && curAmmo > 0 && Time.time >= nextTimeToFire)
       {

           FindObjectOfType<AudioManager>().Play("Browning");

           nextTimeToFire = Time.time + 1f / fireRate;

           muzzleFlash.Play();

           curAmmo--;

           Rigidbody bulletRigidbody;
           bulletRigidbody = Instantiate(bullet, bulletSpawn.position, bulletSpawn.rotation) as Rigidbody;
           bulletRigidbody.AddForce(bulletSpawn.forward * bulletSpeed);

       }

       if (Input.GetKeyDown(KeyCode.R) && !isReloading && backupAmmo > 0)
       {

           FindObjectOfType<AudioManager>().Play("Reloading1");
               
           curReloadTime = reloadTime;
           isReloading = true;
           Reload();
       }

       if (isReloading)
       {
           curReloadTime -= Time.fixedDeltaTime;

           if (curReloadTime <= 0)
           {
               isReloading = false;
           }
       }
   }
       
   void Reload()
   {
       var shot = fullAmmo - curAmmo;

       if (backupAmmo < shot)
       {
           curAmmo += backupAmmo;
           backupAmmo = 0;
       }
       else
       {
           curAmmo += shot;
           backupAmmo -= shot;
       }
   }
}


Weapon Switcher :

Code:

using UnityEngine;
using System.Collections;

public class ShowWeapon : MonoBehaviour
{
   [SerializeField]
   public GameObject item1;
   [SerializeField]
   public GameObject item2;
   public bool showItem1;
   public bool showItem2;
   // Use this for initialization
   void Start()
   {
       showItem1 = false;
       showItem2 = false;
   }

   // Update is called once per frame
   void Update()
   {
       if (showItem1 == false)
       {
           item1.SetActive(false);
       }
       if (showItem1 == true)
       {
           item1.SetActive(true);
       }
       if (showItem2 == false)
       {
           item2.SetActive(false);
       }
       if (showItem2 == true)
       {
           item2.SetActive(true);
       }
       if (Input.GetKeyDown(KeyCode.Alpha1) && showItem1 == false)
       {
           showItem1 = true;
           showItem2 = false;
       }
       if(Input.GetKeyDown(KeyCode.Alpha2)&& showItem2 == false)
       {
           showItem2 = true;
           showItem1 = false;
       }
       if (Input.GetKeyDown(KeyCode.H))
       {
           showItem2 = false;
           showItem1 = false;
       }
   }
}

Enemy Script :

Code:

using UnityEngine;

public class Enemy : MonoBehaviour
{
   public float health;
   public ParticleSystem blood;
   public GameObject deadVersion;

   void Update()
   {
       if (health <= 0)
       Die();
   }

   public void Die()
   {
       Instantiate(deadVersion, transform.position, transform.rotation);

       Destroy(this.gameObject);

       blood.Play();
   }


}


These are all my scripts if you are giving it to people please give credit. Comment what scripts you want and I will try and make them.

Spoiler :
(FPS games only)