Thanks koogy! I combined what you said with my idea and I got this, which seems to be working fine now.
hint (DISABLE_DEPTH_TEST);
cam.beginHUD();
noLights();
if (worldnum == 2) {
image(legends[0], width-320, height-108);
}
else if (worldnum != 1 && worldnum != 2) {
image(legends[1], width-320, height-108);
}
cam.endHUD();
hint(ENABLE_DEPTH_TEST);