How to transfer music from iPhone to iTunes without the music being deleted

Ok so my macbook recently had to get a new hard drive (i think thats the name of it) and all its data is erased. Now when i try to get on iTunes to download the music from my phone, it says if i sync the music only the music from the iTunes library will be on my phone and all of my phone music will be deleted. I think there's a way to do it with a disk but i'm not sure how to get music from my iPhone on to a disk either.

any help and suggestions on how not to get my music deleted but to be able to sync my music to my macbook?

I recommend you Aiseesoft iPhone Transfer for Mac, so just try this