Conditional Blocks
Using conditions, you can instruct AnyDice to only exectute a block of instructions if a specific condition is true. Optionally, you can also define an alternative block it should execute when the condition is not true.
X: 1 if X = 1 { output 1 } else { output 1d6 }