I was playing around with Scratch and figured out how to do this, and I thought it looked pretty cool so I shared it! You can copy my code as long as you give credit.