Inverted Movement

Help
My movement is normal going sideways but inverted going forwards and backwards
Heres The Script

using UnityEngine;
using System.Collections;

public class Igrac : MonoBehaviour
{
    public bool controllable = false;

    public float speed = 7.0f;
    public float jumpSpeed = 6.0f;
    public float gravity = 20.0f;

    private Vector3 moveDirection = Vector3.zero;
    private CharacterController controller;

    // Use this for initialization
    void Start()
    {
        controller = GetComponent<CharacterController>();
    }

    // Update is called once per frame
    void Update()
    {
        if (controller.isGrounded && controllable)
        {
            moveDirection = new Vector3(Input.GetAxis("Vertical"), 0, Input.GetAxis("Horizontal"));
            moveDirection = transform.TransformDirection(moveDirection);
            moveDirection *= speed;

            if (Input.GetButton("Jump"))
                moveDirection.y = jumpSpeed;

        }
        moveDirection.y -= gravity * Time.deltaTime;
        controller.Move(moveDirection * Time.deltaTime);
    }
}

You are setting up movement as absolute values of the world: input on the joystic vertical axis is set to become the x component, horizontal joystick axis becomes translation along the z axis. This may work, but presumes some settimgs.

First, Unity is usually set up that you are looking down the negative Z axis, so this can be confusing.

But rather than setting up your movement using absolute values, which will break the moment you turn the player object, you can use the object’s forward and rigt vectors:

moveDirection = new Vector3(0, 0, 0);
moveDirection += Input.GetAxis("Vertical") * transform.right +  Input.GetAxis("Horizontal") * transform.forward;
moveDirection *= speed;