Engine rev

not that i've heard or expereinced.
but airleaks that cause piston failure, and dirty carburetors can result in revving.
both by causing a lean condition
 
Well I have a yz 125 and it rev and I adjested the carb and it stop then I but the adjustment back the way it and it stop then I rode it for a little bit and it lost compression and wouldn't start
 
sounds like that adjustment you made to correct a dirty carb or an airleak, fried your piston
a leakdown and compression test is your next move, then report your findings
 
Do I read this right, you replaced a piston because it lacked compression, and you rode the bike with the new piston and now you have no compression.

Did you investigate why you had no compression, like doing a leak down test or even a plug chop to see if the correct jets are in the carb.

Did you do heat cycles and a break in proceedure on the new piston or did you just ride it?

The revving says to me that you you have an air leak and you have tried to mask it by messing with adjustment of the carby.