Only requires 2 lines of code and no blocks!! If you use it please give credit
Might be a little confusing so just use the code inside if you don't understand. https://scratch.mit.edu/projects/960287062/editor/