How can I change the brightness with a slider?

Here you go