Although your status as an undocumented worker prevents you from working lawfully in the United States, it does not prevent you from receiving workers' compensation payments if you are injured.
Accepting an offer from your boss after suffering an injury at work should be delayed until you have spoken with an undocumented worker attorney in New York. Taking a financial payment and moving on with your life could be alluring. However, your boss can pay you substantially less than your case is actually valued. Before accepting any payout from your job, you should get a free evaluation of the value of your case.