If you overstay your visa you won't be able to leave Morocco until you regularise your immigration status. You could be subject to a fine, a deportation order or a ban from re-entering. If you have overstayed your visa, or are unable to leave due to border closures, contact your nearest police station.