1-Countdown when player uses spell , spell countdown time should be 5m (300s)
2-Real effects when a player uses a spell , same as if i use spell speed then my speed will be increased.
3-Shown effect , when a player uses a spell a effect will be shown on the player who used it like a blue smoke..
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
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
function initArray(m) local array = {} for i = 1, m do array[i]=0 end return array end level=initArray(32) exp=initArray(32) toexp=initArray(32) money=initArray(32) speeds=initArray(32) attacks=initArray(32) healths=initArray(32) heals=initArray(32) countdowns=initArray(32) speede=initArray(32) attacke=initArray(32) healthe=initArray(32) heale=initArray(32) function string.split(text,b) local cmd = {} if b then b = b else b = "%s" end b = "[^"..b.."]+" for o in string.gmatch(text,b) do table.insert(cmd,o) end return cmd end 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) end return cmd end addhook("ms100","save_hud") function save_hud() for id = 1,32 do if (player(id,"exists")) then parse('hudtxt2 '..id..' 40 "©000100255Level: '..level[id]..' " 13 117') parse('hudtxt2 '..id..' 41 "©000100255Exp: '..exp[id]..'/'..toexp[id]..' " 13 129') parse('hudtxt2 '..id..' 42 "©000100255Money: '..money[id]..' " 13 141') end end end addhook("kill","save_kill") function save_kill(id) 	money[id]=money[id]+25 	exp[id]=exp[id]+1 	if exp[id] == toexp[id] then 	toexp[id]=toexp[id]*2 	money[id]=money[id]+100 		exp[id]=0 		level[id]=level[id]+1 		msg2(id,"©000255000Level up!@C") 		parse("sv_sound2 "..id.." levelup.wav") 		msg("©255075000"..player(id,"name").." reached "..level[id].." level!") 	end 	if exp[id] < toexp[id] then 		parse("sv_sound2 "..id.." coin.wav") 	end end addhook("leave","save_leave") -- When you leave it saves function save_leave(id) if (player(id,"usgn")>0) then io.output(io.open("sys/lua/saves/"..player(id,"usgn")..".txt","w+")) io.write(exp[id].." "..level[id].." "..money[id].." "..toexp[id].." "..attacks[id].." "..speeds[id].." "..healths[id].." "..heals[id]) io.close() end end addhook("die","save_die") -- When you die it saves function save_die(id) if (player(id,"usgn")>0) then io.output(io.open("sys/lua/saves/"..player(id,"usgn")..".txt","w+")) io.write(exp[id].." "..level[id].." "..money[id].." "..toexp[id].." "..attacks[id].." "..speeds[id].." "..healths[id].." "..heals[id]) io.close() end end addhook("join","save_join") -- When join load function save_join(id) 	if (player(id,"usgn")>0) then 		local filename = "sys/lua/saves/%s.txt" 		local file = io.open(filename:format(player(id,"usgn"), "r")) 		local line 		if not file then 			line = {0, 1} 			msg2(id,"©255000000Failed to save!@C") 		else 			line = file:read("*a"):split() 		end 		exp[id] = tonumber(line[1]) or 0 -- If line[1] is not a number, level[id] becomes 1 		level[id] = tonumber(line[2]) or 1 -- Same as above reasoning (prevents errors) 		money[id] = tonumber(line[3]) or 0 		toexp[id] = tonumber(line[4]) or 10 		attacks[id] = tonumber(line[5]) or 1 		speeds[id] = tonumber(line[6]) or 1 		healths[id] = tonumber(line[7]) or 1 		heals[id] = tonumber(line[8]) or 1 	else 		msg2(id,"©255000000No USGN found!@C") 		level[id]=1 		toexp[id]=10 		money[id]=0 		exp[id]=0 		attacks[id]=1 		speeds[id]=1 		healths[id]=1 		heals[id]=1 	end end addhook("say","save_say") function save_say(id,txt) 	if (txt=="!reset") then 		menu(id,"Reset your level?,Yes,No") 		parse("sv_sound2 "..id.." menu.wav") 		return 1 	end 	if txt == "!help" then 		msg2(id,"©000255000Server commands:") 		msg2(id,"©100255100!help - Check commands.") 		msg2(id,"©100255100!reset - Reset your level to 1.") 		return 1 	end end addhook("menu","save_menu") function save_menu(id,title,b) 	if title == "Reset your level?" then 		if b == 1 then 			msg("©255000000"..player(id,"name").." Has reset level!") 			level[id]=1 			exp[id]=0 			toexp[id]=10 		elseif b == 2 then 			level[id]=level[id] 			exp[id]=exp[id] 		end 	end 	if title == "Magic Menu" then 		if b == 1 then 		menu(id,"Magic Store,Speed Spell | 100$ ,Attack Spell | 100$ ,Health Spell | 150$ ,Heal Spell | 300$") 		elseif b == 2 then 		menu(id,"Inventory@b,Speed Spells | "..speeds[id]..",Attack Spells | "..attacks[id]..",Health Spells | "..healths[id]..",Heal Spells | "..heals[id].." ") 		end 	end 	if title == "Magic Store" then 		if b == 1 then 			if money[id] > 99 then money[id]=money[id]-100 		speeds[id]=speeds[id]+1 		msg2(id,"©000255100Store: You have purchased a speed spell for 100$ !") 		else 		msg2(id,"©255000000Store: You don't have enough money to buy a speed spell !") 			end	 		elseif b == 2 then 			if money[id] > 99 then money[id]=money[id]-100 		attacks[id]=attacks[id]+1 		msg2(id,"©000255100Store: You have purchased a attack spell for 100$ !") 		else 		msg2(id,"©255000000Store: You don't have enough money to buy a attack spell !") 			end 		elseif b == 3 then 			if money[id] > 149 then money[id]=money[id]-150 		healths[id]=healths[id]+1 		msg2(id,"©000255100Store: You have purchased a health spell for 150$ !") 		else 		msg2(id,"©255000000Store: You don't have enough money to buy a health spell !") 			end 		elseif b == 4 then 			if money[id] > 299 then 		money[id]=money[id]-300 		heals[id]=heals[id]+1 		msg2(id,"©000255100Store: You have purchased a heal spell for 300$ !") 		else 		msg2(id,"©255000000Store: You don't have enough money to buy a heal spell !") 			end 		end 	end 	if title == "Inventory" then 		if b == 1 then 			if speeds[id] > 0 then 				if level[id] > 4 then 				countdowns[id]=300 				speede[id]=1 				speeds[id]=speeds[id]-1 				else 				msg2(id,"©255000000You have to be level 5 or up to use this!") 				end 			else 			msg2(id,"©255000000You don't have a speed spell to use!") 			end 		elseif b == 2 then 			if attacks[id] > 0 then 				if level[id] > 4 then 				countdowns[id]=300 				attacke[id]=1 				attacks[id]=attacks[id]-1 				else 				msg2(id,"©255000000You have to be level 5 or up to use this!") 				end 			else 			msg2(id,"©255000000You don't have a attack spell to use!") 			end 		elseif b == 3 then 			if healths[id] > 0 then 				if level[id] > 9 then 				countdowns[id]=300 				healthe[id]=1 				healths[id]=healths[id]-1 				else 				msg2(id,"©255000000You have to be level 9 or up to use this!") 				end 			else 			msg2(id,"©255000000You don't have a health spell to use!") 			end 		elseif b == 4 then 			if heals[id] > 0 then 				if level[id] > 9 then 				countdowns[id]=300 				heale[id]=1 				heals[id]=heals[id]-1 				else 				msg2(id,"©255000000You have to be level 9 or up to use this!") 				end 			else 			msg2(id,"©255000000You don't have a heal spell to use!") 			end 		end 	end end addhook("serveraction","_action") function _action(id,b) if b == 1 then menu(id,"Magic Menu,Magic Store,Inventory") return 1 end end