Phosphorylation of the transcription factor Mad determines whether it mediates Wingless or BMP signaling.