take a value from a scrollbar unity code example
Example: unity get scrollbar value
// To get the value of a scrollbar, use below
gameObject.GetComponent<Scrollbar>().value;
// To get the value of a scrollbar, use below
gameObject.GetComponent<Scrollbar>().value;