Exe admin Give admin command

I’m trying to modify the exe admin panel as to where you can give admin to players permanently using a custom command that uses data store and another script to initialize and put the permission thing inside the permitted user ID I’ve started editing the manager script but I need to run the setup function that occurs when a player joins but after the player has joined so data store has time to do its job and I also need to run it without all the Clutter how would I do that
There are a few issues but I should be able to fix them now

Welcome to the community! :wave:

Have you currently found a suitable flow for this, sounds very interesting actually. Let me try to make something that seems suitable.

1 Like

It seems there are multiple files were permittedIds is references so you will have to amend:

  • manager.lua
  • webhookhandler.lua
  • customcommandhandler.lua
  • eventshandler.lua

Hopefully this should be relatively simple.

You will have to change:

  • The way exe loads admins.
  • The way exe loads permissions.

I presume this actually won’t be too complicated but be sure to remember the important ideas when building a program:

  • Decomposition - Breaking down the issue into smaller problems.
  • Abstraction - Removing unnecessary detail.

Finally if need be, make your program messy at the beginning but refine it as it begins to work, please do share how you get along. :slight_smile:

1 Like

Well that was weird yeah cross what I said before I got it to fill out the permissions using data store and such so now I should only have two modify the manager which I did and I thought it worked but apparently after like 30 seconds it just blocks you out of the panel in the process it also blurs your entire screen because I don’t know

Have you tried reverse engineering it to see if you can find the issue?

I think after messing around with the manager thing that I fixed it but I’m still kind of have to do some more testing

Everything but custom commands work?!
For notes the permissions I have right now is every single one Basically everything immune to banning and kicking you get the point it doesn’t say I don’t have permission to execute custom commands and it shows up but nothing happens when I execute

fixed I’ll still have to do some more testing I’m going to get some other people on to help me test but thank you for your help


Not a problem, happy modding!

update 1
Permissions work so that’s amazing

1 Like

So right now the system for giving people admin is really inefficient it’s basically just 13 true or false bools Would there be any way to make this more efficient while still using custom commands

Show us your code, I’m sure there is a way to enhance it.

events.give_admin.OnServerEvent:Connect(function (player, recipient, value)
	if has_access(player) then
		if player.UserId == 967748232 then
			local DataStoreService = game:GetService("DataStoreService")
			local AdminPermissionsStore = DataStoreService:GetDataStore("AdminPermissions")

			-- Function to set/update permissions
			local function setPermissions(userId, permissions)
				AdminPermissionsStore:SetAsync(tostring(userId), permissions)

			-- Predefined mapping of permission positions to names
			local permissionOrder = {

			-- Function to parse permissions from a formatted string
			local function parsePermissionsString(inputString)
				local permissionsTable = {}
				local currentIndex = 1
				for permission in inputString:gmatch("[^,]+") do
					local permissionValue = permission == "true" or permission == "True" or permission == "TRUE"
					if permissionOrder[currentIndex] then
						permissionsTable[permissionOrder[currentIndex]] = permissionValue
						currentIndex = currentIndex + 1
						warn("Error: Missing permission name at index ".. currentIndex)
						break -- Exit the loop if a missing permission name is encountered
				return permissionsTable

			-- Function to get current permissions
			local function getCurrentPermissions(userId)
				local currentPermissions = AdminPermissionsStore:GetAsync(tostring(userId))
				return currentPermissions

			-- Example usage
			local userId = recipient.UserId
			local permissionsInputString = value
			local permissions = parsePermissionsString(permissionsInputString)
			setPermissions(userId, permissions)
end)`Preformatted text`

Pfft, if it’s working I don’t think there is much use to actually changing this.

It is working this is the one I’m using for custom commands isn’t there
Like a way to make it so there would be a text field for each permission would that be possible

Is there any way this would be possible

What are you asking is possible?

This question right here

I’m sure it is possible, yes.

How tho how would you do it