the short answer, if you really do mean melodies, is to look at jazz tunes or other genres that push the harmonic envelope.
If you mean bass lines, explore some of the motown and funk and stuff that uses chromaticism more.
Long answer:
But don't be too hard on yourself for creating things that fit into the pentatonic -or any- scale. Pentatonic scales were deduced from the fact that their tones are so inherently melodic and supportive of the harmony - they sounded good to people long before anybody named them and wrote theory books/courses about them. This applies to all theory : it was just musical eggheads asking :why does this sound good? is there a systematic way to continue sounding good?
I think your experiencing a phenomena like what a fellow musician once called "Jazz Damage": You begin to realize how everything you make up that sounds good to you also fits neatly into standard music theory concepts, and it can be a bit of an ego blow "aw man, you mean Bach already thought of this?. " So you begin trying to push the envelope and break the rules, and trust your ears less. The downside is that this can devolve into hyper intellectualized atonal wanking.
Learn theory so you can communicate with other players, and so you can easily transpose your ideas to fit new situations. But if you want to play what pleases your ear, then by all means stop over thinking and just trust your ears. Figure out the theory later, when you need to explain it to others or change keys
