How to create rank system?

Hello everyone, Today I am trying to make it where you can level up by killing people and npc’s, And get a chat tag:
Capture

lvl 1 = Noob
lvl 5 = Pro

And so on…

Trouble is I dont know where to start, Or how to get a script to change the chat tag when they reach a new level.

Any help appreciated :grinning:

local players = game:GetService("Players")

players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player
	
	local level = Instance.new("IntValue")
	level.Name = "Level"
	level.Parent = leaderstats
	
	local experience = Instance.new("IntValue")
	experience.Name = "Experience"
	experience.Parent = leaderstats
end)

This script should get you started off with a level/experience system.

Here’s a tutorial for chat tags.

1 Like

Here some other keys on setting the chat data of the speaker and the system of it

local ChatService = require(game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner"):WaitForChild("ChatService")) 

local PlayerSpeakerName = ChatService.SpeakerAdded:Wait() 

local Speaker = ChatService:GetSpeaker(PlayerSpeakerName)

--Tag Here//
Speaker:SetExtraData("Tags", {
	[game:GetService("Players"):FindFirstChild(PlayerSpeakerName).UserId] = {
		TagText =
			--TAG TEXT HERE--
			"Noob",
		--/
		TagColor =
			--TAG COLOR HERE--
			Color3.new(0.333333, 1, 1)
		--/
	}
})

--Message Here//
Speaker:SetExtraData("ChatColor", 
	--MESSAGE COLOR HERE--
	Color3.new(1, 0.666667, 1)
	--/
)

--Player Name Here//
Speaker:SetExtraData("NameColor",
	--Player Name Color Here--
	Color3.new(1, 1, 0.498039)
	--/
)
1 Like

Can you please explain? I dont know how to connect this with my leaderstats script? Thanks!

ur gonna call this when the rank is changed you could use a basevalue for the rank and detect it when it changes by using Changed() on the value

those on the boxes which you gonna change when the rank is changed