Clean NameTag verified badge

Hello, i need help making it that if your username is equal to ______ then it puts the verified badge next to your name, but verified people can still have it.

This is not my code

local Players = game:GetService("Players")
local NameTag = game.ReplicatedStorage.Tags

local function addTag(plr, head)
	if not head:FindFirstChild(NameTag.Name) then
		local NewTag = NameTag:Clone()
		local DisplayName = plr.DisplayName
		local VerifiedBadge = plr.HasVerifiedBadge
		local MembershipType = plr.MembershipType

		local tagText = ""
		if MembershipType == Enum.MembershipType.Premium then
			tagText = utf8.char(0xE001) .. " " .. DisplayName
		else
			tagText = DisplayName
		end

		if VerifiedBadge then
			tagText = tagText .. utf8.char(0xE000)
		end
		

		NewTag.TextLabel.Text = tagText
		NewTag.Parent = head
		NewTag.Adornee = head
	end
end


Players.PlayerAdded:Connect(function(plr)
	local childConnection = nil
	plr.CharacterAdded:Connect(function(char)
		if childConnection then
			childConnection:Disconnect()
		end

		childConnection = char.ChildAdded:Connect(function(part)
			if part.Name == "Head" then
				addTag(plr, part)
			end
		end)

		local head = char:FindFirstChild("Head")
		if head then
			addTag(plr, head)
		end
		char.Humanoid.DisplayDistanceType = "None"
	end)
end)

Form post

1 Like
local Players = game:GetService("Players")
local NameTag = game.ReplicatedStorage.Tags

local function addTag(plr, head)
	if not head:FindFirstChild(NameTag.Name) then
		local NewTag = NameTag:Clone()
		local DisplayName = plr.DisplayName
		local VerifiedBadge = plr.HasVerifiedBadge
		local MembershipType = plr.MembershipType

		local tagText = ""
		if MembershipType == Enum.MembershipType.Premium then
			tagText = utf8.char(0xE001) .. " " .. DisplayName
		else
			tagText = DisplayName
		end

		if VerifiedBadge then
			tagText = tagText .. utf8.char(0xE000)
		end
		

		NewTag.TextLabel.Text = tagText
		NewTag.Parent = head
		NewTag.Adornee = head
	end
end


Players.PlayerAdded:Connect(function(plr)
	if plr.Name ~= "ENTER_NAME_HERE" then return end;

    local childConnection = nil
	plr.CharacterAdded:Connect(function(char)
		if childConnection then
			childConnection:Disconnect()
		end

		childConnection = char.ChildAdded:Connect(function(part)
			if part.Name == "Head" then
				addTag(plr, part)
			end
		end)

		local head = char:FindFirstChild("Head")
		if head then
			addTag(plr, head)
		end
		char.Humanoid.DisplayDistanceType = "None"
	end)
end)

It’s not give me the verified badge, when i tested it.

u gotta change the username brudda

I did do that, it did not work

This line, particularly the VerifiedBadge variable, will only be true if the player actually has the verified badge on Roblox. To add it to your own nametag, you’ll have to change this statement to something like:

if VerifiedBadge or plr.Name == "DylanandMarley" then
    tagText = tagText .. utf8.char(0xE000)
end
1 Like

try this

local Players = game:GetService("Players")
local NameTag = game.ReplicatedStorage.Tags

local WhitelistedUsernames = {
    "ENTER_NAME_HERE",
    "ENTER_NAME_HERE",
}

local function addTag(plr, head)
	if not head:FindFirstChild(NameTag.Name) then
		local NewTag = NameTag:Clone()
		local DisplayName = plr.DisplayName
		local VerifiedBadge = plr.HasVerifiedBadge
		local MembershipType = plr.MembershipType

		local tagText = ""
		if MembershipType == Enum.MembershipType.Premium then
			tagText = utf8.char(0xE001) .. " " .. DisplayName
		else
			tagText = DisplayName
		end

		if VerifiedBadge then
			tagText = tagText .. utf8.char(0xE000)
		end
		
		NewTag.TextLabel.Text = tagText
		NewTag.Parent = head
		NewTag.Adornee = head
	end
end

Players.PlayerAdded:Connect(function(plr)
	for _, name in ipairs(WhitelistedUsernames) do
        if plr.Name == name then
            local childConnection = nil
            plr.CharacterAdded:Connect(function(char)
                if childConnection then
                    childConnection:Disconnect()
                end
        
                childConnection = char.ChildAdded:Connect(function(part)
                    if part.Name == "Head" then
                        addTag(plr, part)
                    end
                end)
        
                local head = char:FindFirstChild("Head")
                if head then
                    addTag(plr, head)
                end
                char.Humanoid.DisplayDistanceType = "None"
            end)
        end
    end
end)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.