fair-weather friend
Quite simply, a traitor who seems to be your friend when things are going well in your life, but will ditch you the second things start to look bad. Fair-weather friends are often very selfish with sociopathic elements in their personalities, and are usually on the prowl for a poor tool to take advantage of. He/she won't miss an opportunity to use someone to get something. Watch yourself, or you could be the next victim!
Once William lost his job and his house, like a fair-weather friend, Paul was quick to ditch him and look for someone else to mooch from.