How can i make the right choice of implementation of my shooting fire script ?

This is working but the way i’m doing it is wrong.
I don’t want to use not frame counts but rate of fire that is setup to be governed by the desired delay between shots in actual time.

I also want to make some bar i can move and change while the game is running the rate of fire. For example 10 bullets per second or 11 bullets per second or 200. I think the real one is 10 bullets per second but i want to be able to change it while the game is running. Something like this line: [Range(0f,20f)] public float bulletsPerSecond = 10f;

Not sure how to do it.

The first script is attached to the weapon that fire.
The second script is attached to the bullet prefab i created.
I have a Rigidbody component already on the weapon.

This is my script:

using UnityEngine;
using System.Collections;

public class Shooter : MonoBehaviour {

    public GameObject bullet = null;
    public float bulletSpeed = 500f;

    private int frames = 0;

    void Update ()
    {
        frames++;
        if (frames % 10 == 0)
        {
            if (Input.GetKeyDown(KeyCode.G) || Input.GetKey(KeyCode.G))
            {
                GameObject shot = (GameObject)Instantiate(bullet, transform.position
                    + (transform.forward * 2), transform.rotation);

                Rigidbody _rigidbody = shot.AddComponent<Rigidbody>();
                _rigidbody.AddForce(transform.forward * bulletSpeed);
            }
        }
	}
}

And this is the script that destroy the bullets:

using UnityEngine;
using System.Collections;

public class Bullet : MonoBehaviour {

	void OnCollisionEnter(Collision c)
    {
        Destroy(gameObject);
    }
}

Replace this:

 // [ ... ]
 private int frames = 0;

 void Update ()
 {
     frames++;
     if (frames % 10 == 0)
     {
         if (Input.GetKeyDown(KeyCode.G) || Input.GetKey(KeyCode.G))
         {
            // [ ... ]

with this

// [ ... ]
public float coolDownTime = 0.2f; // 0.2 --> 5 shots per second
private float time = 0;

void Update ()
{
    if (time > 0)
    {
        time -= Time.deltaTime;
    }
    else
    {
        if (Input.GetKey(KeyCode.G))
        {
            time += coolDownTime;
            // [ ... ]

Note: using GetKeyDown and GetKey is redundant. GetKey will also return true the first frame the key is down. If you want to specify a firerate instead of the dellay between shots, just calculate this:

coolDownTime = 1f / fireRate; // fireRate is in "shots per seconds"