scoreboard players set out rng 0
execute unless entity @e[tag=trapped,distance=23..47,limit=1] run function rng:percentage
execute if score out rng matches 75.. run tag @s add trapped
# tellraw @a [{"text":"RNG: "},{"score":{"name":"out","objective":"rng"}}]
