Use Turbo Mode (hold shift while clicking the green flag). Don't click the keyboard; it will play automatically when the Play Scale or Play Chord buttons are clicked. Only one of the Play buttons will be visible at a time; use the chords / scales selector to choose which one is active. Use the other controls to determine which scale or chord will be played, what the root tone will be, etc.
I used 'flat' and 'sharp' vector images from ClipArtLogo.com; here's the link: https://www.clipartlogo.com/image/free-vector-music-dj_328009.html. Other than that I simply used images and fonts from the Scratch libraries and modified them for my own purposes. I wrote all the code myself. I'm learning to play piano and I plan to use this program along with my piano books. It will be fun to hear the notes as well as see them when I'm learning a new scale or chord. The code inside could use simplification; I was thinking about additional features while putting it together. My original plan was to show recommended finger positions as the keys are being played. I'm sharing without having put that in; if anyone would find it helpful, let me know. Also, if you find something not working please call it to my attention. Feb-27-2018 update - added Pentatonic scale to the list. Jan-05-2019 update - made Tempo disappear in chord view.