How to change movement script for computer for android.

Hello, i have this script but it is made for a computer not android. i am trying to make this game for android i am stuck on the movement. if you can make it into an android script i already have a joystick pack press here to see. Here is the script,

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

public class Movement : MonoBehaviour
    public float walkingSpeed = 7.5f;
    public float runningSpeed = 11.5f;
    public float jumpSpeed = 8.0f;
    public float gravity = 20.0f;
    public VariableJoystick variableJoystick;
    public float lookSpeed = 2.0f;
    public float lookXLimit = 45.0f;

    CharacterController characterController;
    Vector3 moveDirection =;
    float rotationX = 0;

    public bool canMove = true;

    void Start()
        characterController = GetComponent<CharacterController>();

        // Lock cursor

    void Update()
        // We are grounded, so recalculate move direction based on axes
        Vector3 forward = transform.TransformDirection(Vector3.forward);
        Vector3 right = transform.TransformDirection(Vector3.right);
        // Press Left Shift to run
        bool isRunning = Input.GetKey(KeyCode.LeftShift);
        float curSpeedX = canMove ? (isRunning ? runningSpeed : walkingSpeed) * Input.GetAxis("Vertical") : 0;
        float curSpeedY = canMove ? (isRunning ? runningSpeed : walkingSpeed) * Input.GetAxis("Horizontal") : 0;
        float movementDirectionY = moveDirection.y;
        moveDirection = (forward * curSpeedX) + (right * curSpeedY);

        if (Input.GetButton("Jump") && canMove && characterController.isGrounded)
            moveDirection.y = jumpSpeed;
            moveDirection.y = movementDirectionY;

        // Apply gravity. Gravity is multiplied by deltaTime twice (once here, and once below
        // when the moveDirection is multiplied by deltaTime). This is because gravity should be applied
        // as an acceleration (ms^-2)
        if (!characterController.isGrounded)
            moveDirection.y -= gravity * Time.deltaTime;

        // Move the controller
        characterController.Move(moveDirection * Time.deltaTime);

        // Player and Camera rotation
        if (canMove)
            rotationX += -Input.GetAxis("Mouse Y") * lookSpeed;
            rotationX = Mathf.Clamp(rotationX, -lookXLimit, lookXLimit);
            transform.rotation *= Quaternion.Euler(0, Input.GetAxis("Mouse X") * lookSpeed, 0);


The link doesn’t work, but if you’re talking about the free Fenerax joystick pack on the asset store Fenerax joystick package

Then you can replace Input.GetAxis("Horizontal") with joystick.horizontal, for example. Here’s some general code:

public VariableJoystick joystick;

void Update()
     // Same as Input.GetAxis() for horizontal/vertical asx
     float x = joystick.horizontal;
     float z = joystick.vertical;

     // Movement code...

Thank you so much but do you know how to change the rotation bit to be a finger instead of a mouse