Interaction with Slider Bar

What does your logic for the slider look like?