Run it
Copy the script and paste it into your executor.
SafeCall = {}
SafeCall.Defaults = {
RetryCount = ,
RetryDelay = ,
YieldInterval =
}
SafeCall.Errors = {
InvalidURL = ,
Aborted = ,
Suspicious = ,
FetchFailed = ,
ExecutionFailed =
}
SafeCall.AntiVirus = {
DetectionLog = {},
QuarantineFolder = ,
LogDetection = (self, url, reason)
.(self.DetectionLog, {
Timestamp = .(),
URL = url,
Reason = reason
})
( .. url)
( .. reason)
,
QuarantineScript = (self, url, content)
(self.QuarantineFolder)
(self.QuarantineFolder)
fileName = self.QuarantineFolder .. .. :():() ..
(fileName, content)
( .. fileName)
,
ScanWorkspace = (self)
()
suspiciousCount =
(instance)
instance:()
source = instance.Source
isSuspicious, reason = SafeCall.(source)
isSuspicious
suspiciousCount = suspiciousCount +
( .. instance:())
( .. reason)
_, child (instance:())
(child)
()
( .. suspiciousCount .. )
,
ScanAll = (self)
()
suspiciousCount =
(tbl)
key, value (tbl)
(value) ==
isSuspicious, reason = SafeCall.(value)
isSuspicious
suspiciousCount = suspiciousCount +
( .. (key))
( .. reason)
(value) ==
(value)
(instance)
instance:()
source = instance.Source
isSuspicious, reason = SafeCall.(source)
isSuspicious
suspiciousCount = suspiciousCount +
( .. instance:())
( .. reason)
_, child (instance:())
(child)
(service)
_, instance (service:())
(instance)
_, service (:())
(service)
()
()
( .. suspiciousCount .. )
}
SafeCall.GUI = {
ScreenGui = ,
NotificationTemplate = ,
Setup = (self)
self.ScreenGui = .()
self.ScreenGui.Name =
self.ScreenGui.Parent = .Players.LocalPlayer:()
self.NotificationTemplate = .()
self.NotificationTemplate.Size = .(, , , )
self.NotificationTemplate.Position = .(, -, , -)
self.NotificationTemplate.AnchorPoint = .(, )
self.NotificationTemplate.BackgroundColor3 = .(, , )
self.NotificationTemplate.TextColor3 = .(, , )
self.NotificationTemplate.TextSize =
self.NotificationTemplate.Font = .Font.SourceSansBold
self.NotificationTemplate.TextWrapped =
self.NotificationTemplate.TextXAlignment = .TextXAlignment.Left
self.NotificationTemplate.TextYAlignment = .TextYAlignment.Top
corner = .()
corner.CornerRadius = .(, )
corner.Parent = self.NotificationTemplate
padding = .()
padding.PaddingLeft = .(, )
padding.PaddingRight = .(, )
padding.PaddingTop = .(, )
padding.PaddingBottom = .(, )
padding.Parent = self.NotificationTemplate
,
Notify = (self, title, message, color)
notification = self.NotificationTemplate:()
notification.Text = title .. .. message
notification.BackgroundColor3 = color .(, , )
notification.Parent = self.ScreenGui
notification:(
.(, -, , - - (#self.ScreenGui:() - ) * ),
.EasingDirection.Out,
.EasingStyle.Quart,
,
)
(()
()
notification:(
.(, , notification.Position.Y.Scale, notification.Position.Y.Offset),
.EasingDirection.Out,
.EasingStyle.Quart,
,
,
()
notification:()
)
)
}
SafeCall.(scriptContent)
suspiciousPatterns = {
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
}
lowercaseContent = scriptContent:()
_, pattern (suspiciousPatterns)
lowercaseContent:(pattern:())
, .. pattern
scriptContent:() scriptContent:()
,
scriptContent:()
,
SafeCall.(url, options)
((url) == url:(), SafeCall.Errors.InvalidURL)
options = (options) == options {}
retryCount = options.RetryCount SafeCall.Defaults.RetryCount
retryDelay = options.RetryDelay SafeCall.Defaults.RetryDelay
()
success, content = (.HttpGet, , url)
success
SafeCall.GUI:(, SafeCall.Errors.FetchFailed .. .. (content), .(, , ))
, SafeCall.Errors.FetchFailed .. .. (content)
isSuspicious, reason = SafeCall.(content)
isSuspicious
SafeCall.AntiVirus:(url, reason)
SafeCall.AntiVirus:(url, content)
SafeCall.AntiVirus:()
SafeCall.GUI:(, SafeCall.Errors.Suspicious .. .. reason, .(, , ))
, SafeCall.Errors.Suspicious .. .. reason
, content
(content)
success, result = ((content))
success
SafeCall.GUI:(, SafeCall.Errors.ExecutionFailed .. .. (result), .(, , ))
, SafeCall.Errors.ExecutionFailed .. .. (result)
, result
(attemptsLeft)
fetchSuccess, fetchResult = ()
fetchSuccess
attemptsLeft >
options.OnRetry
options.(retryCount - attemptsLeft + , fetchResult)
SafeCall.GUI:(, .. (retryCount - attemptsLeft + ) .. .. retryCount, .(, , ))
(retryDelay)
(attemptsLeft - )
options.OnError options.(fetchResult)
, fetchResult
runSuccess, runResult = (fetchResult)
runSuccess
options.OnSuccess options.(runResult)
SafeCall.GUI:(, , .(, , ))
, runResult
attemptsLeft >
options.OnRetry
options.(retryCount - attemptsLeft + , runResult)
SafeCall.GUI:(, .. (retryCount - attemptsLeft + ) .. .. retryCount, .(, , ))
(retryDelay)
(attemptsLeft - )
options.OnError options.(runResult)
, runResult
options.ShouldAbort options.()
SafeCall.GUI:(, SafeCall.Errors.Aborted, .(, , ))
, SafeCall.Errors.Aborted
(retryCount)
SafeCall.GUI:()
url =
options = {
RetryCount = ,
RetryDelay = ,
OnSuccess = (result) (, result) ,
OnError = () (, ) ,
OnRetry = (attempt, ) (, attempt, , ) ,
ShouldAbort = ()
}
success, result = SafeCall.(url, options)
(success ( .. (result)) ( .. (result)))
SafeCall.AntiVirus:()