Add :undex command to remove Dex from players, and hook the removal function to Server.Core.Admin.luau #1974
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(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 toAdmin.SetLevel(player)such as:unrankis 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
:undexcommand 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