Looks like your ULX or Ulib is broken. They're the ones that handle convars.
But if you want a version without the convar:
--Prop Blocker by Golden-Death--
local groups = { "superadmin", "admin" } --These groups here are allowed to spawn anything, defined in gmod/settings/users.txt
local models = { ""} --All or part of model name that is to be banned
local function block_build( ply, mdl )
for _, v in pairs( models ) do
if string.find( mdl, v ) then
for _,v in ipairs( groups ) do
if ply:IsUserGroup( v ) then
return
end
end
ULib.tsay( ply, "Non-admins are not allowed to spawn this prop. ("..mdl..")." )
return false
end
end
end
hook.Add( "PlayerSpawnProp", "block_prop", block_build )