I figured it out.
if (degrees >= 175){
dega = 1
if (dega == 1 && degb == 1){
rotation = rotation + 360*int(-angle) + 720
degb = 0
}
}
if (degrees <= -175){
degb = 1
if (dega == 1 && degb == 1){
rotation = rotation + 360*int(-angle) - 720
dega = 0
}
}
if (degrees < 175 && degrees > -175){
dega = 0
degb = 0
}
total = degrees + rotation;
this._rotation = total
ring._rotation = int(total/7.5);
};
Its a bit sloppy, but works. I hope this helps the next
person that needs to do gears.