Hello! If you looking for a Nametag System with Group Rank, AFK Tag, Leaderboard Value and Rainbow Nametag for Gamepass. You’re in the right place! I am happy to say that I decided to open source this system. This is because I have saw that many people is searching for a Tutorial or Model for Rainbow Nametag. But sadly, it seem like there’s less people doing this and is outdated.
Good thing is. This Nametag doesn’t need any Main Module or Loader for it. Which mean you can just edit it by your own way! You can also take this Nametag System to change it to whatever style you want too!
Inserting the Model:
- Simply insert the Model into your Game!
- Open the Folder which named “Nametag”!
- Move the Script / RemoteEvent in the Folder to the correct place!
Setup:
- This required some Scripting Skill!
StarterCharacterscript > Nametag
wait()
local Character = script.Parent --Path of the Player Character
local NameTag = script:FindFirstChild("Nametag") --Path of Nametag UI
local rank = game.Players:GetPlayerFromCharacter(Character):GetRoleInGroup(GroupID) --Get Player Rank from Specify Group
local team = game.Players:GetPlayerFromCharacter(Character).Team.Name --Path to Player Team Name
local Gametime = game.Players:GetPlayerFromCharacter(Character).leaderstats.Gametime.Value --Path to Player Leaderstats Value. To change it, just change Gametime to your Stats Name
local NameTagClone = NameTag:Clone() --Clone the Nametag
NameTagClone.Parent = Character:FindFirstChild("Head") --Make the Cloned Nametag Parent to Player Character Head
NameTagClone.Adornee = Character:FindFirstChild("Head") --Make the Cloned Nametag Adornee to Player Character Head
NameTagClone.Frame.name.Text = Character.Name --Show the name of Player
NameTagClone.Frame.rank.Text = team.." ["..rank.."]" --Show the Group Rank with Team
NameTagClone.Frame.gametime.Text = "Gametime: "..Gametime.." Minute(s)" --Show the Stats of Player. Can change the Gametime and Minutes to any text.
StarterCharacterscript > Value Increaser
local Players = game:GetService("Players") --Get Players Service
local Character = script.Parent --Path to the Player Character
local Player = Players:GetPlayerFromCharacter(Character) --Path to the Player
local Head = Character:WaitForChild("Head") --Path to the Player Character Head
local NameTag = Head:WaitForChild("Nametag") --Path to the Nametag
local gametimetag = NameTag:WaitForChild("Frame") --Path to the Nametag Frame
local gametimetag1 = gametimetag:WaitForChild("gametime") --Path to the Leaderstats Stats Display
local Gametime = Player:WaitForChild("leaderstats"):WaitForChild("Gametime") --Path to the Stats
while true do
wait(60) --Wait 60 Second / 1 Minute
if Character.Checker.IsAFK.Value == false then --If Player doesn't AFK
game.Players:GetPlayerFromCharacter(Character).leaderstats.Gametime.Value = game.Players:GetPlayerFromCharacter(Character).leaderstats.Gametime.Value + 1 --Add 1 to the Stats
Gametime.Changed:Connect(function(gametime) --If the Stats Value Changed
gametimetag1.Text = "Gametime: "..Gametime.Value.." Minute(s)" --Reset the Leaderstats Stats Display Text. Can change Gametime: and Minute(s)
print("Successfully refresh nametag.")
end)
end
end
ServerScriptService > RainbowNametag
local Id = GamepassID --Gamepass ID Here
game.Players.PlayerAdded:connect(function(Player) --When Player Joined
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(Player.UserId, Id) then --If player own the Gamepass
Player.CharacterAdded:Connect(function(character) --Get Player Character
character.Checker.IsVIP.Value = true --Set the IsVIP / Own the Rainbow Nametag = True
end)
end
end)
- Do not change the IsVIP. It help the System to know that is the Player own the Gamepass or not. If you want to change, make sure you change the Name of the BoolValue in the StarterCharacterScript. Make sure to also change the “IsVIP” to the Name you set for BoolValue in
StarterCharacterScripts > Nametag > Nametag > Frame > Name > Script
That’s all for now! If you have any question, feel free to Reply under this Post. I don’t know if this Documentary is enough or not! For the Others Script, you can explore it but they normally don’t need to change.