help with this code please?

local function ToAdmins(ply, cmd, args)
if not args[1] then return false end

local text = table.concat(args, " ")
local send = {}

if ply ~= game.GetWorld() then table.insert(send, ply) end
for k,v in pairs(player.GetAll()) do
    if FAdmin.Access.PlayerHasPrivilege(v, "AdminChat") or v:IsAdmin() then
        table.insert(send, v)
if not 
net.Receive( "Notstaffnoadminchat", function( len, ply )
 print("You do not have access to talk in adminchat")


what is wrong with this code please help me?

Else, not “if not”

not working bud.

Looks like you copied lines from somewhere and just added code, without knowing what it do.

I can recommend reading basic lua and the g-wiki on net.Recive, as you’re using it wrong.

its the fadmin admichat

and ive just added if not then return “no access to chat”