Filter contours on 'Z' axis

I am using the animate tool in number sliders to export individual contour layers. My goal is to create a series of .bmp files, each containing n different contour extracted from the Z-axis. As the number slider increases, it filters out a higher Z value for the contour. This way, I can later edit the animation, ensuring that in each frame, the most recent contour appears with a thicker line weight than the ones below it. So my question is… how can i filter the contour using a number slider to show just one contour at a time on the Z axis.

Example of contour and GH script so far below. Thanks.