Drag the light gray circle on the right hand side and release. The string then gets faster and faster and the oscillations become smaller and smaller.
By George Willcox Increased speed to look more realistic, removed all the unnecessary code and sprites. Runs smoother and better. Thanks to @2002aidan for providing the main code! UPDATE: Now works in the Y direction too. Only works if on the right hand side due to bug, now cannot be placed on the left. Improved physics.