Help with Double Jump

Help i want to know how to double jump, i got rid of collision and put [up] keyboard on switch on yet that means they can jump 'till they’re at the moon. was wondering if there is a block that can make it so you can only do something for a certain amount of times before a set cool down.

i tried setting a 50 ms timer, just prolonged the failed attempt

https://flowlab.io/game/view/1059658
I hope this will be helpful.