Walking on Sunshine makes some good points (as always!) and she always rightfully thinks of safety of the children first.
What I would offer is that the reason the rooster is attacking you is because it's in his nature to protect the flock, to ensure he's the most dominant in the flock. Some part of me recognizes that his bad behavior, if he was in the wild as were his ancestors, is exactly the behavior that helped the chicken line survive all the predators that wanted to eat them! Saying this does NOT mean I tolerate or excuse bad rooster behavior, but it helps to "think like a chicken" and I try to I keep this in my mind. Understanding is often the first step to modifying bad behaviors, after all.
That said, there are a few schools of thought on how to handle this. One is to instantly move to culling the rooster. Most of us want to at least try a few things before we take go this irrevocable option as death is very final. Another action is to show the rooster that you are more dominant than he is. Search in the above search bar on "aggressive rooster" or anything similar and you'll find many posts on this topic with suggestions on how to show a rooster that you are higher in the pecking order than he is. But, in a nut shell, the idea is when he attacks you, don't back down. If he attacks your feet, give him a little roll with your foot. Don't hurt him, just sort of gently kick him so he does a little barrel roll. This might take a few tries but sooner or later, he'll usually stop and back down. Remember that in chicken behavior, he who backs down first is the loser. If the little boot kick doesn't do the trick, try chasing him and he should run away. If you can catch him, do so and pick him up, hold him nicely but tightly and maybe sit with him for a few minutes. I tend to pet him and talk to him nicely just to show him I'm the boss. I also repeatedly put my hand near his beak and if he tries to peck my hand, I'll hold my hand under his chin along his neck so he can't, which he doesn't like. Then, I'll let go of his neck, pet him some more, then try putting my hand near his face again. I do this until he no longer tries to peck my hand and instead, turns his head away from my hand. This is his way of saying, "Fine, you win. You are higher in the pecking order then me." At this point, I put him gently down on the ground.
Depending on how stubborn he is and just his general nature, plus how he was raised, how long his aggressive behavior has been tolerated by humans, etc. will determine how many times you have to do this and if it will even work at all. As you can tell, my rooster has mis-behaved towards me and others. We've tried what I'm suggesting and it has worked for us. It only took a few times and he just got the message. But all roosters are individuals so give it a try and see if it works for you. Or, try some of the other suggestions you'll find in this forum. If it doesn't work, you can always cull but once you cull, there is no turning back. And remember, if he was in the wild, he would be doing exactly what he's supposed to be doing. He's not in the wild but recognize that to him, he's simply doing his job and he's in fact, actually the best at it of all the roosters because he's the toughest of all.
Hope this helps,
Guppy