The key to training a cat is that feedback (positive or negative) must be immediate and consistent.
If your cat bites or scratches, then you must make a noise using a hurt or angry tone while they are doing it. If your reaction is delayed, they will have trouble associating it with their actions as the cause and may just think you're randomly being a jerk.
Then, once that link is established, deliver the negative feedback: move them off your lap or even give them a short time out in another room. The key is to deprive them of something they want, which is most likely your attention in the case of playing too rough.
They will be unhappy about this result, of course, but if you (and anyone else in the household) are consistent about it, they will make the connection fairly quickly and try modifying their behavior to see if it stops happening.
Note that this is exactly how kittens learn to play with each other: if they are too rough, the other kittens cry and run away, but if they're not, they get a fun playmate. Human skin is a bit more delicate, so that requires adjustment on their part, but the overall learning process is the same.