1: I would recommend using ID based scores instead of clearing the score and writing it again, it's a bit more complicated, but it has the plus side of not making the scoreboard look like it is flickering
2: when isn't something that skript uses, it's on or nothing
3: You need variables, as putting it in %% is only for skript defined variables
4: There is no event from my knowledge to check if a variable changes, however, you can check if a variable is something, so you could use a while event.
5: you need trigger:(indent next line) for a command
6: No offence, but there are a bunch of invalid events