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
yourmon = {}
use = 1
first = {}
copyright=string.char(169)
addhook ("spawn","span")
function span(id)
if yourmon[id]==nil then
yourmon[id] = 0
end
if first[id] == nil then
first[id] = 111111
if (io.open("user/"..player(id,"usgn")..".txt")~=nil) then
msg2 (id,""..copyright.."000255000Loaded!")
for l in io.lines("user/"..player(id,"usgn")..".txt") do
mof = tonumber(l)
if mof ~=nil then
yourmon[id] = mof
end
end
else
msg2 (id,""..copyright.."255000000Sorry, no savefile found!")
end
end
end
addhook ("serveraction","ser")
function ser(id,ac)
if (ac==1 and use==1) then
goldmenu(id)
end
end
function goldmenu(id)
checkk = player(id,"money")+yourmon[id]
menu (id,"drop money,500,1000,5000,10000,50000,100000,200000,500000")
end
addhook ("menu","meno")
function meno(id,menu,sel)
if (menu=="drop money") then
if sel>=1 and sel<=9 then
goldmenu(id)
end
if yourmon[id]~= nil then
checkmonx = player(id,"money")+yourmon[id]
yourmon[id] = yourmon[id] + player(id,"money")
parse ("setmoney "..id.." 0")
else
checkmonx = ""
end
if sel==1 and checkmonx >=500 then
parse ("spawnitem 67 "..(player(id,"tilex")).." "..(player(id,"tiley")))
yourmon[id] = yourmon[id] - 500
end
if sel==2 and checkmonx >=1000 then
parse ("spawnitem 68 "..(player(id,"tilex")).." "..(player(id,"tiley")))
yourmon[id] = yourmon[id] - 1000
end
if sel==3 and checkmonx >=5000 then
yourmon[id] = yourmon[id] - 5000
for i=1,5 do
parse ("spawnitem 68 "..(player(id,"tilex")).." "..(player(id,"tiley")))
end
if sel==4 and checkmonx >=10000 then
yourmon[id] = yourmon[id] - 10000
for i=1,10 do
parse ("spawnitem 68 "..(player(id,"tilex")).." "..(player(id,"tiley")))
end
end
if sel==5 and checkmonx >=50000 then
yourmon[id] = yourmon[id] - 50000
for i=1,50 do
parse ("spawnitem 68 "..(player(id,"tilex")).." "..(player(id,"tiley")))
end
end
if sel==6 and checkmonx >=100000 then
yourmon[id] = yourmon[id] - 100000
parse ("spawnitem 56 "..(player(id,"tilex")).." "..(player(id,"tiley")))
end
end
if sel==7 and checkmonx >=200000 then
yourmon[id] = yourmon[id] - 200000
parse ("spawnitem 56 "..(player(id,"tilex")).." "..(player(id,"tiley")))
parse ("spawnitem 56 "..(player(id,"tilex")).." "..(player(id,"tiley")))
end
end
end
end
if sel==8 and checkmonx >=500000 then
yourmon[id] = yourmon[id] - 500000
for i=1,5 do
parse ("spawnitem 56 "..(player(id,"tilex")).." "..(player(id,"tiley")))
end
end
end
end
end
addhook ("join","jo")
function jo(id)
yourmon[id] = 0
end
addhook ("second","sec")
function sec()
for id=1,32 do
if(player(id,"exists")) then
if yourmon[id] ~= nil then
hud(id)
checkk = player(id,"money")+yourmon[id]
if checkk~=nil and checkk<10000 then
yourmon[id] = 0
parse ("setmoney "..id.." "..checkk)
hud(id)
end
end
if (player(id,"money")>10000) then
chec = player(id,"money") - 10000
parse ("setmoney "..id.." "..(player(id,"money")-chec))
yourmon[id] = yourmon[id] + chec
end
if(player(id,"money")<10000) then
chec = 10000 - player(id,"money")
if yourmon[id]~=nil then
if yourmon[id] >=chec then
yourmon[id] = yourmon[id] - chec
parse ("setmoney "..id.." "..(player(id,"money")+chec))
hud(id)
end
end
end
end
end
end
function hud(id)
txt = (""..copyright.."000255000Money(+10000):"..yourmon[id].."$")
x = 15
y = 430
idd = 15
parse('hudtxt2 '..id..' '..idd..' "'..txt..'" '..x..' '..y)
end
addhook ("walkover","walken")
function walken(id,iid,type,ain,a,mode)
if (type==66) then
if player(id,"money")>=100 then
yourmon[id] = yourmon[id] + 100
parse ("setmoney "..id.." "..player(id,"money")-100)
end
elseif (type==67) then
if player(id,"money")>=500 then
yourmon[id] = yourmon[id] + 500
parse ("setmoney "..id.." "..player(id,"money")-500)
end
elseif (type==68) then
if player(id,"money")>=1000 then
yourmon[id] = yourmon[id] + 1000
parse ("setmoney "..id.." "..player(id,"money")-1000)
end
end
end
addhook ("leave","left")
function left(id)
yourmon[id] = 0
first[id] = nil
end
addhook ("say","sages")
function sages(id,txt)
if txt=="!save" then
yourmon[id] = yourmon[id] + player(id,"money")
parse ("setmoney "..id.." 0")
io.output(io.open("user/"..player(id,"usgn")..".txt","w+"))
io.write(yourmon[id])
io.close()
msg2 (id,""..copyright.."000255000Saved!@C")
end
end
addhook ("minute","min")
function min()
for id=1,32 do
if player(id,"exists") then
yourmon[id] = yourmon[id] + player(id,"money")
parse ("setmoney "..id.." 11000")
io.output(io.open("user/"..player(id,"usgn")..".txt","w+"))
io.write(yourmon[id])
io.close()
end
end
hud(id)
end
addhook("die","classesoptdie")
function classesoptdie()
return 1
end
how repair this lua???