I assume you meant that the if-then is in a trigger. If you didn't mean that, then you must put it in a trigger for it to work the way you want. Optionally, you can have your final waypoint execute a script that has the if-then statement.
If you use a trigger, in the condition field, the following code:
done
That's it. When done is true, the condition will be met and the trigger will activate. Have this trigger perform End #1.
Make a second trigger, but put fail in the condition field instead. When fail is true, then this second trigger will be activated. Have this trigger perform Loose (which should be spelled "Lose").
Depending on how your mission is made, it might be possible for both done and fail to become true at the same time (or nearly the same time). You might want to use safer code, such as the following:
done and not fail
and
fail and not done