#Effect#
effect give @s slowness 1 0 true
effect give @s slow_falling 1 0 true

#Armor-Stand#
execute as @s[tag=petrosapien] at @s run summon armor_stand ~ ~ ~ {Tags:[crystal_projectile],Small:1b,NoGravity:1b,Invisible:1b,Invulnerable:1b,Marker:1b,equipment:{head:{id:"knowledge_book",components:{custom_model_data:{strings:[hank_petrosapien_shard_idle]}}}},attributes:[{id:"scale",base:1}]}

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^1
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^2
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^3
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly if block ^ ^ ^4 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^4
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly if block ^ ^ ^4 #sector:fly if block ^ ^ ^5 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^5
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly if block ^ ^ ^4 #sector:fly if block ^ ^ ^5 #sector:fly if block ^ ^ ^6 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^6
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly if block ^ ^ ^4 #sector:fly if block ^ ^ ^5 #sector:fly if block ^ ^ ^6 #sector:fly if block ^ ^ ^7 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^7
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly if block ^ ^ ^4 #sector:fly if block ^ ^ ^5 #sector:fly if block ^ ^ ^6 #sector:fly if block ^ ^ ^7 #sector:fly if block ^ ^ ^8 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^8
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly if block ^ ^ ^4 #sector:fly if block ^ ^ ^5 #sector:fly if block ^ ^ ^6 #sector:fly if block ^ ^ ^7 #sector:fly if block ^ ^ ^8 #sector:fly if block ^ ^ ^9 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^9
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly if block ^ ^ ^4 #sector:fly if block ^ ^ ^5 #sector:fly if block ^ ^ ^6 #sector:fly if block ^ ^ ^7 #sector:fly if block ^ ^ ^8 #sector:fly if block ^ ^ ^9 #sector:fly if block ^ ^ ^10 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^10
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly if block ^ ^ ^4 #sector:fly if block ^ ^ ^5 #sector:fly if block ^ ^ ^6 #sector:fly if block ^ ^ ^7 #sector:fly if block ^ ^ ^8 #sector:fly if block ^ ^ ^9 #sector:fly if block ^ ^ ^10 #sector:fly if block ^ ^ ^11 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^11
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly if block ^ ^ ^4 #sector:fly if block ^ ^ ^5 #sector:fly if block ^ ^ ^6 #sector:fly if block ^ ^ ^7 #sector:fly if block ^ ^ ^8 #sector:fly if block ^ ^ ^9 #sector:fly if block ^ ^ ^10 #sector:fly if block ^ ^ ^11 #sector:fly if block ^ ^ ^12 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^12
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly if block ^ ^ ^4 #sector:fly if block ^ ^ ^5 #sector:fly if block ^ ^ ^6 #sector:fly if block ^ ^ ^7 #sector:fly if block ^ ^ ^8 #sector:fly if block ^ ^ ^9 #sector:fly if block ^ ^ ^10 #sector:fly if block ^ ^ ^11 #sector:fly if block ^ ^ ^12 #sector:fly if block ^ ^ ^13 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^13
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly if block ^ ^ ^4 #sector:fly if block ^ ^ ^5 #sector:fly if block ^ ^ ^6 #sector:fly if block ^ ^ ^7 #sector:fly if block ^ ^ ^8 #sector:fly if block ^ ^ ^9 #sector:fly if block ^ ^ ^10 #sector:fly if block ^ ^ ^11 #sector:fly if block ^ ^ ^12 #sector:fly if block ^ ^ ^13 #sector:fly if block ^ ^ ^14 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^14
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly if block ^ ^ ^4 #sector:fly if block ^ ^ ^5 #sector:fly if block ^ ^ ^6 #sector:fly if block ^ ^ ^7 #sector:fly if block ^ ^ ^8 #sector:fly if block ^ ^ ^9 #sector:fly if block ^ ^ ^10 #sector:fly if block ^ ^ ^11 #sector:fly if block ^ ^ ^12 #sector:fly if block ^ ^ ^13 #sector:fly if block ^ ^ ^14 #sector:fly if block ^ ^ ^15 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^15
function sector:abilities/crystal_projectile_damage

execute as @s at @s anchored eyes if block ^ ^ ^1 #sector:fly if block ^ ^ ^2 #sector:fly if block ^ ^ ^3 #sector:fly if block ^ ^ ^4 #sector:fly if block ^ ^ ^5 #sector:fly if block ^ ^ ^6 #sector:fly if block ^ ^ ^7 #sector:fly if block ^ ^ ^8 #sector:fly if block ^ ^ ^9 #sector:fly if block ^ ^ ^10 #sector:fly if block ^ ^ ^11 #sector:fly if block ^ ^ ^12 #sector:fly if block ^ ^ ^13 #sector:fly if block ^ ^ ^14 #sector:fly if block ^ ^ ^15 #sector:fly if block ^ ^ ^16 #sector:fly at @s anchored eyes run tp @e[tag=crystal_projectile,distance=..16,limit=1,sort=nearest] ^ ^ ^16
function sector:abilities/crystal_projectile_damage

#Sound
playsound block.glass.break ambient @a[distance=..10]

#Model#
scoreboard players set @s model_reload 5
scoreboard players set @s model 2

scoreboard players set @s stretch 5
