This is a schoolwork (I'm still a beginner pls don't expect much) It's just a dog wanting to get the ball you're holding.
Ummm... My ICT teacher showed how to code this? I also learned how make the ball follow your mouse by checking the inside of a project so yeah