For the major scale, it's all about the slide between the 6 and 7, whether you're working with the E-shape major scale pattern, or adding the 4 and 7 to the 3-2 major pentatonic: