Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "criteria": {
- "nothing": {
- "trigger": "minecraft:impossible"
- }
- },
- "rewards": {
- "commands": [
- "advancement revoke @s only command:maths/factorial",
- "scoreboard players add @s sc 0",
- "tellraw @s[score_sc_min=0,score_sc=0,score_ix1=-1] {\"text\":\"Your number is too small!\"}",
- "scoreboard players set @s[score_sc_min=0,score_sc=0,score_ix1=-1] sc 3",
- "tellraw @s[score_sc_min=0,score_sc=0,score_ix1_min=13] {\"text\":\"Your number is too big!\"}",
- "scoreboard players set @s[score_sc_min=0,score_sc=0,score_ix1_min=13] sc 3",
- "scoreboard players set @s[score_sc_min=0,score_sc=0] ox1 1",
- "scoreboard players set @s[score_sc_min=0,score_sc=0,score_ix1_min=0,score_ix1=0] sc 2",
- "execute @s[score_sc_min=0,score_sc=0] ~ ~ ~ scoreboard players operation @s ic = @s ix1",
- "scoreboard players set @s[score_sc_min=0,score_sc=0] sc 1",
- "execute @s[score_sc_min=1,score_sc=1] ~ ~ ~ scoreboard players operation @s ox1 *= @s ic",
- "scoreboard players remove @s[score_sc_min=1,score_sc=1] ic 1",
- "scoreboard players set @s[score_sc_min=1,score_sc=1,score_ic=0] sc 2",
- "advancement grant @s[score_sc=1] only command:maths/factorial",
- "tellraw @s[score_sc=2,score_sc_min=2] [\"\",{\"text\":\"Factorial of \"},{\"score\":{\"name\":\"@s\",\"objective\":\"ix1\"}},{\"text\":\" is \"},{\"score\":{\"name\":\"@s\",\"objective\":\"ox1\"}}]",
- "scoreboard players set @s[score_sc_min=2] sc 0"
- ]
- }
- }
Add Comment
Please, Sign In to add comment