forked from ztxs/Aimware-v5-luas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Clientinfo.lua
355 lines (279 loc) · 9.21 KB
/
Clientinfo.lua
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
-- ClientInfo
local kills = {}
local deaths = {}
local kdratio = #kills/#deaths
local frametimes = {}
local fps_prev = 0;
local skeet_font = draw.CreateFont("KaushanScript", 14, 9999);
local GetPropInt = nil
local PING = 0;
local local_player = client.GetLocalPlayerIndex()
local lp = local_player
-- Draw PINGIndicator
local function DrawPingColor()
if ( PING <= 20 ) then
draw.Color(0, 255, 0, 255); -- Green
elseif ( PING <= 30 ) then
draw.Color( 50, 255, 0, 255 );
elseif ( PING <= 40 ) then
draw.Color( 100, 255, 0, 255 );
elseif ( PING <= 50 ) then
draw.Color( 150, 255, 0, 255 );
elseif ( PING <= 60 ) then
draw.Color( 200, 255, 0, 255 );
elseif ( PING <= 70 ) then
draw.Color( 255, 255, 0, 255 ); -- Orange
elseif ( PING <= 80 ) then
draw.Color( 255, 200, 0, 255 );
elseif ( PING <= 90 ) then
draw.Color( 255, 150, 0, 255 );
elseif ( PING <= 100 ) then
draw.Color( 255, 100, 0, 255 );
elseif ( PING <= 150 ) then
draw.Color( 255, 50, 0, 255 );
else
draw.Color( 255, 0, 0, 255 ); -- Red
end
end
callbacks.Register( "Draw", "DrawPingColor", DrawPingColor );
local function accumulate_fps()
local ft = globals.AbsoluteFrameTime()
if ft > 0 then
table.insert(frametimes, 1, ft)
end
local count = #frametimes
if count == 0 then
return 0
end
local i, accum = 0, 0
while accum < 0.5 do
i = i + 1
accum = accum + frametimes[i]
if i >= count then
break
end
end
accum = accum / i
while i < count do
i = i + 1
table.remove(frametimes)
end
local fps = 1 / accum
local rt = globals.RealTime()
if math.abs(fps - fps_prev) > 4 or rt - last_update_time > 2 then
fps_prev = fps
last_update_time = rt
else
fps = fps_prev
end
return math.floor(fps + 0.5)
end
local function events(event)
if (event:GetName( ) == "begin_new_match") or (event:GetName( ) == "round_announce_match_start" ) then
kills = {}
deaths = {}
end
if event:GetName() == "player_death" then
local local_player = client.GetLocalPlayerIndex()
local attacker = client.GetPlayerIndexByUserID(event:GetInt("attacker"))
local victim = client.GetPlayerIndexByUserID(event:GetInt("userid"))
if attacker == local_player then
kills[#kills + 1] = {};
end
if victim == local_player then
deaths[#deaths + 1] = {};
end
end
end
callbacks.Register( "FireGameEvent", "events", events );
local function DrawPING()
draw.SetFont(skeet_font);
local w, h = draw.GetScreenSize();
if entities.GetPlayerResources() ~= nil then
PING = entities.GetPlayerResources():GetPropInt( "m_iPing", client.GetLocalPlayerIndex() );
DrawPingColor();
draw.Text(45, 360, PING);
draw.TextShadow(45, 360, PING);
draw.Color( 200, 30, 200, 255 );
draw.Text( 15, 360, "Ping: ");
draw.TextShadow( 15, 360, "Ping: ");
else
draw.Color( 200, 200, 20, 255 );
draw.Text( 15, 360, "Offline" );
draw.TextShadow( 15, 360, "Offline" );
end
end
callbacks.Register( "Draw", "DrawPING", DrawPING );
local function getColor(number, max)
local r, g, b
i = math.abs(number, max, 9)
if i <= 1 then r, g, b = 255, 0, 0
elseif i == 2 then r, g, b = 237, 27, 3
elseif i == 3 then r, g, b = 235, 63, 6
elseif i == 4 then r, g, b = 229, 104, 8
elseif i == 5 then r, g, b = 228, 126, 10
elseif i == 6 then r, g, b = 220, 169, 16
elseif i == 7 then r, g, b = 213, 201, 19
elseif i == 8 then r, g, b = 176, 205, 10
elseif i == 9 then r, g, b = 124, 195, 13
end
return r, g, b
end
local function drawing_stuff()
if lp == nil then
return
end
if entities.GetLocalPlayer() then
local w,h = draw.GetScreenSize();
draw.SetFont(skeet_font)
-- fps Zeile
local r, g, b = getColor(accumulate_fps(), 100)
if accumulate_fps() > 59 then
r, g, b = 0, 255, 0
else
r, g, b = 255, 0, 0
end
draw.Color(r, g, b, 255)
rw,rh = draw.GetTextSize(accumulate_fps())
draw.Text(45, 380, accumulate_fps())
draw.TextShadow(45, 380, accumulate_fps())
draw.Color(255, 255, 255, 255);
draw.Text(15, 380, "FPS:" );
draw.TextShadow(15, 380, "FPS:" );
--kills und death anzeige
draw.SetFont(skeet_font);
draw.Color(255,255,255,255)
draw.Text(15, 300, "kills: ")
draw.TextShadow(15, 300, "kills: ")
draw.Text(15, 315, "deaths: ")
draw.TextShadow(15, 315, "deaths:")
draw.Text(15, 330, "kd/r: ")
draw.TextShadow(15, 330, "kd/r: ")
draw.SetFont(skeet_font);
if #kills/#deaths > 1 then
draw.Color(0,255,0,255)
else
draw.Color(255,0,0,255)
end
if #kills == 0 and #deaths == 0 then
draw.Color(255,255,255,255)
end
if #deaths > 0 then
kdratio = string.format("%.2f", math.floor(#kills/#deaths))
else
kdratio = string.format("%.2f", #kills/1)
end
draw.SetFont(skeet_font);
draw.Text(88, 300, #kills)
draw.TextShadow(88, 300, #kills)
draw.Text(88, 315, #deaths)
draw.TextShadow(88, 315, #deaths)
draw.Text(88, 330, kdratio)
draw.TextShadow(88, 330, kdratio)
-- legitbot line
if (gui.GetValue("lbot.master") == true ) and (gui.GetValue("lbot.aim.enable") == true) then
onoroff = "On"
draw.Color(0,175,205, 255)
draw.Text(15, 400, "LegitAimbot: ")
draw.TextShadow(15, 400, "LegitAimbot: ")
draw.Color(0, 200, 0, 255)
draw.Text(88, 400, onoroff)
draw.TextShadow(88, 400, onoroff)
else
onoroff = "Off"
draw.Color(0,175,205, 255)
draw.Text(15, 400, "LegitAimbot: ") --w/w +15, h/2 +450
draw.TextShadow(15, 400, "LegitAimbot: ") --w/w +15, h/2 +450
draw.Color(200, 0, 0, 255)
draw.Text(88, 400, onoroff)
draw.TextShadow(88, 400, onoroff)
end
-- legitAA line
if (gui.GetValue("lbot.master") == true) and (gui.GetValue("lbot.antiaim.type") == 2) then
onoroff = "-->"
draw.Color(0,175,205, 255)
draw.Text(15, 415, "Legit AA: ")
draw.TextShadow(15, 415, "Legit AA: ")
draw.Color(0, 200, 0, 255)
draw.Text(88, 415, onoroff)
draw.TextShadow(88, 415, onoroff)
elseif (gui.GetValue("lbot.master") == true) and (gui.GetValue("lbot.antiaim.type") == 3) then
onoroff = "<--"
draw.Color(0,175,205, 255)
draw.Text(15, 415, "Legit AA: ") --w/w +15, h/2 +450
draw.TextShadow(15, 415, "Legit AA: ") --w/w +15, h/2 +450
draw.Color(0, 200, 0, 255)
draw.Text(88, 415, onoroff)
draw.TextShadow(88, 415, onoroff)
else
onoroff = "Off"
draw.Color(0,175,205, 255)
draw.Text(15, 415, "Legit AA: ") --w/w +15, h/2 +450
draw.TextShadow(15, 415, "Legit AA: ") --w/w +15, h/2 +450
draw.Color(200, 0, 0, 255)
draw.Text(88, 415, onoroff)
draw.TextShadow(88, 415, onoroff)
end
-- Triggerbot line
if (gui.GetValue("lbot.trg.enable") == true ) then
onoroff = "On"
draw.Color(0,175,205, 255)
draw.Text(15, 430, "Triggerbot: ")
draw.TextShadow(15, 430, "Triggerbot: ")
draw.Color(0, 200, 0, 255)
draw.Text(88, 430, onoroff)
draw.TextShadow(88, 430, onoroff)
else
onoroff = "Off"
draw.Color(0,175,205, 255)
draw.Text(15, 430, "Triggerbot: ") --w/w +15, h/2 +450
draw.TextShadow(15, 430, "Triggerbot: ") --w/w +15, h/2 +450
draw.Color(200, 0, 0, 255)
draw.Text(88, 430, onoroff)
draw.TextShadow(88, 430, onoroff)
end
-- rageaimbot line
if (gui.GetValue("rbot.master") == true ) and (gui.GetValue("rbot.aim.enable") == true) then
onoroff = "On"
draw.Color(40, 100, 205, 255)
draw.Text(15, 445, "RageAimbot: ")
draw.TextShadow(15, 445, "RageAimbot: ")
draw.Color(0, 255, 0, 255)
draw.Text(88, 445, onoroff)
draw.TextShadow(88, 445, onoroff)
else
onoroff = "Off"
draw.Color(40, 100, 205, 255)
draw.Text(15, 445, "RageAimbot: ") --w/w +15, h/2 +450
draw.TextShadow(15, 445, "RageAimbot: ") --w/w +15, h/2 +450
draw.Color(255, 0, 0, 255)
draw.Text(88, 445, onoroff)
draw.TextShadow(88, 445, onoroff)
end
-- resolver line
if (gui.GetValue("rbot.master") == true) and (gui.GetValue("rbot.aim.enable") == true) and (gui.GetValue("rbot.accuracy.posadj.resolver") == true) then
onoroff = "On"
draw.Color(40, 100, 205, 255)
draw.Text(15, 460, "Resolver: ")
draw.TextShadow(15, 460, "Resolver: ")
draw.Color(0, 255, 0, 255)
draw.Text(88, 460, onoroff)
draw.TextShadow(88, 460, onoroff)
else
onoroff = "Off"
draw.Color(40, 100, 205, 255)
draw.Text(15, 460, "Resolver: ")
draw.TextShadow(15, 460, "Resolver: ")
draw.Color(255, 0, 0, 255)
draw.Text(88, 460, onoroff)
draw.TextShadow(88, 460, onoroff)
end
end
end
client.AllowListener( "player_death" );
client.AllowListener( "player_disconnect" );
client.AllowListener( "round_announce_match_start" );
client.AllowListener( "begin_new_match" );
client.AllowListener( "m_iPing" );
callbacks.Register( "Draw", "drawing_stuff", drawing_stuff );
-- End ClientInfo