You can use magicam and do that in no time.
But if you want do it yourself by event then you will need some variables and it should look something like this
on mouse click:
Set old_Mouse_AbsoluteX to Mouse.AbsoluteX
Set old_Mouse_AbsoluteY to Mouse.AbsoluteY
Set old_scrollX to scrollx*LayoutScale
Set old_scrollY to scrolly*LayoutScale
on mouse button is down
set scroll to:
X (old_ScrollX+old_Mouse_AbsoluteX-Mouse.AbsoluteX)/LayoutScale
Y (old_ScrollY+old_Mouse_AbsoluteY-Mouse.AbsoluteY)/LayoutScale
I'm not on my pc currently but this should work fine.