-
-
Notifications
You must be signed in to change notification settings - Fork 225
Expand file tree
/
Copy pathAnti_Cheat.luau
More file actions
905 lines (791 loc) · 27.3 KB
/
Anti_Cheat.luau
File metadata and controls
905 lines (791 loc) · 27.3 KB
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
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
--!nolint DeprecatedGlobal
--# selene: allow(deprecated)
script.Archivable = false
task.spawn(function()
if not game:GetService("RunService"):IsStudio() then
script.Name = "\n\n\n\n\n\n\n\nModuleScript"
end
end)
GetEnv = nil
return function(Vargs)
local client, service = Vargs.Client, Vargs.Service
local env = GetEnv(nil, {script = script})
setfenv(1, env)
local _G, game, script, getfenv, setfenv, workspace,
getmetatable, setmetatable, loadstring, coroutine,
rawequal, typeof, print, math, warn, error, pcall,
xpcall, select, rawset, rawget, ipairs, pairs,
next, Rect, Axes, os, time, Faces, unpack, string, Color3,
newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor,
NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint,
NumberSequenceKeypoint, PhysicalProperties, Region3int16,
Vector3int16, require, table, type, wait,
Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay =
_G, game, script, getfenv, setfenv, workspace,
getmetatable, setmetatable, loadstring, coroutine,
rawequal, typeof, print, math, warn, error, pcall,
xpcall, select, rawset, rawget, ipairs, pairs,
next, Rect, Axes, os, time, Faces, unpack, string, Color3,
newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor,
NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint,
NumberSequenceKeypoint, PhysicalProperties, Region3int16,
Vector3int16, require, table, type, wait,
Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay
local Anti, Process, UI, Variables
local script = script
local Core = client.Core
local Remote = client.Remote
local Functions = client.Functions
local Disconnect = client.Disconnect
local Send = client.Remote.Send
local Get = client.Remote.Get
local NetworkClient = service.NetworkClient
local Kill = client.Kill
local Player = service.Players.LocalPlayer
local isStudio = select(2, pcall(service.RunService.IsStudio, service.RunService))
local Kick = Player.Kick
local UI = client.UI;
local Anti = client.Anti;
local Variables = client.Variables;
local Process = client.Process;
local Detected = Anti.Detected;
getfenv().client = nil
getfenv().service = nil
getfenv().script = nil
script.Parent = nil
local compareTables
compareTables = function(t1, t2)
if service.CountTable(t1) ~= service.CountTable(t2) then
return false
end
for k, _ in pairs(t1) do
local val1, val2 = t1[k], t2[k]
local isTable = type(val1) == "table"
if isTable and not compareTables(val1, val2) or not isTable and not rawequal(val1, val2) then
return false
end
end
return true
end
local proxyDetector = newproxy(true)
do
local proxyMt = getmetatable(proxyDetector)
proxyMt.__index = function()
Detected("kick", "Proxy methamethod 0x215F")
return task.wait(2e2)
end
proxyMt.__newindex = function()
Detected("kick", "Proxy methamethod 0x86F1")
return task.wait(2e2)
end
proxyMt.__tostring = function()
Detected("kick", "Proxy methamethod 0xC0BD0")
return task.wait(2e2)
end
proxyMt.__unm = function()
Detected("kick", "Proxy methamethod 0x10F00")
return task.wait(2e2)
end
proxyMt.__add = function()
Detected("kick", "Proxy methamethod 0x60DC3")
return task.wait(2e2)
end
proxyMt.__sub = function()
Detected("kick", "Proxy methamethod 0x90F5D")
return task.wait(2e2)
end
proxyMt.__mul = function()
Detected("kick", "Proxy methamethod 0x19999")
return task.wait(2e2)
end
proxyMt.__div = function()
Detected("kick", "Proxy methamethod 0x1D14AC")
return task.wait(2e2)
end
proxyMt.__mod = function()
Detected("kick", "Proxy methamethod 0x786C64")
return task.wait(2e2)
end
proxyMt.__pow = function()
Detected("kick", "Proxy methamethod 0x1D948C")
return task.wait(2e2)
end
proxyMt.__len = function()
Detected("kick", "Proxy methamethod 0xBE931")
return task.wait(2e2)
end
proxyMt.__metatable = "The metatable is locked"
end
local Detectors = {
Speed = function(data)
service.StartLoop("AntiSpeed", 1, function()
if workspace:GetRealPhysicsFPS() > tonumber(data.Speed) then
Detected("kill", "Speed exploiting")
end
end)
end;
AntiAntiIdle = function(data)
local hasActivated = false
local function idleTamper(message)
if hasActivated then
return
end
hasActivated = true
Detected("crash", "Tamper Protection 0xC0FA6; "..tostring(message).."; ")
wait(1)
pcall(Disconnect, "Adonis_0xC0FA6")
pcall(Kill, "Adonis_0xC0FA6")
pcall(Kick, Player, "Adonis_0xC0FA6")
end
if isStudio then
return
else
if not game:IsLoaded() then
game.Loaded:Wait()
end
if not Player.Character and service.Players.CharacterAutoLoads then
Player.CharacterAdded:Wait()
end
end
local isAntiAntiIdlecheck, clientHasClosed = data.Enabled, false
task.spawn(pcall, function()
local connection
local networkClient = service.UnWrap(service.NetworkClient)
local clientReplicator = networkClient.ClientReplicator
if
#networkClient:GetChildren() == 1 and
#networkClient:GetDescendants() == 1 and
networkClient:GetChildren()[1] == clientReplicator and
networkClient:GetDescendants()[1] == clientReplicator and
networkClient:FindFirstChild("ClientReplicator") == clientReplicator and
networkClient:FindFirstChildOfClass("ClientReplicator") == clientReplicator and
networkClient:FindFirstChildWhichIsA("ClientReplicator") == clientReplicator and
clientReplicator:FindFirstAncestor("NetworkClient") == networkClient
then
connection = networkClient.DescendantRemoving:Connect(function(object)
if
object == clientReplicator and
object.Parent == networkClient and
object:IsA("NetworkReplicator") and
object:GetPlayer() == service.UnWrap(Player)
then
connection:Disconnect()
clientHasClosed = true
end
end)
end
end)
while true do
local connection
local idledEvent = service.UnWrap(Player).Idled
connection = idledEvent:Connect(function(time)
if type(time) ~= "number" or not (time > 0) then
idleTamper("Invalid time data")
elseif time > 30 * 60 and isAntiAntiIdlecheck ~= false and not clientHasClosed then
Detected("kick", "Anti-idle detected. "..tostring(math.ceil(time/60) - 20).." minutes above maximum possible Roblox value")
end
end)
if
type(connection) ~= "userdata" or
not rawequal(typeof(connection), "RBXScriptConnection") or
connection.Connected ~= true or
not rawequal(type(connection.Disconnect), "function") or
not rawequal(typeof(idledEvent), "RBXScriptSignal") or
not rawequal(type(idledEvent.Connect), "function") or
not rawequal(type(idledEvent.Wait), "function")
then
idleTamper("Userdata disrepencies detected")
end
task.wait(200 + math.random() * 5)
connection:Disconnect()
if clientHasClosed then
return
end
end
end;
--elseif not Get("CheckBackpack", t) then
--t:Destroy() --// Temp disabled pending full fix
--Detected('log','Client-Side Tool Detected')
HumanoidState = function()
wait(1)
local humanoid = service.Player.Character:WaitForChild("Humanoid", 2) or service.Player.Character:FindFirstChildOfClass("Humanoid")
local event
local doing = true
if humanoid then
event = humanoid.StateChanged:Connect(function(_,new)
if not doing then
event:Disconnect()
end
if rawequal(new, Enum.HumanoidStateType.StrafingNoPhysics) and doing then
doing = false
Detected("kill", "NoClipping")
event:Disconnect()
end
end)
while humanoid and humanoid.Parent and humanoid.Parent.Parent and doing and wait(0.1) do
if
not (Enum.HumanoidStateType.StrafingNoPhysics == Enum.HumanoidStateType.StrafingNoPhysics) or
not rawequal(Enum.HumanoidStateType.StrafingNoPhysics, Enum.HumanoidStateType.StrafingNoPhysics)
then
Detected("crash", "Enum tampering detected")
elseif rawequal(humanoid:GetState(), Enum.HumanoidStateType.StrafingNoPhysics) and doing then
doing = false
Detected("kill", "NoClipping")
end
end
end
end;
AntiCoreGui = function()
if isStudio then
return
end
-- // Checks disallowed content URLs in the CoreGui
service.StartLoop("AntiCoreGui", 15, function()
xpcall(function()
local function getCoreUrls()
local coreUrls = {"rbxassetid://0", "rbxassetid://10066921516", "rbxassetid://13262267483", "rbxassetid://13253401424"} -- Whitelist for Roblox Camera SFX and Quest Controls Scheme
local screenshotHud = service.GuiService:FindFirstChildOfClass("ScreenshotHud")
for _, container in {Player.Character, service.StarterPack, Player:FindFirstChildOfClass("Backpack")} do
for _, v: Instance in ipairs(container:GetChildren()) do
if v:IsA("BackpackItem") and service.Trim(v.TextureId) ~= "" then
table.insert(coreUrls, service.Trim(v.TextureId))
elseif v:IsA("MeshPart") then
table.insert(coreUrls, service.Trim(v.MeshId))
table.insert(coreUrls, service.Trim(v.TextureID)) -- For some reason, on MeshParts it's TextureID instead of TextureId
end
end
end
if screenshotHud and service.Trim(screenshotHud.CameraButtonIcon) ~= "" then
table.insert(coreUrls, service.Trim(screenshotHud.CameraButtonIcon))
end
return coreUrls
end
local hasDetected = false
local activated = false
local rawContentProvider = service.UnWrap(service.ContentProvider)
local workspace = service.UnWrap(workspace)
local tempDecal = service.UnWrap(Instance.new("Decal"))
tempDecal.Texture = "rbxasset://textures/face.png" -- It's a local asset and it's likely to never get removed, so it will never fail to load, unless the user's PC is corrupted
local coreUrls = getCoreUrls()
if not (service.GuiService.MenuIsOpen or service.ContentProvider.RequestQueueSize >= 50 or Player:GetNetworkPing() * 1000 >= 750) then
rawContentProvider.PreloadAsync(rawContentProvider, {tempDecal, tempDecal, tempDecal, service.UnWrap(service.CoreGui), tempDecal}, function(url, status)
if url == "rbxasset://textures/face.png" and status == Enum.AssetFetchStatus.Success then
activated = true
elseif not hasDetected and (string.match(url, "^rbxassetid://") or string.match(url, "^http://www%.roblox%.com/asset/%?id=")) then
local isItemIcon = false
for _, v in ipairs(coreUrls) do
if string.find(url, v, 1, true) then
isItemIcon = true
break
end
end
if isItemIcon == true then
return
end
hasDetected = true
Detected("Kick", "Disallowed content URL detected in CoreGui: " ..url)
end
end)
tempDecal:Destroy()
task.wait(6)
if not activated then -- // Checks for Anti-CoreGui detection bypasses
Detected("kick", "CoreGui detection bypass found")
end
end
local success, err = pcall(function()
rawContentProvider:preloadasync({tempDecal})
end)
local success2, err2 = pcall(function()
rawContentProvider.PreloadAsync(workspace, {tempDecal})
end)
local success3, err3 = pcall(function()
workspace:PreloadAsync({tempDecal})
end)
if
success or (string.match(err, "^%a+ is not a valid member of ContentProvider \"(.+)\"$") or "") ~= rawContentProvider:GetFullName() or
success2 or err2 ~= "Expected ':' not '.' calling member function PreloadAsync" or
success3 or (string.match(err3, "^PreloadAsync is not a valid member of Workspace \"(.+)\"$") or "") ~= workspace:GetFullName()
then
Detected("kick", "Content provider spoofing detected")
end
-- // GetFocusedTextBox detection
local textbox = service.UserInputService:GetFocusedTextBox()
local success, value = pcall(service.StarterGui.GetCore, service.StarterGui, "DeveloperConsoleVisible")
local textChatService = service.TextChatService
local chatBarConfig = textChatService and textChatService:FindFirstChildOfClass("ChatInputBarConfiguration")
if
textbox and Anti.RLocked(textbox) and not ((success and value) or service.GuiService.MenuIsOpen or (
service.Chat.LoadDefaultChat and
textChatService and
textChatService.ChatVersion == Enum.ChatVersion.TextChatService and
chatBarConfig and
chatBarConfig.Enabled
))
then
Detected("Kick", "Invalid CoreGui Textbox has been selected")
end
end, function()
Detected("kick", "Tamper Protection 0x6F832")
end)
end)
end,
MainDetection = function()
local game = service.DataModel
local findService = service.DataModel.FindService
local lastLogOutput = os.clock()
local spoofedHumanoidCheck = Instance.new("Humanoid")
local lastLogIndex = 0
local lookFor = {
"current identity is [0789]";
"gui made by kujo";
"tetanus reloaded hooked";
"hookmetamethod";
"hookfunction";
"HttpGet";
"^Chunk %w+, at Line %d+";
"reviz admin";
"iy is already loaded";
"infinite yield is already loaded";
"infinite yield is already";
"iy_debug";
"returning json";
"shattervast";
"failed to parse json";
"newcclosure", -- // Kicks all non chad exploits which do not support newcclosure like jjsploit
"getrawmetatable";
"setrawmetatable";
"getnamecallmethod";
"setnamecallmethod";
--"setfflag";
--"getfflag";
"gethui";
"isreadonly";
"setreadonly";
"isfile";
"writefile";
"appendfile";
"delfile";
"readfile";
"loadfile";
--"isfolder";
"makefolder";
"delfolder";
"listfiles";
"secure_call"; -- synapse specific (?)
"getsynasset"; -- synapse specific
"getcustomasset";
"cloneref";
--"clonefunction";
"getspecialinfo";
"saveinstance";
--"messagebox";
"protect_gui"; -- specific to synapse and smaller executors like sirhurt, temple, etc
"unprotect_gui"; -- specific to synapse and smaller executors like sirhurt, temple, etc
"rconsoleprint";
"rconsoleinfo";
"rconsolewarn";
"rconsoleerr";
"rconsoleclear";
"rconsolename";
"rconsoleinput";
--"printconsole";
"checkcaller";
--"dumpstring";
"islclosure";
"getscriptclosure";
"getscripthash";
"getcallingscript";
"getgenv";
"getsenv";
"getrenv";
"getmenv";
"gettenv"; -- script-ware specific
"identifyexecutor";
--"getreg";
--"getgc";
"getnilinstances";
"getconnections";
"getloadedmodules";
"firesignal";
--"fireclickdetector";
"fireproximityprompt";
"firetouchinterest";
"setsimulationradius";
"getsimulationradius";
"sethiddenproperty";
"gethiddenproperty";
"setscriptable";
--"isnetworkowner";
"setclipboard";
"getconstants";
"getconstant";
"setconstant";
"getupvalues";
"getupvalue";
"setupvalue";
"getprotos";
"getproto";
"setproto";
"getstack";
"setstack";
"getregistry";
"cache_replace"; -- synapse specific (?)
"cache_invalidate"; -- synapse specific (?)
"get_thread_identity"; -- synapse specific (?)
"set_thread_identity"; -- synapse specific (?)
"setthreadcontext";
--"setidentity";
--"is_cached"; -- synapse specific (?)
"write_clipboard"; -- synapse specific (?)
"replicatesignal";
"hooksignal";
"queue_on_teleport";
--"is_beta"; -- synapse specific (?)
"create_secure_function"; -- synapse specific (?)
"run_secure_function"; -- synapse specific (?)
"Kill by Avexus#1234 initialized";
--"FilteringEnabled Kill"; -- // Disabled due to potential of having false flags
"Depricated & Drop Support on"; -- VegaX detection
"Couldn't find target with input:";
"Found target with input:";
"Couldn't find the target's root part%. :[";
"HookMT"; --watameln was here :3
}
local soundIds = {
5032588119,
}
local function check(Message)
for _, v in lookFor do
if
not string.find(string.lower(Message), "failed to load", 1, true) and
not string.find(string.lower(Message), "meshcontentprovider failed to process", 1, true) and
not string.find(string.lower(Message), "unknown 'active' animation:", 1, true) and
(string.match(string.lower(Message), string.lower(v)) or string.match(Message, v))
then
return true
end
end
end
local function checkServ()
if
not service.GuiService:IsTenFootInterface() and
not service.VRService.VREnabled and
not service.UserInputService.GamepadEnabled and
not service.UserInputService.TouchEnabled
then
if not pcall(function()
if not isStudio and (findService(game, "VirtualUser") or findService(game, "VirtualInputManager") or findService(game, "UGCValidationService")) then
Detected("crash", "Disallowed Services Detected")
end
end) then
Detected("kick", "Disallowed Services Finding Error")
end
end
end
local function soundIdCheck(Sound)
for _,v in ipairs(soundIds) do
if Sound.SoundId and (string.find(string.lower(tostring(Sound.SoundId)), tostring(v)) or Sound.SoundId == tostring(v)) then
return true
end
end
return false
end
local function checkTool(t)
task.wait()
if t and (t:IsA("Tool") or t.ClassName == "HopperBin") and not t:FindFirstChild(Variables.CodeName) and service.Player:FindFirstChild("Backpack") and t:IsDescendantOf(service.Player.Backpack) then
if t.ClassName == "HopperBin" and (rawequal(t.BinType, Enum.BinType.Grab) or rawequal(t.BinType, Enum.BinType.Clone) or rawequal(t.BinType, Enum.BinType.Hammer) or rawequal(t.BinType, Enum.BinType.GameTool)) then
Detected("kick", "Building Tools detected; "..tostring(t.BinType))
end
end
end
checkServ()
service.DataModel.ChildAdded:Connect(checkServ)
service.PolicyService.ChildAdded:Connect(function(child)
if child:IsA("Sound") then
for i = 1, 5 do
if soundIdCheck(child) then
Detected("crash", "CMDx Detected; "..tostring(child))
end
task.wait(0.1)
end
end
end)
service.LogService.MessageOut:Connect(function(Message)
if Message == " " then
lastLogOutput = os.clock()
elseif type(Message) ~= "string" then
pcall(Detected, "crash", "Tamper Protection 0x600D")
task.wait(1)
pcall(Disconnect, "Adonis_0x600D")
pcall(Kill, "Adonis_0x600D")
pcall(Kick, Player, "Adonis_0x600D")
elseif check(Message) then
Detected("crash", "Exploit detected; "..Message)
end
end)
--[[
service.ScriptContext.ChildAdded:Connect(function(child)
if Anti.GetClassName(child) ~= "CoreScript" then
Detected("kick","Non-CoreScript Detected; "..tostring(child))
end
end)
service.ReplicatedFirst.ChildAdded:Connect(function(child)
if Anti.GetClassName(child) == "LocalScript" then
Detected("kick", "Localscript Detected; "..tostring(child))
end
end)
]]
service.ScriptContext.Error:Connect(function(Message, Trace, Script)
Message, Trace, Script = tostring(Message), tostring(Trace), tostring(Script)
if Script and Script == "tpircsnaisyle" then
Detected("kick", "Elysian Detected")
elseif check(Message) or check(Trace) or check(Script) then
Detected("crash", "Exploit detected; "..Message.." "..Trace.." "..Script)
elseif not Script or (not Trace or Trace == "") then
local tab = service.LogService:GetLogHistory()
local found = false
if Script then
for i, v in pairs(tab) do
if v.message == Message and tab[i+1] and tab[i+1].message == Trace then
found = true
end
end
else
found = true
end
if found then
if string.match(Trace, "CoreGui") or string.match(Trace, "PlayerScripts") or string.match(Trace, "Animation_Scripts") or string.match(Trace, "^(%S*)%.(%S*)") then
return
else
Detected("log", "Traceless/Scriptless error")
end
end
end
end)
if service.Player:WaitForChild("Backpack", 120) then
service.Player.Backpack.ChildAdded:Connect(checkTool)
end
--// Detection Loop
local hasPrinted = false
service.StartLoop("Detection", 15, function()
--// Stuff
local ran,_ = pcall(function() service.ScriptContext.Name = "ScriptContext" end)
if not ran then
Detected("log", "ScriptContext error?")
end
--// Check Log History
local Logs = service.LogService.GetLogHistory(service.LogService)
local rawLogService = service.UnWrap(service.LogService)
local First = Logs[1]
if not compareTables(Logs, rawLogService:GetLogHistory()) then
Detected("kick", "Log spoofing found")
elseif not hasPrinted and not First then
local startTime = os.clock()
client.OldPrint(" ")
for i = 1, 5 do
task.wait()
end
Logs = service.LogService:GetLogHistory()
First = Logs[1]
hasPrinted = true
if (lastLogOutput + 3) < startTime then
Detected("kick", "Log event not outputting to console")
end
else
if not First then
Detected("kick", "Suspicious log amount detected 0x48248")
client.OldPrint(" ") -- // To prevent the log amount check from firing every 10 seconds (Just to be safe)
end
end
if
not rawequal(type(First), "table") or
not rawequal(type(First.message), "string") or
not rawequal(typeof(First.messageType), "EnumItem") or
not rawequal(type(First.timestamp), "number") or
First.timestamp < os.time() - os.clock() - 60 * 60 * 48 or
First.timestamp > os.time() + 60 * 60 * 24 * 7 * 4 * 5 -- If the timestamp is five months in the future, it's safe to say its invalid
then
Detected("kick", "Bypass detected 0x48248")
else
for _, v in ipairs(Logs), Logs, lastLogIndex do
if check(v.message) then
Detected("crash", "Exploit detected; "..v.message)
end
end
lastLogIndex = #Logs
end
--// Check Loadstring
local ran, _ = pcall(function()
local func, err = loadstring("print('LolloDev5123 was here')")
end)
if ran then
Detected("crash", "Exploit detected; Loadstring usable")
end
--// Check Context Level
local ran, _ = pcall(function()
local test = Instance.new("StringValue")
test.RobloxLocked = true
end)
if ran then
Detected("crash", "RobloxLocked usable")
end
local function getDictionaryLenght(dictionary)
local len = 0
for _, _ in pairs(dictionary) do
len += 1
end
return len
end
local mt = {
__mode = "v"
}
-- // Detects certain anti-dex bypasses
local tbl = setmetatable({}, mt)
if mt.__mode ~= "v" or rawget(mt, "__mode") ~= "v" or getmetatable(tbl) ~= mt or getDictionaryLenght(mt) ~= 1 or "_" == "v" or "v" ~= "v" then
Detected("crash", "Anti-dex bypass found. Method 0x1")
else
local success, value = pcall(function()
return setmetatable(tbl, mt)
end)
if not success or value ~= tbl or not service.OrigRawEqual(value, tbl) then
Detected("crash", "Anti-dex bypass found. Method 0x2")
end
end
-- // Anti humanoid data spoof
xpcall(function()
local eventCount = 0
local oldWalkSpeed, oldJumpPower = spoofedHumanoidCheck.WalkSpeed, spoofedHumanoidCheck.JumpPower
local newWalkSpeed, newJumpPower = math.random(1, 100), math.random(1, 100)
local connection1, connection2, connection3
connection1 = spoofedHumanoidCheck.Changed:Connect(function()
eventCount += 1
end)
connection2 = spoofedHumanoidCheck:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
eventCount += 1
end)
connection3 = spoofedHumanoidCheck:GetPropertyChangedSignal("JumpPower"):Connect(function()
eventCount += 1
end)
spoofedHumanoidCheck.WalkSpeed = newWalkSpeed
spoofedHumanoidCheck.JumpPower = newJumpPower
if
spoofedHumanoidCheck.WalkSpeed ~= newWalkSpeed or
spoofedHumanoidCheck.JumpPower ~= newJumpPower
then
Detected("kick", "Humanoid tampering detected. Method 0x1")
end
if newWalkSpeed == oldWalkSpeed then
eventCount += 2
end
if newJumpPower == oldJumpPower then
eventCount += 2
end
task.spawn(function()
task.wait(5)
connection1:Disconnect()
connection2:Disconnect()
connection3:Disconnect()
if eventCount < 4 then
Detected("kick", "Humanoid tampering detected. Method 0x2. Count: "..tostring(eventCount))
end
end)
end, function()
Detected("kick", "Tamper Protection 0x16C1D")
end)
if gcinfo() ~= collectgarbage("count") then
Detected("kick", "GC spoofing detected")
end
xpcall(function()
local strings = {
"Loaded press z to", "press x to respawn", "Fe Invisible Fling By",
"Diemiers#4209", "Respawning dont spam"
}
for _, object in ipairs(workspace:GetChildren()) do
if object:IsA("Message") then
local text = object.Text
for _, v in ipairs(strings) do
if string.find(text, v, 1, true) then
Detected("kick", "Invisible FE fling GUI detected")
end
end
end
end
end, warn)
end)
end
}
for k, v in pairs(Detectors) do
Anti.AddDetector(k, v)
end
-- // The tamper checks below are quite bad but they are sufficient for now
local lastChanged1, lastChanged2, lastChanged3 = os.clock(), os.clock(), os.clock()
local checkEvent = service.UnWrap(script).Changed:Connect(function(prop)
if prop == "Name" and string.match(script.Name, "^\n\n+ModuleScript$") then
lastChanged1 = os.clock()
elseif not isStudio then
Detected("kick", "Tamper Protection 0xC1E7")
end
end)
do
local meta = service.MetaFunc
local track = meta(service.TrackTask)
local opcall = meta(pcall)
local oWait = meta(wait)
local time = meta(time)
local oldName = ""
track("Thread: Anti Cheat tamper check", meta(function()
while oWait(1) do
local success, value = pcall(function()
return Anti.Detectors
end)
if
not success or
script.Archivable ~= false or
not isStudio and (not string.match(script.Name, "^\n\n+ModuleScript$") or lastChanged2 - lastChanged1 > 90) or
lastChanged2 - lastChanged3 > 90 or
not checkEvent or
typeof(checkEvent) ~= "RBXScriptConnection" or
checkEvent.Connected ~= true
then
opcall(Detected, "crash", "Tamper Protection 0x16471")
oWait(1)
opcall(Disconnect, "Adonis_0x16471")
opcall(Kill, "Adonis_0x16471")
opcall(Kick, Player, "Adonis_0x16471")
end
if not isStudio then
local newName = "\n\n"..string.rep("\n", math.random(1, 50)).."ModuleScript"
if newName == oldName then
lastChanged1 = os.clock()
end
script.Name, oldName = newName, newName
else
lastChanged1 = os.clock()
end
lastChanged2 = os.clock()
end
end))
task.spawn(xpcall, function()
while true do
if
not isStudio and math.abs(lastChanged3 - lastChanged1) > 90 or
math.abs(lastChanged3 - lastChanged2) > 90
then
opcall(Detected, "crash", "Tamper Protection 0xE28D")
oWait(1)
opcall(Disconnect, "Adonis_0xE28D")
opcall(Kill, "Adonis_0xE28D")
opcall(Kick, Player, "Adonis_0xE28D")
end
task.wait(1)
lastChanged3 = os.clock()
end
end, function()
opcall(Detected, "crash", "Tamper Protection 0x36C6")
oWait(1)
opcall(Disconnect, "Adonis_0x36C6")
opcall(Kill, "Adonis_0x36C6")
opcall(Kick, Player, "Adonis_0x36C6")
end)
end
end