This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GUARD.sk
452 lines (426 loc) · 16 KB
/
GUARD.sk
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
444
445
446
447
448
449
450
451
452
#-------------------------------------------
# G U A R D
# A N T I C H E A T
# V E R S I O N : B1
# A U T H O R : XIII___
#-------------------------------------------
options:
Guard: &9&lGUARD &7»&f
Version: B1
Ban: true
Kick: true
SetBack: true
on any move:
if block under player is air:
if block 2 under player is air:
if block 3 under player is air:
if player is on ground:
set {_y} to y location of player
remove 2 to {_y}
set {GUARD.%player%.setback} to {_y}
function Flag(p: player, cheat: text, type: text:)
set {_uuid} to uuid of {_p}
loop all players:
if {GUARD.%loop-player%.alerts} is set:
send "{@Guard} %{_p}%&7 failed &f%{_cheat}%&f %{_type}%&7 VL[&9%{GUARD.%{_p}%.vl}%&7]" to loop-player
command /guard [<text>] [<text>] [<timespan>]:
trigger:
if player does'nt have permission "GUARD.admin":
send "{@Guard} Author: XIII___"
send "{@Guard} Build: b1"
send "{@Guard} &7You don't have access to any other commands of GUARD."
stop
if player has permission "GUARD.admin":
if arg 1 is not set:
send " {@Guard}"
send "&7/guard &8| &fShow this pop up"
send "&7/guard kick [player] &8| Kick a player"
send "&7/guard info [player] &8| Show informations about a selected player"
send ""
stop
if arg 1 is "kick":
if arg 2 is online player:
if executor is player:
kick arg 2 due to "{@Guard} CHEAT DETECTION &7(ID-%player%&7)"
broadcast "{@Guard} &c%arg 2%&f has been removed for &cUnfair Advantage"
else:
kick arg 2 due to "{@Guard} CHEAT DECTECTION &7(ID-CONSOLE&7)"
broadcast "{@Guard} &c%arg 2%&f has been removed for &cUnfair Advantage"
stop
if arg 1 is "info":
if arg 2 is set:
send " {@Guard}"
send "&fInformations about %arg 2%"
send ""
send "Anticheat Kicks: &7%{GUARD.%arg 2%.kick}%"
send "Anticheat Ban: &7%{GUARD.%arg 2%.kick}%"
send "Anticheat logs: &7%{GUARD.%arg 2%.total.vl}%"
send "Anticheat detection: &7%{GUARD.%arg 2%.detection::*}%"
send ""
stop
#--------------------------------------------------------
#
# A N T I A U T O C L I C K E R
#
#--------------------------------------------------------
on leftclick:
if {GUARD.check.AUTOCLICKER} is true:
add 1 to {cpsL.%player%}
if {cpsL.%player%} >= 20:
cancel event
add 1 to {GUARD.%player%.vl}
add 1 to {GUARD.%player%.total.vl}
Flag(player, "AutoClicker", "1A")
if {GUARD.%player%.vl} >= 3:
if {@Kick} is true:
make server execute command "/guard kick %player%"
stop
if {@Ban} is true:
make server execute command "/guard ban %player% 7 day"
every 1 second:
loop all players:
clear {cpsL.%loop-player%}
clear {cpsR.%loop-player%}
on rightclick:
if {GUARD.check.AUTOCLICKER} is true:
add 1 to {cpsR.%player%}
if {cpsL.%player%} >= 20:
cancel event
Flag(attacker, "AutoClicker", "2A")
add 1 to {GUARD.%player%.vl}
add 1 to {GUARD.%player%.total.vl}
if {GUARD.%player%.vl} >= 3:
if {@Kick} is true:
make server execute command "/guard kick %player%"
stop
if {@Ban} is true:
make server execute command "/guard ban %player% 7 day"
#--------------------------------------------------------
#
# A N T I K I L L A U R A
#
#--------------------------------------------------------
every 10 tick:
loop all players:
clear {combo.%loop-player%}
on damage:
if {GUARD.check.KILLAURA} is true:
if attacker is player:
add 0.5 to {combo.%attacker%}
if {combo.%attacker%} >= 2:
add 1 to {GUARD.%attacker%.vl}
add 1 to {GUARD.%player%.total.vl}
Flag(attacker, "KillAura", "2A")
if {GUARD.%attacker%.vl} >= 3:
if {@Kick} is true:
make server execute command "/guard kick %attacker%"
stop
if {@Ban} is true:
make server execute command "/guard ban %attacker% 7 day"
if {@setback} is true:
cancel event
on damage:
if victim is not player:
stop
if attacker is not player:
stop
if {GUARD.check.KILLAURA} is false:
stop
if {ktarget.%attacker%} is not set:
add 1 to {GUARD.%attacker%.vl}
add 1 to {GUARD.%player%.total.vl}
if {@setback} is true:
cancel event
Flag(attacker, "KillAura", "3A")
on leftclick:
set {ktarget.%player%} to targeted entity
on damage:
if {GUARD.check.KILLAURA} is false:
stop
if attacker is a player:
loop all blocks in radius 3 around attacker:
if loop-block is snow layer:
stop
if loop-block is ladder:
stop
if loop-block is vines:
stop
if loop-block is iron bars:
stop
if loop-block is fence:
stop
if loop-block is large fern:
stop
if loop-block is tall grass:
stop
if loop-block is button:
stop
if loop-block is door:
stop
if loop-block is fence gate:
stop
if loop-block is cobblestone wall:
stop
set {_a.v} to distance between attacker and victim
set {_a.atb} to distance between attacker and attacker's targeted block
attacker's targeted block is not block under victim
if attacker's gamemode is not creative or spectator:
if {%attacker's uuid%.VAC.bypass} is not set:
set {%victim's uuid%.VAC.cheat.cooldown.damage} to true
if projectile doesn't exist:
if {_a.v} > {_a.atb}:
if {@setback} is true:
cancel event
add 1 to {GUARD.%attacker%.vl}
add 1 to {GUARD.%player%.total.vl}
Flag(attacker, "KillAura", "2A"))
if {GUARD.%attacker%.vl} >= 5:
if {@Kick} is true:
make server execute command "/guard kick %attacker%"
stop
if {@Ban} is true:
make server execute command "/guard ban %attacker% 7 day"
delete {%attacker's uuid%.VAC.killaura.check}
loop {GUARD.Delay} times:
wait 0.21 second
delete {%attacker's uuid%.VAC.cheat.cooldown.damage}
#--------------------------------------------------------
#
# A N T I R E A C H
#
#--------------------------------------------------------
on damage:
set {_distance} to distance between attacker and victim
set {_distance.%attacKER%} to distance between attacker and victim
if {GUARD.check.Reach} is false:
stop
if attacker has speed:
stop
if attacker is a player:
if attacker's gamemode is creative:
stop
if {_distance} > 4.7:
if damage cause is not a projectile:
if {@setback} is true:
cancel event
add 1 to {GUARD.%attacker%.vl}
add 1 to {GUARD.%attacker%.total.vl}
Flag(attacker, "Reach", "1A")
on damage:
{VAC.Reach} is true
set {_distance.%attacKER%} to distance between attacker and victim
delete {%attacker's uuid%.VAC.cheat.cooldown.damage}
if distance between attacker and victim is greater than 4.25:
set {_r} to distance between attacker and victim
if attacker is a player:
if {%attacker's uuid%.VAC.bypass} is not set:
if {%attacker's uuid%.VAC.cheat.cooldown.damage} is not set:
set {%attacker's uuid%.VAC.cheat.cooldown.damage} to true
if "%damage cause%" is not "fall", "void" or "unknown":
if projectile doesn't exist:
if {%attacker's uuid%.VAC.autoclicker.check} is not set:
if {_r} is less than 4.5:
add 1 to {GUARD.%attacker%.vl}
add 1 to {GUARD.%attacker%.total.vl}
Flag(attacker, "Reach", "2A")
if {@setback} is true:
cancel event
if {GUARD.%attacker%.vl} >= 10:
if {@Kick} is true:
make server execute command "/guard kick %attacker%"
stop
if {@Ban} is true:
make server execute command "/guard ban %attacker% 7 day"
else if {_r} is less than 5.5:
add 1 to {GUARD.%attacker%.vl}
add 1 to {GUARD.%attacker%.total.vl}
Flag(attacker, "Reach", "2B")
if {@setback} is true:
cancel event
if {GUARD.%attacker%.vl} >= 10:
if {@Kick} is true:
make server execute command "/guard kick %attacker%"
stop
if {@Ban} is true:
make server execute command "/guard ban %attacker% 7 day"
else:
if {%attacker's uuid%.VAC} > 5:
add 1 to {GUARD.%attacker%.vl}
add 1 to {GUARD.%attacker%.total.vl}
Flag(attacker, "Reach", "3B")
if {@setback} is true:
cancel event
if {GUARD.%attacker%.vl} >= 1:
if {@Kick} is true:
make server execute command "/guard kick %attacker%"
stop
if {@Ban} is true:
make server execute command "/guard ban %attacker% 7 day"
delete {%attacker's uuid%.VAC.cheat.cooldown.damage}
#--------------------------------------------------------
#
# A N T I N O F A L L
#
#--------------------------------------------------------
on any move:
if {GUARD.check.Nofall} is false:
stop
{time.%player%} is not set
player's gamemode is Adventure or Survival
player is on ground
block at player is air
block under player is air
set {_nofallcount} to 0
loop all blocks in radius 3 around player:
if loop-block is stairs:
stop
if loop-block is slab:
stop
loop all blocks in radius 2 around player:
if loop-block is not air:
add 1 to {_nofallcount}
if {_nofallcount} < 1:
add 1 to {GUARD.%player%.vl}
add 1 to {GUARD.%player%.total.vl}
Flag(player, "Nofall", "1A")
if {vl.NOFALL.%player%} >= 8:
if {@Kick} is true:
make server execute command "/guard kick %player%"
stop
if {@Ban} is true:
make server execute command "/guard ban %player% 7 day"
if {_nofallcount} > 0:
stop
on walk on slab:
if {time.%player%} is not set:
set {time.%player%} to true
wait 2 seconds
clear {time.%player%}
on walk on ladder:
if {time.%player%} is not set:
set {time.%player%} to true
wait 2 seconds
clear {time.%player%}
on break:
if {time.%player%} is not set:
set {time.%player%} to true
wait 0.5 seconds
clear {time.%player%}
on any movement:
{GUARD.check.Step} is true
if {legitfly.%player%} is true:
stop
set {_loc} to player's location
set {_y} to y coordinate of {_loc}
wait 2 ticks
set {_y} to player's y coordinate - {_y}
player doesn't have jump boost
block under player is not carpet or water
if {_y} is greater than 1.25:
wait 1 tick
player's chestplate is not an elytra
{%player's uuid%.VAC.nochecks} is not set
{%player's uuid%.VAC.epteleport} is not set
{%player's uuid%.VAC.teleport} is not set
player's gamemode is not creative or spectator
{%player's uuid%.VAC.bypass} is not set
player's flight mode is false
player is not riding
player is not on ground
if block under player is not air:
if {%player's uuid%.VAC.step.player} is not set:
add 1 to {GUARD.%player%.vl}
add 1 to {GUARD.%player%.total.vl}
Flag(player, "Fly", "1A")
if {GUARD.%player%.vl} >= 5:
if {@Kick} is true:
make server execute command "/guard kick %player%"
stop
îf {@Ban} is true:
make server execute command "/guard ban %player% 7 day"
else:
{GUARD.check.FLY} is true
if {legitfly.%player%} is true:
stop
add 1 to {GUARD.%player%.vl}
add 1 to {GUARD.%player%.total.vl}
Flag(player, "Fly", "2A")
if {@setback} is true:
teleport player to {setback.%player%}
if {GUARD.%player%.vl} >= 5:
if {@Kick} is true:
make server execute command "/guard kick %player%"
stop
îf {@Ban} is true:
make server execute command "/guard ban %player% 7 day"
on any movement:
if player's chestplate is an elytra:
stop
if {legitfly.%player%} is true:
stop
if player's gamemode is not creative or spectator:
if {%player's uuid%.VAC.bypass} is not set:
player's flight mode is false
set {_loc} to player's location
set {_t.b} to player's targeted block
wait 1 tick
set {_loc2} to player's location
set y coordinate of {_loc} to 0
set y coordinate of {_loc2} to 0
set {_dif} to distance between {_loc} and {_loc2}
if {_dif} >= 0.18:
set {%player's uuid%.VAC.walking} to true
set {%player's uuid%.VAC.walk.speed} to {_dif}
wait 1 tick
delete {%player's uuid%.VAC.walking}
delete {%player's uuid%.VAC.walk.speed}
if {%player's uuid%.VAC.nochecks} is true:
stop
if {%player's uuid%.VAC.epteleport} is true:
stop
if {%player's uuid%.VAC.teleport} is true:
stop
player is not riding
if {_dif} > 5:
if {%player's uuid%.VAC.teleport} is true:
stop
set {%player's uuid%.VAC.cheat.speed} to {_dif} * 20
if block under player is not {_t.b}:
if block under player is not air:
{GUARD.check.Blink} is true
add 1 to {GUARD.%player%.vl}
add 1 to {GUARD.%player%.total.vl}
Flag(player, "Blink", "1A")
if {@Kick} is true:
make server execute command "/guard kick %player%"
stop
if {@Ban} is true:
make server execute command "/guard ban %player% 7 day"
else:
{GUARD.check.FLY} is true
if {legitfly.%player%} is true:
stop
add 1 to {GUARD.%player%.vl}
add 1 to {GUARD.%player%.total.vl}
Flag(player, "Fly", "3A")
if {@setback} is true:
teleport player to {setback.%player%}
if {GUARD.%player%.vl} >= 5:
if {@Kick} is true:
make server execute command "/guard kick %player%"
stop
if {@Ban} is true:
make server execute command "/guard ban %player% 7 day"
else:
{VAC.ClickTP} is true
add 1 to {GUARD.%player%.vl}
add 1 to {GUARD.%player%.total.vl}
Flag(player, "Fly", "4A")
if {@setback} is true:
teleport player to {GUARD.%player%.setback}
if {GUARD.%player%.vl} >= 5:
if {@Kick} is true:
make server execute command "/guard kick %player%"
stop
if {@Ban} is true:
make server execute command "/guard ban %player% 7 day"