Script
Spoiler
if p == nil then p = {} end
--------USGN-Tables--------
p.owner = {}
p.superadmin = {}
p.admin = {}
p.mod = {}
p.member = {}
addhook([[join]],[[thejoin]])
function thejoin(id)
if status(p.owner,id) == true then
msg("©255255255"..player(id,"name").." Joined the server")
end
if status(p.superadmin,id) == true then
msg("©255255255"..player(id,"name").." Joined the server")
end
if status(p.admin,id) == true then
msg("©255255255"..player(id,"name").." Joined the server")
end
if status(p.mod,id) == true then
msg("©255255255"..player(id,"name").." Joined the server")
end
if status(p.member,id) == true then
msg("©255255255"..player(id,"name").." Joined the server")
end
end
function status(table,id)
for _, u in ipairs(table) do
if player(id,"usgn") == u then
return true
end
end
return false
end
addhook("say","p.psay")
function p.psay(id,txt)
if txt == "!resetscore" then
parse("setscore "..id.." 0")
parse("setdeaths "..id.." 0")
msg("©041023000"..player(id,"name").." used !ResetScore")
return 1
elseif string.lower(txt) ~= "rank" then
if status(p.owner,id) then
msg("©000255255"..player(id,"name").." [Clan-Leader]: "..txt)
return 1
elseif status(p.viceowner,id) then
msg("©255000255"..player(id,"name").." [S-Admin]: "..txt)
return 1
elseif status(p.admin,id) then
msg("©255255255"..player(id,"name").." [Admin]: "..txt)
return 1
elseif status(p.mod,id) then
msg("©000000255"..player(id,"name").." [Moderator]: "..txt)
return 1
elseif status(p.member,id) then
msg("©255155000"..player(id,"name").." [Member]: "..txt)
return 1
end
end
------------------owner----------------
addhook("say,sayc")
function sayc(id, t)
if status (p.owner,id) == true and t:sub(1,5)=="!removesuperadmin" then
kid=tonumber(t:sub(7,8))
parse("removestatussuperadmin "..kid)
msg("©041023000"..player(id,"name").." used !removesuperadmin")
end
if status (p.owner,id) == true and t:sub(1,5)=="!removeadmin" then
kid=tonumber(t:sub(7,8))
parse("removestatusadmin "..kid)
msg("©041023000"..player(id,"name").." used !removeadmin")
end
if status (p.owner,id) == true and t:sub(1,5)=="!removemod" then
kid=tonumber(t:sub(7,8))
parse("removestatusmod "..kid)
msg("©041023000"..player(id,"name").." used !removemod")
end
if status (p.owner,id) == true and t:sub(1,5)=="!removemember" then
kid=tonumber(t:sub(7,8))
parse("removestatusmember "..kid)
msg("©041023000"..player(id,"name").." used !removemember")
end
if status (p.owner,id) == true and t:sub(1,5)=="!makesuperadmin" then
kid=tonumber(t:sub(7,8))
parse("statussuperadmin "..kid)
msg("©041023000"..player(id,"name").." used !makesuperadmin")
end
if status (p.owner,id) == true and t:sub(1,5)=="!makeadmin" then
kid=tonumber(t:sub(7,8))
parse("statusadmin "..kid)
msg("©041023000"..player(id,"name").." used !makeadmin")
end
if status (p.owner,id) == true and t:sub(1,5)=="!makemod" then
kid=tonumber(t:sub(7,8))
parse("statusmod "..kid)
msg("©041023000"..player(id,"name").." used !makemod")
end
if status (p.owner,id) == true and t:sub(1,5)=="!makemember" then
kid=tonumber(t:sub(7,8))
parse("statusmember "..kid)
msg("©041023000"..player(id,"name").." used !makemember")
end
if status (p.owner,id) == true and t:sub(1,5)=="!ban" then
kid=tonumber(t:sub(7,8))
parse("ban "..kid)
msg("©041023000"..player(id,"name").." used !ban")
end
if status (p.owner,id) == true and t:sub(1,5)=="!kick" then
kid=tonumber(t:sub(7,8))
parse("kick "..kid)
msg("©041023000"..player(id,"name").." used !kick")
end
if status (p.owner,id) == true and t:sub(1,5)=="!makespec" then
kid=tonumber(t:sub(7,8))
parse("makespec "..kid)
msg("©041023000"..player(id,"name").." used !makespec")
end
if status (p.owner,id) == true and t:sub(1,5)=="!makect" then
kid=tonumber(t:sub(7,8))
parse("makect "..kid)
msg("©041023000"..player(id,"name").." used !makect")
end
if status (p.owner,id) == true and t:sub(1,5)=="!maket" then
kid=tonumber(t:sub(7,8))
parse("maket "..kid)
msg("©041023000"..player(id,"name").." used !maket")
end
if status (p.owner,id) == true and t:sub(1,5)=="!banusgn" then
kid=tonumber(t:sub(7,8))
parse("banusgn "..kid)
msg("©041023000"..player(id,"name").." used !banusgn")
end
if status (p.owner,id) == true and t:sub(1,5)=="!banip" then
kid=tonumber(t:sub(7,8))
parse("banip "..kid)
msg("©041023000"..player(id,"name").." used !banip")
end
if status (p.owner,id) == true and t:sub(1,5)=="!banname" then
kid=tonumber(t:sub(7,8))
parse("banname "..kid)
msg("©041023000"..player(id,"name").." used !banname")
end
if status (p.owner,id) == true and t:sub(1,5)=="!kill" then
kid=tonumber(t:sub(7,8))
parse("kill "..kid)
msg("©041023000"..player(id,"name").." used !kill")
end
end
-----------------super-admin----------------
if status (p.superadmin,id) == true and t:sub(1,5)=="!ban" then
kid=tonumber(t:sub(7,8))
parse("ban "..kid)
msg("©041023000"..player(id,"name").." used !ban")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!kick" then
kid=tonumber(t:sub(7,8))
parse("kick "..kid)
msg("©041023000"..player(id,"name").." used !kick")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!makespec" then
kid=tonumber(t:sub(7,8))
parse("makespec "..kid)
msg("©041023000"..player(id,"name").." used !makespec")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!makect" then
kid=tonumber(t:sub(7,8))
parse("makect "..kid)
msg("©041023000"..player(id,"name").." used !makect")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!maket" then
kid=tonumber(t:sub(7,8))
parse("maket "..kid)
msg("©041023000"..player(id,"name").." used !maket")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!banusgn" then
kid=tonumber(t:sub(7,8))
parse("banusgn "..kid)
msg("©041023000"..player(id,"name").." used !banusgn")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!banip" then
kid=tonumber(t:sub(7,8))
parse("banip "..kid)
msg("©041023000"..player(id,"name").." used !banip")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!banname" then
kid=tonumber(t:sub(7,8))
parse("banname "..kid)
msg("©041023000"..player(id,"name").." used !banname")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!kill" then
kid=tonumber(t:sub(7,8))
parse("kill "..kid)
msg("©041023000"..player(id,"name").." used !kill")
end
end
------------------admin----------------
if status (p.admin,id) == true and t:sub(1,5)=="!ban" then
kid=tonumber(t:sub(7,8))
parse("ban "..kid)
msg("©041023000"..player(id,"name").." used !ban")
end
if status (p.admin,id) == true and t:sub(1,5)=="!kick" then
kid=tonumber(t:sub(7,8))
parse("kick "..kid)
msg("©041023000"..player(id,"name").." used !kick")
end
if status (p.admin,id) == true and t:sub(1,5)=="!makect" then
kid=tonumber(t:sub(7,8))
parse("makect "..kid)
msg("©041023000"..player(id,"name").." used !makect")
end
if status (p.admin,id) == true and t:sub(1,5)=="!maket" then
kid=tonumber(t:sub(7,8))
parse("maket "..kid)
msg("©041023000"..player(id,"name").." used !maket")
end
if status (p.admin,id) == true and t:sub(1,5)=="!banusgn" then
kid=tonumber(t:sub(7,8))
parse("banusgn "..kid)
msg("©041023000"..player(id,"name").." used !banusgn")
end
if status (p.admin,id) == true and t:sub(1,5)=="!banip" then
kid=tonumber(t:sub(7,8))
parse("banip "..kid)
msg("©041023000"..player(id,"name").." used !banip")
end
if status (p.admin,id) == true and t:sub(1,5)=="!banname" then
kid=tonumber(t:sub(7,8))
parse("banname "..kid)
msg("©041023000"..player(id,"name").." used !banname")
end
end
------------------mod----------------
if status (p.mod,id) == true and t:sub(1,5)=="!kick" then
kid=tonumber(t:sub(7,8))
parse("kick "..kid)
msg("©041023000"..player(id,"name").." used !kick")
end
if status (p.mod,id) == true and t:sub(1,5)=="!banname" then
kid=tonumber(t:sub(7,8))
parse("banname "..kid)
msg("©041023000"..player(id,"name").." used !banname")
end
end
end
--------USGN-Tables--------
p.owner = {}
p.superadmin = {}
p.admin = {}
p.mod = {}
p.member = {}
addhook([[join]],[[thejoin]])
function thejoin(id)
if status(p.owner,id) == true then
msg("©255255255"..player(id,"name").." Joined the server")
end
if status(p.superadmin,id) == true then
msg("©255255255"..player(id,"name").." Joined the server")
end
if status(p.admin,id) == true then
msg("©255255255"..player(id,"name").." Joined the server")
end
if status(p.mod,id) == true then
msg("©255255255"..player(id,"name").." Joined the server")
end
if status(p.member,id) == true then
msg("©255255255"..player(id,"name").." Joined the server")
end
end
function status(table,id)
for _, u in ipairs(table) do
if player(id,"usgn") == u then
return true
end
end
return false
end
addhook("say","p.psay")
function p.psay(id,txt)
if txt == "!resetscore" then
parse("setscore "..id.." 0")
parse("setdeaths "..id.." 0")
msg("©041023000"..player(id,"name").." used !ResetScore")
return 1
elseif string.lower(txt) ~= "rank" then
if status(p.owner,id) then
msg("©000255255"..player(id,"name").." [Clan-Leader]: "..txt)
return 1
elseif status(p.viceowner,id) then
msg("©255000255"..player(id,"name").." [S-Admin]: "..txt)
return 1
elseif status(p.admin,id) then
msg("©255255255"..player(id,"name").." [Admin]: "..txt)
return 1
elseif status(p.mod,id) then
msg("©000000255"..player(id,"name").." [Moderator]: "..txt)
return 1
elseif status(p.member,id) then
msg("©255155000"..player(id,"name").." [Member]: "..txt)
return 1
end
end
------------------owner----------------
addhook("say,sayc")
function sayc(id, t)
if status (p.owner,id) == true and t:sub(1,5)=="!removesuperadmin" then
kid=tonumber(t:sub(7,8))
parse("removestatussuperadmin "..kid)
msg("©041023000"..player(id,"name").." used !removesuperadmin")
end
if status (p.owner,id) == true and t:sub(1,5)=="!removeadmin" then
kid=tonumber(t:sub(7,8))
parse("removestatusadmin "..kid)
msg("©041023000"..player(id,"name").." used !removeadmin")
end
if status (p.owner,id) == true and t:sub(1,5)=="!removemod" then
kid=tonumber(t:sub(7,8))
parse("removestatusmod "..kid)
msg("©041023000"..player(id,"name").." used !removemod")
end
if status (p.owner,id) == true and t:sub(1,5)=="!removemember" then
kid=tonumber(t:sub(7,8))
parse("removestatusmember "..kid)
msg("©041023000"..player(id,"name").." used !removemember")
end
if status (p.owner,id) == true and t:sub(1,5)=="!makesuperadmin" then
kid=tonumber(t:sub(7,8))
parse("statussuperadmin "..kid)
msg("©041023000"..player(id,"name").." used !makesuperadmin")
end
if status (p.owner,id) == true and t:sub(1,5)=="!makeadmin" then
kid=tonumber(t:sub(7,8))
parse("statusadmin "..kid)
msg("©041023000"..player(id,"name").." used !makeadmin")
end
if status (p.owner,id) == true and t:sub(1,5)=="!makemod" then
kid=tonumber(t:sub(7,8))
parse("statusmod "..kid)
msg("©041023000"..player(id,"name").." used !makemod")
end
if status (p.owner,id) == true and t:sub(1,5)=="!makemember" then
kid=tonumber(t:sub(7,8))
parse("statusmember "..kid)
msg("©041023000"..player(id,"name").." used !makemember")
end
if status (p.owner,id) == true and t:sub(1,5)=="!ban" then
kid=tonumber(t:sub(7,8))
parse("ban "..kid)
msg("©041023000"..player(id,"name").." used !ban")
end
if status (p.owner,id) == true and t:sub(1,5)=="!kick" then
kid=tonumber(t:sub(7,8))
parse("kick "..kid)
msg("©041023000"..player(id,"name").." used !kick")
end
if status (p.owner,id) == true and t:sub(1,5)=="!makespec" then
kid=tonumber(t:sub(7,8))
parse("makespec "..kid)
msg("©041023000"..player(id,"name").." used !makespec")
end
if status (p.owner,id) == true and t:sub(1,5)=="!makect" then
kid=tonumber(t:sub(7,8))
parse("makect "..kid)
msg("©041023000"..player(id,"name").." used !makect")
end
if status (p.owner,id) == true and t:sub(1,5)=="!maket" then
kid=tonumber(t:sub(7,8))
parse("maket "..kid)
msg("©041023000"..player(id,"name").." used !maket")
end
if status (p.owner,id) == true and t:sub(1,5)=="!banusgn" then
kid=tonumber(t:sub(7,8))
parse("banusgn "..kid)
msg("©041023000"..player(id,"name").." used !banusgn")
end
if status (p.owner,id) == true and t:sub(1,5)=="!banip" then
kid=tonumber(t:sub(7,8))
parse("banip "..kid)
msg("©041023000"..player(id,"name").." used !banip")
end
if status (p.owner,id) == true and t:sub(1,5)=="!banname" then
kid=tonumber(t:sub(7,8))
parse("banname "..kid)
msg("©041023000"..player(id,"name").." used !banname")
end
if status (p.owner,id) == true and t:sub(1,5)=="!kill" then
kid=tonumber(t:sub(7,8))
parse("kill "..kid)
msg("©041023000"..player(id,"name").." used !kill")
end
end
-----------------super-admin----------------
if status (p.superadmin,id) == true and t:sub(1,5)=="!ban" then
kid=tonumber(t:sub(7,8))
parse("ban "..kid)
msg("©041023000"..player(id,"name").." used !ban")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!kick" then
kid=tonumber(t:sub(7,8))
parse("kick "..kid)
msg("©041023000"..player(id,"name").." used !kick")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!makespec" then
kid=tonumber(t:sub(7,8))
parse("makespec "..kid)
msg("©041023000"..player(id,"name").." used !makespec")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!makect" then
kid=tonumber(t:sub(7,8))
parse("makect "..kid)
msg("©041023000"..player(id,"name").." used !makect")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!maket" then
kid=tonumber(t:sub(7,8))
parse("maket "..kid)
msg("©041023000"..player(id,"name").." used !maket")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!banusgn" then
kid=tonumber(t:sub(7,8))
parse("banusgn "..kid)
msg("©041023000"..player(id,"name").." used !banusgn")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!banip" then
kid=tonumber(t:sub(7,8))
parse("banip "..kid)
msg("©041023000"..player(id,"name").." used !banip")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!banname" then
kid=tonumber(t:sub(7,8))
parse("banname "..kid)
msg("©041023000"..player(id,"name").." used !banname")
end
if status (p.superadmin,id) == true and t:sub(1,5)=="!kill" then
kid=tonumber(t:sub(7,8))
parse("kill "..kid)
msg("©041023000"..player(id,"name").." used !kill")
end
end
------------------admin----------------
if status (p.admin,id) == true and t:sub(1,5)=="!ban" then
kid=tonumber(t:sub(7,8))
parse("ban "..kid)
msg("©041023000"..player(id,"name").." used !ban")
end
if status (p.admin,id) == true and t:sub(1,5)=="!kick" then
kid=tonumber(t:sub(7,8))
parse("kick "..kid)
msg("©041023000"..player(id,"name").." used !kick")
end
if status (p.admin,id) == true and t:sub(1,5)=="!makect" then
kid=tonumber(t:sub(7,8))
parse("makect "..kid)
msg("©041023000"..player(id,"name").." used !makect")
end
if status (p.admin,id) == true and t:sub(1,5)=="!maket" then
kid=tonumber(t:sub(7,8))
parse("maket "..kid)
msg("©041023000"..player(id,"name").." used !maket")
end
if status (p.admin,id) == true and t:sub(1,5)=="!banusgn" then
kid=tonumber(t:sub(7,8))
parse("banusgn "..kid)
msg("©041023000"..player(id,"name").." used !banusgn")
end
if status (p.admin,id) == true and t:sub(1,5)=="!banip" then
kid=tonumber(t:sub(7,8))
parse("banip "..kid)
msg("©041023000"..player(id,"name").." used !banip")
end
if status (p.admin,id) == true and t:sub(1,5)=="!banname" then
kid=tonumber(t:sub(7,8))
parse("banname "..kid)
msg("©041023000"..player(id,"name").." used !banname")
end
end
------------------mod----------------
if status (p.mod,id) == true and t:sub(1,5)=="!kick" then
kid=tonumber(t:sub(7,8))
parse("kick "..kid)
msg("©041023000"..player(id,"name").." used !kick")
end
if status (p.mod,id) == true and t:sub(1,5)=="!banname" then
kid=tonumber(t:sub(7,8))
parse("banname "..kid)
msg("©041023000"..player(id,"name").." used !banname")
end
end
end