How to make probability is 1 in 10?
You could use
random.nextInt(10)
This chooses a random number between 0 to 9. So you would do
if random.nextInt(10) == 1 then //input your code here end