Custom Leaderboard Icons

Would it be possible to fork one of the corescripts to achieve custom icons like the ones seen next to Administrators on the player list? I’ve been looking through the CoreScript repository on GitHub, and I found the module that controls permissions. I’m not particularly interested in creating a custom leaderboard UI as UI design really isn’t my thing.

local PlayerPermissionsModule = {}

local function HasRankInGroupFunctionFactory(groupId, requiredRank)
	local hasRankCache = {}
	assert(type(requiredRank) == "number", "requiredRank must be a number")
	return function(player)
		if player and player.UserId > 0 then
			if hasRankCache[player.UserId] == nil then
				local hasRank = false
				pcall(function()
					hasRank = player:GetRankInGroup(groupId) >= requiredRank
				end)
				hasRankCache[player.UserId] = hasRank
			end
			return hasRankCache[player.UserId]
		end
		return false
	end
end

local function IsInGroupFunctionFactory(groupId)
	local inGroupCache = {}
	return function(player)
		if player and player.UserId > 0 then
			if inGroupCache[player.UserId] == nil then
				local inGroup = false
				pcall(function()
					inGroup = player:IsInGroup(groupId)
				end)
				inGroupCache[player.UserId] = inGroup
			end
			return inGroupCache[player.UserId]
		end
		return false
	end
end

PlayerPermissionsModule.IsPlayerAdminAsync = IsInGroupFunctionFactory(1200769)
PlayerPermissionsModule.IsPlayerInternAsync = HasRankInGroupFunctionFactory(2868472, 100)
PlayerPermissionsModule.IsPlayerStarAsync = IsInGroupFunctionFactory(4199740)

return PlayerPermissionsModule

Is this achievable?

1 Like

There is no way to create custom icons on the default Roblox leaderboard as far as I know. This can only be achieved if you make your own custom leaderboard.

Okay. Is the source of the leaderboard UI open or is it unavailable?

The source of the default Roblox leaderboard UI?

Yes. I am terrible at UI design, so wouldn’t be able to design a nice looking one myself.

Sadly, no, it’s unavailable. 30 chars

No, it actually is available. You just have to go through a few other things to piece together the whole leaderboard, but here’s one part of it for example.

https://github.com/CloneTrooper1019/Roblox-Client-Tracker/blob/roblox/scripts/CoreScripts/Modules/PlayerlistModule.lua

Is that updated with the new leaderboard Roblox released a while back? The one I was looking at on Roblox’s GitHub repository was quite outdated.

Yes, the stuff on this repository is all latest. CloneTrooper has a tool that automatically updates this repository with stuff data mined from the client and all, can’t remember the exact process for it.

The Roblox GitHub repository is severely outdated and not maintained, hasn’t been for the past few years. It’s not a reliable resource anymore, so anything to do with Roblox CoreScripts should be searched for via Clone’s Client Tracker repository (as linked above).

There’s a few other related PlayerList items in here that you may need to go through to fully piece together the leaderboard. As well, if you intend to fork this, then there are certain functionalities you’ll need to remove which CoreScripts have access to but developer scripts don’t.

1 Like

In addition to finding it on github, if you wanted to go on an adventure, you could find the scripts in your Roblox Appdata folder.

I was actually looking for Roblox in my appdata folder earlier to try and find the updated scripts, but couldn’t find it.

No idea if I’m in the wrong thing or not, but I think I’ll just get them off of the GitHub repository.

They put it in local, not Roaming. Little different than the usual appdata area.
image

So, would it be necessary to copy every single CoreScript module that the main leaderboard script requires? I haven’t really ever done this before, so kind of confused as to what to do from here.

Not sure either because I haven’t ever forked it or ever had a reason to. I just make my own leaderboard if I need to override behaviours, no matter how major or minor they are, since I figure I just do it myself without forcing it on the current leaderboards.

1 Like

With this information would it be possible to have the owner icon given to owners on the game from a group game.
The issue I have with my game is that people do not believe im the owners my game because I do not have the hammer next to my name, could this possibly resolve this issue, if so how?

Native support for users with group game access receiving a developer icon is already on the way, it just isn’t live yet. You don’t need to worry too much about any custom leaderboard or forking to get that icon in for yourself if you’d like to continue using the default leaderboard.

Look under the Changes section for Release Notes 425:
https://developer.roblox.com/en-us/resources/release-note/Release-Notes-for-425

Oh sweet, so it’s gonna be a feature soon to give group devs icons :slight_smile: