function onPlayerSpawned(player) if player:GetRankInGroup(4012232) <= 100 then game.Lighting.Sword:Clone().Parent = player.Backpack end end
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function() onPlayerSpawned(player) end) end)
Basically, its trying to give a sword to people above the rank of Soldier, but for some reason everyone is given the sword.

2 comments
If the sword is given to everyone, then I would guess that the problem lies in the group itself. Everyone in the group has a rank higher than 100. You'll have to get the group leader to fix it.
Everyone except the soldiers perhaps. <= is less than or equal to. From the sounds of it, you want it to be >= which is greater than or equal to?