When i plug my magsafe into my mac it starts charging but suddenly it stops then
when i go and plug my mac to another magsafe it continues charging?
Sounds like it is the charger.
I would take it to an Apple Retail Store or an Apple Authorized Service Provider (AASP) for evaluation, or call your nearest Apple Contact Center. Visit the Genius Bar at the Apple Retail Store, make a reservation.
If that is not convenient, then on-line: