That is a very bad idea, implementing this would result in a massive state apparatus that would be insanely expensive to run and most inefficient.
People down on their luck would have to go through months of tribulations to prove they have the right to not starve, losing time not actually trying to climb out of their hole.
Also the point of UBI is that it is unconditional (The U stands for Univeral). It is supposed to be a simpler, fairer welfare system that allows everyone to focus on improving their lives instead of trying to survive.