This is a test program designed to tell you how far away one sprite is from another. Ten steps = 1 for the distance variable. Feel free to go in and take the script if you want, just credit me in the project you use it for. I did try making a toggling on/off button to make the bear move randomly, but I haven't fixed all the bugs yet so you'll see that in there. Another thing; the farther you are from the bear the longer it will take for the distance to update.
Everything in this project (sprites aside) is entirely original. I want to be able to make it quicker and more effective, so if you have ideas please share them in the comments below.