RNG 1.21.4
More Info in 1st Comment trashloot.mcfunction:
#trashshute animations and sounds schedule function rpanon:trashshute/trashshute_sounds/loot_event1 30s append schedule function rpanon:trashshute/trashshute_sounds/loot_event2 40s append schedule function rpanon:trashshute/trashshute_sounds/loot_event3 50s append #next event schedule function rpanon:trashshute/trashloot 60s append #run the rng loot function function rpanon:trashshute/rngtable``` rngtable.mcfunction example: ```say Distributing Loot function rpanon:trashshute/rng #common execute if score @r rng matches 1..6 run execute at @e[type=minecraft:marker,tag=tag_loot1] run summon item -18330 106 5472 {Item:{id:"minecraft:poisonous_potato",count:1}} execute if score @r rng matches 7..12 run execute at @e[type=minecraft:marker,tag=tag_loot2] run summon item -18313 106 5472 {Item:{id:"minecraft:snowball",count:1}} execute if score @r rng matches 13..18 run execute at @e[type=minecraft:marker,tag=tag_loot3] run summon item -18313 106 5472 {Item:{id:"minecraft:kelp",count:4}} execute if score @r rng matches 19..24 run execute at @e[type=minecraft:marker,tag=tag_loot1] run summon item -18330 106 5472 {Item:{id:"minecraft:feather",count:9}} execute if score @r rng matches 25..30 run execute at @e[type=minecraft:marker,tag=tag_loot2] run summon item -18313 106 5472 {Item:{id:"minecraft:rotten_flesh",count:2}} execute if score @r rng matches 31..36 run execute at @e[type=minecraft:marker,tag=tag_loot3] run summon item -18313 106 5472 {Item:{id:"minecraft:charcoal",count:16}} execute if score @r rng matches 37..42 run execute at @e[type=minecraft:marker,tag=tag_loot1] run summon item -18330 106 5472 {Item:{id:"minecraft:flint",count:8}} execute if score @r rng matches 43..48 run execute at @e[type=minecraft:marker,tag=tag_loot2] run summon item -18313 106 5472 {Item:{id:"minecraft:sweet_berries",count:16}} execute if score @r rng matches 49..54 run execute at @e[type=minecraft:marker,tag=tag_loot3] run summon item -18313 106 5472 {Item:{id:"minecraft:bone_meal",count:8}} execute if score @r rng matches 55..60 run execute at @e[type=minecraft:marker,tag=tag_loot1] run summon item -18330 106 5472 {Item:{id:"minecraft:stick",count:8}} execute if score @r rng matches 61..66 run execute at @e[type=minecraft:marker,tag=tag_loot2] run summon item -18313 106 5472 {Item:{id:"minecraft:enchanted_book",count:1,components:{"minecraft:enchantments":{levels:{"minecraft:vanishing_curse":1},show_in_tooltip:true}}}} execute if score @r rng matches 67..72 run execute at @e[type=minecraft:marker,tag=tag_loot3] run summon item -18313 106 5472 {Item:{id:"minecraft:enchanted_book",count:1,components:{"minecraft:enchantments":{levels:{"minecraft:binding_curse":1},show_in_tooltip:true}}}}rng.mcfunction example:
summon armor_stand -18351 -4 5472 {NoGravity:1b,Silent:1b,Invulnerable:1b,Invisible:1b,Tags:["rng1"]} summon armor_stand -18351 -4 5472 {NoGravity:1b,Silent:1b,Invulnerable:1b,Invisible:1b,Tags:["rng2"]} summon armor_stand -18351 -4 5472 {NoGravity:1b,Silent:1b,Invulnerable:1b,Invisible:1b,Tags:["rng3"]} summon armor_stand -18351 -4 5472 {NoGravity:1b,Silent:1b,Invulnerable:1b,Invisible:1b,Tags:["rng4"]} scoreboard players set @e[tag=rng1] rng 1 scoreboard players set @e[tag=rng2] rng 2 scoreboard players set @e[tag=rng3] rng 3 scoreboard players set @e[tag=rng4] rng 4 scoreboard players operation @r rng = @e[type=minecraft:armor_stand,limit=1,sort=random] rng scoreboard players operation @r rng = @e[type=minecraft:armor_stand,limit=1,sort=random] rng scoreboard players operation @r rng = @e[type=minecraft:armor_stand,limit=1,sort=random] rng scoreboard players operation @r rng = @e[type=minecraft:armor_stand,limit=1,sort=random] rng scoreboard players operation @r rng = @e[type=minecraft:armor_stand,limit=1,sort=random] rng kill @e[x=-18351,y=-4,z=5472,type=minecraft:armor_stand]```