How to get a table of admins in Kohl's admin

You can write your topic however you want, but you need to answer these questions:

  1. What do I want to achieve?
    Get the table of admins from the kohl’s admin module from a completely unrelated server script.

  2. What is the issue?
    I dunno how to get a table of all the admins/superadmins/vips/etc… in a completely detached script from the kohl’s admin main modules.

  3. What solutions have you tried so far?
    I have tried looking on the dev forum, on youtube and looking at the kohl’s admin module scripts trying to understand them myself

This is how far i got, but I don’t know how to get a table of the admins from here. Sorry if this is kinda asking for people to script me a thing but I simply have no other choice at this point

l

ocal Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local AdminModule = require(ReplicatedStorage:WaitForChild("MainAdminModule"))

Players.PlayerAdded:Connect(function(plr)
	local plrId = plr.UserId
	local plrName = plr.Name
	
	local Admins = AdminModule[] -- what do here
	
	plr.CharacterAdded:Connect(function(char)
		
	end)
end)
1 Like

You are going to have to edit the base admin module, although its not too difficult, instead of returning true in the module have it return the list of admins which is in the module as a variable named “Admins”.

1 Like

isn’t that going to break the system? or is “true” irrelevant in the whole thing?

It’s irrelevant. The main module does not check what it requires, although you will need to fetch the settings from the settings module in credit which is where it loads, to get the result otherwise you will be reloading the module.

If you want to get all admins you added to your game you will just have to read the settings of Kohl’s admin from your script.

Screenshot 2024-03-27 234302

When running the game Kohl’s admin will clone itself into ServerScriptService along with its settings and other parts. In the admins of your game will be stored in those settings or atleast visible. So you will have to require these settings since they’re a module script and get the data you were looking for.

Code of the settings:

-- Use usernames or userIds to add a user to a list
-- For example;	Admins={'MyBestFriend','Telamon',261}

local Banned={'someoneyoudislike'} -- For those who have wronged you, & this guy

--------------------------------------------------------------
-- You DO NOT need to add yourself to any of these lists!!! --
--------------------------------------------------------------

local Owners={}					-- Can set SuperAdmins, & use all the commands
local SuperAdmins={}			-- Can set permanent admins, & shutdown the game
local Admins={}					-- Can ban, crash, & set Moderators/VIP
local Mods={}					-- Can kick, mute, & use most commands
local VIP={}					-- Can use nonabusive commands only on self

local Settings={
	
-- Style Options

Flat=true;						-- Enables Flat theme / Disables Aero theme
ForcedColor=false;				-- Forces everyone to have set color & transparency
Color=Color3.new(0,0,0);		-- Changes the Color of the user interface
ColorTransparency=.75;			-- Changes the Transparency of the user interface
Chat=false;						-- Enables the custom chat
BubbleChat=false;				-- Enables the custom bubble chat

-- Basic Settings

AdminCredit=true;				-- Enables the credit GUI for that appears in the bottom right
AutoClean=false;				-- Enables automatic cleaning of hats & tools in the Workspace
AutoCleanDelay=60;				-- The delay between each AutoClean routine
CommandBar=true;				-- Enables the Command Bar | GLOBAL KEYBIND: \
FunCommands=true;				-- Enables fun yet unnecessary commands
FreeAdmin=false;				-- Set to 1-5 to grant admin powers to all, otherwise set to false
PublicLogs=false;				-- Allows all users to see the command & chat logs
Prefix=':';						-- Character to begin a command
								--[[
	Admin Powers
	
0			Player
1			VIP					Can use nonabusive commands only on self
2			Moderator			Can kick, mute, & use most commands
3			Administrator		Can ban, crash, & set Moderators/VIP
4			SuperAdmin			Can grant permanent powers, & shutdown the game
5			Owner				Can set SuperAdmins, & use all the commands
6			Game Creator		Can set owners & use all the commands

	Group & VIP Admin
	
		You can set multiple Groups & Ranks to grant users admin powers:
		
GroupAdmin={
[12345]={[254]=4,[253]=3};
[GROUPID]={[RANK]=ADMINPOWER}
};

		You can set multiple Assets to grant users admin powers:
		
VIPAdmin={
[12345]=3;
[54321]=4;
[ITEMID]=ADMINPOWER;
};								]]

GroupAdmin={

};

VIPAdmin={

};

-- Permissions
-- You can set the admin power required to use a command
-- COMMANDNAME=ADMINPOWER;

Permissions={

};

}

return {Settings,{Owners,SuperAdmins,Admins,Mods,VIP,Banned}}

Example code you could use:

local serverScriptService = game:GetService("ServerScriptService")
local settings = require(serverScriptService["Kohl's Admin Infinite"].Settings)
local admins = settings[2][3] -- Table containing all admins

print(admins)

This will not get all of the admins though, admins added by the owner/creator will not show up here.

how would i go about doing that?
(also you’re right since all my admins are added ingame and not from the settings script, the idea provided by @TheAverageLumberjack prints out an empty table)

Also, I found this global data store with what I’m assuming to be the plrIds of all the people i have given admin to + their admin level. Maybe, somehow, I’d be able to get that data and somehow separate the different ids from a single string to multiple strings and then separate the number next to the id from the string and then apply what i want to do with that data. One thing, no idea how to do this
image

Use the string library. Here is a example of how you can get the levels and the user id.

local Data = "data here"

for i,v in pairs(Data:split(" ")) do
	local UserId = v:split(":-")[1]
	local Rank = v:split(":-")[2]
	
	-- Do what ever you need to do with the data / store it somewhere
end