Create 2 objects: the actual bar and the area the bar sits in. These should be created in a layer with parallax set to 0 (so these objects won't scroll). The bar needs some instance variables as well (IsClicked)
Then add the following events:
If bar clicked ----- set bar.IsClicked to true
if mouse click released && if bar.IsClicked = true ------ bar.IsClicked = false
If bar.IsClicked = true ------ set bar position (self.x, mouse.y)
EveryTick --------- Scroll to position (scroll.x ,( bar.positionY * some scale factor))
Because you have the scroll bar in its own layer that does not scroll, it should remain in place regardless of scroll. Some scale factor, if set to 1, will scroll as far as you move the bar. I would set this to 2 or 3 depending on how far you need to scroll.