Slider var global

Made the slider variable global