I am creating a function pack for the bedrock edition of Minecraft. In one of the commands, I want to give the tag ‘test’ to @s (the player running the command) if they do not already have the tag and remove ‘test’ if they already have it.
How would I do this?