difficulty normal
clear @a
execute at @e[tag=item_spot] run setblock ~ ~ ~ cave_air
execute at @e[tag=item_spot] run setblock ~ ~-1 ~ emerald_block
fill 11 2 2 11 2 -2 minecraft:barrier
data merge entity e0bdfada-c63a-4669-a626-ea250c0364ec {start_interpolation:-1,transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],scale:[1.0f,1.0f,5.0f],translation:[-0.5f,-0.5f,-2.5f]}}
data merge entity aeb17fe1-371d-4e7b-bda1-6cab00973144 {start_interpolation:-1,transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],scale:[4.0f,5.0f,5.0f],translation:[-1.9f,-2.5f,-2.5f]}}
setblock 5 0 0 minecraft:note_block
data merge entity bb1d49a9-e6a3-4f66-a02e-3ede73c55c65 {start_interpolation:-1,transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],scale:[1.0f,1.0f,1.0f],translation:[-0.5f,-0.5f,-0.5f]}}
data merge entity 9194fb87-d88e-452e-a626-f1700f36a2ec {start_interpolation:-1,transformation:{left_rotation:[0.50434417f,0.49561772f,0.50434417f,-0.49561772f],right_rotation:[0.0f,0.0f,0.0f,1.0f],scale:[0.99999917f,0.9999992f,0.99999934f],translation:[0.0f,0.0f,0.0f]}}
setblock 8 -2 0 minecraft:redstone_block
scoreboard players reset #startSEQ V
scoreboard players reset #npc_start time
kill @e[tag=side_npc]
summon piglin 51 11 -2.5 {Silent:1b,Invulnerable:1b,CustomNameVisible:0b,PersistenceRequired:1b,NoAI:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Rotation:[90F,25F],Tags:["side_npc"],CustomName:'{"text":"jay"}',ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:0}}},{id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:16777215},Trim:{material:"minecraft:iron",pattern:"minecraft:wild"}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:14606046},Trim:{material:"minecraft:iron",pattern:"minecraft:rib"}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:"JayPietSmiet"}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
summon piglin 51 11 -1.0 {Silent:1b,Invulnerable:1b,CustomNameVisible:0b,PersistenceRequired:1b,NoAI:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Rotation:[90F,25F],Tags:["side_npc"],CustomName:'{"text":"piet"}',ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:7895160}}},{id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:16777215},Trim:{material:"minecraft:iron",pattern:"minecraft:wild"}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:1826337},Trim:{material:"minecraft:emerald",pattern:"minecraft:rib"}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:"PietSmiet"}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
summon piglin 51 11 0.5 {Silent:1b,Invulnerable:1b,CustomNameVisible:0b,PersistenceRequired:1b,NoAI:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Rotation:[90F,25F],Tags:["side_npc"],CustomName:'{"text":"br4"}',ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:13416814}}},{id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:13416814}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:14604326}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:"Br4mm3n"}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
summon piglin 51 11 2.0 {Silent:1b,Invulnerable:1b,CustomNameVisible:0b,PersistenceRequired:1b,NoAI:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Rotation:[90F,25F],Tags:["side_npc"],CustomName:'{"text":"chr"}',ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:10720344}}},{id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:11370572}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:3680267}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:"Brosator"}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
summon piglin 51 11 3.5 {Silent:1b,Invulnerable:1b,CustomNameVisible:0b,PersistenceRequired:1b,NoAI:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Rotation:[90F,25F],Tags:["side_npc"],CustomName:'{"text":"sep"}',ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:2838991}}},{id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:11381923},Trim:{material:"minecraft:lapis",pattern:"minecraft:vex"}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:13577235},Trim:{material:"minecraft:redstone",pattern:"minecraft:rib"}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:"kessemak"}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
scoreboard players set @a checkpoint 0
spawnpoint @a 0 1 0 -90
scoreboard players set @a death.total 0
scoreboard players set @a death.last_check 0
scoreboard players reset #all death.total
tag @s remove check_active
tag @s remove check

tag @a remove player
scoreboard players reset * player
tag @a remove check
function system:playercount
kill @e[tag=npc]
#lvl1
fill 54 2 -2 54 2 2 minecraft:barrier
data merge entity 2597b08a-1493-4ad6-a092-e0cbe8d3d9cb {block_state:{Name:"minecraft:netherite_block"}}
#lvl2
fill 80 -1 -9 80 -1 -11 minecraft:barrier
data merge entity ac67ec9f-b328-419b-b9b9-f8d18e4176a4 {block_state:{Name:"minecraft:red_stained_glass"}}
#lvl3
summon piglin_brute 48 -1 -9 {Silent:1b,Invulnerable:1b,PersistenceRequired:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Tags:["npc","npc_d_1","npc_2"],Passengers:[{id:"minecraft:interaction",width:1f,height:-2f,response:1b,Tags:["npc","d_1_","npc_2"]}],ArmorItems:[{},{},{},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:{Id:[I;-1270540108,-998941926,-1858353752,-1399270529],Properties:{textures:[{Value:"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWZhMjlmMmZlNjBkMzhjMjRjNGQ3ODZlMDZmMjI5OWQxZjYzYmQzN2FjZmU0YTk1ZGRkZDM4MTdjZjRkYzVkYSJ9fX0="}]}}}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
fill 47 0 -18 49 0 -18 barrier
data merge entity 6c5f2453-e15c-41bd-b0e9-2cdcbf0cf3af {block_state:{Name:"minecraft:red_stained_glass"}}
fill 29 7 -18 57 11 -56 minecraft:red_stained_glass replace minecraft:sea_lantern
scoreboard players reset #npc_m1 V
tag @a remove noob_mode
execute as @a run trigger noob_mode add 0
#lvl5
data merge entity 9becb911-9c8a-4048-8f6e-ad257a0fdfe0 {start_interpolation:-1,transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],scale:[0.25f,0.8125f,3.4375f],translation:[-0.125f,-0.40625f,-1.71875f]}}
execute as @e[tag=lvl5_wall] run data merge entity @s {block_state:{Name:"minecraft:green_concrete"}}
fill 56 38 -45 52 38 -45 minecraft:barrier
data merge entity d09a4efe-5b9e-4d5f-8f46-2498eeb8406f {start_interpolation:-1,transformation:{left_rotation:[0.0f,0.7071068f,0.0f,0.7071068f],right_rotation:[0.0f,0.0f,0.0f,1.0f],scale:[0.9375f,0.9375f,0.9999998f],translation:[0.0f,0.0f,0.0f]}}
#lvl6
data merge entity df130ce7-b224-4117-90ec-29f88b60f72b {block_state:{Name:"minecraft:black_wool"}}
data merge entity bf0bd10c-eaa8-45cd-8802-07a5f7dd04e9 {block_state:{Name:"minecraft:black_wool"}}
fill 29 38 -53 31 37 -53 minecraft:barrier
#lvl7
summon piglin_brute 12 42 -30 {Silent:1b,Invulnerable:1b,PersistenceRequired:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Tags:["npc","npc_troll"],Passengers:[{id:"minecraft:interaction",width:1f,height:-2f,response:1b,Tags:["npc","d_troll"]}],HandItems:[{id:"minecraft:tnt",Count:1b,tag:{Enchantments:[{}]}},{id:"minecraft:command_block",Count:1b,tag:{Enchantments:[{}]}}],ArmorItems:[{},{},{},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:{Id:[I;124123785,-1586015421,-1228064074,1823121838],Properties:{textures:[{Value:"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGM0ODA4N2E0ZGFhZTlkNTRiZDUwNTU4MGY1ZWZkM2VkZmM4YTBkNGU2YWNjYTBjN2I3YzlmZDBmMmUxNjkxYSJ9fX0="}]}}}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
fill 31 37 -35 29 39 -35 minecraft:barrier
data merge entity a6ea3a31-589b-4f55-a157-5bd4fc13b043 {block_state:{Name:"minecraft:red_stained_glass"}}
scoreboard players reset #lvl7d time
scoreboard players set #lvl7timer time 0
scoreboard players set #lvl7_sec time 0
scoreboard players set #lvl7_min time 0
data merge entity e5abd830-189a-487f-8f1b-722c1825032e {text:'[{"text":"Ihr habt\\n","color":"white"},{"score":{"name":"#lvl7_min","objective":"time"},"color":"gold"},{"text":":","color":"white"},{"text":"0","color":"gold"},{"score":{"name":"#lvl7_sec","objective":"time"},"color":"gold"},{"text":" gebraucht,\\n um es heraus zu finden!","color":"white"}]'}
item replace entity @e[tag=du] armor.head with minecraft:player_head
tag @a remove found
effect clear @a
#finish
summon piglin_brute 41 32 -17 {NoGravity:1b,Silent:1b,Invulnerable:1b,PersistenceRequired:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Tags:["npc","end_npc"],Passengers:[{id:"minecraft:interaction",CustomNameVisible:0b,width:1f,height:-2f,response:1b,Tags:["npc","npc_5","tester_npc"],CustomName:'{"text":"Pikatscha"}'}],ArmorItems:[{},{},{},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:{Id:[I;-1270540108,-998941926,-1858353752,-1399270529],Properties:{textures:[{Value:"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWZhMjlmMmZlNjBkMzhjMjRjNGQ3ODZlMDZmMjI5OWQxZjYzYmQzN2FjZmU0YTk1ZGRkZDM4MTdjZjRkYzVkYSJ9fX0="}]}}}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
setblock 34 37 -23 air
data merge entity 52889c68-2898-44be-abad-0761ddf395e8 {text:'[{"text":"Statistiken","extra":[{"text":"\\n   ▪ Alle Tode = ","color":"white","bold":false},{"text":"...","color":"gold"},{"text":"\\n   ▪ Gefundene kosmetische Items = ","color":"white","bold":false},{"text":"...","color":"gold"},{"text":"/12","color":"gold"}],"color":"aqua","bold":true}]'}
summon piglin 36 32 -18.0 {Silent:1b,Invulnerable:1b,CustomNameVisible:0b,PersistenceRequired:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Rotation:[-90F,0F],Tags:["side_npc","tester_npc"],Passengers:[{id:"minecraft:interaction",width:1f,height:-2f,Tags:["side_npc","tester_npc"],CustomName:'{"text":"banzeee"}'}],CustomName:'{"text":"banzeee"}',ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:3551023},Trim:{material:"minecraft:netherite",pattern:"minecraft:wild"}}},{id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:4085575}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:14935011},Trim:{material:"minecraft:netherite",pattern:"minecraft:vex"}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:"banzeee"}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
summon piglin 36 32 -16.5 {Silent:1b,Invulnerable:1b,CustomNameVisible:0b,PersistenceRequired:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Rotation:[-90F,0F],Tags:["side_npc","tester_npc"],Passengers:[{id:"minecraft:interaction",width:1f,height:-2f,Tags:["side_npc","tester_npc"],CustomName:'{"text":"Ben_Progamer"}'}],CustomName:'{"text":"Ben_Progamer"}',ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:16777215},Trim:{material:"minecraft:lapis",pattern:"minecraft:wayfinder"}}},{id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:2039583},Trim:{material:"minecraft:iron",pattern:"minecraft:sentry"}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:2979509},Trim:{material:"minecraft:netherite",pattern:"minecraft:rib"}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:"Ben_Progamer"}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
summon piglin 36 32 -15.0 {Silent:1b,Invulnerable:1b,CustomNameVisible:0b,PersistenceRequired:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Rotation:[-90F,0F],Tags:["side_npc","tester_npc"],Passengers:[{id:"minecraft:interaction",width:1f,height:-2f,Tags:["side_npc","tester_npc"],CustomName:'{"text":"BVBOcon38"}'}],CustomName:'{"text":"BVBOcon38"}',ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:0},Trim:{material:"minecraft:diamond",pattern:"minecraft:wayfinder"}}},{id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:1127040}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:2204085},Trim:{material:"minecraft:diamond",pattern:"minecraft:dune"}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:"BVBOcon38"}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
summon piglin 36 32 -13.5 {Silent:1b,Invulnerable:1b,CustomNameVisible:0b,PersistenceRequired:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Rotation:[-90F,0F],Tags:["side_npc","tester_npc"],Passengers:[{id:"minecraft:interaction",width:1f,height:-2f,Tags:["side_npc","tester_npc"],CustomName:'{"text":"Flatze"}'}],CustomName:'{"text":"Flatze"}',ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:5197647},Trim:{material:"minecraft:emerald",pattern:"minecraft:spire"}}},{id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:5197647}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:5197647},Trim:{material:"minecraft:emerald",pattern:"minecraft:raiser"}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:"Flatze"}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
summon piglin 36 32 -12.0 {Silent:1b,Invulnerable:1b,CustomNameVisible:0b,PersistenceRequired:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Rotation:[-90F,0F],Tags:["side_npc","tester_npc"],Passengers:[{id:"minecraft:interaction",width:1f,height:-2f,Tags:["side_npc","tester_npc"],CustomName:'{"text":"InTube"}'}],CustomName:'{"text":"InTube"}',ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:7856554},Trim:{material:"minecraft:emerald",pattern:"minecraft:silence"}}},{id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:7856554},Trim:{material:"minecraft:emerald",pattern:"minecraft:spire"}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:7856554},Trim:{material:"minecraft:emerald",pattern:"minecraft:tide"}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:"InTube"}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
summon piglin 36 32 -10.5 {Silent:1b,Invulnerable:1b,CustomNameVisible:0b,PersistenceRequired:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Rotation:[-90F,0F],Tags:["side_npc","tester_npc"],Passengers:[{id:"minecraft:interaction",width:1f,height:-2f,Tags:["side_npc","tester_npc"],CustomName:'{"text":"Koriyuko"}'}],CustomName:'{"text":"Koriyuko"}',ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:8536356},Trim:{material:"minecraft:netherite",pattern:"minecraft:host"}}},{id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:8831459},Trim:{material:"minecraft:quartz",pattern:"minecraft:spire"}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:9507332},Trim:{material:"minecraft:netherite",pattern:"minecraft:rib"}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:"Koriyuko"}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
summon piglin 36 32 -9.0 {Silent:1b,Invulnerable:1b,CustomNameVisible:0b,PersistenceRequired:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Rotation:[-90F,0F],Tags:["side_npc","tester_npc"],Passengers:[{id:"minecraft:interaction",width:1f,height:-2f,Tags:["side_npc","tester_npc"],CustomName:'{"text":"SpeedRunar189"}'}],CustomName:'{"text":"SpeedRunar189"}',ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:8022891}}},{id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:1787061},Trim:{material:"minecraft:lapis",pattern:"minecraft:sentry"}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:4968409}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:"SpeedRunar189"}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}

scoreboard players reset #final time

scoreboard players reset #npc.blink

execute as @a run function system:give_book
playsound minecraft:block.note_block.bell master @a -11 2 1 3 .6
gamerule sendCommandFeedback false
gamerule showDeathMessages false
gamerule fallDamage false

gamemode adventure @a
tellraw @a [{"text":"\n["},{"text":"System","color":"dark_aqua"},{"text":"] Die Map wurde zurückgesetzt und sollte startbereit sein!\n","color":"white"}]
execute as @a unless entity @s[x=-10,dx=20,y=1,dy=5,z=-10,dz=20] run tp @a 0 1 0 -90 10

scoreboard objectives add cooldown dummy
summon piglin -1 22 -36 {Silent:1b,Invulnerable:1b,CustomNameVisible:0b,PersistenceRequired:1b,CanPickUpLoot:0b,IsImmuneToZombification:1b,Rotation:[-90F,0F],Tags:["side_npc","tester_npc"],CustomName:'{"text":"Flatze"}',ArmorItems:[{id:"minecraft:leather_boots",Count:1b,tag:{display:{color:5197647},Trim:{material:"minecraft:emerald",pattern:"minecraft:spire"}}},{id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:5197647}}},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:5197647},Trim:{material:"minecraft:emerald",pattern:"minecraft:raiser"}}},{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:"Flatze"}}],Attributes:[{Name:generic.follow_range,Base:-999},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0}]}
data merge entity cac03e51-6e6a-4f58-b9fa-a2412b39c98d {item:{id:"minecraft:air",count:1}}