how to make my character shoot in the Y and X axis

how to make my character shoot in the Y and X axis is a 2d game

This is too vague! Anyway, slow projectiles usually are instantiated from a rigidbody prefab, then you add a force or set its speed to the direction you want to shoot - something like this:

var projectile: Rigidbody; // drag your prefab here (must have a rigidbody)
var dirX = Vector3.right;  // direction X
var dirY = Vector3.up;     // direction Y
var speed: float = 10;     // bullet speed

function Update(){
    if (Input.GetButtonDown("Fire1")){
        var bullet: Rigidbody = Instantiate(projectile, transform.position, Quaternion.identity);
        bullet.velocity = speed * dirX; // shoot in the X direction
    }
}

Select dirX or dirY in the last line to define the shooting direction.