Помоги, пожалуйста, соединить аккуратно эти два скрипта в один:
using UnityEngine;

public class PlayerController : MonoBehaviour
{
	public float speed = 5f;
	
	public const float plane_size = 25f;
	public float boder_limit_x, boder_limit_z;
	
	private bool isBoosted = false;
	private float boost_end_time = 0f;
	private float normal_speed;

	void Start()
	{
		// save initial speed
		normal_speed = speed;
	
		// calculate border_limit considering sizes of the Player
		Vector3 player_size = GetComponent<BoxCollider>().bounds.size;
		boder_limit_x = (plane_size - player_size.x) / 2f;
		boder_limit_z = (plane_size - player_size.z) / 2f;	
	}

	void Update()
	{
		//
		if (isBoosted && Time.time > boost_end_time)
		{
			EndSpeedBoost();
		}
	
		// movement
		float h = Input.GetAxis("Horizontal");
		float v = Input.GetAxis("Vertical");
		
		Vector3 movement = new Vector3(h, 0, v);
		transform.Translate(movement * speed * Time.deltaTime);
		
		// border processing
		Vector3 current_position = transform.position;
		current_position.x = Mathf.Clamp(current_position.x, -boder_limit_x, boder_limit_x);
		current_position.z = Mathf.Clamp(current_position.z, -boder_limit_z, boder_limit_z);
		transform.position = current_position;
	}
	
	public void StartSpeedBoost(float speed_coeef, float duration)
	{
		if (!isBoosted)
		{
			speed *= speed_coeef;
			isBoosted = true;
			boost_end_time = Time.time + duration;
		}
		else
		{
			boost_end_time = Time.time + duration;
		}
	}
	
	private void EndSpeedBoost()
	{
		speed = normal_speed;
		isBoosted = false;
	}
}

using UnityEngine;

public enum ControlType
{
    Keyboard,
    Joystick
}

public class PlayerController : MonoBehaviour
{
    public float speed = 5f;

    public ControlType currentControl = ControlType.Keyboard;

    private Vector2 inputVector = Vector2.zero;

    void Update()
    {
        switch (currentControl)
        {
            case ControlType.Keyboard:
                inputVector = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
                break;

            case ControlType.Joystick:
                // inputVector обновляется извне через SetJoystickInput
                break;
        }

        Vector3 movement = new Vector3(inputVector.x, 0, inputVector.y);
        transform.Translate(movement * speed * Time.deltaTime, Space.World);

        // Пример переключения управления с клавиши Tab (по желанию)
        if (Input.GetKeyDown(KeyCode.Tab))
        {
            if (currentControl == ControlType.Keyboard)
                SetControlType(ControlType.Joystick);
            else
                SetControlType(ControlType.Keyboard);
        }
    }

    public void SetJoystickInput(Vector2 joystickInput)
    {
        if (currentControl == ControlType.Joystick)
        {
            inputVector = joystickInput;
        }
    }

    public void SetControlType(ControlType controlType)
    {
        currentControl = controlType;
        
        if (controlType == ControlType.Keyboard)
        {
            inputVector = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
        }
        else if (controlType == ControlType.Joystick)
        {
            inputVector = Vector2.zero;
        }
    }
}