Imagine you are the only guitarist in the band and your drummer comes up with a cool rythm. You know the chords, and you know 3 scales: minor, major and phrygian. You have 5 minutes straight to create a guitar part and to make it interesting.
The reason i said all the above is: this riff came out of my head in 5 minutes. So when you finish learning it you will hopefully be able to create something similar - because this riff shows how to combine powerchords and scales to create interesting speed riffs.
With some practice you will soon be able to create different riffs in a very short time.
You're still reading this?? Get on it!
--Pavel