There are no 'if' statements in popcornfx scripts. (There once were, and might be once more after version 2.0 is released, but currently, they aren't available)
to do the equivalent of 'if' statements, you'll have to use the 'select' or 'iif' builtins ("iif" stands for "immediate if" or "inline if"):
if (Life < dt * 3)
Color = float4(0,0,0,0.5);
Color = float4(1);
Color = iif(Life < dt * 3, float4(0,0,0,0.5), float4(1));
Color = select(float4(1), float4(0,0,0,0.5), Life < dt * 3);
Compared to real 'if' statements, in addition to the visual syntactic difference, this has the disasvantage of having to always compute both statements, then select which one it should use based on the condition.
so you won't be able to use selects or iifs to avoid performing expensive computations such as scene intersections or spatial layers lookups.