I would:
Ask them what they want in their future. Would they want to be successful or live on the streets? Do they aspire to have a big house?
If I was getting good grades in the subjects, I would ask if I can help the friend understand and tutor them.
I would talk to the parents. They know their child better than I would, they can try to persuade the friend to stay.
On a more personal level, remind the friend how much they mean to me and how school cannot be the same without them and their personality.
:)