Add :removedexnew for removing Dex GUIs from players#1877
Add :removedexnew for removing Dex GUIs from players#1877wilsontulus wants to merge 6 commits intoEpix-Incorporated:masterfrom
Conversation
Dex can now be revoked / removed with :revokedexnew and other similar commands. Also includes a check for existing Dex_Client in PlayerGui when loading, and some code style fixes (ply -> plr)
Should be targeting the destination / selected players instead.
Sorry for the little mistake, fixed for now. |
All good |
Only users with the same rank or lower than the source user. This prevents certain cases when the owner is using dex but someone with HeadAdmin uses the command against the owner.
P3tray
left a comment
There was a problem hiding this comment.
Hello. Old man here with some gripes!
Why on gods green earth would you make a command to prevent someone from running a command? That's what admin levels are for! Why wouldn't you allow someone to run dex, but let them run :s, :btools and other commands? The key difference between admin levels is that Admins+ can run dangerous commands. If that doesn't work for you, allow lower admins levels to run higher commands or create a custom level. This goes against Adonis's design principles.
|
If you want to remove Dex from people who have been demoted in the same session (not sure how we handle this). If they retain dex after their admin level has been lowered, then simply add a function inside server.Admin.SetLevel or whatever to clear their dex. That's much better. |
|
Hello @P3tray , Sorry for the confusion, this command is more to removing the Dex UI rather than completely revoking the access since by executing the This PR is also made for this issue #1857 , which the suggester prefers the Dex UI to be removed after using it in some way. (I've also thought about adding an option in the About making a function for automatically removing the Dex inside |
|
Actually it would be better if it only affected the user running the command rather than be able to remove someone's access (you cant even give dex access to someone else normally unless you run :sudo which is restricted to Creator+) |
In my opinion, users with higher ranks than the minimum rank for using Dex should also have some kind of control to atleast remove the Dex UI from the lower rank (e.g. HeadAdmins). |
|
Crazy that a command this specific is getting merged instead of made into a plugin tbh when is anyone ever going to need to use this |
Technically the Dex itself is a plugin though, an "internal" one, due to it's third-party nature. |
|
yeah dex is "technically" a plugin |
|
Woah woah woah who said it's getting merged |
Yes. Now, I'll vouch in favor of Wilson! A lot of our commands do have :un* versions, like :unlight and stuff. Having :undex is fine. This can be considered as a band aid fix until something's done inside Admin.SetLevel. I will also point zero other people have complained about users retaining dex after being demoted, because that very rarely happens. Regarless, it's probably good to merge. Could you rename the cmd from :removenewdex to :undex, so it removes all dex, regardless of if it's Dex V3 or V4?. Can someone less lazy than me read the code for malware? The diff is too big to look at on GitHub. Thanks for your contribution, Wilson. |
GalacticInspired
left a comment
There was a problem hiding this comment.
I am Saul Goodman and I approve of these changes.
…yer's rank is higher This commit removes the unnecessary command aliases as the main task is to remove Dex from target player(s) and the old Dex is no longer bundled with current releases of Adonis. Also adds a hint when a target player's rank is higher than the user of the command.
Forgot to rename it last commit...
The unnecessary aliases are now removed, sorry for the inconsistencies before. IIRC Dex V3 is no longer shipped with latest releases of Adonis, though using Variables.DexNames is still a good idea.
Yeah, unfortunately it's a common issue in working with rbxmx files like the Dex plugin due to the nature of Roblox Studio sometimes changing the signature / uniqueIds of the Instances, even when the only real change is a variable name change (which unfortunately just hit me recently with 13K additions(??!) for some reason). |
|
@wilsontulus |
The difference between This command only removes Dex GUIs, and it also removes the (yes, it can also be implemented in |
|
also i'm probably going to redo this at my free time. the commits are too many for such a simple change and the addition counts triggered by rbxmx saving are simply too many (and probably suspicious) for the fellow maintainers. Edit: While experimenting a bit, setting a function inside the dex plugin for dex removal and calling it from Admin.SetLevel does work, but I'm not sure if it's a good practice though. |


Dex can now be removed from a player with
:removedexnewand other similar commands.This PR also includes a check for existing Dex_Client in PlayerGui when loading (and removes the old Dex_Client if found), and some code style fixes (mainly the inconsistencies of player variable naming).
Expected intended behavior
After executing
:removedexnew(or other similar commands) to a player, the player is removed from theServerNewDex.Authorizedlist (for security purposes), every Dex-related GUIs (listed in Variables.DexNames) are removed, and the existing Dex_Client in the player's PlayerGui on the server is also removed.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
2025-04-08.10-55-55.mp4