Will it drink water, ? In hot weather dehydration is what is more urgent to avoid.
Use a dropper or syringe, if it won't or can not drink from a container.
Also, but less urgent, can it eat , and will it, ...?
Hope fully you can take it to a "Ideally an avian vet" as suggested, and ASP,...I also agree
it is not a good idea to be moving, or massaging the legs.
If it is a baby, and does not appear to be fully feathered, you will need to hand feed it, using
a dropper or syringe, this has to be done carefully, there are some topics on that here on the forum, ..Where I am, we don't have "avian vets", any where near, and they are rare even in the cities.
What I use on baby parrots is a very liquid mixture of corn flour, but if you are in a area where
you can get it, there are formulas special for parrots,...
Again, I stress this,..especially if the weather is hot (here it has be 104 f, the last few days) deyhdration can happen rather fast, a baby bird/parrot would not make through the night, until
the next day without at least some liquid,..
I know, some people may say some thing about it not being sanitary, or bacteria, but I have had times with baby birds where they won't even accept a dropper, or syringe,...and just dipping my fingers in water and especially with parrots, they will instinctively try to bite or peck my fingers, since it is a small one, no worry about it hurting you it won't, and when it realizes there is water on your fingers, it will try to get the water, moisture,... it also is very effective in calming the bird/parrot, they realize you are not trying to hurt them, and have something it needs and wants
very much, water.
If it appears fully feathered, it maybe old enough to eat,... have you tried giving it any food ? They like sunflower seeds, (natural, not salted), but also
just a piece of bread, or maybe a piece of apple,...
It is hard to say about the legs, this is where a vet really is necessary,..
Can you give more details ?
Something's wrong with both its legs
Is really vague,... what exactly is wrong with its legs,... are they stiff , or do the just hang limply,...can it move them at all ?