Improvising well is nothing more than practice. Over time, you learn to avoid the stuff that sounds crap. There is no magic answer I'm afraid....
Jimmy is right on linking the patterns so you can move across the neck. Playing the scale along one string horizontally as well as in a standard box is also helpful, but developing licks is something you have to do yourself. I'd recommend listening to other players and seenig how they do it - I've ripped loads off Satch and Vai if I'm honest :D
Might also be worth grabbing a G3 DVD or something to watch it happening too...
Check out my music, video, lessons & backing tracks here![br]https://www.renhimself.com