Could I make it so that when I kill a player for the first time, a command block gives me an iron sword, on my second kill it gives me a diamond sword, on my third kill it gives me an enchanted item, and so on?
I also want a way to reset this, as well as a start button. I know a way that I can do this by doing
/scoreboard objectives add objectivename playerKillCount, and then a comparator does
/give @p iron_sword. However, if I am too far from the command block and another player is next to it, the command block will give the sword to them instead. Also,
@p won't work for the whole world, because I have to be near it. Can somebody please help me with a way that I can do this?