Cats learn best by positive reinforcement - negative-based "punishment" only results in them learning to fear you.
Any time she uses the litter box, praise her to high heaven. And as Pami pointed, out, when out playing, make sure there's a litter box nearby. You may want to consider putting out a number of boxes until she grows a little older.
Also, at this point you need to purchase a black light and run through the house with it. Any place that has a yellow splotch is kitty urine, and it needs to be completely cleaned with an enzyme cleaner. Nature's Miracle is one, and is pretty much available at most supermarkets or pet stores. We prefer knok-out (http://www.nokout.com/odor.html
), but it's more expensive and you have to wait the shipping time.
But wherever she's peed not in the box, you must completely douse with an enzyme cleaner. If on carpet, it needs to be soaked down to the floor boards. Then cover the area with aluminum foil until it dries - which should take a couple of days. If you smell ANYTHING even slightly ammonia-like after the first application, apply a second. The problem is that once they start peeing out of the box, any place that smells like pee is simply a place to go to the bathroom, and it has to be cleaned up to the kitty's nose, not our noses - thus the enzyme cleaner.
You may also want to consider purchasing a product called "cat attract." Many pet stores carry it. Our vet carries it. Used according to the directions, it really helps.
But additional litter boxes, lots of praise for litter box use, and cleaning up any soiled areas should really do the trick.
Remember - she's just a little baby. At 5 weeks, she is VERY young - and she needs help with her potty training. She really shouldn't be punished for being excited. It's just like with a human baby - you need to help her use the potty, and it'll be a lot more productive to do it with praise for doing the right thing.