I am making a Maze/Horror Game but I cannot get the sprinting to work with a cooldown

I am quite new to scripting and am trying to make use of bools to get the sprinting to work. So if Sprinting is active then I can sprint. Here is what I have so far for my player controller.

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

public class PlayerController : MonoBehaviour
{
    // Variables
    private Rigidbody playerRb;
    private float jumpForce = 4;
    private bool isOnGround = true;
    private float moveSpeed = 1.0f;
    private Vector3 turn = new Vector3(0, 5, 0);
    private float horizontalInput;
    private float forwardInput;
    private Vector3 reset = new Vector3(0, 0, 0);
    public float turnSpeed = 1.0f;
    public bool sprintActive = false;
    public float sprintTime;
    public float sprintCooldown;

    // Start is called before the first frame update
    void Start()
    {
        playerRb = GetComponent<Rigidbody>();
        sprintActive = true;
    }

    // Update is called once per frame
    void Update()
    {
        horizontalInput = Input.GetAxis("Horizontal");
        forwardInput = Input.GetAxis("Vertical");
        // Jump
        if (Input.GetKeyDown(KeyCode.Space) && isOnGround)
        {
            playerRb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
            isOnGround = false;
        }
        // Walk Right/Left
            transform.Translate(Time.deltaTime * moveSpeed * Vector3.right * horizontalInput);
        // Walk Forward/Back
            transform.Translate(moveSpeed * Time.deltaTime * Vector3.forward * forwardInput);
        // Right turn
        if (Input.GetKey(KeyCode.RightArrow))
        {
            transform.Rotate(turn * Time.deltaTime * turnSpeed);
        }
        // Left turn
        if (Input.GetKey(KeyCode.LeftArrow))
        {
            transform.Rotate(-turn * Time.deltaTime * turnSpeed);
        }
  

  // This is the part where I am struggling
        // Sprinting
        if (Input.GetKeyDown(KeyCode.LeftShift))
        {
            sprintTime = sprintTime + 1 * Time.deltaTime;
        }
       else
        {
            sprintActive = false;
        }
        if (Input.GetKeyDown(KeyCode.R))
        {
            transform.rotation = Quaternion.identity;
        }
        if (sprintActive == true && Input.GetKey(KeyCode.LeftShift))
        {
            moveSpeed = 3.0f;
        }
        if (sprintTime == 5)
        {
            moveSpeed = 1.0f;
            sprintCooldown = sprintCooldown + 1 * Time.deltaTime;
        }
        if (sprintCooldown == 10)
        {
            sprintActive = true;
        }
                
    }

I figured it out, Thanks for the help!!!