Can you make a script which puts in the chance of an animation occurring and if it doesn't happen then another one happens instead. But using on Key down functions.

Like when you press the key: R there is a 70% chance of one animation playing, but a 30% chance of another.

And then a cool down of 40 seconds before you can execute this process again.

Thank you in advance.