can anybody help me to get the sound in the ending part (lead melody) of Avicii's song "The Days" by using pedals? All I can think about is to use EHX's Hog2 in combination with an overdrive, also it would give me enough versatility for other songs like this..
Any other ideas?
It doens't have to sound perfectly the same, I want to get just close enough to the sound
A guitar is never gonna sound anything like that.

HOG can add octaves above and below which will sound a little like this.

The sound also has a very fast synthetic vibrato at times. Maybe jiggle your whammy bar up and down really fast?

A lot of the character of the sound is white noise.

A fuzz like the Big Muff can turn your guitar sound into a squarer wave.

A noise gate can cut off the sound when it dips below a certain dB. This can be used to make your phrases end jarringly synthetic.