Trying to import commands from command blocks into a datapack.

Hello! So.. I made some special abilities for my server by using command blocks, scoreboards and predicates. I'm more into command blocks then datapacks so.. I don't understand why isn't it working. I have a command in repeating command block that checks if player with a tag "tvGoose" has a specific item in it's offhand, also it checks for him to be sneaking. execute as @e[tag=tvGoose] if items entity @s weapon.offhand minecraft:netherite_scrap if predicate hizer_s3:is_sneaking run scoreboard players add @s tvStrike 1 Just to check, I put this command into a function which I later on put into tick function - and after that "tick" function just doesn't work. It doesn't show up. If I delete the function with that command from tick function - tick function shows up again But this command does work if it's just inside a repeating command block. Why does tick function disappears? Isn't it kinda the same thing as a repeating command block? Sorry if this question is too long.. I just spend some time on it and I really need help.

Continue to help post