1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
--Settings
--Status settings
admins={}
hls={16434}
vip={}
--Allow settings
adminallow={ban=true,kick=true}
hlsallow={ban=false,kick=true}
vipallow={ban=false,kick=false}
--Other settings
local admincolor="255000000"
local hlscolor="000000255"
local vipcolor="255089000"
local admintag="[ADMIN]"
local hlstag="[HLS]"
local viptag="[VIP]"
--End of settings
--Script
function initArray(m)
	local array={}
		for i=1,m do
	array[i]=0
	end
	return array
end
mute=initArray(32)
addhook("say","colorandcmds")
function colorandcmds(id,t)
	if t:sub(1,4)=="!b" then
		for a=1,99999 do
			if (adminallow.ban==true and player(id,"usgn")==admins[a]) or (hlsallow.ban==true and player(id,"usgn")==hls[a]) or (vipallow.ban==true and player(id,"usgn")==vip[a]) then
				bid=tonumber(t:sub(6,7))
				local bip=player(bid,"ip")
				parse("banip "..bip)
			end
		end
	end
	if t:sub(1,5)=="!k" then
		for a=1,99999 do
			if (adminallow.kick==true and player(id,"usgn")==admins[a]) or (hlsallow.kick==true and player(id,"usgn")==hls[a]) or (vipallow.kick==true and player(id,"usgn")==vip[a]) then
				kid=tonumber(t:sub(7,8))
				parse("kick "..kid)
			end
		end
	end
	if t:sub(1,5)=="!s" then
		for a=1,99999 do
			if (adminallow.speed==true and player(id,"usgn")==admins[a]) or (hlsallow.speed==true and player(id,"usgn")==hls[a]) or (vipallow.speed==true and player(id,"usgn")==vip[a]) then
				sid=tonumber(t:sub(7,8))
				parse("speedmod "..sid ..100)
			end
		end
	end
	for a=1,99999 do
		if player(id,"usgn")==admins[a] then
			msg("©"..admincolor.." "..player(id,"name")..""..admintag..": "..t)
			return 1
		end
		if player(id,"usgn")==hls[a] then
			msg("©"..hlscolor.." "..player(id,"name")..""..hlstag..": "..t)
			return 1
		end
		if player(id,"usgn")==vip[a] then
			msg("©"..vipcolor.." "..player(id,"name")..""..viptag..": "..t)
			return 1
		end
	end
end