tag @s add temp
execute as @e[type=armor_stand,tag=invis_stand] if score @s real_ID = @e[tag=temp,limit=1] real_ID run tag @e[tag=temp,limit=1] remove temp
execute if entity @s[tag=temp] run summon armor_stand 8 500 8 {NoGravity:1b,Invulnerable:1b,Small:1b,Invisible:1b,NoBasePlate:1b,PersistenceRequired:1b,Tags:["invis_stand","new"],DisabledSlots:4144959,CustomName:{"text":"invis_stand"}}
data modify entity @e[type=armor_stand,tag=invis_stand,tag=new,limit=1] equipment.head set from entity @s equipment.head
data modify entity @e[type=armor_stand,tag=invis_stand,tag=new,limit=1] equipment.chest set from entity @s equipment.chest
data modify entity @e[type=armor_stand,tag=invis_stand,tag=new,limit=1] equipment.legs set from entity @s equipment.legs
data modify entity @e[type=armor_stand,tag=invis_stand,tag=new,limit=1] equipment.feet set from entity @s equipment.feet

execute unless items entity @s armor.head #minecraft:wool run item replace entity @s armor.head with minecraft:air
item replace entity @s armor.chest with minecraft:air
item replace entity @s armor.legs with minecraft:air
item replace entity @s armor.feet with minecraft:air

execute as @e[type=armor_stand,tag=invis_stand,tag=new,limit=1] run scoreboard players operation @s real_ID = @e[tag=temp,sort=nearest,limit=1] real_ID
execute as @e[type=armor_stand,tag=invis_stand,tag=new,limit=1] run tag @s remove new

particle entity_effect{color:[1.000,1.000,1.000,1.00]} ~ ~ ~ 0.5 0.5 0.5 0 50 force @a

$effect give @s minecraft:invisibility $(seconds) 0 true
$scoreboard players set @s invis_timer $(ticks)
#
execute store result score random temp run random value 1..4
#
execute if score random temp matches 1 run playsound minecraft:entity.illusioner.mirror_move player @a ~ ~ ~ 0.75 0.9
execute if score random temp matches 2 run playsound minecraft:entity.illusioner.mirror_move player @a ~ ~ ~ 0.75 1
execute if score random temp matches 3 run playsound minecraft:entity.illusioner.mirror_move player @a ~ ~ ~ 0.75 1.1
execute if score random temp matches 4 run playsound minecraft:entity.illusioner.mirror_move player @a ~ ~ ~ 0.75 1.2

tag @s remove temp