tag @e[type=pig,tag=K] add StrikeMe
execute at @a[tag=K,tag=KyuNat] run tag @e[distance=..300,type=pig] remove StrikeMe
execute at @a[tag=K,nbt={Inventory:[{tag:{kyunaturegift:1b}}]}] run tag @e[distance=..300,type=pig] remove StrikeMe
execute as @e[tag=K,type=pig,tag=StrikeMe] run data merge entity @s {PersistenceRequired:1b}
execute as @e[tag=K,type=pig,tag=StrikeMe] run tag @s add RemovePersist
execute at @e[tag=K,type=pig,tag=StrikeMe] run summon lightning_bolt

tellraw @a[team=P] ["",{"text":"LIGHTNING BOLT!","color":"dark_red","italic":true}]