When the scrolling text stops

hi, i’ve a question
There is any action that can be used when the text in a scroll reaches the end?

I mean, i am trying to make a scroll that when it reaches the bottom end (when there is no more text to scoll) a function to be call (a function that will make a sphere to change its color.

And this also backwards

Help please :geek:

pleease!!!