Magnetar as a Central Engine for Long-Duration \(\gamma\)-ray Bursts and Superluminous Supernovae