Conditionals.
If touch.y is greater than gold then set the variable to touch.y-gold*gspeed, else set it to touch.y+gold*gspeed.
With the ? indicating the if, and the : indicating the else.
Basically test if something is true, if it is, then it sets it to the value following the question mark. If its not then it sets it to the value following the :.
In this case it determines if you are going up, or down.
At least I think that's how it works, the script does seem familiar.