Assume the role of a unity developer. Script 1 contains instructions for modifying Script 2. Please apply these instructions to Script 2 and provide me with the finalized version of the script that I can copy and paste directly, without needing any additional modifications.

Script 1:
public class HoverboardGrindController : MonoBehaviour
{
    // ... (other code)

    // Property to check if the hoverboard is grinding
    public bool IsGrinding
    {
        get { return isGrinding; }
    }

    // ... (other code)
}

Script 2:
using UnityEngine;
using UnityEngine.UI;

public class HoverboardGrindController : MonoBehaviour
{
    [Header("Grind UI")]
    public Slider grindBalanceSlider; // Assign the slider in the inspector

    [Header("Grind Detection")]
    public float detectionRadius = 5f;
    public LayerMask grindableLayer;
    public KeyCode grindKey = KeyCode.G; // Key to start grinding

    public GrindableSurface currentGrindSurface { get; private set; } // Make it accessible
    private bool isGrinding;

    // Update method (includes key press logic)
    public void Update() // Make sure to declare Update as public
    {
        // Check for grind key press and toggle grinding
        if (Input.GetKeyDown(grindKey))
        {
            currentGrindSurface = FindClosestGrindableSurface();
            if (currentGrindSurface != null)
            {
                StartGrinding(currentGrindSurface);
            }
        }
        else if (Input.GetKeyUp(grindKey))
        {
            EndGrinding();
        }

        if (isGrinding)
        {
            GrindAlongSurface();
            UpdateGrind();  // Call the UpdateGrind method from HoverboardGrindController
            // HandleGrindBalance(); // You can implement balance functionality here if needed
        }
    }

    // Property to check if the hoverboard is grinding
    public bool IsGrinding()
    {
        return isGrinding;
    }

    // Method to find the nearest grindable surface
    public GrindableSurface FindClosestGrindableSurface()
    {
        Collider[] hits = Physics.OverlapSphere(transform.position, detectionRadius, grindableLayer);
        GrindableSurface closestSurface = null;
        float closestDistanceSqr = Mathf.Infinity;
        Vector3 currentPosition = transform.position;

        foreach (Collider hit in hits)
        {
            GrindableSurface surface = hit.GetComponent<GrindableSurface>();
            if (surface != null)
            {
                Vector3 directionToSurface = hit.transform.position - currentPosition;
                float dSqrToSurface = directionToSurface.sqrMagnitude;
                if (dSqrToSurface < closestDistanceSqr)
                {
                    closestDistanceSqr = dSqrToSurface;
                    closestSurface = surface;
                }
            }
        }

        return closestSurface;
    }

    // Method to start grinding
    public void StartGrinding(GrindableSurface grindSurface)
    {
        isGrinding = true;
        transform.position = grindSurface.startPoint.position; // Snap to start point
        transform.forward = grindSurface.GetDirection(); // Face in the direction of the grind

        grindBalanceSlider.gameObject.SetActive(true);

        // You can run additional logic here (like animations, scoring system, etc.)
    }

    // Method to end grinding
    public void EndGrinding()
    {
        isGrinding = false;
        currentGrindSurface = null;

        grindBalanceSlider.gameObject.SetActive(false);

        // You can run additional logic here (like animations, scoring system, etc.)
    }

    // Method to handle movement along the surface while grinding
    private void GrindAlongSurface()
    {
        if (currentGrindSurface != null)
        {
            transform.position += currentGrindSurface.GetDirection() * currentGrindSurface.GetSpeed() * Time.deltaTime;
            // Here you could add checks to see if the grind has reached the end of the surface
            // And additional logic such as effects, scoring, and so on
        }
    }

    // Update grind logic
    public void UpdateGrind()
    {
        // Update grind logic
    }
}