If a slider is in a simple zscript (displayed in the ZScript Window) then the path is of the form zscript:slidername, so for a slider called 'Width' you would use [IGet,zscript:Width] to get its value.
When writing a plugin it is often easier to keep it as a simple zscript until the basic functionality is there. This is because once a plugin is loaded it becomes part of the interface and does not update if you reload the text file, meaning you have to restart ZBrush to test any changes.
There are ways around this. If you 'close' the plugin interface then it is no longer part of the interface and reloading will update the whole plugin.
If you have a sub-palette with a path ZPlugin:Test Stuff then using the command
will remove the sub-palette and all its buttons from the interface. Use with care though. Closing a sub-palette from within a plugin that resides in that sub-palette will crash ZBrush. Also closing and reloading mean that the plugin interface is assigned new numerical IDs each time. Restart ZBrush every so often so that the limit (whatever that might be) is not reached.