Help with top down camera movement

Hello everyone,

I’ve been trying to figure out how to make a moveable top down camera.
Basically something like League of Legends or clash of clans.

I’ve tried to make it a lot of times and I always failed.

The thing I need help with is basically top down camera and when you’re holding RMB you can move it but when you release RMB it locks onto your head again. Please help me with that.