The slice selection gradient (Gs) should be created by a combination of y and z gradients.
Gz = Gs Sin 45o
Gy = -Gs Cos 45o
The phase encoding gradient (Gf) should be created by a combination of y and z gradients.
Gz = Gf Cos 45o
Gy = Gf Sin 45o
The frequency encoding gradient (Gf) will be equal to the x gradient.
Gx = Gf
Please note that the phase and frequency enocding gradients could be switched.