u no when u want to make a song that u have heard b4, lets just say i heard the Mc Donalds I'm lovin it tune, wht is the easiest way of creating tht tune on guitar, do i use any scales?
You could use scales, yes.

You could mess around for a bit trying to find a suitable key, and then mess around with the rest of the scale tones. You could find out what key the song you want to emulate is in before hand, then work from there with the rest of the scale. Those are options using theory; if you have any knowledge.

Otherwise you could just go completely by your ear - just fiddle around and you'll know when it sounds right and when it sounds wrong. Obviously, theory will be involved, but you'll be oblivious to it.

Another thing would be try to emulate a state of experience - something I learned from a certain Mr. Steve Vai. Basically, using your emotions, feelings and thoughts to re-create them on your guitar, whether it's a melody, chord progression, a whole sonata or a single note.

You could listen to the song you want to re-create and immerse yourself in it being aware of how it's making you feel and how you're interpreting it, then use that as a guide along with your ear; even if you don't figure out the song, everything you play is going to be emulate of your emotions & thoughts, which is priceless.

Failing all that, I've heard rumours that UG hosts tabs.
What I would do is guess at what the intervals are, and then play them on a guitar. If it doesn't sound right (it rarely does the first time) I play around with the intervals to see if I can get it to sound right. The next step is to find the starting note, but if it's something like the McDonald's "I'm Lovin' It" tune, the starting note doesn't matter.

BTW, I think I was playing around with the guitar and stumbled upon the McDonald's "I'm Lovin' It" tune accidentally.
Just choose one. Haha I just fooled around with that and I just found the mcdonalds tune in under 2 minutes. You can do it all on one string, I chose the B string.
I think in something such as....primative.....as the "Im loving it" tune you dont really need to figure out any scales, its probably some simply notes, maybe even some harmonization.