How to give a user HD admin VIP commands if a boolen value is true?

If I recall, it has a module function meant for ranking, (hence the chat rank command), you can use that too. Found it.

function module:RankPlayerSimple(player, newRank, automaticRank)
	local pdata = main.pd[player]
	if tonumber(newRank) == nil then
		newRank = main:GetModule("cf"):GetRankId(newRank)
	end
	if pdata.Rank <= newRank then
		if automaticRank then
			main:GetModule("PlayerData"):ChangeStat(player, "AutomaticRank", newRank)
		end
		if pdata.Rank < newRank then
			main:GetModule("PlayerData"):ChangeStat(player, "Rank", newRank)
		end
	end
end

It’s in ServerCoreFunctions modulescript.
You would need to use that function with these parameters.
RankPlayerSimple(player, main.permissions.vipServerPlayer, true)

1 Like