Again, like others have said, I don't think that changing or hiding the category will do what you want it to. The command will still show up in ULX Menu regardless- there's no way to "hide" it from people who have access to it.
The problem is that I have a undercover script, but everyone can use it and that is after I restrict it to superadmins only.
undercover:defaultAccess( ULib.ACCESS_SUPERADMIN )When I remove admins access to it via ULX groups etc, then no one can use it..
So,
"defaultAccess" will set up the INITIAL permissions the FIRST time the command has been run. It sounds like this was set to Admins when you first ran your code, so ULX gave your admins group access to "ulx undercover". Then, you changed it to Superadmin, which has no effect for you now because the permissions have already been set up. (Superadmins have access to the command through inheritance, which means removing it from admins causes superadmins not to be able to use it.)
In order to reset this, you should open your data/ulib/groups.txt file, and remove any lines that that give access to "ulx undercover". Then, find the misc_registered.txt file in the same group, and also remove the line that says "ulx undercover". Once you've done this, restart your server, and the command should be given access to Superadmins by default.