You can press the 'See inside' button above to check out my code. Check out my other Scratch projects. Using the Simulation: Press the green flag to start. Hold and release the mouse to launch the cue ball. The farther away from the ball you click, the harder the hit. Note: Sometimes there's a glitch where the balls get stuck inside the walls. I will fix this in the next update.
Programming ideas from Ball Throwing! by Ecliptic. Original vector graphics.