How to randomly activate a fucntion

It worked, thank you so much for your time and help.