Diffrence between server and private world

So im making a data pack for a server and i have been working hard on it when i come upload it to my server something is always wrong and its that i have a function that should give me a weapon everytime i die if i have a certain advancment it works well in my world but not in the server why is this doing it ill send all crutial information now
Continue to help post