script - IF and Text

Q1 - How do you write up a IF in a script?

Q2 - i want to write a phrase in the X-Y plane
How do i do that in a script?
how do i specifie the position in X-Y-Z?

Q3- is here a list of all the function for the Math librairie?
Thanks & Salutations