I have such a problem my datapack for 1.21.1 make a new mob,base is zombie and the model of mob is pumpkin,i need to make my zombie to have infinite invisibility i have sketched my script and i will paste it here
execute at @s run summon minecraft:zombie ~ ~ ~ {PersistenceRequired:1b,Silent:1b,Health:30f,CustomNameVisible:0b,active_effects:[{id:"minecraft:invisibility",amplifier:0,duration:-1,show_particles:0b}],Attributes:[{id:"minecraft:generic.max_health",base:30.0},{id:"minecraft:generic.attack_damage",base:5.0},{id:"minecraft:generic.movement_speed",base:0.28}],ArmorItems:[{},{},{},{id:"minecraft:carved_pumpkin",count:1,components:{"minecraft:custom_model_data":666001}}],HandItems:[{id:"minecraft:iron_sword",count:1},{}],ArmorDropChances:[0.0f,0.0f,0.0f,0.0f],Tags:["devil_mob"],DeathLootTable:"devil:entities/devil"}