Run it
Copy the script and paste it into your executor.
Players = :()
TweenService = :()
UserInputService = :()
RunService = :()
StarterGui = :()
Player = Players.LocalPlayer
ScanContext = {
hasHttp: boolean,
hasWebhook: boolean,
hasRemote: boolean,
hasLoadstring: boolean,
hasExecutor: boolean,
hasDataCollection: boolean,
hasTeleport: boolean,
}
export Threat = {
Category: ,
Severity: ,
Confidence: ,
Description: ,
Pattern: ,
: ?,
InstancePath: ?,
LineNumber: number?,
Target: ?,
ExploitImpact: ?,
Evidence: ,
BenignReason: ?,
SuggestedAction: ,
}
export GroupedThreat = {
Category: ,
Severity: ,
Description: ,
Instances: { Threat },
}
export PatternData = {
patterns: { },
severity: ,
description: ,
target: ,
exploit_impact: ,
benign_reason: ?,
suggested_action: ,
}
MaliciousDetector = {}
MaliciousDetector.__index = MaliciousDetector
CONFIG = {
LogToOutput = ,
MaxLineLength = ,
MaxScriptSizeForTokenizer = ,
MaxRegexChunk = ,
MaxBytecodeSize = ,
ChunkOverlap = ,
}
RAW_ENV: { []: any } = () :: any
getgenvFn: any = RAW_ENV.getgenv
(container: LuaSourceContainer, key: ): any
ok, value = (()
(container :: any)[key]
)
ok
value
lastYieldTime = .()
YIELD_THRESHOLD =
()
.() - lastYieldTime > YIELD_THRESHOLD
.()
lastYieldTime = .()
(instance: , thickness: number, speed: number?): UIStroke
stroke = .()
stroke.Thickness = thickness
stroke.Transparency =
stroke.Parent = instance
hue =
s = speed
.(()
stroke stroke.Parent
hue = (hue + * s) %
stroke.Color = .(hue, , )
.()
)
stroke
FX = {}
(obj: , info: TweenInfo, goal: { []: any })
t = TweenService:(obj, info, goal)
t:()
t
FX.(gradient: UIGradient, speed: number)
conn
conn = RunService.Heartbeat:((dt)
gradient.Parent
conn:()
x = gradient.Offset.X
gradient.Offset = .(((x + + dt * speed) % ) - , )
)
conn
FX.(barFill: Frame)
g = .()
g.Color = ColorSequence.({
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, .(, , )),
})
g.Parent = barFill
FX.(g, )
FX.(parent: )
sweep = .()
sweep.Name =
sweep.Size = .(, , , )
sweep.Position = .(, , , )
sweep.BackgroundColor3 = .(, , )
sweep.BackgroundTransparency =
sweep.BorderSizePixel =
sweep.ZIndex =
sweep.Parent = parent
g = .()
g.Rotation =
g.Transparency = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
g.Parent = sweep
tw = (
sweep,
TweenInfo.(, .EasingStyle.Sine, .EasingDirection.InOut, -, ),
{ Position = .(, , , -) }
)
sweep, tw
FX.(parent: , color: )
ring = .()
ring.AnchorPoint = .(, )
ring.Position = .(, , , )
ring.Size = .(, )
ring.BackgroundTransparency =
ring.Parent = parent
corner = .()
corner.CornerRadius = .(, )
corner.Parent = ring
stroke = .()
stroke.Color = color
stroke.Thickness =
stroke.Parent = ring
(ring, TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out), { Size = .(, ) })
t = (stroke, TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out), { Transparency = , Thickness = })
t.Completed:(()
ring:()
)
FX.(frame: GuiObject, magnitude: number, duration: number)
base = frame.Position
start = .()
conn
conn = RunService.RenderStepped:(()
elapsed = .() - start
elapsed >= duration frame.Parent
frame.Parent
frame.Position = base
conn:()
falloff = - elapsed / duration
dx = (.() * - ) * magnitude * falloff
dy = (.() * - ) * magnitude * falloff
frame.Position = .(base.X.Scale, base.X.Offset + dx, base.Y.Scale, base.Y.Offset + dy)
)
FX.(label: TextLabel, text: , charDelay: number)
label.Text =
.(()
i = , #text
label.Parent
label.Text = .(text, , i)
.(charDelay)
)
FX.(guiObj: GuiObject)
scale = guiObj:() :: UIScale?
scale
newScale = .()
newScale.Name =
newScale.Parent = guiObj
scale = newScale
s = scale :: UIScale
s.Scale =
(s, TweenInfo.(, .EasingStyle.Back, .EasingDirection.Out), { Scale = })
FX.(stroke: UIStroke)
(stroke, TweenInfo.(, .EasingStyle.Sine, .EasingDirection.InOut, -, ), { Thickness = })
FX.(card: Frame, : number, stroke: UIStroke)
scale = .()
scale.Scale =
scale.Parent = card
card.BackgroundTransparency =
stroke.Transparency =
labels = {}
_, d (card:())
d:()
d.TextTransparency =
.(labels, d)
.(, ()
card.Parent
(card, TweenInfo.(, .EasingStyle.Quad), { BackgroundTransparency = })
(stroke, TweenInfo.(, .EasingStyle.Quad), { Transparency = })
(scale, TweenInfo.(, .EasingStyle.Back, .EasingDirection.Out), { Scale = })
_, label (labels)
(label, TweenInfo.(, .EasingStyle.Quad), { TextTransparency = })
)
FX.(frame: GuiObject, onDone: (() -> ())?)
frame:()
frame:(, )
info = TweenInfo.(, .EasingStyle.Quad, .EasingDirection.In)
scale = frame:()
scale
scale = .()
scale.Parent = frame
(scale :: UIScale, info, { Scale = })
(obj: )
obj:()
(obj, info, { Transparency = })
obj:()
obj.BackgroundTransparency <
(obj, info, { BackgroundTransparency = })
obj:() obj:() obj:()
(obj, info, { TextTransparency = })
obj:() obj:()
(obj, info, { ImageTransparency = })
obj:()
(obj, info, { ScrollBarImageTransparency = })
(frame)
_, d (frame:())
(d)
.(info.Time, ()
onDone
()
)
FX.(button: TextButton)
stroke = .()
stroke.Color = .(, , )
stroke.Thickness =
stroke.Transparency =
stroke.ApplyStrokeMode = .ApplyStrokeMode.Border
stroke.Parent = button
overlay = .()
overlay.Name =
overlay.Size = .(, )
overlay.BackgroundColor3 = .(, , )
overlay.BackgroundTransparency =
overlay.BorderSizePixel =
overlay.Active =
overlay.Parent = button
corner = button:()
corner
corner:().Parent = overlay
button.MouseEnter:(()
(stroke, TweenInfo.(), { Thickness = , Transparency = })
(overlay, TweenInfo.(), { BackgroundTransparency = })
)
button.MouseLeave:(()
(stroke, TweenInfo.(), { Thickness = , Transparency = })
(overlay, TweenInfo.(), { BackgroundTransparency = })
)
(s: ): number
#s ==
counts = {}
i = , #s
c = s:(i, i)
counts[c] = (counts[c] ) +
entropy =
_, count (counts)
p = count / #s
entropy = entropy - p * .(p, )
entropy
(source: , scriptInstance: LuaSourceContainer): { Threat }
threats: { Threat } = {}
#source > CONFIG.MaxScriptSizeForTokenizer
threats
tokens = {}
pos =
lineNum =
pos <= #source
c = source:(pos, pos)
c ==
lineNum +=
pos +=
c == source:(pos + , pos + ) ==
nextPos = source:(, pos)
pos = nextPos nextPos + #source +
c == source:(pos + , pos + ) ==
endPos = source:(, pos, )
pos = endPos endPos + #source +
c == c ==
endPos = source:(c, pos + )
strVal =
endPos
strVal = source:(pos + , endPos - )
pos = endPos +
pos = #source +
#strVal >
entropy = (strVal)
entropy >
.(threats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Pattern = ,
Target = ,
ExploitImpact = ,
LineNumber = lineNum,
Evidence = .. .(, entropy) .. .. #strVal,
BenignReason = ,
SuggestedAction = ,
})
c:()
match = source:(, pos)
.(tokens, { = , value = match, line = lineNum })
pos += #match
c ==
source:(pos + , pos + ) ==
pos +=
.(tokens, { = , value = , line = lineNum })
pos +=
pos +=
()
varMap = {}
DANGEROUS_GLOBALS = {
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
}
i = , #tokens -
t1, t2, t3, t4 = tokens[i], tokens[i + ], tokens[i + ], tokens[i + ]
t1.type == t1.value == t2.type == t3.type == t3.value ==
t4.type == DANGEROUS_GLOBALS[t4.value]
varMap[t2.value] = t4.value
hasFireServer =
hasWait =
hasDebounce =
hasLoadstring =
hasHttp =
i, t (tokens)
t.type ==
resolved = varMap[t.value] t.value
DANGEROUS_GLOBALS[resolved]
resolved ~=
resolved ~=
resolved ~=
resolved ~=
.(threats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Pattern = resolved,
Target = ,
ExploitImpact = ,
LineNumber = t.line,
Evidence = .. t.value .. .. resolved .. ,
BenignReason = ,
SuggestedAction = ,
})
resolved == resolved ==
hasFireServer =
resolved == resolved ==
hasWait =
resolved == resolved ==
hasDebounce =
resolved ==
hasLoadstring =
resolved == resolved ==
hasHttp =
hasFireServer hasWait hasDebounce
.(threats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Target = ,
ExploitImpact = ,
Pattern = ,
LineNumber = ,
Evidence = ,
BenignReason = ,
SuggestedAction = ,
})
hasLoadstring hasHttp
.(threats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Target = ,
ExploitImpact = ,
Pattern = ,
LineNumber = ,
Evidence = ,
BenignReason = ,
SuggestedAction = ,
})
threats
INTRO_DURATION =
(shouldSkip: () -> boolean)
playerGui = Player:()
existingIntro = playerGui:()
existingIntro
existingIntro:()
ACCENT = .(, , )
ARMED = .(, , )
RADIUS =
TRAIL =
SWEEP_SPEED =
TITLE =
GLYPHS =
BLIP_COLORS = {
.(, , ),
.(, , ),
.(, , ),
.(, , ),
}
introGui = .()
introGui.Name =
introGui.IgnoreGuiInset =
introGui.ResetOnSpawn =
introGui.DisplayOrder =
introGui.Parent = playerGui
stage = .()
stage.Name =
stage.Size = .(, )
stage.BackgroundColor3 = .(, , )
stage.BackgroundTransparency =
stage.BorderSizePixel =
stage.Parent = introGui
(
parent: ,
diameter: number,
strokeColor: ?,
strokeThickness: number?,
strokeTransparency: number?
): Frame
f = .()
f.AnchorPoint = .(, )
f.Position = .(, )
f.Size = .(diameter, diameter)
f.BackgroundTransparency =
f.BorderSizePixel =
f.Parent = parent
c = .()
c.CornerRadius = .(, )
c.Parent = f
strokeColor
s = .()
s.Color = strokeColor
s.Thickness = strokeThickness
s.Transparency = strokeTransparency
s.Parent = f
f
grid = .()
grid.Size = .(, )
grid.BackgroundTransparency =
grid.GroupTransparency =
grid.Parent = stage
GRID_STEP =
i = ,
v = .()
v.Size = .(, , , )
v.Position = .(i * GRID_STEP, )
v.BackgroundColor3 = ACCENT
v.BackgroundTransparency =
v.BorderSizePixel =
v.Parent = grid
i <=
h = .()
h.Size = .(, , , )
h.Position = .(, i * GRID_STEP)
h.BackgroundColor3 = ACCENT
h.BackgroundTransparency =
h.BorderSizePixel =
h.Parent = grid
radar = .()
radar.AnchorPoint = .(, )
radar.Position = .(, )
radar.Size = .(RADIUS * , RADIUS * )
radar.BackgroundTransparency =
radar.Parent = stage
radarScale = .()
radarScale.Scale =
radarScale.Parent = radar
disc = (radar, RADIUS * )
disc.BackgroundColor3 = ACCENT
disc.BackgroundTransparency =
outerRing = (radar, RADIUS * , ACCENT, , )
(radar, RADIUS * , ACCENT, , )
(radar, RADIUS * , ACCENT, , )
_, horizontal ({ , })
line = .()
line.AnchorPoint = .(, )
line.Position = .(, )
line.Size = horizontal .(RADIUS * , ) .(, RADIUS * )
line.BackgroundColor3 = ACCENT
line.BackgroundTransparency =
line.BorderSizePixel =
line.Parent = radar
arms: { Frame } = {}
k = , TRAIL
arm = .()
arm.AnchorPoint = .(, )
arm.Position = .(, )
arm.Size = .(RADIUS * , k == )
arm.BackgroundColor3 = k == .(, , ) ACCENT
arm.BackgroundTransparency = k == ( + * k / TRAIL)
arm.BorderSizePixel =
arm.ZIndex =
arm.Parent = radar
g = .()
g.Transparency = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
g.Parent = arm
arms[k + ] = arm
core = (radar, )
core.BackgroundColor3 = .(, , )
core.BackgroundTransparency =
core.ZIndex =
Blip = { frame: Frame, scale: UIScale, angle: number, shown: boolean }
blips: { Blip } = {}
_ = ,
angle = .() *
dist = ( + .() * ) * RADIUS
rad = .(angle)
b = (radar, )
b.Position = .(, .(rad) * dist, , .(rad) * dist)
b.BackgroundColor3 = BLIP_COLORS[.(, #BLIP_COLORS)]
b.BackgroundTransparency =
b.ZIndex =
s = .()
s.Scale =
s.Parent = b
.(blips, { frame = b, scale = s, angle = angle, shown = })
title = .()
title.AnchorPoint = .(, )
title.Position = .(, , , -RADIUS - )
title.Size = .(, )
title.BackgroundTransparency =
title.Font = .Font.GothamBlack
title.TextSize =
title.TextColor3 = .(, , )
title.Text =
title.Parent = stage
status = .()
status.AnchorPoint = .(, )
status.Position = .(, , , RADIUS + )
status.Size = .(, )
status.BackgroundTransparency =
status.Font = .Font.Code
status.TextSize =
status.TextColor3 = ACCENT
status.Text =
status.Parent = stage
flash = .()
flash.Size = .(, )
flash.BackgroundColor3 = .(, , )
flash.BackgroundTransparency =
flash.BorderSizePixel =
flash.ZIndex =
flash.Parent = introGui
ping = .()
ping.SoundId =
ping.Volume =
ping.Parent = introGui
(pitch: number)
(()
s = ping:()
s.PlaybackSpeed = pitch
s.Parent = introGui
s.Ended:(()
s:()
)
s:()
)
(blip: Blip)
blip.shown =
(blip.scale, TweenInfo.(, .EasingStyle.Back, .EasingDirection.Out), { Scale = })
echo = (radar, , blip.frame.BackgroundColor3, , )
echo.Position = blip.frame.Position
echo.ZIndex =
echoStroke = echo:() :: UIStroke
(echo, TweenInfo.(, .EasingStyle.Quad), { Size = .(, ) })
(echoStroke, TweenInfo.(, .EasingStyle.Quad), { Transparency = }).Completed:(()
echo:()
)
( + .() * )
startTime = .()
sweepActive =
lastDecrypt =
decryptDone =
conn = RunService.Heartbeat:(()
t = .() - startTime
sweepActive t >=
sweepTotal = (t - ) * SWEEP_SPEED
k, arm (arms)
arm.Rotation = (sweepTotal - (k - ) * ) %
_, blip (blips)
blip.shown sweepTotal >= blip.angle
(blip)
decryptDone t >= t - lastDecrypt >=
lastDecrypt = t
revealed = .(.((t - ) / , , ) * #TITLE)
chars = .(#TITLE)
i = , #TITLE
ch = TITLE:(i, i)
i <= revealed ch ==
chars[i] = ch
r = .(, #GLYPHS)
chars[i] = GLYPHS:(r, r)
title.Text = .(chars)
revealed >= #TITLE
decryptDone =
)
(seconds: number): boolean
t0 = .()
.() - t0 < seconds
()
.()
(text: )
status.Text = .. text
FX.(status)
(stage, TweenInfo.(), { BackgroundTransparency = })
(grid, TweenInfo.(), { GroupTransparency = })
(radarScale, TweenInfo.(, .EasingStyle.Back, .EasingDirection.Out), { Scale = })
()
()
()
()
()
()
()
()
()
sweepActive =
_, arm (arms)
(arm, TweenInfo.(), { BackgroundTransparency = })
_, blip (blips)
(blip.frame, TweenInfo.(, .EasingStyle.Quad, .EasingDirection.In), {
Position = .(, ),
BackgroundTransparency = ,
})
ringStroke = outerRing:() :: UIStroke
(ringStroke, TweenInfo.(), { Color = ARMED, Thickness = })
(core, TweenInfo.(), { BackgroundColor3 = ARMED, Size = .(, ) })
status.TextColor3 = ARMED
()
()
()
FX.(stage, ACCENT)
.(, ()
stage.Parent
FX.(stage, ARMED)
)
FX.(radar, , )
(radarScale, TweenInfo.(, .EasingStyle.Back, .EasingDirection.In), { Scale = })
()
conn:()
(flash, TweenInfo.(), { BackgroundTransparency = })
.()
stage:()
(flash, TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out), { BackgroundTransparency = })
.()
introGui:()
(): any?
env = ()
(getgenvFn) ==
s, g = (getgenvFn)
s (g) ==
(g.decompile) ==
g.decompile
(g.Decompile) ==
g.Decompile
(g.decompileScript) ==
g.decompileScript
(RAW_ENV.decompile) ==
RAW_ENV.decompile
(env.decompile) ==
env.decompile
Decompiler = ()
(): any?
funcs = { , , }
env = ()
_, name (funcs)
(env[name]) ==
env[name]
(getgenvFn) ==
s, g = (getgenvFn)
s (g) == (g[name]) ==
g[name]
ClipboardFunc = ()
(: LuaSourceContainer): ?
env = ()
(getgenvFn) ==
s, g = (getgenvFn)
s (g) == (g.getscriptbytecode) ==
bs, b = (g.getscriptbytecode, )
bs (b) == #b >
b
(env.getscriptbytecode) ==
bs, b = (env.getscriptbytecode, )
bs (b) == #b >
b
(RAW_ENV.getscriptbytecode) ==
bs, b = (RAW_ENV.getscriptbytecode, :: any)
bs (b) == #b >
b
MALICIOUS_PATTERNS: { []: PatternData } = {
ExecutorFunctions = {
patterns = {
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
},
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
DynamicExecution = {
patterns = {
,
,
,
},
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
BackdoorPatterns = {
patterns = {
,
,
,
,
,
},
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
Obfuscation = {
patterns = {
,
,
,
,
,
},
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
SuspiciousHTTP = {
patterns = {
,
,
,
,
,
,
,
},
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
ClientSideAntiCheat = {
patterns = { , , },
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
ClientExploitReporter = {
patterns = {
,
,
,
,
,
,
,
,
,
,
,
,
},
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
ExecutorBrands = {
patterns = { , , },
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
InsecureGlobals = {
patterns = {
,
,
,
,
,
,
,
},
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
DebugLibraryAbuse = {
patterns = {
,
,
,
,
,
,
,
,
},
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
FreeModelBackdoor = {
patterns = { , },
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
MissingTextFilter = {
patterns = { , },
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
PredictableRNG = {
patterns = {
,
,
,
,
},
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
NetworkOwnership = {
patterns = {
,
,
},
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
ClipboardAndExfil = {
patterns = {
,
,
,
,
,
,
,
},
severity = ,
description = ,
target = ,
exploit_impact = ,
benign_reason = ,
suggested_action = ,
},
}
SUSPICIOUS_NAMES = {
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
}
HIGH_RISK_REMOTE_NAMES = { , , , , , , , , , }
MEDIUM_RISK_REMOTE_NAMES = {
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
}
WHITELIST_PATHS = {
,
,
,
,
,
,
,
,
}
DEFAULT_SAFE_SCRIPT_NAMES = {
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
}
CLICK_PATTERNS = {
,
,
,
,
,
}
DANGEROUS_CLICK_PATTERNS = {
{
pattern = ,
desc = ,
sev = ,
action = ,
},
{
pattern = ,
desc = ,
sev = ,
action = ,
},
{
pattern = ,
desc = ,
sev = ,
action = ,
},
{
pattern = ,
desc = ,
sev = ,
action = ,
},
{
pattern = ,
desc = ,
sev = ,
action = ,
},
{
pattern = ,
desc = ,
sev = ,
action = ,
},
{
pattern = ,
desc = ,
sev = ,
action = ,
},
}
SELF_SCRIPT = (() == )
SKIP_SUBTREES = {
,
,
}
(instance: ): boolean
path = instance:()
_, skip (SKIP_SUBTREES)
path == skip .(path, , #skip + ) == skip ..
(instance: ): boolean
SELF_SCRIPT instance == SELF_SCRIPT
(instance)
path = instance:()
_, pattern (WHITELIST_PATHS)
.(path, pattern, , )
(instance: ): boolean
nameLower = .(instance.Name)
_, suspicious (SUSPICIOUS_NAMES)
.(nameLower, .. suspicious .. )
SOURCE_CACHE: { [LuaSourceContainer]: | } = ({}, { __mode = }) :: any
(: LuaSourceContainer): ?
cached = SOURCE_CACHE[]
cached ~=
cached cached
source = (, )
(source) == #source >
SOURCE_CACHE[] = source
source
Decompiler
bytecode = ()
bytecode #bytecode > CONFIG.MaxBytecodeSize
SOURCE_CACHE[] =
.()
dSuccess, dSource = (Decompiler, )
dSuccess (dSource) == #dSource >
lowerSource = .(dSource)
#lowerSource < (.(lowerSource, ) .(lowerSource, ))
SOURCE_CACHE[] =
SOURCE_CACHE[] = dSource
dSource
SOURCE_CACHE[] =
(source: ): ScanContext
ctx: ScanContext = {
hasHttp = ,
hasWebhook = ,
hasRemote = ,
hasLoadstring = ,
hasExecutor = ,
hasDataCollection = ,
hasTeleport = ,
}
.(source, )
.(source, )
.(source, )
.(source, )
ctx.hasHttp =
.(source, ) .(source, )
ctx.hasWebhook =
.(source, ) .(source, )
ctx.hasRemote =
.(source, )
ctx.hasLoadstring =
.(source, ) .(source, ) .(source, )
ctx.hasExecutor =
.(source, )
.(source, )
.(source, )
.(source, )
ctx.hasDataCollection =
.(source, )
ctx.hasTeleport =
ctx
(: LuaSourceContainer, source: ): Threat?
source #source ==
isClientScript =
:()
isClientScript =
s, r = (()
( :: any).RunContext
)
s r == .RunContext.Client
isClientScript =
isClientScript
hasPurchaseEvent = .(source, )
.(source, )
.(source, )
hasRewardLogic = .(source, )
hasPurchaseEvent hasRewardLogic
lineNumber =
lines = .(source, )
i, line (lines)
.(line, )
lineNumber = i
{
Category = ,
Severity = ,
Confidence = ,
Description = ,
Target = ,
ExploitImpact = ,
Pattern = ,
LineNumber = lineNumber,
Evidence = ,
BenignReason = ,
SuggestedAction = ,
}
(: LuaSourceContainer, source: ?): { Threat }
scriptThreats: { Threat } = {}
()
scriptThreats
()
.(scriptThreats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Pattern = .Name,
Target = ,
ExploitImpact = ,
LineNumber = ,
Evidence = .Name,
BenignReason = ,
SuggestedAction = ,
})
source #source >
ctx = (source)
lines = .(source, )
segText: { } = {}
segLine: { number } = {}
idx, ln (lines)
#ln > CONFIG.MaxLineLength
.(scriptThreats, {
Category = ,
Severity = ,
Confidence = ,
Description = .. #ln .. ,
Pattern = ,
Target = ,
ExploitImpact = ,
LineNumber = idx,
Evidence = .. #ln,
BenignReason = ,
SuggestedAction = ,
})
#ln <= CONFIG.MaxRegexChunk
.(segText, ln)
.(segLine, idx)
step = CONFIG.MaxRegexChunk - CONFIG.ChunkOverlap
start =
start <= #ln
.(segText, .(ln, start, start + CONFIG.MaxRegexChunk - ))
.(segLine, idx)
start + CONFIG.MaxRegexChunk - >= #ln
start += step
k, line (segText)
i = segLine[k]
trimmedLine = line:() line
#trimmedLine == trimmedLine:(, ) ==
#trimmedLine >
trimmedLine = .(trimmedLine, , ) ..
gs = .(line, , , )
gs
hs = .(line, , gs, )
hs .(line, , hs, )
.(scriptThreats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Target = ,
ExploitImpact = ,
Pattern = ,
LineNumber = i,
Evidence = trimmedLine,
BenignReason = ,
SuggestedAction = ,
})
.(line, )
.(line, )
.(line, )
.(line, )
.(line, )
.(line, )
.(line, )
ctx.hasHttp ctx.hasWebhook
.(scriptThreats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Target = ,
ExploitImpact = ,
Pattern = ,
LineNumber = i,
Evidence = trimmedLine,
BenignReason = ,
SuggestedAction = ,
})
.(scriptThreats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Target = ,
ExploitImpact = ,
Pattern = ,
LineNumber = i,
Evidence = trimmedLine,
BenignReason = ,
SuggestedAction = ,
})
(
.(line, )
.(line, )
.(line, )
.(line, )
) (ctx.hasDataCollection ctx.hasWebhook)
.(scriptThreats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Target = ,
ExploitImpact = ,
Pattern = ,
LineNumber = i,
Evidence = trimmedLine,
BenignReason = ,
SuggestedAction = ,
})
.(line, )
.(line, )
.(line, )
.(line, ) .(line, ) .(line, )
.(scriptThreats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Target = ,
ExploitImpact = ,
Pattern = ,
LineNumber = i,
Evidence = trimmedLine,
BenignReason = ,
SuggestedAction = ,
})
ctx.hasHttp ctx.hasRemote ctx.hasExecutor
.(scriptThreats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Target = ,
ExploitImpact = ,
Pattern = ,
LineNumber = i,
Evidence = trimmedLine,
BenignReason = ,
SuggestedAction = ,
})
.(scriptThreats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Target = ,
ExploitImpact = ,
Pattern = ,
LineNumber = i,
Evidence = trimmedLine,
BenignReason = ,
SuggestedAction = ,
})
.(line, ) .(line, )
lowerLine = .(line)
isPrivileged =
matchedPriv =
_, p (HIGH_RISK_REMOTE_NAMES)
.(lowerLine, p)
isPrivileged =
matchedPriv = p
isVararg = .(line, ) .(line, )
isPrivileged
.(scriptThreats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Target = ,
ExploitImpact = ,
Pattern = .. matchedPriv .. ,
LineNumber = i,
Evidence = trimmedLine,
BenignReason = ,
SuggestedAction = ,
})
isVararg
.(scriptThreats, {
Category = ,
Severity = ,
Confidence = ,
Description = ,
Target = ,
ExploitImpact = ,
Pattern = ,
LineNumber = i,
Evidence = trimmedLine,
BenignReason = ,
SuggestedAction = ,
})
.(line, )
ctx.hasHttp
.(scriptThreats, {
Category = "FetchAndExecute",
Severity = "CRITICAL",
Confidence = "High",
Description = "Remote code execution chain detected (loadstring + HTTP).",
Target = "Server / Client",
ExploitImpact = "Download and execute malicious code on the fly.",
Pattern = "loadstring(HttpGet(...))",
LineNumber = i,
Evidence = trimmedLine,
BenignReason = "Very rarely used in legitimate sandbox environments.",
SuggestedAction = "Remove immediately. Do not use loadstring with external content.",
})
else
table.insert(scriptThreats, {
Category = "DynamicExecution",
Severity = "HIGH",
Confidence = "Medium",
Description = "Dynamic code execution detected (loadstring).",
Target = "Lua Runtime",
ExploitImpact = "Execute hidden code, bypassing Roblox security restrictions.",
Pattern = "loadstring(...)",
LineNumber = i,
Evidence = trimmedLine,
BenignReason = "Can be used for custom command bars or in-game scripting features.",
SuggestedAction = "Ensure `ServerScriptService.LoadStringEnabled` is false unless explicitly required.",
})
end
end
if string.find(line, "getfenv%s*%(") or string.find(line, "setfenv%s*%(") then
table.insert(scriptThreats, {
Category = "DynamicExecution",
Severity = "HIGH",
Confidence = "High",
Description = "Environment manipulation detected.",
Target = "Lua Runtime",
ExploitImpact = "Hijack global functions, modify script environments, or hide malicious code.",
Pattern = "getfenv/setfenv",
LineNumber = i,
Evidence = trimmedLine,
BenignReason = "Legacy code might use this for OOP or sandboxing, but it's bad practice.",
SuggestedAction = "Remove and replace with modern Luau practices.",
})
end
for category, data in pairs(MALICIOUS_PATTERNS) do
if category ~= "DynamicExecution" and category ~= "ClientAuthBypass" and category ~= "VarargRemoteFire" then
for _, pattern in ipairs(data.patterns) do
if string.find(line, pattern) then
table.insert(scriptThreats, {
Category = category,
Severity = data.severity,
Confidence = "High",
Description = data.description,
Target = data.target,
ExploitImpact = data.exploit_impact,
Pattern = pattern,
LineNumber = i,
Evidence = trimmedLine,
BenignReason = data.benign_reason or "None.",
SuggestedAction = data.suggested_action or "Review the context of this line.",
})
break
end
end
end
end
SafeYield()
end
-- Chunk overlap can report the same hit twice
local seenKeys: { [string]: boolean } = {}
local unique: { Threat } = {}
for _, t in ipairs(scriptThreats) do
local key = t.Category .. ":" .. tostring(t.LineNumber) .. ":" .. tostring(t.Pattern)
if not seenKeys[key] then
seenKeys[key] = true
table.insert(unique, t)
end
end
scriptThreats = unique
local purchaseThreat = CheckPurchaseVulnerability(script, source)
if purchaseThreat then
table.insert(scriptThreats, purchaseThreat)
end
-- Deep Tokenizer Pass
local deepThreats = TokenizeAndAnalyze(source, script)
-- Skip tokenizer hits the line scanner already reported (same category + line)
local seenHits = {}
for _, t in ipairs(scriptThreats) do
seenHits[t.Category .. ":" .. tostring(t.LineNumber)] = true
end
for _, t in ipairs(deepThreats) do
local key = t.Category .. ":" .. tostring(t.LineNumber)
if not seenHits[key] then
seenHits[key] = true
table.insert(scriptThreats, t)
end
end
end
return scriptThreats
end
local function CheckPlayerCollisions(): { Threat }
local physicsThreats: { Threat } = {}
local PhysicsService = game:GetService("PhysicsService")
local success, collisionGroups = pcall(function()
return PhysicsService:GetCollisionGroups()
end)
if not success or not collisionGroups then
return physicsThreats
end
if #collisionGroups == 0 then
table.insert(physicsThreats, {
Category = "PlayerCollisionEnabled",
Severity = "MEDIUM",
Confidence = "Medium",
Description = "No custom collision groups found. Default player-to-player collisions are likely enabled.",
Pattern = "Default",
Target = "Physics Service",
ExploitImpact = "Exploiters can fling other players across the map.",
Instance = nil,
InstancePath = "PhysicsService (Default)",
LineNumber = 1,
Evidence = "No collision groups defined.",
BenignReason = "Some games might not need collision groups if players cannot interact physically.",
SuggestedAction = "Create a collision group for players and disable self-collision.",
})
return physicsThreats
end
local playerGroups = {}
for _, group in ipairs(collisionGroups) do
local lowerName = string.lower(group.name)
if string.find(lowerName, "player") or string.find(lowerName, "character") or string.find(lowerName, "humanoid") then
table.insert(playerGroups, group.name)
end
end
if #playerGroups == 0 then
table.insert(physicsThreats, {
Category = "PlayerCollisionEnabled",
Severity = "MEDIUM",
Confidence = "Medium",
Description = "No specific collision group found for players.",
Pattern = "Default",
Target = "Physics Service",
ExploitImpact = "Exploiters can fling other players across the map.",
Instance = nil,
InstancePath = "PhysicsService (Default)",
LineNumber = 1,
Evidence = "No player-specific collision groups.",
BenignReason = "Might be handled via custom physics or constraints.",
SuggestedAction = "Create a collision group for players and disable self-collision.",
})
else
for _, groupName in ipairs(playerGroups) do
local collidableSuccess, isCollidable = pcall(function()
return PhysicsService:CollisionGroupsAreCollidable(groupName, groupName)
end)
if collidableSuccess and isCollidable then
table.insert(physicsThreats, {
Category = "PlayerCollisionEnabled",
Severity = "MEDIUM",
Confidence = "High",
Description = "Player-to-player collisions are enabled in PhysicsService (" .. groupName .. ").",
Pattern = groupName,
Target = "Physics Service",
ExploitImpact = "Exploiters can fling other players across the map.",
Instance = nil,
InstancePath = "PhysicsService (" .. groupName .. ")",
LineNumber = 1,
Evidence = 'CollisionGroupsAreCollidable("' .. groupName .. '", "' .. groupName .. '") == true',
BenignReason = "Required for certain combat or physical interaction games.",
SuggestedAction = "If not strictly necessary, disable self-collision for this group.",
})
end
end
end
return physicsThreats
end
local function CheckSuspiciousRemotes(): { Threat }
local remoteThreats: { Threat } = {}
local servicesToScan = { game:GetService("ReplicatedStorage"), game:GetService("Workspace") }
for _, service in ipairs(servicesToScan) do
for _, descendant in ipairs(service:GetDescendants()) do
if (descendant:IsA("RemoteEvent") or descendant:IsA("RemoteFunction")) and not IsSkippedSubtree(descendant) then
local nameLower = string.lower(descendant.Name)
local matchedHigh = nil
for _, p in ipairs(HIGH_RISK_REMOTE_NAMES) do
if string.find(nameLower, p) then
matchedHigh = p
break
end
end
local matchedMedium = nil
for _, p in ipairs(MEDIUM_RISK_REMOTE_NAMES) do
if string.find(nameLower, p) then
matchedMedium = p
break
end
end
if matchedHigh then
table.insert(remoteThreats, {
Category = "SuspiciousRemote",
Severity = "HIGH",
Confidence = "Medium",
Description = "High-risk remote name detected. Ensure strict server-side validation.",
Pattern = descendant.Name,
Target = "Server Remotes",
ExploitImpact = "Exploiters can fire this directly to gain unauthorized privileges.",
Instance = descendant,
InstancePath = descendant:GetFullName(),
LineNumber = 1,
Evidence = "Remote Name: " .. descendant.Name,
BenignReason = "Could be a legitimate admin remote, but dangerous if exposed.",
SuggestedAction = "Verify server-side checks. Ensure exploiter cannot grant themselves privileges.",
})
elseif matchedMedium then
table.insert(remoteThreats, {
Category = "SuspiciousRemote",
Severity = "MEDIUM",
Confidence = "Medium",
Description = "Medium-risk remote name detected. Verify server-side sanity checks.",
Pattern = descendant.Name,
Target = "Server Remotes",
ExploitImpact = "Exploiters can fire this to duplicate items or manipulate data.",
Instance = descendant,
InstancePath = descendant:GetFullName(),
LineNumber = 1,
Evidence = "Remote Name: " .. descendant.Name,
BenignReason = "Common in standard game logic.",
SuggestedAction = "Ensure the server validates purchases, cooldowns, and data integrity.",
})
end
end
SafeYield()
end
end
return remoteThreats
end
local function CheckUnanchoredParts(): { Threat }
local partThreats: { Threat } = {}
local workspace = game:GetService("Workspace")
local count = 0
local flagged = false
for _, part in ipairs(workspace:GetDescendants()) do
if part:IsA("BasePart") and not part.Anchored and not part.CanCollide then
local ancestorModel = part:FindFirstAncestorWhichIsA("Model")
if not ancestorModel or not ancestorModel:FindFirstChild("Humanoid") then
count += 1
end
end
if count > 20 and not flagged then
table.insert(partThreats, {
Category = "UnanchoredParts",
Severity = "MEDIUM",
Confidence = "Medium",
Description = "Found many unanchored, non-colliding parts in Workspace.",
Pattern = "NetworkOwnership Exploit",
Target = "Physics Server",
ExploitImpact = "Exploiters can use NetworkOwnership to fling players across the map or cause lag.",
Instance = nil,
InstancePath = "Workspace",
LineNumber = 1,
Evidence = "Count: " .. count .. " unanchored non-colliding parts.",
BenignReason = "Could be debris, particles, or physical projectiles.",
SuggestedAction = "Anchor these parts or set their NetworkOwnership to nil/server.",
})
flagged = true
break
end
SafeYield()
end
return partThreats
end
local REPLICATION_PATTERNS = {
"Instance%s*%.%s*new%s*%(%s*['\"]Script",
"Instance%s*%.%s*new%s*%(%s*['\"]LocalScript",
"Source%s*=%s*loadstring",
"Source%s*=%s*readfile",
}
local function CheckFreeModelReplication(): { Threat }
local replThreats: { Threat } = {}
local servicesToScan = {
game:GetService("Workspace"),
game:GetService("ReplicatedStorage"),
game:GetService("ReplicatedFirst"),
game:GetService("StarterGui"),
game:GetService("StarterPack"),
game:GetService("StarterPlayer"),
}
for _, service in ipairs(servicesToScan) do -- (1)
for _, descendant in ipairs(service:GetDescendants()) do -- (2)
if descendant:IsA("LuaSourceContainer") and not IsWhitelisted(descendant) then -- (3)
local source = GetScriptSource(descendant)
if source and #source > 0 then -- (4)
local lines = string.split(source, "\n")
for i, line in ipairs(lines) do -- (5)
for _, pattern in ipairs(REPLICATION_PATTERNS) do -- (6)
if string.find(line, pattern) then -- (7)
table.insert(replThreats, {
Category = "FreeModelReplication",
Severity = "HIGH",
Confidence = "High",
Description = "Script appears to clone itself or create new scripts at runtime.",
Pattern = pattern,
Target = "Server / Game",
ExploitImpact = "Self-replicating malware can spread through the game and infect other scripts.",
Instance = descendant,
InstancePath = descendant:GetFullName(),
LineNumber = i,
Evidence = line:match("^%s*(.-)$") or line,
BenignReason = "Very rarely used for legitimate dynamic loading systems.",
SuggestedAction = "Remove the script. Runtime script creation is highly dangerous.",
})
break
end -- /(7)
end -- /(6)
end -- /(5)
end -- /(4)
end -- /(3)
SafeYield()
end -- /(2)
end -- /(1) <-- THIS WAS MISSING
return replThreats
end
local CLIENT_ACCESSIBLE_SERVICES = {
["ReplicatedStorage"] = true,
["ReplicatedFirst"] = true,
["StarterGui"] = true,
["StarterPack"] = true,
["StarterPlayer"] = true,
}
local function CheckExposedServerScripts(): { Threat }
local exposedThreats: { Threat } = {}
local seen: { [Instance]: boolean } = {}
for _, service in ipairs(game:GetChildren()) do
if CLIENT_ACCESSIBLE_SERVICES[service.Name] then
for _, descendant in ipairs(service:GetDescendants()) do
if
descendant:IsA("Script")
and not descendant:IsA("LocalScript")
and not seen[descendant]
and not IsWhitelisted(descendant)
and not descendant:FindFirstAncestorWhichIsA("Tool")
then
local runContext = ReadScriptProp(descendant :: any, "RunContext")
local isServer = (runContext == Enum.RunContext.Server)
local isSafeDefault = DEFAULT_SAFE_SCRIPT_NAMES[descendant.Name]
if isServer and not isSafeDefault then
seen[descendant] = true
table.insert(exposedThreats, {
Category = "ExposedServerScript",
Severity = "MEDIUM",
Confidence = "High",
Description = "A server 'Script' (RunContext: Server) was found in a client-accessible service.",
Pattern = "ServerScript in " .. service.Name,
Target = "Server Source Code",
ExploitImpact = "Clients can view the structure and logic of server scripts, making it easier to find exploits.",
Instance = descendant,
InstancePath = descendant:GetFullName(),
LineNumber = 1,
Evidence = "Instance: " .. descendant:GetFullName(),
BenignReason = "If the script's Source is empty (compiled), clients cannot read the logic, only the structure.",
SuggestedAction = "Move server scripts to `ServerScriptService` or `ServerStorage`.",
})
end
end
SafeYield()
end
end
end
return exposedThreats
end
local function CheckClickDetectors(): { Threat }
local threats: { Threat } = {}
local clickDetectors: { ClickDetector } = {}
for _, service in ipairs(game:GetChildren()) do
for _, desc in ipairs(service:GetDescendants()) do
if desc:IsA("ClickDetector") then
table.insert(clickDetectors, desc)
end
SafeYield()
end
end
if #clickDetectors == 0 then
return threats
end
local scriptsToScan: { LuaSourceContainer } = {}
for _, service in ipairs(game:GetChildren()) do
for _, desc in ipairs(service:GetDescendants()) do
if desc:IsA("LuaSourceContainer") then
table.insert(scriptsToScan, desc)
end
SafeYield()
end
end
for _, script in ipairs(scriptsToScan) do
if IsWhitelisted(script) then
continue
end
local source = GetScriptSource(script)
if not source then
continue
end
local hasClickHandler = false
for _, p in ipairs(CLICK_PATTERNS) do
if string.find(source, p) then
hasClickHandler = true
break
end
end
if not hasClickHandler then
continue
end
local matchedClickDetector: ClickDetector? = nil
for _, cd in ipairs(clickDetectors) do
if string.find(source, cd.Name, 1, true) then
matchedClickDetector = cd
break
end
end
if not matchedClickDetector then
for _, cd in ipairs(clickDetectors) do
if script:IsDescendantOf(cd.Parent) or script == cd.Parent then
matchedClickDetector = cd
break
end
end
end
if not matchedClickDetector and #clickDetectors > 0 then
matchedClickDetector = clickDetectors[1]
end
local cdPath = matchedClickDetector and matchedClickDetector:GetFullName() or "Unknown ClickDetector"
local scriptType = "Script"
if script:IsA("LocalScript") then
scriptType = "LocalScript"
elseif script:IsA("ModuleScript") then
scriptType = "ModuleScript"
end
local foundDangerous = false
local lines = string.split(source, "\n")
for i, line in ipairs(lines) do
for _, data in ipairs(DANGEROUS_CLICK_PATTERNS) do
if string.find(line, data.pattern) then
foundDangerous = true
table.insert(threats, {
Category = "ClickDetectorAbuse",
Severity = data.sev,
Confidence = "High",
Description = "ClickDetector Server Spam Vulnerability",
Target = "Server Performance / Remotes",
ExploitImpact = "Exploiters could spam clicks to overload the server, create instances, or fire remotes excessively.",
Pattern = data.pattern,
Instance = script,
InstancePath = script:GetFullName(),
LineNumber = i,
Evidence = string.format(
"Path: %s\nScript: %s (%s)\nReason: ClickDetector.MouseClick %s.\nExploiters could spam clicks to impact server.",
cdPath,
script:GetFullName(),
scriptType,
data.desc
),
BenignReason = "Could be a legitimate one-time action, but dangerous if no cooldown exists.",
SuggestedAction = data.action,
})
break
end
end
if foundDangerous then
break
end
SafeYield()
end
if not foundDangerous then
table.insert(threats, {
Category = "ClickDetectorAbuse",
Severity = "LOW",
Confidence = "Medium",
Description = "ClickDetector Handler with Bytecode Detected",
Target = "Server Performance",
ExploitImpact = "Script handles ClickDetector events. No immediate dangerous patterns found, but manual review of cooldowns is recommended.",
Pattern = "MouseClick Handler",
Instance = script,
InstancePath = script:GetFullName(),
LineNumber = 1,
Evidence = string.format(
"Path: %s\nScript: %s (%s)\nReason: Script has bytecode and handles click events.",
cdPath,
script:GetFullName(),
scriptType
),
BenignReason = "Script might have safe internal cooldowns already.",
SuggestedAction = "Verify manually that click frequency is limited server-side.",
})
end
SafeYield()
end
return threats
end
function MaliciousDetector.Log(message: string)
if CONFIG.LogToOutput then
print("[MaliciousDetector] " .. message)
end
end
local function GroupThreats(threats: { Threat }): { GroupedThreat }
local grouped: { [string]: GroupedThreat } = {}
local orderedList: { GroupedThreat } = {}
for _, threat in ipairs(threats) do
if not grouped[threat.Category] then
local newGroup: GroupedThreat = {
Category = threat.Category,
Severity = threat.Severity,
Description = threat.Description,
Instances = {},
}
grouped[threat.Category] = newGroup
table.insert(orderedList, newGroup)
end
table.insert(grouped[threat.Category].Instances, threat)
end
return orderedList
end
local function FormatThreatsForClipboard(threats: { Threat }): string
local grouped = GroupThreats(threats)
local lines = { "=== Malicious Script Detector Report ===", "Total Threats: " .. #threats, "" }
for _, group in ipairs(grouped) do
table.insert(lines, string.format("[%s] %s (%d found)", group.Severity, group.Category, #group.Instances))
table.insert(lines, group.Description)
for _, t in ipairs(group.Instances) do
table.insert(
lines,
string.format(
" - Path: %s | Location: %s",
t.InstancePath or "N/A",
t.LineNumber and ("Line " .. t.LineNumber) or "Instance Level"
)
)
table.insert(lines, string.format(" Target: %s", t.Target or "N/A"))
table.insert(lines, string.format(" Exploiter Capability: %s", t.ExploitImpact or "N/A"))
table.insert(lines, string.format(" Confidence: %s", t.Confidence or "N/A"))
table.insert(lines, string.format(" Pattern: %s", t.Pattern or "N/A"))
table.insert(lines, string.format(" Evidence: %s", t.Evidence or t.Pattern))
if t.BenignReason then
table.insert(lines, string.format(" Benign Reason: %s", t.BenignReason))
end
table.insert(lines, string.format(" Suggested Action: %s", t.SuggestedAction or "N/A"))
end
table.insert(lines, "")
end
return table.concat(lines, "\n")
end
local function CreateThreatCard(groupedThreat: GroupedThreat, parent: Instance)
local count = #groupedThreat.Instances
local card = Instance.new("Frame")
card.Name = "ThreatCard_" .. groupedThreat.Category
card.Size = UDim2.new(1, 0, 0, 0)
card.AutomaticSize = Enum.AutomaticSize.Y
card.BackgroundColor3 = Color3.fromRGB(30, 30, 35)
card.BorderSizePixel = 0
card.Parent = parent
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 6)
corner.Parent = card
local stroke = Instance.new("UIStroke")
stroke.Thickness = 1
stroke.Transparency = 0.2
stroke.Parent = card
if groupedThreat.Severity == "CRITICAL" then
stroke.Color = Color3.fromRGB(220, 50, 50)
elseif groupedThreat.Severity == "HIGH" then
stroke.Color = Color3.fromRGB(220, 150, 50)
elseif groupedThreat.Severity == "MEDIUM" then
stroke.Color = Color3.fromRGB(220, 220, 50)
else
stroke.Color = Color3.fromRGB(150, 150, 150)
end
local padding = Instance.new("UIPadding")
padding.PaddingTop = UDim.new(0, 8)
padding.PaddingBottom = UDim.new(0, 8)
padding.PaddingLeft = UDim.new(0, 10)
padding.PaddingRight = UDim.new(0, 10)
padding.Parent = card
local layout = Instance.new("UIListLayout")
layout.Padding = UDim.new(0, 4)
layout.SortOrder = Enum.SortOrder.LayoutOrder
layout.Parent = card
local titleLabel = Instance.new("TextLabel")
titleLabel.Size = UDim2.new(1, 0, 0, 18)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = string.format("[%s] %s (%d found)", groupedThreat.Severity, groupedThreat.Category, count)
titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextSize = 14
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.LayoutOrder = 1
titleLabel.Parent = card
local descLabel = Instance.new("TextLabel")
descLabel.Size = UDim2.new(1, 0, 0, 0)
descLabel.AutomaticSize = Enum.AutomaticSize.Y
descLabel.BackgroundTransparency = 1
descLabel.Text = groupedThreat.Description
descLabel.TextColor3 = Color3.fromRGB(220, 220, 220)
descLabel.Font = Enum.Font.Gotham
descLabel.TextSize = 13
descLabel.TextWrapped = true
descLabel.TextXAlignment = Enum.TextXAlignment.Left
descLabel.TextYAlignment = Enum.TextYAlignment.Top
descLabel.LayoutOrder = 2
descLabel.Parent = card
for i, threat in ipairs(groupedThreat.Instances) do
local instanceLabel = Instance.new("TextLabel")
instanceLabel.Size = UDim2.new(1, 0, 0, 0)
instanceLabel.AutomaticSize = Enum.AutomaticSize.Y
instanceLabel.BackgroundTransparency = 1
instanceLabel.Text = string.format(
"• Path: %s\n Location: %s\n Target: %s\n Exploiter Capability: %s\n Confidence: %s\n Evidence: %s\n Benign Reason: %s\n Action: %s",
threat.InstancePath or "N/A",
threat.LineNumber and ("Line " .. threat.LineNumber) or "Instance Level",
threat.Target or "N/A",
threat.ExploitImpact or "N/A",
threat.Confidence or "N/A",
threat.Evidence or threat.Pattern,
threat.BenignReason or "None.",
threat.SuggestedAction or "Review manually."
)
instanceLabel.TextColor3 = Color3.fromRGB(180, 180, 180)
instanceLabel.Font = Enum.Font.Gotham
instanceLabel.TextSize = 12
instanceLabel.TextWrapped = true
instanceLabel.TextXAlignment = Enum.TextXAlignment.Left
instanceLabel.TextYAlignment = Enum.TextYAlignment.Top
instanceLabel.LayoutOrder = i + 2
local leftPad = Instance.new("UIPadding")
leftPad.PaddingLeft = UDim.new(0, 10)
leftPad.Parent = instanceLabel
instanceLabel.Parent = card
end
if groupedThreat.Severity == "CRITICAL" then
FX.PulseStroke(stroke)
end
FX.FadeInCard(card, #parent:GetChildren() * 0.08, stroke)
end
local function CreateScanUI()
local playerGui = Player:WaitForChild("PlayerGui")
local existingGui = playerGui:FindFirstChild("MaliciousDetectorUI")
if existingGui then
existingGui:Destroy()
end
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "MaliciousDetectorUI"
screenGui.ResetOnSpawn = false
screenGui.IgnoreGuiInset = true
screenGui.Parent = playerGui
local mainFrame = Instance.new("Frame")
mainFrame.Size = UDim2.new(0, 500, 0, 0)
mainFrame.Position = UDim2.new(0.5, 0, 1, 300)
mainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
mainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 30)
mainFrame.BorderSizePixel = 0
mainFrame.Parent = screenGui
local uiCorner = Instance.new("UICorner")
uiCorner.CornerRadius = UDim.new(0, 10)
uiCorner.Parent = mainFrame
ApplyRainbowStroke(mainFrame, 1.5, 0.4)
local dragBar = Instance.new("Frame")
dragBar.Name = "DragBar"
dragBar.Size = UDim2.new(1, 0, 0, 40)
dragBar.BackgroundTransparency = 1
dragBar.Parent = mainFrame
local titleLabel = Instance.new("TextLabel")
titleLabel.Size = UDim2.new(1, -20, 0, 40)
titleLabel.Position = UDim2.new(0, 20, 0, 10)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = "Malicious Script Detector"
titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
titleLabel.TextSize = 20
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.Parent = dragBar
local statusLabel = Instance.new("TextLabel")
statusLabel.Size = UDim2.new(1, -20, 0, 20)
statusLabel.Position = UDim2.new(0, 20, 0, 45)
statusLabel.BackgroundTransparency = 1
statusLabel.Text = "Initializing scan..."
statusLabel.TextColor3 = Color3.fromRGB(180, 180, 180)
statusLabel.TextSize = 14
statusLabel.Font = Enum.Font.Gotham
statusLabel.TextXAlignment = Enum.TextXAlignment.Left
statusLabel.Parent = mainFrame
local currentFileLabel = Instance.new("TextLabel")
currentFileLabel.Size = UDim2.new(1, -20, 0, 20)
currentFileLabel.Position = UDim2.new(0, 20, 0, 65)
currentFileLabel.BackgroundTransparency = 1
currentFileLabel.Text = "Gathering scripts..."
currentFileLabel.TextColor3 = Color3.fromRGB(140, 140, 140)
currentFileLabel.TextSize = 12
currentFileLabel.Font = Enum.Font.Gotham
currentFileLabel.TextXAlignment = Enum.TextXAlignment.Left
currentFileLabel.TextTruncate = Enum.TextTruncate.AtEnd
currentFileLabel.Parent = mainFrame
local barBackground = Instance.new("Frame")
barBackground.Size = UDim2.new(1, -40, 0, 15)
barBackground.Position = UDim2.new(0, 20, 0, 100)
barBackground.BackgroundColor3 = Color3.fromRGB(40, 40, 45)
barBackground.BorderSizePixel = 0
barBackground.Parent = mainFrame
local barCorner = Instance.new("UICorner")
barCorner.CornerRadius = UDim.new(1, 0)
barCorner.Parent = barBackground
local barFill = Instance.new("Frame")
barFill.Size = UDim2.new(0, 0, 1, 0)
barFill.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
barFill.BorderSizePixel = 0
barFill.Parent = barBackground
local fillCorner = Instance.new("UICorner")
fillCorner.CornerRadius = UDim.new(1, 0)
fillCorner.Parent = barFill
local statsLabel = Instance.new("TextLabel")
statsLabel.Size = UDim2.new(1, -40, 0, 20)
statsLabel.Position = UDim2.new(0, 20, 0, 125)
statsLabel.BackgroundTransparency = 1
statsLabel.Text = "Scanned: 0 | Skipped: 0 | Threats: 0"
statsLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
statsLabel.TextSize = 13
statsLabel.Font = Enum.Font.Gotham
statsLabel.TextXAlignment = Enum.TextXAlignment.Left
statsLabel.Parent = mainFrame
local reportList = Instance.new("ScrollingFrame")
reportList.Name = "ReportList"
reportList.Size = UDim2.new(1, -40, 1, -120)
reportList.Position = UDim2.new(0, 20, 0, 55)
reportList.BackgroundTransparency = 1
reportList.ScrollBarThickness = 4
reportList.Visible = false
reportList.Parent = mainFrame
local listLayout = Instance.new("UIListLayout")
listLayout.Padding = UDim.new(0, 8)
listLayout.SortOrder = Enum.SortOrder.LayoutOrder
listLayout.Parent = reportList
listLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
reportList.CanvasSize = UDim2.new(0, 0, 0, listLayout.AbsoluteContentSize.Y + 10)
end)
local buttonHolder = Instance.new("Frame")
buttonHolder.Size = UDim2.new(1, -40, 0, 40)
buttonHolder.Position = UDim2.new(0, 20, 1, -50)
buttonHolder.BackgroundTransparency = 1
buttonHolder.Visible = false
buttonHolder.Parent = mainFrame
local showReportButton = Instance.new("TextButton")
showReportButton.Size = UDim2.new(0.5, -5, 1, 0)
showReportButton.Position = UDim2.new(0, 0, 0, 0)
showReportButton.BackgroundColor3 = Color3.fromRGB(50, 50, 60)
showReportButton.Text = "Show Reports"
showReportButton.TextColor3 = Color3.fromRGB(255, 255, 255)
showReportButton.TextSize = 14
showReportButton.Font = Enum.Font.GothamBold
showReportButton.Parent = buttonHolder
local reportCorner = Instance.new("UICorner")
reportCorner.CornerRadius = UDim.new(0, 6)
reportCorner.Parent = showReportButton
local dismissButton = Instance.new("TextButton")
dismissButton.Size = UDim2.new(0.5, -5, 1, 0)
dismissButton.Position = UDim2.new(0.5, 5, 0, 0)
dismissButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
dismissButton.Text = "Dismiss"
dismissButton.TextColor3 = Color3.fromRGB(255, 255, 255)
dismissButton.TextSize = 14
dismissButton.Font = Enum.Font.GothamBold
dismissButton.Parent = buttonHolder
local dismissCorner = Instance.new("UICorner")
dismissCorner.CornerRadius = UDim.new(0, 6)
dismissCorner.Parent = dismissButton
-- Resize handle: invisible hit area + a small arc that follows the window's rounded corner
-- (window corner radius 10; arc radius ~6, concentric with it, like the iPadOS grabber)
local resizeHandle = Instance.new("Frame")
resizeHandle.Name = "ResizeHandle"
resizeHandle.Size = UDim2.fromOffset(24, 24)
resizeHandle.AnchorPoint = Vector2.new(1, 1)
resizeHandle.Position = UDim2.fromScale(1, 1)
resizeHandle.BackgroundTransparency = 1
resizeHandle.Parent = mainFrame
local arcClip = Instance.new("Frame")
arcClip.Name = "ArcClip"
arcClip.AnchorPoint = Vector2.new(1, 1)
arcClip.Position = UDim2.new(1, -2, 1, -2)
arcClip.Size = UDim2.fromOffset(8, 8)
arcClip.BackgroundTransparency = 1
arcClip.ClipsDescendants = true
arcClip.Parent = resizeHandle
local arcRing = Instance.new("Frame")
arcRing.Position = UDim2.fromOffset(-5, -5)
arcRing.Size = UDim2.fromOffset(10, 10)
arcRing.BackgroundTransparency = 1
arcRing.Parent = arcClip
local arcCorner = Instance.new("UICorner")
arcCorner.CornerRadius = UDim.new(1, 0)
arcCorner.Parent = arcRing
local arcStroke = Instance.new("UIStroke")
arcStroke.Color = Color3.fromRGB(150, 150, 158)
arcStroke.Thickness = 2
arcStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
arcStroke.Parent = arcRing
local dragging = false
local dragInput, mousePos, framePos
dragBar.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
mousePos = input.Position
framePos = mainFrame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
dragBar.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)
UserInputService.InputChanged:Connect(function(input)
if input == dragInput and dragging then
local delta = input.Position - mousePos
mainFrame.Position = UDim2.new(framePos.X.Scale, framePos.X.Offset + delta.X, framePos.Y.Scale, framePos.Y.Offset + delta.Y)
end
end)
-- The window is anchored at its center, so changing Size alone moves the corner by only half the
-- change. Resize from the top-left instead: shift Position by half the size change, so the
-- bottom-right corner stays exactly under the cursor.
local resizing = false
local resizeStartMousePos = Vector2.zero
local resizeStartSize = Vector2.zero
local resizeStartPos = mainFrame.Position
resizeHandle.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
resizing = true
resizeStartMousePos = UserInputService:GetMouseLocation()
resizeStartSize = mainFrame.AbsoluteSize
resizeStartPos = mainFrame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
resizing = false
end
end)
end
end)
UserInputService.InputChanged:Connect(function(input)
if resizing and input.UserInputType == Enum.UserInputType.MouseMovement then
local delta = UserInputService:GetMouseLocation() - resizeStartMousePos
local newWidth = math.clamp(resizeStartSize.X + delta.X, 400, 1200)
local newHeight = math.clamp(resizeStartSize.Y + delta.Y, 250, 800)
mainFrame.Size = UDim2.fromOffset(newWidth, newHeight)
mainFrame.Position = UDim2.new(
resizeStartPos.X.Scale,
resizeStartPos.X.Offset + (newWidth - resizeStartSize.X) / 2,
resizeStartPos.Y.Scale,
resizeStartPos.Y.Offset + (newHeight - resizeStartSize.Y) / 2
)
end
end)
TweenService:Create(
mainFrame,
TweenInfo.new(0.6, Enum.EasingStyle.Quint, Enum.EasingDirection.Out),
{ Position = UDim2.new(0.5, 0, 0.5, 0), Size = UDim2.new(0, 500, 0, 250) }
):Play()
-- Three result buttons: Reports | Node Map | Dismiss
showReportButton.Size = UDim2.new(1 / 3, -6, 1, 0)
local mapButton = showReportButton:Clone()
mapButton.Name = "MapButton"
mapButton.Text = "Node Map"
mapButton.BackgroundColor3 = Color3.fromRGB(0, 120, 190)
mapButton.Position = UDim2.new(1 / 3, 3, 0, 0)
mapButton.Parent = buttonHolder
dismissButton.Size = UDim2.new(1 / 3, -6, 1, 0)
dismissButton.Position = UDim2.new(2 / 3, 6, 0, 0)
FX.Hover(showReportButton)
FX.Hover(mapButton)
FX.Hover(dismissButton)
FX.GlowBar(barFill)
return {
ScreenGui = screenGui,
MainFrame = mainFrame,
StatusLabel = statusLabel,
CurrentFileLabel = currentFileLabel,
BarBackground = barBackground,
BarFill = barFill,
StatsLabel = statsLabel,
ReportList = reportList,
ButtonHolder = buttonHolder,
ShowReportButton = showReportButton,
MapButton = mapButton,
DismissButton = dismissButton,
}
end
-- Top-level container an instance lives in: "Workspace", "CoreGui", "gethui()", "Nil Instances", ...
local function GetRootName(instance: Instance?): string
if not instance then
return "Environment"
end
local ok, name = pcall(function(): string
local cur: Instance = instance
while cur.Parent and cur.Parent ~= game do
cur = cur.Parent :: Instance
end
if cur.Parent == game then
return cur.Name
end
return "Nil Instances"
end)
return if ok then name else "Unknown"
end
type ScanResult = {
Threats: { Threat },
Scanned: number,
Total: number,
Skipped: number,
RootNames: { string },
}
-- ============================================================
-- SHARED UI HELPERS
-- ============================================================
local UI = {
Panel = Color3.fromRGB(25, 25, 30),
Row = Color3.fromRGB(36, 36, 44),
RowHover = Color3.fromRGB(46, 46, 56),
Accent = Color3.fromRGB(0, 170, 255),
Text = Color3.fromRGB(235, 235, 240),
Dim = Color3.fromRGB(140, 140, 150),
Good = Color3.fromRGB(60, 200, 110),
Warn = Color3.fromRGB(230, 170, 60),
}
local SEVERITY_ORDER = { CRITICAL = 4, HIGH = 3, MEDIUM = 2, LOW = 1 }
local SEVERITY_COLORS = {
CRITICAL = Color3.fromRGB(220, 50, 50),
HIGH = Color3.fromRGB(220, 150, 50),
MEDIUM = Color3.fromRGB(220, 220, 50),
LOW = Color3.fromRGB(150, 150, 150),
}
local SEVERITY_HEX = { CRITICAL = "#DC3232", HIGH = "#DC9632", MEDIUM = "#DCDC32", LOW = "#969696" }
local function Corner(parent: Instance, radius: number)
local c = Instance.new("UICorner")
c.CornerRadius = UDim.new(0, radius)
c.Parent = parent
end
local function Label(parent: Instance, text: string, size: number, font: Enum.Font, color: Color3): TextLabel
local l = Instance.new("TextLabel")
l.BackgroundTransparency = 1
l.Text = text
l.TextSize = size
l.Font = font
l.TextColor3 = color
l.TextXAlignment = Enum.TextXAlignment.Left
l.Parent = parent
return l
end
local function MakeDraggable(handle: GuiObject, frame: GuiObject)
local dragging = false
local dragStart: Vector3? = nil
local startPos: UDim2? = nil
handle.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = frame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
local conn = UserInputService.InputChanged:Connect(function(input)
if
dragging
and dragStart
and startPos
and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch)
then
local delta = input.Position - dragStart
frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
end)
frame.Destroying:Connect(function()
conn:Disconnect()
end)
end
local function EscapeRich(s: string): string
local out = s:gsub("&", "&"):gsub("<", "<"):gsub(">", ">"):gsub('"', """)
return out
end
-- ============================================================
-- NODE MAP WINDOW (game -> containers -> flagged instances)
-- ============================================================
type MapNode = {
Key: string,
Label: string,
Threats: { Threat },
Severity: string,
}
type MapRoot = { Name: string, Nodes: { MapNode }, ByKey: { [string]: MapNode }, Severity: string? }
local function BuildMapData(result: ScanResult): { MapRoot }
local order: { MapRoot } = {}
local byName: { [string]: MapRoot } = {}
local function getRoot(name: string): MapRoot
local r = byName[name]
if not r then
r = { Name = name, Nodes = {}, ByKey = {}, Severity = nil }
byName[name] = r
table.insert(order, r)
end
return r
end
for _, name in ipairs(result.RootNames) do
getRoot(name)
end
for _, t in ipairs(result.Threats) do
local r = getRoot(GetRootName(t.Instance))
local key = t.InstancePath or t.Category
local node = r.ByKey[key]
if not node then
local nodeLabel = if t.Instance then t.Instance.Name else (t.InstancePath or t.Category)
node = { Key = key, Label = nodeLabel, Threats = {}, Severity = t.Severity }
r.ByKey[key] = node
table.insert(r.Nodes, node)
end
local n = node :: MapNode
table.insert(n.Threats, t)
if (SEVERITY_ORDER[t.Severity] or 0) > (SEVERITY_ORDER[n.Severity] or 0) then
n.Severity = t.Severity
end
if not r.Severity or (SEVERITY_ORDER[t.Severity] or 0) > (SEVERITY_ORDER[r.Severity :: string] or 0) then
r.Severity = t.Severity
end
end
for _, r in ipairs(order) do
table.sort(r.Nodes, function(a, b)
local sa, sb = SEVERITY_ORDER[a.Severity] or 0, SEVERITY_ORDER[b.Severity] or 0
if sa ~= sb then
return sa > sb
end
return a.Label < b.Label
end)
end
return order
end
local function DescribeNode(node: MapNode): string
local first = node.Threats[1]
local parts = {
string.format('<b><font size="15">%s</font></b>', EscapeRich(node.Label)),
string.format('<font color="#8C8C96">%s</font>', EscapeRich(first.InstancePath or node.Key)),
string.format(
'%d finding%s | worst: <font color="%s"><b>%s</b></font>',
#node.Threats,
if #node.Threats == 1 then "" else "s",
SEVERITY_HEX[node.Severity] or "#FFFFFF",
node.Severity
),
}
for _, t in ipairs(node.Threats) do
table.insert(parts, "")
table.insert(
parts,
string.format(
'<font color="%s"><b>[%s] %s</b></font> <font color="#8C8C96">(%s confidence)</font>',
SEVERITY_HEX[t.Severity] or "#FFFFFF",
t.Severity,
EscapeRich(t.Category),
EscapeRich(t.Confidence or "?")
)
)
table.insert(parts, EscapeRich(t.Description))
local fields = {
{ "Location", if t.LineNumber then "Line " .. t.LineNumber else "Instance Level" },
{ "Target", t.Target or "N/A" },
{ "Exploiter Capability", t.ExploitImpact or "N/A" },
{ "Pattern", t.Pattern or "N/A" },
{ "Evidence", t.Evidence or "N/A" },
{ "Benign Reason", t.BenignReason or "None." },
{ "Action", t.SuggestedAction or "Review manually." },
}
for _, f in ipairs(fields) do
table.insert(parts, string.format('<font color="#A0C8DC">%s:</font> %s', f[1], EscapeRich(tostring(f[2]))))
end
end
return table.concat(parts, "\n")
end
local function DescribeRoot(root: MapRoot): string
local counts = { CRITICAL = 0, HIGH = 0, MEDIUM = 0, LOW = 0 }
local findings = 0
for _, n in ipairs(root.Nodes) do
for _, t in ipairs(n.Threats) do
counts[t.Severity] = (counts[t.Severity] or 0) + 1
findings += 1
end
end
local parts = {
string.format('<b><font size="15">%s</font></b>', EscapeRich(root.Name)),
string.format("%d flagged instance%s | %d findings", #root.Nodes, if #root.Nodes == 1 then "" else "s", findings),
"",
}
if findings == 0 then
table.insert(parts, '<font color="#3CC86E"><b>Clean</b></font>: nothing flagged in this container.')
else
for _, sev in ipairs({ "CRITICAL", "HIGH", "MEDIUM", "LOW" }) do
table.insert(parts, string.format('<font color="%s"><b>%s</b></font>: %d', SEVERITY_HEX[sev], sev, counts[sev]))
end
table.insert(parts, "")
table.insert(parts, "Hover a node on the right for its details.")
end
return table.concat(parts, "\n")
end
local function OpenNodeMap(screenGui: ScreenGui, result: ScanResult)
local existing = screenGui:FindFirstChild("NodeMapWindow")
if existing then
existing:Destroy()
end
local WIN_W, WIN_H = 820, 520
local window = Instance.new("Frame")
window.Name = "NodeMapWindow"
window.AnchorPoint = Vector2.new(0.5, 0.5)
window.Position = UDim2.new(0.5, 40, 0.5, 30)
window.Size = UDim2.fromOffset(WIN_W, WIN_H)
window.BackgroundColor3 = UI.Panel
window.BorderSizePixel = 0
window.ZIndex = 10
window.Parent = screenGui
Corner(window, 12)
ApplyRainbowStroke(window, 1.5, 0.4)
local winScale = Instance.new("UIScale")
winScale.Scale = 0.85
winScale.Parent = window
tween(winScale, TweenInfo.new(0.35, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Scale = 1 })
local titleBar = Instance.new("Frame")
titleBar.BackgroundTransparency = 1
titleBar.Size = UDim2.new(1, 0, 0, 40)
titleBar.ZIndex = 11
titleBar.Parent = window
local title = Label(titleBar, "Threat Map", 18, Enum.Font.GothamBold, UI.Text)
title.Position = UDim2.fromOffset(16, 0)
title.Size = UDim2.new(0.5, 0, 1, 0)
title.ZIndex = 11
local subtitle =
Label(titleBar, string.format("%d findings | %d containers", #result.Threats, #result.RootNames), 12, Enum.Font.Gotham, UI.Dim)
subtitle.Position = UDim2.fromOffset(130, 2)
subtitle.Size = UDim2.new(0.5, 0, 1, 0)
subtitle.ZIndex = 11
MakeDraggable(titleBar, window)
local closeBtn = Instance.new("TextButton")
closeBtn.AnchorPoint = Vector2.new(1, 0.5)
closeBtn.Position = UDim2.new(1, -10, 0, 20)
closeBtn.Size = UDim2.fromOffset(28, 28)
closeBtn.BackgroundColor3 = UI.Row
closeBtn.AutoButtonColor = false
closeBtn.Text = "X"
closeBtn.Font = Enum.Font.GothamBold
closeBtn.TextSize = 14
closeBtn.TextColor3 = UI.Text
closeBtn.ZIndex = 12
closeBtn.Parent = window
Corner(closeBtn, 14)
FX.Hover(closeBtn)
closeBtn.MouseEnter:Connect(function()
tween(closeBtn, TweenInfo.new(0.12), { BackgroundColor3 = Color3.fromRGB(200, 50, 50) })
end)
closeBtn.MouseLeave:Connect(function()
tween(closeBtn, TweenInfo.new(0.12), { BackgroundColor3 = UI.Row })
end)
closeBtn.MouseButton1Click:Connect(function()
FX.Close(window, function()
window:Destroy()
end)
end)
local legend = Label(window, "", 12, Enum.Font.Gotham, UI.Dim)
legend.RichText = true
legend.Position = UDim2.new(0, 16, 1, -28)
legend.Size = UDim2.new(1, -32, 0, 20)
legend.ZIndex = 11
legend.Text = string.format(
'<font color="%s">CRITICAL</font> <font color="%s">HIGH</font> <font color="%s">MEDIUM</font> <font color="%s">LOW</font> <font color="#3CC86E">CLEAN</font> Hover a node for details | click to lock | drag empty space to pan',
SEVERITY_HEX.CRITICAL,
SEVERITY_HEX.HIGH,
SEVERITY_HEX.MEDIUM,
SEVERITY_HEX.LOW
)
local canvas = Instance.new("ScrollingFrame")
canvas.Name = "Canvas"
canvas.Position = UDim2.fromOffset(12, 44)
canvas.Size = UDim2.new(1, -24, 1, -80)
canvas.BackgroundColor3 = Color3.fromRGB(18, 18, 22)
canvas.BorderSizePixel = 0
canvas.ScrollingDirection = Enum.ScrollingDirection.XY
canvas.ScrollBarThickness = 6
canvas.ZIndex = 11
canvas.Parent = window
Corner(canvas, 8)
-- Layout: three columns, elbow connectors (no rotated frames, so clipping stays correct)
local GAME_X, GAME_W = 20, 110
local ROOT_X, ROOT_W = 190, 170
local LEAF_X, LEAF_W = 430, 250
local NODE_H, LEAF_GAP, ROOT_GAP = 28, 8, 22
local roots = BuildMapData(result)
local y = 20
type Placed = { Root: MapRoot, CenterY: number, Leaves: { { Node: MapNode, Y: number } } }
local placed: { Placed } = {}
for _, r in ipairs(roots) do
local count = math.max(1, #r.Nodes)
local blockH = count * NODE_H + (count - 1) * LEAF_GAP
local entry: Placed = { Root = r, CenterY = y + blockH / 2, Leaves = {} }
for i, n in ipairs(r.Nodes) do
table.insert(entry.Leaves, { Node = n, Y = y + (i - 1) * (NODE_H + LEAF_GAP) + NODE_H / 2 })
end
table.insert(placed, entry)
y += blockH + ROOT_GAP
end
local contentH = math.max(y, 200)
local gameCenterY = if #placed > 0 then (placed[1].CenterY + placed[#placed].CenterY) / 2 else contentH / 2
canvas.CanvasSize = UDim2.fromOffset(LEAF_X + LEAF_W + 30, contentH + 10)
-- Pan surface: drag empty space to scroll
local pan = Instance.new("Frame")
pan.BackgroundTransparency = 1
pan.Size = UDim2.fromOffset(LEAF_X + LEAF_W + 30, contentH + 10)
pan.ZIndex = 11
pan.Parent = canvas
local panning = false
local panStart: Vector3? = nil
local panCanvasStart = Vector2.zero
pan.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
panning = true
panStart = input.Position
panCanvasStart = canvas.CanvasPosition
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
panning = false
end
end)
end
end)
local panConn = UserInputService.InputChanged:Connect(function(input)
if panning and panStart and input.UserInputType == Enum.UserInputType.MouseMovement then
local d = input.Position - panStart
canvas.CanvasPosition = panCanvasStart - Vector2.new(d.X, d.Y)
end
end)
window.Destroying:Connect(function()
panConn:Disconnect()
end)
local lineIndex = 0
local function segment(x: number, yPos: number, w: number, h: number, color: Color3)
lineIndex += 1
local f = Instance.new("Frame")
f.Position = UDim2.fromOffset(x, yPos)
f.Size = UDim2.fromOffset(math.max(w, 2), math.max(h, 2))
f.BackgroundColor3 = color
f.BackgroundTransparency = 1
f.BorderSizePixel = 0
f.ZIndex = 12
f.Parent = canvas
task.delay(math.min(lineIndex * 0.004, 0.5), function()
if f.Parent then
tween(f, TweenInfo.new(0.3), { BackgroundTransparency = 0.45 })
end
end)
end
local function elbow(x1: number, y1: number, x2: number, y2: number, color: Color3)
local midX = math.floor((x1 + x2) / 2)
segment(x1, y1 - 1, midX - x1, 2, color)
segment(midX - 1, math.min(y1, y2) - 1, 2, math.abs(y2 - y1) + 2, color)
segment(midX, y2 - 1, x2 - midX, 2, color)
end
-- Tooltip (child of the window, so it isn't clipped by the canvas)
local TIP_W, TIP_MAX_H = 360, 300
local tip = Instance.new("Frame")
tip.Name = "Tooltip"
tip.Size = UDim2.fromOffset(TIP_W, 120)
tip.BackgroundColor3 = Color3.fromRGB(14, 14, 18)
tip.BackgroundTransparency = 0.03
tip.Visible = false
tip.ZIndex = 30
tip.Parent = window
Corner(tip, 8)
local tipStroke = Instance.new("UIStroke")
tipStroke.Thickness = 1.5
tipStroke.Color = UI.Accent
tipStroke.Parent = tip
local tipHeader = Label(tip, "", 11, Enum.Font.GothamBold, UI.Dim)
tipHeader.Position = UDim2.fromOffset(10, 4)
tipHeader.Size = UDim2.new(1, -20, 0, 18)
tipHeader.ZIndex = 31
local tipBody = Instance.new("ScrollingFrame")
tipBody.BackgroundTransparency = 1
tipBody.BorderSizePixel = 0
tipBody.Position = UDim2.fromOffset(10, 24)
tipBody.Size = UDim2.new(1, -14, 1, -30)
tipBody.CanvasSize = UDim2.new()
tipBody.AutomaticCanvasSize = Enum.AutomaticSize.Y
tipBody.ScrollBarThickness = 4
tipBody.ZIndex = 31
tipBody.Parent = tip
local tipText = Label(tipBody, "", 12, Enum.Font.Gotham, UI.Text)
tipText.RichText = true
tipText.TextWrapped = true
tipText.TextYAlignment = Enum.TextYAlignment.Top
tipText.Size = UDim2.new(1, -8, 0, 0)
tipText.AutomaticSize = Enum.AutomaticSize.Y
tipText.ZIndex = 31
tipText:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
tip.Size = UDim2.fromOffset(TIP_W, math.min(TIP_MAX_H, tipText.AbsoluteSize.Y + 36))
end)
local hovered: GuiObject? = nil
local locked: GuiObject? = nil
local shownFor: GuiObject? = nil
local nodeText: { [GuiObject]: string } = {}
local nodeStroke: { [GuiObject]: UIStroke } = {}
local function placeTip()
local anchor = shownFor
if not anchor then
return
end
local rel = anchor.AbsolutePosition - window.AbsolutePosition
local winSize = window.AbsoluteSize
local tipSize = tip.AbsoluteSize
local x = rel.X + anchor.AbsoluteSize.X + 10
if x + tipSize.X > winSize.X - 8 then
x = rel.X - tipSize.X - 10
end
x = math.clamp(x, 8, math.max(8, winSize.X - tipSize.X - 8))
local yPos = math.clamp(rel.Y - 6, 44, math.max(44, winSize.Y - tipSize.Y - 8))
tip.Position = UDim2.fromOffset(x, yPos)
end
local function refreshHeader()
if locked then
tipHeader.Text = "LOCKED | scroll here | click the node again to unlock"
tipHeader.TextColor3 = UI.Accent
tipStroke.Thickness = 2.5
else
tipHeader.Text = "Click the node to lock this panel"
tipHeader.TextColor3 = UI.Dim
tipStroke.Thickness = 1.5
end
end
local function showFor(node: GuiObject)
shownFor = node
tipText.Text = nodeText[node] or ""
tipStroke.Color = (nodeStroke[node] and nodeStroke[node].Color) or UI.Accent
tipBody.CanvasPosition = Vector2.zero
refreshHeader()
if not tip.Visible then
tip.Visible = true
tip.BackgroundTransparency = 1
tween(tip, TweenInfo.new(0.12), { BackgroundTransparency = 0.03 })
end
task.defer(placeTip)
placeTip()
end
local function hideTip()
shownFor = nil
tip.Visible = false
end
canvas:GetPropertyChangedSignal("CanvasPosition"):Connect(placeTip)
window:GetPropertyChangedSignal("AbsolutePosition"):Connect(placeTip)
local nodeIndex = 0
local function makeNode(x: number, centerY: number, w: number, text: string, color: Color3, badge: string?, column: number): TextButton
nodeIndex += 1
local b = Instance.new("TextButton")
b.AutoButtonColor = false
b.Text = ""
b.Position = UDim2.fromOffset(x, centerY - NODE_H / 2)
b.Size = UDim2.fromOffset(w, NODE_H)
b.BackgroundColor3 = Color3.fromRGB(30, 30, 36)
b.ZIndex = 13
b.Parent = canvas
Corner(b, 7)
local s = Instance.new("UIStroke")
s.Color = color
s.Thickness = 1.5
s.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
s.Parent = b
nodeStroke[b] = s
local dot = Instance.new("Frame")
dot.AnchorPoint = Vector2.new(0, 0.5)
dot.Position = UDim2.new(0, 9, 0.5, 0)
dot.Size = UDim2.fromOffset(8, 8)
dot.BackgroundColor3 = color
dot.ZIndex = 14
dot.Parent = b
Corner(dot, 4)
local l = Label(b, text, 12, Enum.Font.GothamMedium, UI.Text)
l.Position = UDim2.fromOffset(24, 0)
l.Size = UDim2.new(1, if badge then -60 else -30, 1, 0)
l.TextTruncate = Enum.TextTruncate.AtEnd
l.ZIndex = 14
if badge then
local bl = Label(b, badge, 11, Enum.Font.GothamBold, color)
bl.AnchorPoint = Vector2.new(1, 0)
bl.Position = UDim2.new(1, -8, 0, 0)
bl.Size = UDim2.fromOffset(34, NODE_H)
bl.TextXAlignment = Enum.TextXAlignment.Right
bl.ZIndex = 14
end
-- staggered pop-in, column by column
local scale = Instance.new("UIScale")
scale.Scale = 0
scale.Parent = b
task.delay(column * 0.12 + math.min(nodeIndex * 0.015, 0.6), function()
if b.Parent then
tween(scale, TweenInfo.new(0.35, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Scale = 1 })
end
end)
b.MouseEnter:Connect(function()
hovered = b
tween(s, TweenInfo.new(0.12), { Thickness = 3 })
tween(b, TweenInfo.new(0.12), { BackgroundColor3 = Color3.fromRGB(42, 42, 50) })
if not locked then
showFor(b)
end
end)
b.MouseLeave:Connect(function()
if hovered == b then
hovered = nil
end
if locked ~= b then
tween(s, TweenInfo.new(0.12), { Thickness = 1.5 })
end
tween(b, TweenInfo.new(0.12), { BackgroundColor3 = Color3.fromRGB(30, 30, 36) })
if not locked then
hideTip()
end
end)
b.MouseButton1Click:Connect(function()
if locked == b then
-- unlock; the panel goes away once the mouse leaves the node
locked = nil
refreshHeader()
if hovered ~= b then
tween(s, TweenInfo.new(0.12), { Thickness = 1.5 })
hideTip()
end
else
local previous = locked
locked = b
if previous and nodeStroke[previous] then
tween(nodeStroke[previous], TweenInfo.new(0.12), { Thickness = 1.5 })
end
tween(s, TweenInfo.new(0.12), { Thickness = 3 })
showFor(b)
end
end)
return b
end
-- game node
local totalFindings = #result.Threats
local gameNode = makeNode(GAME_X, gameCenterY, GAME_W, "game", UI.Accent, nil, 0)
nodeText[gameNode] = table.concat({
'<b><font size="15">game</font></b>',
string.format("Containers scanned: %d", #result.RootNames),
string.format("Scripts scanned: %d (no source: %d)", result.Scanned, result.Skipped),
string.format("Findings: <b>%d</b>", totalFindings),
"",
'<font color="#8C8C96">' .. EscapeRich(table.concat(result.RootNames, ", ")) .. "</font>",
}, "\n")
for _, p in ipairs(placed) do
local r = p.Root
local rootColor = if r.Severity then SEVERITY_COLORS[r.Severity] else UI.Good
local badge = if #r.Nodes > 0 then tostring(#r.Nodes) else nil
local rootNode = makeNode(ROOT_X, p.CenterY, ROOT_W, r.Name, rootColor, badge, 1)
nodeText[rootNode] = DescribeRoot(r)
elbow(GAME_X + GAME_W, gameCenterY, ROOT_X, p.CenterY, rootColor)
for _, leaf in ipairs(p.Leaves) do
local n = leaf.Node
local color = SEVERITY_COLORS[n.Severity] or UI.Dim
local leafBadge = if #n.Threats > 1 then "x" .. #n.Threats else nil
local leafNode = makeNode(LEAF_X, leaf.Y, LEAF_W, n.Label, color, leafBadge, 2)
nodeText[leafNode] = DescribeNode(n)
elbow(ROOT_X + ROOT_W, p.CenterY, LEAF_X, leaf.Y, color)
end
end
end
function MaliciousDetector.Scan()
local ui = CreateScanUI()
local allThreats: { Threat } = {}
local sweep, sweepTween = FX.CreateSweep(ui.MainFrame)
local lastThreatCount = 0
MaliciousDetector.Log("Starting deep security scan...")
if Decompiler then
MaliciousDetector.Log("Decompiler support detected. Bytecode scripts will be analyzed.")
else
MaliciousDetector.Log("No decompiler detected. Compiled bytecode scripts will be skipped.")
end
ui.StatusLabel.Text = "Gathering all scripts..."
local servicesToScan = {
game:GetService("Workspace"),
game:GetService("ReplicatedStorage"),
game:GetService("ReplicatedFirst"),
game:GetService("StarterGui"),
game:GetService("StarterPack"),
game:GetService("StarterPlayer"),
game:GetService("Lighting"),
game:GetService("Teams"),
}
local scriptsToScan: { LuaSourceContainer } = {}
for _, service in ipairs(servicesToScan) do
for _, descendant in ipairs(service:GetDescendants()) do
if descendant:IsA("LuaSourceContainer") and not IsWhitelisted(descendant) then
table.insert(scriptsToScan, descendant)
end
SafeYield()
end
end
local totalScripts = #scriptsToScan
local scannedCount = 0
local skippedCount = 0
local threatCount = 0
ui.StatusLabel.Text = "Scanning " .. totalScripts .. " scripts..."
local lastUIUpdate = os.clock()
local lastFileLabelUpdate = 0
for i, script in ipairs(scriptsToScan) do
if not ui.ScreenGui or not ui.ScreenGui.Parent then
return allThreats
end
scannedCount += 1
local instanceThreats: { Threat } = {}
local isServerScript = script:IsA("Script") and not script:IsA("LocalScript")
-- Show the path before reading/decompiling, so a slow script is visible on screen
if os.clock() - lastFileLabelUpdate > 0.1 then
ui.CurrentFileLabel.Text = "File: " .. script:GetFullName()
lastFileLabelUpdate = os.clock()
end
local source = GetScriptSource(script)
if isServerScript and not source then
skippedCount += 1
if HasSuspiciousName(script) then
table.insert(instanceThreats, {
Category = "SuspiciousName",
Severity = "LOW",
Confidence = "Low",
Description = "Server script with suspicious name (Source locked).",
Pattern = script.Name,
Target = "Script Identity",
ExploitImpact = "Disguise malicious scripts.",
LineNumber = 1,
Evidence = script.Name,
BenignReason = "Source is locked.",
SuggestedAction = "Check the script manually in Studio.",
})
end
else
instanceThreats = AnalyzeScript(script, source)
end
for _, threat in ipairs(instanceThreats) do
threat.Instance = script
threat.InstancePath = script:GetFullName()
table.insert(allThreats, threat)
threatCount += 1
end
if os.clock() - lastUIUpdate > 0.1 then
tween(
ui.BarFill,
TweenInfo.new(0.2, Enum.EasingStyle.Quad),
{ Size = UDim2.new(totalScripts > 0 and (scannedCount / totalScripts) or 0, 0, 1, 0) }
)
ui.StatsLabel.Text =
string.format("Scanned: %d/%d | Skipped: %d | Threats: %d", scannedCount, totalScripts, skippedCount, threatCount)
if threatCount ~= lastThreatCount then
lastThreatCount = threatCount
FX.Pop(ui.StatsLabel)
end
lastUIUpdate = os.clock()
end
SafeYield()
end
ui.CurrentFileLabel.Text = "Checking physics configurations..."
local physicsThreats = CheckPlayerCollisions()
for _, threat in ipairs(physicsThreats) do
table.insert(allThreats, threat)
threatCount += 1
end
ui.CurrentFileLabel.Text = "Checking remote events..."
local remoteThreats = CheckSuspiciousRemotes()
for _, threat in ipairs(remoteThreats) do
table.insert(allThreats, threat)
threatCount += 1
end
ui.CurrentFileLabel.Text = "Checking workspace vulnerabilities..."
local partThreats = CheckUnanchoredParts()
for _, threat in ipairs(partThreats) do
table.insert(allThreats, threat)
threatCount += 1
end
ui.CurrentFileLabel.Text = "Checking for self-replicating scripts..."
local replThreats = CheckFreeModelReplication()
for _, threat in ipairs(replThreats) do
table.insert(allThreats, threat)
threatCount += 1
end
ui.CurrentFileLabel.Text = "Checking trust boundaries..."
local exposedThreats = CheckExposedServerScripts()
for _, threat in ipairs(exposedThreats) do
table.insert(allThreats, threat)
threatCount += 1
end
ui.CurrentFileLabel.Text = "Checking for ClickDetector abuse..."
local clickThreats = CheckClickDetectors()
for _, threat in ipairs(clickThreats) do
table.insert(allThreats, threat)
threatCount += 1
end
ui.StatsLabel.Text = string.format("Scanned: %d/%d | Skipped: %d | Threats: %d", scannedCount, totalScripts, skippedCount, threatCount)
ui.CurrentFileLabel.Text = "Scan complete."
sweepTween:Cancel()
sweep:Destroy()
tween(ui.BarFill, TweenInfo.new(0.3), { Size = UDim2.new(1, 0, 1, 0) })
MaliciousDetector.Log("Scan complete. Found " .. #allThreats .. " potential threats.")
local hasCritical = false
for _, threat in ipairs(allThreats) do
if threat.Severity == "CRITICAL" then
hasCritical = true
break
end
end
local rootNames: { string } = {}
for _, service in ipairs(servicesToScan) do
table.insert(rootNames, service.Name)
end
local result: ScanResult = {
Threats = allThreats,
Scanned = scannedCount,
Total = totalScripts,
Skipped = skippedCount,
RootNames = rootNames,
}
if threatCount > 0 then
FX.Typewrite(ui.StatusLabel, threatCount .. " threats detected!", 0.04)
local alertColor = hasCritical and Color3.fromRGB(220, 50, 50) or Color3.fromRGB(220, 150, 50)
FX.Ring(ui.MainFrame, alertColor)
if hasCritical then
FX.Shake(ui.MainFrame, 6, 0.4)
end
ui.BarFill.BackgroundColor3 = alertColor
ui.ButtonHolder.Visible = true
local reportsShown = false
ui.ShowReportButton.MouseButton1Click:Connect(function()
if not reportsShown then
reportsShown = true
ui.StatusLabel.Visible = false
ui.CurrentFileLabel.Visible = false
ui.BarBackground.Visible = false
ui.StatsLabel.Visible = false
ui.ReportList.Visible = true
TweenService:Create(
ui.MainFrame,
TweenInfo.new(0.4, Enum.EasingStyle.Quint, Enum.EasingDirection.Out),
{ Size = UDim2.new(0, 600, 0, 450) }
):Play()
local groupedThreats = GroupThreats(allThreats)
for _, groupedThreat in ipairs(groupedThreats) do
CreateThreatCard(groupedThreat, ui.ReportList)
end
if ClipboardFunc then
ui.ShowReportButton.Text = "Copy Reports"
ui.ShowReportButton.BackgroundColor3 = Color3.fromRGB(40, 80, 120)
else
ui.ShowReportButton.Text = "Reports Shown"
ui.ShowReportButton.BackgroundColor3 = Color3.fromRGB(30, 100, 30)
end
else
if ClipboardFunc then
local reportText = FormatThreatsForClipboard(allThreats)
local success = pcall(ClipboardFunc, reportText)
ui.ShowReportButton.Text = success and "Copied!" or "Copy Failed"
task.delay(2, function()
if ui.ScreenGui and ui.ScreenGui.Parent then
ui.ShowReportButton.Text = "Copy Reports"
end
end)
end
end
end)
ui.MapButton.MouseButton1Click:Connect(function()
OpenNodeMap(ui.ScreenGui, result)
end)
ui.DismissButton.MouseButton1Click:Connect(function()
local mapWindow = ui.ScreenGui:FindFirstChild("NodeMapWindow")
if mapWindow and mapWindow:IsA("GuiObject") then
FX.Close(mapWindow)
end
FX.Close(ui.MainFrame, function()
ui.ScreenGui:Destroy()
end)
end)
else
FX.Typewrite(ui.StatusLabel, "No threats detected. Game is clean!", 0.03)
FX.Ring(ui.MainFrame, Color3.fromRGB(50, 200, 50))
ui.BarFill.BackgroundColor3 = Color3.fromRGB(50, 200, 50)
task.delay(3, function()
if ui.ScreenGui and ui.ScreenGui.Parent then
FX.Close(ui.MainFrame, function()
ui.ScreenGui:Destroy()
end)
end
end)
end
return allThreats
end
local function Initialize()
MaliciousDetector.Log("Malicious Script Detector initialized.")
if not game:IsLoaded() then
game.Loaded:Wait()
end
task.wait(1)
-- Intro starts right away; the notification's button skips it
local skipIntro = false
local skipCallback = Instance.new("BindableFunction")
skipCallback.OnInvoke = function()
skipIntro = true
end
pcall(function()
StarterGui:SetCore("SendNotification", {
Title = "Malicious Script Detector",
Text = "Booting scanner...",
Duration = INTRO_DURATION,
Callback = skipCallback,
Button1 = "Skip Intro",
})
end)
PlayIntro(function()
return skipIntro
end)
skipCallback:Destroy()
MaliciousDetector.Scan()
end
Initialize()Loads code from the internet. It downloads more code when it runs (loadstring + HttpGet), which can change after it was posted.
Works best in potassium, tested in Real. Real just makes it really quick to scan, madium just takes longer as last tested, correct me if im wrong. Basically scans for all scripts and modulescripts and localscripts, for scripts, it will tell you there is some Script exposed to the client (you cant basically see in it unless it told you it had a bytecode), and for modulescripts, it will check if it has vulnerable names, executor apis, dynamic execution calls, etc. it will check if there is obfuscation, and webhooks/urls, debug library abuses are checked, and it will check if it creates new scripts or load any external source code, and for localscript, it will check if it uses PromptProductPurchaseFinished or PromptGamepassPurchaseFinished, and if it contains those, you can just use 7yd7 gamepass, and will check if there is weak anti-cheats inside localscripts, and if they do, you can just disable or delete it, and it will check if they send remotes in localscripts (maybe some that tells to ban people), and if they contain it, you can use it to abuse that power, or disable it to avoid getting bans. Update: Added Gradient Animations on the Loading Bar, and more idk. Update: Optimi

Universal