Minecraft wiki entry for Randomizers, associated text: In this example, the minimum value is 10 and the maximum is 20. To start, a dummy scoreboard objective must be created to store the values: /scoreboard objectives add randomizer dummy. Next, two repeating command blocks are needed, both set to "always active". The first one adds 1 point to the score every tick: /scoreboard players add ticks randomizer 1. The second one truncates the value to the aforementioned minimum and maximum: /execute if score ticks randomizer matches 21.. run scoreboard players set ticks randomizer 10 (where "21" is the maximum exclusive value and "10" is the minimum value). Finally, a set of command blocks testing each value are needed, all attached to the single input; for example, /execute if score ticks randomizer matches 12 run say hi will run /say hi (placing [@] hi in chat) if the random value between 10 and 20 is 12. The following schematic shows an example setup where the command blocks testing each value are attached to an input: