[Free Module] Nametag & Titletag

Hey devs !

Today i have made a “Tag” module system and i thought it was a good idea to give it for free to others Roblox developers.
I probably will add a “Rank” Title later using saved values.

:framed_picture: Picture :framed_picture:

Capture.PNG

:memo: About The System :memo:

The module is re usable everywhere, in any game by simply copy/paste the module script. It also is fully customisable.

:information_source: All the BillboardGui and TextLabel settings are fully customisable in the module code, if you dont know what some settings do, you can check BillboardGui - TextLabel.

The first step to make it work, is to only write these 3 lines of code in a character added function

local Tags = require(game.ServerScriptService.Tags)
Tags.Nametag(Character)
Tags.Titletag(Character)

Here is the full script if you not already have a character added script in your game.

local Players = game:GetService("Players")

local function onCharacterAdded(Character)
	local Player = Players:GetPlayerFromCharacter(Character)
	
	local Tags = require(game.ServerScriptService.Tags)
	Tags.Nametag(Character)
	Tags.Titletag(Character)
end

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(onCharacterAdded)
end)

Tags.Nametag (Character)
Create a text at the top head of each character that show the player name.

Module.Nametag = function(Character)
	local Head = Character:WaitForChild("Head" ,5)
	if Head ~= nil then
		local MainUi = Instance.new("BillboardGui" ,Head)
		--BILLBOARD SETTINGS
		MainUi.Name = "PlayerNameUi"
		
		MainUi.AlwaysOnTop = true
		
		MainUi.LightInfluence = 1
		MainUi.MaxDistance = 75
		
		MainUi.StudsOffset = Vector3.new(0,1.5,0)
		MainUi.Size = UDim2.new(3.5, 0, 0.75, 0)
		
		MainUi.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
		
		---------------------------------------------------------------------
		
		local TextUi = Instance.new("TextLabel" ,MainUi)
		--TEXT SETTINGS
		TextUi.Name = "PlayerNameText"
		TextUi.Text = Character.Name
		
		TextUi.TextWrapped = true
		TextUi.TextScaled = true
		TextUi.RichText = true
		
		TextUi.TextStrokeTransparency = 0.5
		TextUi.BackgroundTransparency = 1
		TextUi.TextTransparency = 0
		TextUi.BorderSizePixel = 0
		TextUi.LayoutOrder = 0
		TextUi.TextSize = 14
		TextUi.Rotation = 0
		TextUi.ZIndex = 1
		
		TextUi.TextStrokeColor3 = Color3.new(0, 0, 0)
		TextUi.BackgroundColor3 = Color3.new(1, 1, 1)
		TextUi.BorderColor3 = Color3.new(0, 0, 0)
		TextUi.TextColor3 = Color3.new(1, 1, 1)
		TextUi.Position = UDim2.new(0, 0, 0, 0)
		TextUi.Size = UDim2.new(1, 0, 1, 0)
		
		TextUi.Font = Enum.Font.GothamBlack
		TextUi.BorderMode = Enum.BorderMode.Middle
		TextUi.TextTruncate = Enum.TextTruncate.None
		TextUi.AutomaticSize = Enum.AutomaticSize.None
		TextUi.TextXAlignment = Enum.TextXAlignment.Center
		TextUi.TextYAlignment = Enum.TextYAlignment.Center
	end
end

Tags.Titletag(Character)
Create a text at the top head of the wanted character that show his special title.

Module.Titletag = function(Character)
	local Player = game.Players:GetPlayerFromCharacter(Character)
	local Head = Character:WaitForChild("Head" ,5)
	if Head ~= nil then	
		local MainUi = Instance.new("BillboardGui" ,Head)
		--BILLBOARD SETTINGS
		MainUi.Name = "PlayerTitleUi"

		MainUi.AlwaysOnTop = true

		MainUi.LightInfluence = 1
		MainUi.MaxDistance = 75

		MainUi.StudsOffset = Vector3.new(0,2.25,0)
		MainUi.Size = UDim2.new(2.75, 0, 0.6, 0)

		MainUi.ZIndexBehavior = Enum.ZIndexBehavior.Sibling

		---------------------------------------------------------------------
		
		if Player.UserId == 963755032 then --CHANGE THE NUMBER
			local TextUi = Instance.new("TextLabel" ,MainUi)

			TextUi.Name = "PlayerTitleText"
			TextUi.Text = "Owner"

			TextUi.TextWrapped = true
			TextUi.TextScaled = true
			TextUi.RichText = true

			TextUi.TextStrokeTransparency = 0.5
			TextUi.BackgroundTransparency = 1
			TextUi.TextTransparency = 0
			TextUi.BorderSizePixel = 0
			TextUi.LayoutOrder = 0
			TextUi.TextSize = 14
			TextUi.Rotation = 0
			TextUi.ZIndex = 1

			TextUi.TextStrokeColor3 = Color3.new(1, 0.333333, 0)
			TextUi.BackgroundColor3 = Color3.new(1, 1, 1)
			TextUi.BorderColor3 = Color3.new(0, 0, 0)
			TextUi.TextColor3 = Color3.new(1, 0.666667, 0)
			TextUi.Position = UDim2.new(0, 0, 0, 0)
			TextUi.Size = UDim2.new(1, 0, 1, 0)

			TextUi.Font = Enum.Font.GothamBlack
			TextUi.BorderMode = Enum.BorderMode.Middle
			TextUi.TextTruncate = Enum.TextTruncate.None
			TextUi.AutomaticSize = Enum.AutomaticSize.None
			TextUi.TextXAlignment = Enum.TextXAlignment.Center
			TextUi.TextYAlignment = Enum.TextYAlignment.Center
		end
		if Player.UserId == 000000000 then --CHANGE THE NUMBER
			local TextUi = Instance.new("TextLabel" ,MainUi)

			TextUi.Name = "PlayerTitleText"
			TextUi.Text = "Admin"

			TextUi.TextWrapped = true
			TextUi.TextScaled = true
			TextUi.RichText = true

			TextUi.TextStrokeTransparency = 0.5
			TextUi.BackgroundTransparency = 1
			TextUi.TextTransparency = 0
			TextUi.BorderSizePixel = 0
			TextUi.LayoutOrder = 0
			TextUi.TextSize = 14
			TextUi.Rotation = 0
			TextUi.ZIndex = 1

			TextUi.TextStrokeColor3 = Color3.new(0, 0.333333, 1)
			TextUi.BackgroundColor3 = Color3.new(1, 1, 1)
			TextUi.BorderColor3 = Color3.new(0, 0, 0)
			TextUi.TextColor3 = Color3.new(0, 0.666667, 1)
			TextUi.Position = UDim2.new(0, 0, 0, 0)
			TextUi.Size = UDim2.new(1, 0, 1, 0)

			TextUi.Font = Enum.Font.GothamBlack
			TextUi.BorderMode = Enum.BorderMode.Middle
			TextUi.TextTruncate = Enum.TextTruncate.None
			TextUi.AutomaticSize = Enum.AutomaticSize.None
			TextUi.TextXAlignment = Enum.TextXAlignment.Center
			TextUi.TextYAlignment = Enum.TextYAlignment.Center
		end
	end
end

The “PlayerTitle” code is the same code as the “PlayerName” exept one thing, the UserId.
To get a player UserId, you can go in the roblox website, search and go to the wanted Roblox profil, then his UserId will be write in the Url

Also if you want to make more players with a special title like owner, admin or something else, you only need to duplicate the actual code from Player.UserId == 000000000 then to the first end and change the UserId and all text settings

:file_folder: Nametag Module File :file_folder:

Nametag Module.rbxl (23,8 Ko)

:gear: Other Ressources :gear:

[Sprint & Stamina] [System & Gui bar]

:speech_balloon: Contact :speech_balloon:

I’m online every days, you can contact me any time.

Discord
Roblox
DevForum

4 Likes