The only way this works is being direct and honest, but without drama. You need to have a clear conversation where you tell him you can't keep lending money, and that's it. It's not about offending or not offending - it's about setting a boundary that should've existed a long time ago. Something like "look, I value our friendship but I can't keep lending you money. I've realized it doesn't get paid back and it's affecting me. I really can't do it anymore" works because it's simple, honest, and leaves no room for interpretation.
The important thing is don't give him explanations that sound like excuses ("it's just that money's tight this month" or stuff like that), because that opens the door for him to insist or suggest "just this one time". If he says he's offended, that's his problem, not yours. A real friendship should survive this - if it breaks because you set a reasonable boundary, then it wasn't that solid to begin with.
After that conversation, when he asks again, the answer is short and guilt-free: "I can't, we already talked about this". No extra justifications. If he insists or keeps asking, that's when you see if you want to keep being friends with someone who doesn't respect what you said. It's awkward, but it's way less awkward than becoming his ATM.