local ID = nosneaks
local MLGS = {"ihab123432gamer", "eleutherios", "Erik199875", "iiTHECOOLZ", "flyerbram002", "TrulyRev", "MrCrutuBringer"}
local GUIName = {"VSS", "SVD", "MainPicker", "Back2"} 

local function FindPlayer(Plr)
	for Num, Pler in pairs(MLGS) do
		if Pler == Plr then
			return true
		end
	end
end

game.Players.PlayerAdded:connect(function(Player)
	Player.CharacterAdded:Connect(function(character)
    if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(Player.UserId, ID) or FindPlayer(Player.Name) then
			for Num, TextButton in pairs(GUIName) do
				if game:GetService("ServerStorage"):FindFirstChild(TextButton) then
					game:GetService("ServerStorage")[TextButton]:Clone().Parent = Player.PlayerGui.pickweap.Main:WaitForChild("RussianWeaps")
				end
			end
		end
		for Num, TextButton in pairs(GUIName) do
			if Player.PlayerGui.pickweap.Main.RussianWeaps:FindFirstChild(TextButton) == nil then
				if game:GetService("ServerStorage"):FindFirstChild(TextButton) then
						game:GetService("ServerStorage")[TextButton]:Clone().Parent = Player.PlayerGui.pickweap.Main:WaitForChild("RussianWeaps")
					end
				end
			end
		end)
	end)

I've never used marketplaceservice before and this script is meant to give players with a gamepass a gui. That part works fine, but it stops working when they die, so I need to put a player.CharacterAdded:Connect() somewhere, which I did, but the problem still persists. Please fix my script and explain where I went wrong