How to addForce even after you release the button?

I’m trying to addForce to the game object. But when I release the button he stops, I wanted him to keep moving even after releasing the button. How do I do?

Here is the script:

using Photon.Pun;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerScript : MonoBehaviourPun
{
    public Joystick joystick;
    protected JoyButton joyButton;

    public ProgressBar progressBar;
    public GameObject progressBarObj;

    public float speed = 10f;
    private bool isLoading;

    // Start is called before the first frame update
    void Start()
    {
        joystick = FindObjectOfType<Joystick>();
        joyButton = FindObjectOfType<JoyButton>();
        progressBar = FindObjectOfType<ProgressBar>();
        progressBarObj.SetActive(false);
    }

    // Update is called once per frame
    void Update()
    {
        var rigidbody = GetComponent<Rigidbody>();

        if (photonView.IsMine)
        {
            if (!isLoading)
            {
                rigidbody.velocity = new Vector3(joystick.Horizontal * speed, rigidbody.velocity.y, joystick.Vertical * speed);
            }
        }

        if(joyButton.pressed && progressBar.current <= 10)
        {
            progressBarObj.SetActive(true);
            progressBar.current += 0.05f;
            isLoading = true;
        }
        if (!joyButton.pressed && isLoading)
        {
            progressBarObj.SetActive(false);
            rigidbody.AddForce(new Vector3(0, 0, progressBar.current * 10), ForceMode.Impulse);
            progressBar.current = 0;
            isLoading = false;
        }
    }
}

Wow! This can be one particular of the most useful blogs We’ love ever arrive across on this subject. Actually Excellent. I am also a specialist in this topic, therefore, I can understand your effort.
t rex game