More
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
-------------------------------------------------- -- Call of Duty 2d Script by Bobb1118 -- -- Edited GunGame Script by UnrealSoftware -- -------------------------------------------------- ----------------------- -- Initial Setup -- ----------------------- function initArray(m) local array = {} for i = 1, m do array[i]=0 end return array end ----------------------- -- InitArrays -- ----------------------- -- Classes class=initArray(32) -- Experience kills=initArray(32) -- Level level=initArray(32) -- Killstreak killstreak=initArray(32) ----------------------- -- Game Settings -- ----------------------- parse("sv_gamemode 1") -- Deathmatch parse("mp_randomspawn 1") -- Random Spawning -------------------------------------- -- Welcome Message -- -------------------------------------- addhook("join","join") function join(p) msg2(p,"Welcome to COD2d, "..player(p,"name").."!") end ----------------------- -- Class Menu -- ----------------------- function classmenu(id) 	menu(id,"Select your Class,Grenadier|Famas,First Recon|UMP45,Overwatch|M249,Scout Sniper|Scout,Riot Control|Tactical Shield") end ----------------------- -- Team -> Class -- ----------------------- addhook("team","team") function team(id,team) 	if (team>0) then 		classmenu(id) 	end end ----------------------- -- Server Action -- ----------------------- addhook("serveraction","serveraction") function serveraction(id) 	classmenu(id) end ----------------------- -- Class Selection -- ----------------------- addhook("menu","menu") function menu(id,menu,sel) 	if (menu=="Select your Class") then 		if (sel>=0 and sel<=5) then 			class[id]=sel 			if (player(id,"health")>0) then 				parse("killplayer "..id) 			end 		end 	end end ----------------------- -- Spawn -- ----------------------- 	 addhook("spawn","spawn") function spawn(id) -- Grenadier 	if (class[id]<=1) then 		parse ("setarmor "..id.." 100") 		return "5,51,53,39"; 	end -- First Recon 		if (class[id]==2) then parse ("setarmor "..id.." 100") return "5,51,53,24"; end -- Overwatch if (class[id]==3) then parse ("setarmor "..id.." 100") return "45,51,53,40"; end -- Scout Sniper if (class[id]==4) then parse ("setarmor "..id.." 100") return "5,51,53,34"; end -- Riot Control if (class[id]==5) then parse ("setarmor "..id.." 100") return "6,51,53,41"; end end ----------------------- -- No Buying -- ----------------------- addhook("buy","buy") function buy() 	return 1 end -------------------------------------- -- Say Functions -- -------------------------------------- addhook("say","ssay") function ssay(p,txt) 	if txt=="time!" then msg(os.date("Time: %I:%M %p")); end 		if txt=="level!" then 			parse('hudtxt2 '..id..' 30 "Level: "lvl.level[id]" 320 260 1') 			parse('hudtxtalphafade 30 2 5000 0.0') 	end end --------------------------------------------------- -- Experience and Leveling -- --------------------------------------------------- addhook("kill","kill") function kill(killer,victim,weapon,x,y) 	killstreak[killer] = killstreak[killer] + 1 	killstreak[victim] = 0 	if killstreak[killer] == 5 then 		msg2(killer,"Airstrike is ready!") 		parse("equip "..killer.." 76") 	end 	kills[killer] = kills[killer] + 1 -- Add Experience for Kill 	parse('hudtxt2 '..killer..' 30 "Kill +100 exp" 320 260 1') -- Text Callout (+100 xp) 	parse('hudtxtalphafade 0 2 2000 0.0') 	if lvl.kills[killer] >= 5 then -- Next Level (every 5 kills) 		lvl.level[killer]=lvl.level[killer]+1 -- Increase Level 		lvl.kills[killer]=0 -- Reset Experience 		parse('hudtxt2 '..killer..' 30 "Level up!" 320 260 1') -- Text Callout (level+1) 		parse('hudtxtalphafade 0 2 5000 0.0') 	end 	if lvl.level[killer]>80 then -- If this level is higher then 80 		lvl.level[killer]=80 -- Then reset the level to 80 	end end -------------------------------------- -- Level / Kills Bar -- -------------------------------------- addhook("second","secondz") function secondz() for id=1,32 do if player(id,"exists") then msg2(id,"Level: "..level[id].." Kills: "..kills[id]) end end end -------------------------------------- -- Killstreaks -- --------------------------------------
tested for thankless guy
ps, dont add these unuseful array's because they makes this shit hard to reading...
ps2, you have 2 "kill" hooks, so i deleted one and rewrite killstreak system.
ps3, if killstreak is5 it doesn't resets, if you want it then add this string:
1
killstreak[killer] = 0