Datapack

KillStreakPack

can you make a working datapack for 26.2 that makes it so that when a player kills another player they get speed with a maximum of level 4 and on the fourth kill they gain strenght 2 however when a player dies they loose a level of speed and if they are on their fourth kill (when they got strenght 2) they loose it on death make the datapack work in version 26.2 of minecraft please

data/killstreakpack/functions/death/process.mcfunction
scoreboard players operation @s ks_death_delta = @s ks_deaths
scoreboard players operation @s ks_death_delta -= @s ks_deaths_old

execute if score @s ks_kills matches 4.. run effect clear @s minecraft:strength
execute if score @s ks_kills matches 4.. run scoreboard players set @s ks_kills 3
execute if score @s ks_kills matches 1..3 run scoreboard players remove @s ks_kills 1
execute if score @s ks_kills matches ..0 run scoreboard players set @s ks_kills 0

effect clear @s minecraft:speed

execute if score @s ks_kills matches 0 run tellraw @s {"text":"You died and lost your streak.","color":"red"}
execute if score @s ks_kills matches 1..3 run tellraw @s {"text":"You died and lost one speed level.","color":"red"}
execute if score @s ks_kills matches 4.. run tellraw @s {"text":"You died and lost strength II and one speed level.","color":"red"}