I just was editing my script and there isn't any error when i opened it but i just chose a class and i spawned then cs2d quit .
Script 

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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
class = {} function initArray(m,v) if not v then v = 0 end 	local array = {} 	for i = 1, m do 	array[i]=v 	end 	return array end table_pick_itens = {64,65,66,67,68} function totable(t,match) local cmd = {} 	if not match then match = "%S+" end 		for word in string.gmatch(t, match) do 	table.insert(cmd, word:lower()) 	end return cmd end class = initArray(32) flood = initArray(32) timer = initArray(32) no_mute = initArray(32) muted=initArray(32,false) local timer_mute = 60 hats = true addhook("say","_say") addhook("serveraction","_serveraction") addhook("menu","_menu") addhook("walkover","_walkover") addhook("drop","_drop") addhook("buy","_buy") addhook("spawn","_spawn") addhook("team","_team") addhook("die","_die") addhook("second","_second") addhook("leave","_leave") addhook("join","_join") addhook("join","adsjoin") addhook("minute","adsminute") _say = function (id,txt) local p = totable(txt) local cmd = tostring(p[1]) local pl = tonumber(p[2]) if cmd == "!usgn" then 	msg2(id,"\169050050255USGN : "..player(pl,"usgn").." ") 	msg2(id,"\169050255050IP : "..player(pl,"ip").." ") 	msg2(id,"\169050050255Ping : "..player(pl,"ping").." ") 	return 1 elseif cmd == "!help" then 	msg2(id,"\169255255255-=Help=-") 	msg2(id,"\169255255255Script made by P!r@te$ k!ller , USGN : 120840") 	msg2(id,"\169255255255Have fun .") 	return 1 elseif cmd == "!class" then 	msg2(id,"©000255111Your class is "..class[id].."") 	return 1 elseif cmd == "!cmds" then 	msg2(id,"\169255255255-=Cmds=-") 	msg2(id,"\169255255255!usgn : To see your usgn , ip and ping .") 	msg2(id,"\169255255255!help : Just small help ..") 	msg2(id,"\169255255255!cmds : To see the cmds .") 	msg2(id,"\169255255255!class : To see your class .") 	return 1 end 		if flood[id] == 8 then 			msg2(id,"\169255000000Script : Stop Flood or mute") 		end 	 		if flood[id] == 15 then 			muted[id] = true 			no_mute[id] = timer_mute 		end 		 		if muted[id] == true then 				msg2(id,"\169255255255You are muted, for "..timer_mute.." Seconds") 			timer[id] = 5 			return 1 		end 	 			msg("\169255255255"..player(id,"name")..": "..txt) 			flood[id] = flood[id] +1 			timer[id] = 5 	return 1 end _serveraction = function (id,action) 	if action == 1 then 		menu_classe(id) 		end 	if action == 2 then 		menu_main(id) 		end end _menu = function (id,title,buton) 	if title == "Class Menu" then 		if buton == 1 then -- Medic 			class[id] = "Medic" 			spawn(id) 			strip(id,0) 			speed(id,15) 			armor(id,204) 			equip (id,10) 			hp(id,100) 		elseif buton == 2 then --Invisible 			class[id] = "Invisible" 			spawn(id) 			strip(id,0) 			speed(id,25) 			armor(id,206) 			equip (id,46) 			hp(id,100) 		elseif buton == 3 then -- Explosive 			class[id] = "Explosive" 			spawn(id) 			strip(id,0) 			speed(id,11) 			armor(id,200) 			equip (id,48,49,51,76,73) 			hp(id,125) 		elseif buton == 4 then -- Rifler 			class[id] = "Rifler" 			spawn(id) 			strip(id,0) 			speed(id,5) 			armor(id,202) 			equip (id,3,30,32,52) 			hp(id,100) 		elseif buton == 5 then -- Sniper 			class[id] = "Sniper" 			spawn(id) 			strip(id,0) 			speed(id,1) 			armor(id,201) 			equip(id,4,34,35) 			hp(id,150) 		elseif buton == 6 then -- Portal 			class[id] = "Portal" 			spawn(id) 			strip(id,0) 			speed(id,31) 			armor(id,200) 			equip (id,1,77,87,88) 			hp(id,250) 		elseif buton == 7 then -- Mito 			class[id] = "Mito" 			spawn(id) 			strip(id,0) 			speed(id,5) 			armor(id,100) 			equip(id,2) 			equip (id,2,20,38,39) 			hp(id,100) 		elseif buton == 8 then -- Construtor 			class[id] = "Construtor" 			spawn(id) 			strip(id,0) 			speed(id,15) 			armor(id,203) 			equip (id,3,6,21,74) 			hp(id,130) 		elseif buton == 9 then -- Titan 			class[id] = "Titan" 			spawn(id) 			strip(id,0) 			speed(id,-15) 			armor(id,205) 			equip (id,51,76,90,91) 			hp(id,120) 		end 	end 	if title == "Main Menu" then 		if buton == 1 then 				menu_shop(id) 		end 	 if buton == 2 then 				menu_hats(id) 		end 	end 	if title == "Shop Menu" then 		if buton == 1 then 				if player(id,"money") > 4999 then 					equip(id,77,87) 					removemoney(id,5000) 				else 					semgrana(id) 				end 		end 		if buton == 2 then 				if player(id,"money") > 3999 then 					equip(id,65) 					removemoney(id,4000) 				else 					semgrana(id) 				end 		end 		if buton == 3 then 				if player(id,"money") > 6999 then 					equip(id,64) 					removemoney(id,7000) 				else 					semgrana(id) 				end 		end 	end 	if title == "Hats Menu" then 		if buton == 1 then 			freeimage(id) 			cap_1 = image("gfx/cap.png",1,0,200+id) 			imagecolor(cap_1,255,0,0) 		elseif buton == 2 then 			freeimage(id) 			cap_2 = image("gfx/cap.png",1,0,200+id) 			imagecolor(cap_2,0,255,0) 		elseif buton == 3 then 			freeimage(id) 			cap_3 = image("gfx/cap.png",1,0,200+id) 			imagecolor(cap_3,0,0,255) 		elseif buton == 4 then 			freeimage(id) 			cap_4 = image("gfx/cap.png",1,0,200+id) 			imagecolor(cap_4,255,255,0) 		elseif buton == 5 then 			freeimage(id) 			cap_5 = image("gfx/cap.png",1,0,200+id) 			imagecolor(cap_5,0,255,255) 		elseif buton == 6 then 			freeimage(id) 			cap_6 = image("gfx/cap.png",1,0,200+id) 			imagecolor(cap_6,255,0,255) 		elseif buton == 7 then 			freeimage(id) 			cap_7 = image("gfx/cap.png",1,0,200+id) 			imagecolor(cap_7,0,0,0) 		elseif buton == 8 then 			freeimage(id) 			cap_8 = image("gfx/cap.png",1,0,200+id) 			imagecolor(cap_8,255,255,255) 		elseif buton == 9 then 			freeimage(id) 		end 	end end _walkover = function (id,iid,type,ain,a,mode) for _, j in ipairs(table_pick_itens) do 	if type == j then 		return 0 	end end return 1 end _drop = function (id,iten) 	return 1 end _buy = function (id) 	msg2(id,"©255000000Error,You can't buy weapons") 	return 1 end _spawn = function (id) 		if class[id] == "Medic" then 			spawn(id) 			strip(id,0) 			speed(id,15) 			armor(id,204) 			equip (id,10) 			hp(id,100) 		elseif class[id] == "Invisible" then 			spawn(id) 			strip(id,0) 			speed(id,25) 			armor(id,206) 			equip (id,46) 			hp(id,100) 		elseif class[id] == "Explosive" then 			spawn(id) 			strip(id,0) 			speed(id,11) 			armor(id,200) 			equip (id,48,49,51,76,73) 			hp(id,125) 		elseif class[id] == "Rifler" then 			spawn(id) 			strip(id,0) 			speed(id,5) 			armor(id,202) 			equip (id,3,30,32,52) 			hp(id,100) 		elseif class[id] == "Sniper" then 			spawn(id) 			strip(id,0) 			speed(id,1) 			armor(id,201) 			equip(id,4,34,35) 			hp(id,150) 		elseif class[id] == "Portal" then 			spawn(id) 			strip(id,0) 			speed(id,31) 			armor(id,200) 			equip (id,1,77,87,88) 			hp(id,250) 		elseif class[id] == "Mito" then 			spawn(id) 			strip(id,0) 			speed(id,5) 			armor(id,100) 			equip(id,2) 			equip (id,2,20,38,39) 			hp(id,100) 		elseif class[id] == "Construtor" then 			spawn(id) 			strip(id,0) 			speed(id,15) 			armor(id,203) 			equip (id,3,6,21,74) 			hp(id,130) 		elseif class[id] == "Titan" then 			class[id] = "Titan" 			spawn(id) 			strip(id,0) 			speed(id,-15) 			armor(id,205) 			equip (id,51,76,90,91) 			hp(id,120) 		end 	return 1 end _team = function (id,team) end _die = function (id) end _second = function (id) 	for id = 1,32 do 		if timer[id] > 0 then 			timer[id] = timer[id] -1 else 			flood[id] = 0 		 end 		end for _,id in pairs(player(0,"table")) do 	 if muted[id] == true then 		 no_mute[id] = no_mute[id]-1 		 end 		 if no_mute[id] == 0 then 		 muted[id] = false 		end 	end 	parse ("sv_gamemode 0 ") 	parse ("mp_infammo 1 ") 	parse ('mp_building_limit "barricade" 300') 	parse ('mp_building_limit "wall I" 80') 	parse ('mp_building_limit "wall II" 120') 	parse ('mp_building_limit "wall III" 100') 	parse ('mp_building_limit "gate field" 30') 	parse ('mp_building_limit "turret" 2') 	parse ('mp_building_limit "dispenser" 3') 	parse ('mp_building_limit "supply" 2') 	parse ('mp_building_limit "Teleporter Entrance" 2') 	parse ('mp_building_limit "Teleporter Exit" 2') 	 end _leave = function (id) 	muted[id] = false end _join = function (id) 	flood[id] = 0 	muted[id] = false end strip = function (id,iten) 	parse ("equip "..id.." 50") 	parse ("strip "..id.." "..iten) end armor = function (id,armor) 	parse ("setarmor "..id.." "..armor) end equip = function(id,...) for _,wep in ipairs(arg) do parse("equip "..id.." "..wep) end end speed = function (id,speed) 	parse ("speedmod "..id.." "..speed) end spawn = function (id) 	parse ("spawnplayer "..id.." -1 -1") end hp = function (id,hp) 	parse ("setmaxhealth "..id.." "..hp) end removemoney = function (id,mon) 	parse ("setmoney "..id.." "..(player(id,"money")-mon)) end menu_main = function (id) 	menu(id,"Main Menu,Shop Menu,Hats Menu") end menu_classe = function (id) 	menu(id,"Class Menu,Medic,Invisible,Explosivo,Rifler,Sniper,Portal,Mito,Construtor,Titan") end menu_shop = function (id) 	menu(id,"Shop Menu,Mines|$5000,+20 HP|$4000,Full HP|$7000") end menu_hats = function (id) 	menu (id,"Hats Menu,Cap Red,Cap Green,Cap Blue,Cap Yellow,Cap Cyan,Cap Pink,Cap Black,Cap White,None Cap") end semgrana = function (id) 	msg2(id,"\169255000000Error,You don't have enough money") end function adsjoin(id) msg2(id,"©30 144255 Welcome on "..game("sv_name").." Server, "..player(id,"name").."!") end function adsminute() 	msg("©30 144255 [PK] Class Script") 	msg("©30 144255 Do you want help ? , !cmds .") end