execute if score @s giant_timer matches 1.. run return run tellraw @s ["",{"text":"You are immune to being trapped because you are ","color":"aqua"},{"text":"GIANT","bold":true,"color":"aqua"},{"text":"!","color":"aqua"}]
execute if score @s invulnerable_timer matches 1.. run return run tellraw @s ["",{"text":"You are immune to being trapped because you are ","color":"aqua"},{"text":"INVULNERABLE","bold":true,"color":"yellow"},{"text":"!","color":"aqua"}]
attribute @s minecraft:movement_speed base set 0
attribute @s minecraft:jump_strength base set 0
attribute @s minecraft:block_interaction_range base set -1
execute if entity @a[tag=trap_temp] run tellraw @s ["",{"text":"You have been trapped by","color":"aqua"},{"text":" "},{"selector":"@n[tag=trap_temp]"},{"text":"!","color":"aqua"}]
$scoreboard players set @s trapped_timer $(duration)
execute at @s anchored eyes run playsound minecraft:block.trial_spawner.detect_player player @s ^ ^ ^3 5 0.75