Shadow Mode: Anonymous Moderating Tool

Whoops, I forgot: you also need to set yourself as an admin in the IsAdmin module script.

Screen Shot 2023-01-13 at 6.58.16 PM

Screen Shot 2023-01-13 at 6.59.17 PM

Oh weird. So it’s just doing nothing? Are you sure you have the correct user ID?

i did set myself as an admin in the module

1 Like

yep i did check i don’t know why it’s not working

1 Like

Huh. I’m not sure why it isn’t working then. If you send me a picture of your IsAdmin module code and explorer I might be able to figure it out.

1 Like

It’s because the user ID is negative. If you remove the negative sign it will work.

The ID that was there was the first test character’s ID, which is -1. All non-test characters have positive user IDs.

thank you so much it’s working now thanks

1 Like

TopBarPlus doesn’t work super well with dynamic drop down lists, though you can make a UI pop up pretty easily like so:

Create an icon:

local newIcon = Icon.new()
newIcon:setRight()
newIcon:autoDeselect(false)

Give the icon a label:

newIcon:setLabel("Open GUI")

Make the functions to connect to the events:

local function onSelect()
	newIcon:setLabel("Close GUI")
	-- Code to open GUI
end
	
local function onDeselect()
	newIcon:setLabel("Open GUI")
	-- Code to close GUI
end
	
newIcon:bindEvent("selected", onSelect)
newIcon:bindEvent("deselected", onDeselect)

You can manually deselect the icon and run the connected function by doing:

newIcon:deselect()

(For if you have an exit button on your GUI) (Run newIcon:deselect() when the exit button is pressed)

I’m pretty busy with school rn, so I’m probably not going to make this soon.

You need to do this on every client except the hidden user’s client or else it won’t truly hide you from CoreGui

Also, parenting it to nil will call PlayerRemoving on the client (reparenting back calls PlayerAdded)

1 Like

If it’s in the client then it doesn’t worry me, but it still is bad usage tbh as @RadiatedExodus said

There is a problem I encountered.

When I put my user ID in studio, it gives me the tool, but it gave the other dev the tool as well, idk if it gives other people the tool because the game is private, but is this supposed to happen?

1 Like

That shouldn’t happen. Could you send me a picture of your IsAdmin module?

Here is the isadmin script

local ADMIN_GROUPS = {	
	{0, 0};
}

local ADMIN_PLAYERS = {
	2540014956;
}

local function isValidPlayer(player)
	return player and player:IsA("Player")
end

local function isAdmin(player)
	isValidPlayer(player)
	
	if table.find(ADMIN_PLAYERS, player.UserId) then
		return true
	end
	
	for _, groupData in ipairs(ADMIN_GROUPS) do
		if player:GetRankInGroup(groupData[1]) >= groupData[2] then
			return true
		end
	end
	
	return false
end

return isAdmin
1 Like

If you end-up updating this and adding fly-mode etc I will 100% add this to my anti-cheat im currently creating.

My related topics for refence:

1 Like

The problem is the admin groups section.

local ADMIN_GROUPS = {	
	{0, 0};
}

The first number there is the group ID and the second number is the rank in the group. A rank of zero is the guest rank. That means all players, even ones not in group zero, have a rank of zero or higher.

If you want to have no groups affect who is an admin, have admin groups look like this:

local ADMIN_GROUPS = {

}

If you want to include this in your anti cheat you can use the interface function the SetShadowMode module returns.

I more meant for this to be a function that people could add to their own cmd and admin systems, so I’m not planning on adding lots of features. I will update for bugs though if any are found.

1 Like

Thank you, I did not know that!

Now I can stop worrying :sweat_smile:

1 Like