Skip to content

Conversation

@wilsontulus
Copy link
Contributor

@wilsontulus wilsontulus commented Aug 29, 2025

(Continuation of #1877)

This PR makes it so the Dex Explorer can be removed from the source player or a specified target player with :undex, :removedex, or any other similar commands.

This PR also includes a check for existing Dex_Client in PlayerGui when loading (and removes the old Dex_Client and related GUIs if found) to give the ability for players to refresh Dex in case something else happened.

Expected intended behavior

After executing :undex (or other similar commands) to a player, or commands leading to Admin.SetLevel(player) such as :unrank is called, every Dex-related GUIs (listed in Variables.DexNames) and the existing Dex_Client in the player's PlayerGui on the server are removed, alongside removing the player from the ServerNewDex.Authorized list for security reasons.

Note that the target player must have the same rank / AdminLevel or lower than the user of the command to prevent misusage (e.g. someone with HeadAdmin uses this command against an experience owner).

Proof of functionality

Core PoF (Resetting the Dex GUI, executing the :undex command itself, and also making sure the remote function still works):

removedex_pof.mp4

Two-player PoF (Executing :undex alongside other players):

removedex_other_players_comp.mp4

Add a removal function & command, clean-up the style a bit and attach the removal function to the Functions list so that it can be used by the Server.Core.Admin module.
This will be called if both of these conditions were met: the Dex "internal plugin" is present in Server.Plugins (and loaded), and the unranked/demoted player is below rank 300 as the final result.
If the source player's rank is lower than the target's, reject with a hint.
Basically a simple but needed permission system inside the command itself.
@duckymomo360
Copy link
Contributor

duckymomo360 commented Aug 31, 2025

I think you should also add the ability for whoever has dex to remove it from themselves, regardless of rank.

Preferably though dex itself. There could be a close button in that expandable top menu that dex has.

@wilsontulus
Copy link
Contributor Author

wilsontulus commented Sep 1, 2025

I think you should also add the ability for whoever has dex to remove it from themselves, regardless of rank.

Everyone who's able to run :dex can also run :undex on themselves without any problems because both commands have the same rank requirement.
Plus, everytime a player is unranked or demoted to anything below HeadAdmin, the dex removal process will always be automatically executed.

Preferably though dex itself. There could be a close button in that expandable top menu that dex has.

The dex code style & structure is relatively more complex, and I don't think I can really add a new feature to Dex while keeping the consistency across the whole code.

@duckymomo360
Copy link
Contributor

I kinda forgot dex doesn't have a player argument. I give non-admins dex sometimes using ;sudo. Will using sudo still work?

@wilsontulus
Copy link
Contributor Author

Will using sudo still work?

Since :undex now includes an optional player argument (for example when a higher rank wants to make sure the Dex is completely gone after demoting/un-ranking), you don't even need :sudo to execute the command.

@Dimenpsyonal Dimenpsyonal added the ✨ enhancement Enhancing or improving existing functionality label Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ enhancement Enhancing or improving existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants