Because you are using directly Vector3.someDirecton, like
transform.position += Vector3.right * Time.deltaTime * moveSpeed;
you simply move along axis, x (left/right).
So you need some form of direction detection. Does your character rotates toward mouse?
If so, you can use instead Vector3.right, use transform.right.
There is multiple ways, to achieve the same mind.
Also, please use
** Using code tags properly **
You can edit main post.