You could multiply the $random variable by 10 to get a number 0-10
Edit:
Adding a couple photos to better show what I did. This isn’t an exact solution to your problem but this will get you a randomly generated number from 0-10.
This is the syntax I followed. This will speak a message each time the Front Door is opened so unless this is what you want you may want to add an extra condition(s).
IF
Front Door changes to open
Then
(Using Location)
Wait 5 seconds
Set number variable (Your Variable) = $random * 10
(Using Your Text To Speech Synthesizer)
Switch (Your Variable) Do
Case 0
Speak “Message”
.
.
.
Case 10
Speak "Message"
End Switch