How about the code when the ball is retracted and returned to its original position?

You expect us to do that for you?

You did not even format your code which means you haven’t even read the pin thread on how to ask question which you are suppose to read before posting something. I’m speaking of this one in case you are interested: Guidelines—Tips on Asking Questions

And most importantly you don’t even write a sentence in your post… I’m not even speaking of politeness words like “hello” or “please” or “thanks”… I’m just speaking of the fact that there is not a single word… just a video and your code…

So please edit your post and be more friendly, maybe someone will consider helping you then.

And trust me, I’m taking on me to not be rude!