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.
You have a few doozies in this. If it's 100 and higher you want then use the script below.
game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function() if plr:GetRankInGroup(4012232) >= 100 then local sworddupe = game.Lighting.Sword:Clone() sworddupe.Parent = plr.Backpack end end) end)