Jetpack script adjustments

Hello everyone, I have a jetpack script that I made and am having a few issues, for starters my gameplay is a 3rd person platformer that has an open world feature. In one of my worlds you are on the moon and can use the jetpack to jet around, only I don’t want the player to be able to jet into the air forever so I would like to add a “gas” feature with a visible bar in the lower middle of the screen.

(When player holds F button jetpack is activated LIFT UP, when player is not grounded jet animations are activated, when player is grounded jet animations are de-activated)

This is where my issue is, does anyone have a good way of doing this with my script? Thanks!

Script:

using UnityEngine;
using System.Collections;

public class JetPack : MonoBehaviour {

   public float JetPackForce;
   public float startTime = 3.5f;
   public GameObject player;
   public GameObject Rocket1;
   public GameObject Rocket2;
   Animator anim;
   
   void Start(){
   	
   	 anim = GetComponent<Animator>();
   	
      }
   void FixedUpdate () {
      if (Input.GetKey (KeyCode.F)) {
         Rocket1.SetActive(true);
         Rocket2.SetActive(true);
         startTime -= Time.deltaTime;
         player.rigidbody.AddForce(new Vector3(0.0f, 1.0f, 0.0f) * JetPackForce);

            }
            
      if (startTime <= 0.0f) {
         player.rigidbody.velocity = Vector3.down * Time.smoothDeltaTime;
         startTime = 3.5f;
            }
            
     if(anim.GetBool("Grounded")) {
     	 Rocket1.SetActive(false);
         Rocket2.SetActive(false);

     }
   }
}

I ended up figuring it out, here’s the adjusted code: (minus the visible bar which i will handle in NGUI)

using UnityEngine;
using System.Collections;

public class JetPack : MonoBehaviour {

   public float JetPackForce;
   public float startTime = 3.5f;
   public float fuel = 10;
   public float maxFuel = 100;
   public bool isGrounded;
   public GameObject player;
   public GameObject Rocket1;
   public GameObject Rocket2;
   Animator anim;
   
   void Start(){
   	
   	 anim = GetComponent<Animator>();

  }
   void FixedUpdate () {
      if (Input.GetKey (KeyCode.F) && fuel > 0) {
         Rocket1.SetActive(true);
         Rocket2.SetActive(true);
         startTime -= Time.deltaTime;
         player.rigidbody.AddForce(new Vector3(0.0f, 1.0f, 0.0f) * JetPackForce);
         fuel -= 10 * Time.deltaTime; 

            }
            
      if (startTime <= 0.0f) {
         player.rigidbody.velocity = Vector3.down * Time.smoothDeltaTime;
         startTime = 3.5f;
            }
            
     if(anim.GetBool("Grounded")) {
     	 Rocket1.SetActive(false);
         Rocket2.SetActive(false);
         isGrounded = true;
     }

		 else{ 
		 isGrounded = false;
	}
     
     if (fuel < maxFuel && isGrounded == true) //If the players fuel is less than the max fuel and the player is grounded
 {
     fuel += 10 * Time.deltaTime;
     print(fuel);
 //Increase the players fuel every second
 
	 }
     
   }
}