Combine UI buttons with character controller

So for my player(cube) movement i use built in unity character controller, that script is in player.cs and here’s the character controller script i’m using:

CharacterController controller = GetComponent<CharacterController>();
        if (controller.isGrounded) {
            moveDirection = new Vector3(0, 0, Input.GetAxis("Vertical"));
            moveDirection = transform.TransformDirection(moveDirection);
            moveDirection *= speed;
        }
        moveDirection.y -= gravity * Time.deltaTime;
        controller.Move(moveDirection * Time.deltaTime);
    }

The game is for android so i need ui buttons to move the cube not w/s keys, so how do i combine those? I can’t understand any of tutorials i found or that just isn’t for thing i need. I want it to be like 1 button and cube goes x positive, and 2 button to cube goes negative. Thanks.

bump