Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 42 additions & 35 deletions MainModule/Client/Plugins/Anti_Cheat.luau
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ GetEnv = nil

return function(Vargs)
local client, service = Vargs.Client, Vargs.Service
local env = GetEnv(nil, {script = script})
local env = GetEnv(nil, {
script = script
})
setfenv(1, env)

local _G, game, script, getfenv, setfenv, workspace,
Expand Down Expand Up @@ -166,7 +168,7 @@ return function(Vargs)
return
end
hasActivated = true
Detected("crash", "Tamper Protection 0xC0FA6; "..tostring(message).."; ")
Detected("crash", "Tamper Protection 0xC0FA6; " .. tostring(message) .. "; ")
wait(1)
pcall(Disconnect, "Adonis_0xC0FA6")
pcall(Kill, "Adonis_0xC0FA6")
Expand Down Expand Up @@ -223,7 +225,7 @@ return function(Vargs)
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")
Detected("kick", "Anti-idle detected. " .. tostring(math.ceil(time / 60) - 20) .. " minutes above maximum possible Roblox value")
end
end)

Expand Down Expand Up @@ -258,7 +260,7 @@ return function(Vargs)
local event
local doing = true
if humanoid then
event = humanoid.StateChanged:Connect(function(_,new)
event = humanoid.StateChanged:Connect(function(_, new)
if not doing then
event:Disconnect()
end
Expand Down Expand Up @@ -291,6 +293,13 @@ return function(Vargs)
MainDetection = function()
local game = service.DataModel
local findService = service.DataModel.FindService
if not game:GetService("RunService"):IsStudio() then
game:GetService("RunService").PreRender:Connect(function()
if findService(game, "AppUpdateService\000") or findService(game, "AccountService\000") or findService(game, "DataModelPatchService\000") or findService(game, "OmniRecommendationsService\000") then
Detected("crash", "Disallowed services detected")
end
end)
end
local lastLogOutput = os.clock()
local spoofedHumanoidCheck = Instance.new("Humanoid")
local lastLogIndex = 0
Expand Down Expand Up @@ -422,7 +431,9 @@ return function(Vargs)
string.find(string.lower(Message), "failed to load", 1, true) or
string.find(string.lower(Message), "meshcontentprovider failed to process", 1, true) or
string.find(string.lower(Message), "unknown 'active' animation:", 1, true)
then return false end
then
return false
end

for _, v in lookFor do
if string.match(string.lower(Message), string.lower(v)) or string.match(Message, v) then
Expand All @@ -439,17 +450,17 @@ return function(Vargs)
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
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
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
Expand All @@ -462,7 +473,7 @@ return function(Vargs)

if t and t.ClassName == "HopperBin" and not t:FindFirstChild(Variables.CodeName) and service.Player:FindFirstChild("Backpack") and t:IsDescendantOf(service.Player.Backpack) then
if 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))
Detected("kick", "Building Tools detected; " .. tostring(t.BinType))
end
end
end
Expand All @@ -475,7 +486,7 @@ return function(Vargs)
if child:IsA("Sound") and child.Parent == service.PolicyService then
for i = 1, 5 do
if soundIdCheck(child) then
Detected("crash", "CMDx Detected; "..tostring(child))
Detected("crash", "CMDx Detected; " .. tostring(child))
end
task.wait(0.1)
end
Expand All @@ -492,37 +503,23 @@ return function(Vargs)
pcall(Kill, "Adonis_0x600D")
pcall(Kick, Player, "Adonis_0x600D")
elseif check(Message) then
Detected("crash", "Exploit detected; "..Message)
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)
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
if v.message == Message and tab[i + 1] and tab[i + 1].message == Trace then
found = true
end
end
Expand All @@ -547,7 +544,9 @@ return function(Vargs)
local hasPrinted = false
service.StartLoop("Detection", 15, function()
--// Stuff
local ran,_ = pcall(function() service.ScriptContext.Name = "ScriptContext" end)
local ran, _ = pcall(function()
service.ScriptContext.Name = "ScriptContext"
end)
if not ran then
Detected("log", "ScriptContext error?")
end
Expand Down Expand Up @@ -592,7 +591,7 @@ return function(Vargs)
else
for _, v in ipairs(Logs), Logs, lastLogIndex do
if check(v.message) then
Detected("crash", "Exploit detected; "..v.message)
Detected("crash", "Exploit detected; " .. v.message)
end
end
lastLogIndex = #Logs
Expand Down Expand Up @@ -685,7 +684,7 @@ return function(Vargs)
connection3:Disconnect()

if eventCount < 4 then
Detected("kick", "Humanoid tampering detected. Method 0x2. Count: "..tostring(eventCount))
Detected("kick", "Humanoid tampering detected. Method 0x2. Count: " .. tostring(eventCount))
end
end)
end, function()
Expand All @@ -698,8 +697,11 @@ return function(Vargs)

xpcall(function()
local strings = {
"Loaded press z to", "press x to respawn", "Fe Invisible Fling By",
"Diemiers#4209", "Respawning dont spam"
"Loaded press z to",
"press x to respawn",
"Fe Invisible Fling By",
"Diemiers#4209",
"Respawning dont spam"
}

for _, object in ipairs(workspace:GetChildren()) do
Expand Down Expand Up @@ -769,7 +771,7 @@ return function(Vargs)
end

if not isStudio then
local newName = "\n\n"..string.rep("\n", math.random(1, 50)).."ModuleScript"
local newName = "\n\n" .. string.rep("\n", math.random(1, 50)) .. "ModuleScript"

if newName == oldName then
lastChanged1 = os.clock()
Expand Down Expand Up @@ -812,5 +814,10 @@ return function(Vargs)
opcall(Kill, "Adonis_0x36C6")
opcall(Kick, Player, "Adonis_0x36C6")
end)
workspace.ChildAdded:Connect(function(c)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add this to the existing workdpace message detector or fe fling by just adding "pls join Moon Backdoor Dc!!" to the detected messages list.

if c:IsA("Message") and task.wait(1.5) and c.Text == "pls join Moon Backdoor Dc!!" then
Detected("crash", "Backdoor executor detected")
end
end)
end
end
Loading