Learn the 3 notes per string major scale in all positions on the neck. Or atleast the 1st, 5th and 4th positions for starters. Learn it with alternate picking and legato.
To get it up to speed, get a metronome. Start with a really slow and boring tempo where you can clearly think about the next note before fingering it. Also, make sure you do not cheat with your picking - you should stay strictly alternate picking (downstroke followed by upstroke followed by downstroke etc). Or for legato, only first note of the string played by downstroke while ascending and upstroke while descending the scale. Make sure your timing is perfect even if you cant speed up. Speed is a product of more practice and will develop over time but if you mess up your timing, unlearning the bad habit is a terrible thing to go through.
Try out Satch's Always With Me... Gives you a good legato workout. Try to get it as exact as possible, especially in places where he plays a flurry of quick notes (legato runs).
Alternate picking might take a little more patience as both your hands need to co-ordinate to get each note right, as opposed to more fretting hand focus for legato. But anyways, I thought it is easier to speed up one hand at a time. I love Zakk Wylde style licks so I would recommend you try his famous six note pattern in the solo on No More Tears. It is a tough ask if you are a beginner but Zakk's licks are very aggressive and useful for improvisation.
Hope this helps...
-- My current rig
Guitar: '98 MIJ Ibanez RG520 QS w EMG 81/60
Amp: Laney LC15R Tube, Fernandes 20W SS
Pedals: MI Audio Tube Zone Overdrive, Boss OD3, CS3, MT2, HM2, DS2, CE5, DD7, TU3, Beta Aivin DD2 Delay, Dunlop Crybaby 95Q, Stranger Vol Pedal, BBE SupaCharger
Others: Yamaha RBX 374 Bass, Yamaha MM-6 Synth, M-Audio Fast Track, Shure SM-57, Heet Sound E-Bow Plus
Wanted(pm if selling): EB VPJr/Boss FV500L,Ibanez w Original/Lo-Pro Edge