There are posts on here about whether Aspies are susceptible to scams which might be helpful. That said, yes, I have given money/food to people on the street though not often because I rarely carry cash on me anymore. In Boston, there is an area nicknamed "Methadone Mile" because there are a lot of drug users and homeless people. It just happens to be next to a McDonald's, my idea was to get a bunch of $5 McDonald's gift cards and hand those out when people asked. That was back when there was a dollar menu and $5 could buy you 5 hamburgers but it'll still get them something.
My first job was as a homelessness case manager and there are a lot of misconceptions about what homelessness looks like. Some homeless people have jobs, some of them have cars, and families, and responsibilities. I know there are a lot of urban legends about people who beg on the street and then drive home in Cadillacs but I would suspect this almost never happens and if it does...maybe that's the only thing the person has left in their name...maybe they sleep in their car. I think we tell ourselves these things and convince ourselves that these people are liars because it absolves us of our guilt. I strongly believe that most able-bodied, able-minded people would prefer working over going through the humiliation of sitting on the street begging for money. It's not like it's a get-rich-quick scheme and it's certainly not a pleasant experience. I doubt these people are even collecting the equivalent of minimum wage and they get a lot of vitriol in the process.
Perhaps, the guy wasn't lying to you. Giving him $7 was extremely kind of you but maybe he thought if he asked a few more people he could actually fill up his tank instead of just getting enough to go home. Or maybe it was a lie but he desperately needs the money and realized that having a sob story would garner more sympathy than just saying, "I'm homeless, please give me cash."
One thing to note, I do sometimes hesitate because I don't want the money to be used for drugs or alcohol but I also don't judge. A homeless man once asked my law school roommate for money. They were next to a Chipotle so my roommate offered to buy him a burrito instead. Well, the homeless guy declined and said he really wanted the money to go to the liquor store next to the Chipotle. At least he was honest haha. My roommate thanked him for his honesty but didn't give him the money, of course. I wouldn't have either but being homeless is awful and many of them are experiencing great despair and trauma. I can't honestly say that if I had to sleep, eat, use the bathroom, etc., on some street corner that I wouldn't seek out substances to help numb the experience. I'm not condoning it, just saying that I understand.
Lastly, even if you don't give them money, I hate when people just ignore the homeless and act as if they don't exist. I recall a homeless man asking me for change. I briefly stopped, apologized, and said I didn't have any money on me. Despite not giving him anything, he got teary-eyed and thanked me for acknowledging his existence and treating him like a human being.
So, I don't think you were scammed. Perhaps, the guy was dishonest but I want to believe that you genuinely helped someone in need. And even if it was a scam, I don't think that your kindness/willingness to help is something you need to change. I don't think you are a bad person if you never give another dollar to a homeless person. It's a choice. But continue to be humane and continue to be kind. And if being kind, means that you occasionally give a couple bucks to someone who didn't really need it...oh well. We give a lot more money away to a bunch of rich people who don't deserve it. *Cough...Elon Musk...richest man in the world* *Cough....congratulations on the new Tesla...cough
*