Hi, I have 2 unity scripts that I need to merge I will provide them below
Script 1: 
using UnityEngine;
using UnityEngine.UI;

public class HoverboardGrindController : MonoBehaviour
{
    [Header("Grind Settings")]
    public float grindSpeed = 10f;
    public bool isGrinding;
    public Transform grindPosition; // The target position on the grindable object
    public Transform localGrindDirection; // The direction of grinding (if needed)

    [Header("Grind UI")]
    public Slider grindBalanceSlider; // Assign this in the inspector

    private Rigidbody rb;
    private Vector3 startPosition;
    private Quaternion startRotation;
    private float grindBalance; // Represents the current balance while grinding
    private float balanceChangeTimer = 0f;
    private int grindDirection = 1; // You can use this to reverse grind direction if needed

    public float balanceTimeDuration = 2f; // Time after which the grind balance changes direction
    public float balanceDifficulty = 20f; // Increase for more difficult balancing

    void Awake()
    {
        rb = GetComponent<Rigidbody>();
    }

    void Update()
    {
        if (isGrinding)
        {
            GrindBalanceManager();
            GrindMovement();
        }
    }

    public void StartGrinding(Transform grindSurface, Transform direction)
    {
        if (!isGrinding)
        {
            isGrinding = true;
            startPosition = transform.position;
            startRotation = transform.rotation;

            // Position and direction are provided from the grindable object
            grindPosition = grindSurface;
            localGrindDirection = direction;

            // Optionally, set the player’s position and rotation to match the grindable object
            transform.position = grindPosition.position;
            transform.rotation = localGrindDirection.rotation;

            // Start UI elements for grinding, like sliders
            grindBalanceSlider.gameObject.SetActive(true);
            grindBalanceSlider.value = 0; // Reset the grind balance slider
        }
    }

    public void EndGrinding()
    {
        if (isGrinding)
        {
            isGrinding = false;
            // Restore the player’s position and rotation to avoid any snapping effects
            transform.position = startPosition;
            transform.rotation = startRotation;

            // Hide UI elements for grinding
            grindBalanceSlider.gameObject.SetActive(false);

            // Maybe add some logic here for when the player stops grinding, like slowing down
        }
    }

    private void GrindBalanceManager()
    {
        // Modify the slider value over time to simulate a balance mechanic
        grindBalanceSlider.value += grindDirection * Time.deltaTime * balanceDifficulty;

        // Change grind balance direction periodically to challenge the player
        balanceChangeTimer += Time.deltaTime;
        if (balanceChangeTimer >= balanceTimeDuration)
        {
            grindDirection *= -1; // Reverse direction
            balanceChangeTimer = 0f;
        }

        // Clamp slider value to prevent it from going out of bounds (usually -1 to 1)
        grindBalanceSlider.value = Mathf.Clamp(grindBalanceSlider.value, -1f, 1f);
    }

    private void GrindMovement()
    {
        // Perform the grinding movement here
        // You will need to configure this to match the behavior you want in your game
        Vector3 grindTargetPosition = grindPosition.position;
        transform.position = Vector3.MoveTowards(transform.position, grindTargetPosition, grindSpeed * Time.deltaTime);
    }

    private void OnTriggerEnter(Collider other)
    {
        // Check if we hit a grindable surface (you’ll need to tag these objects accordingly)
        if (other.CompareTag("Grindable"))
        {
            Transform grindDirection = other.transform; // Find the grind direction (you’ll have to determine how this is represented in your game)
            StartGrinding(other.transform, grindDirection);
        }
    }

    private void OnTriggerExit(Collider other)
    {
        // Check if we’re leaving a grindable surface
        if (other.CompareTag("Grindable"))
        {
            EndGrinding();
        }
    }
}

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;
    private bool isGrinding;

    // Update method (includes key press logic)
    private void Update()
    {
        // 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();
            // HandleGrindBalance(); // You can implement balance functionality here if needed
        }
    }

    // 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
        }
    }
}

Expertly at a high level integrate script 1 into script 2. Please provide the whole script omitting nothing ready for copy and paste implementation.