Run it
Copy the script and paste it into your executor.
__dcm_boot = {
hostEnv = ( ()) {},
}
__dcm_boot.getLoader = ()
hostLoader = (__dcm_boot.hostEnv) == (__dcm_boot.hostEnv, )
(hostLoader) ==
hostLoader
() ==
__dcm_isDelta =
(identifyexecutor) ==
ok, name = (identifyexecutor)
__dcm_isDelta = ok (name) == name:() ==
__dcm_isDelta
(()
loader = __dcm_boot.()
(loader) ~=
src = :()
chunk = (src, )
(chunk) ~=
mod = ()
(mod) == (mod.Notify) ==
mod.({
Title = ,
Description = ,
Duration = ,
})
)
__dcm_boot.hostGetfenv = (__dcm_boot.hostEnv.getfenv) == __dcm_boot.hostEnv.getfenv getfenv
__dcm_boot.hostSetfenv = (__dcm_boot.hostEnv.setfenv) == __dcm_boot.hostEnv.setfenv setfenv
__dcm_boot.debug = (__dcm_boot.hostEnv, ) debug
__dcm_boot.getPrivateRegistry = ()
registry
(getreg) ==
(()
registry = ()
)
(registry) ~= (__dcm_boot.debug) == (__dcm_boot.debug.getregistry) ==
(()
registry = __dcm_boot.debug.()
)
(registry) ~=
registry = {}
registry
__dcm_boot.ensureTable = (host, key)
value = (host) == (host, key)
(value) ~=
value = {}
(host) ==
(, host, key, value)
(host, key) ~= value
host[key] = value
value
__dcm_boot.clearHostKey = (host, key)
(host) ==
(, host, key, )
(()
host[key] =
)
__dcm_boot.clearLegacyGlobals = (host)
keys = {
,
,
,
,
,
}
i = , #keys
__dcm_boot.(host, keys[i])
sh = (host) == (host, )
(sh) == sh ~= host
i = , #keys
__dcm_boot.(sh, keys[i])
__dcm_boot.privateRegistry = __dcm_boot.()
__dcm_boot.privateRoot = __dcm_boot.(__dcm_boot.privateRegistry, )
__dcm_env = __dcm_boot.(__dcm_boot.privateRoot, )
__dcm_shared = __dcm_boot.(__dcm_env, )
__dcm_boot.runtimeEnv = __dcm_boot.(__dcm_env, )
__dcm_boot.runtimeEnv.shared = __dcm_shared
__dcm_boot.runtimeEnv._G = __dcm_boot.runtimeEnv
__dcm_boot.runtimeEnv.getgenv = ()
__dcm_boot.runtimeEnv
__dcm_boot.runtimeEnv.getfenv = (target)
target == target ==
__dcm_boot.runtimeEnv
(__dcm_boot.hostGetfenv) ==
__dcm_boot.(target)
__dcm_boot.runtimeEnv
(__dcm_boot.runtimeEnv, {
__index = (_, key)
key ==
__dcm_boot.runtimeEnv
key ==
__dcm_shared
key ==
__dcm_boot.runtimeEnv.getgenv
key ==
__dcm_boot.runtimeEnv.getfenv
__dcm_boot.hostEnv[key]
,
})
(__dcm_boot.hostSetfenv) ==
(__dcm_boot.hostSetfenv, , __dcm_boot.runtimeEnv)
__lt = (()
cached = (__dcm_boot.privateRoot, )
(cached) ==
cached
loader = __dcm_boot.()
(loader) ~=
()
okSrc, src = (()
:()
)
(okSrc (src) == src ~= )
( .. ( (src) (src)))
resolver = (src, )
(resolver) ~=
()
(__dcm_boot.hostSetfenv) ==
(__dcm_boot.hostSetfenv, resolver, __dcm_boot.runtimeEnv)
loaded = ()
(loaded) ~=
()
__dcm_boot.privateRoot.serviceResolver = loaded
loaded
)()
__NAUIProtector = (()
cacheHost = __dcm_env;
cacheHost
cached = (cacheHost, );
(cached) ==
cached;
;
;
loader = __dcm_boot.();
(loader) ~=
;
;
okSource, source = (()
:();
);
okSource (source) ~= source ==
;
;
chunk = (source, );
(chunk) ~=
;
;
(__dcm_boot.hostSetfenv) ==
(__dcm_boot.hostSetfenv, chunk, __dcm_boot.runtimeEnv);
;
okLoaded, loaded = (chunk);
okLoaded (loaded) ==
cacheHost
cacheHost.__lt_ui_protector = loaded;
;
loaded;
;
;
)();
__NAOriginalGetHui = gethui;
gethui = ()
__NAUIProtector (__NAUIProtector.huiGrabber) ==
ok, ui = (__NAUIProtector.huiGrabber);
ok (ui) ==
ui;
;
;
(__NAOriginalGetHui) ==
ok, ui = (__NAOriginalGetHui);
ok
ui;
;
;
;
;
(gui, options)
__NAUIProtector (__NAUIProtector.protectUI) ==
ok, protected = (__NAUIProtector.protectUI, gui, options);
ok protected
protected;
;
;
;
;
()
__dcm_env __dcm_env.__DeltaCustomizationModuleLoaded
__dcm_shared __dcm_shared.__DeltaCustomizationModuleLoaded
__dcm_previousMasterRuntime = (__dcm_env, )
(__dcm_previousMasterRuntime) == (__dcm_previousMasterRuntime.stop) ==
(__dcm_previousMasterRuntime.stop)
__dcm_previousRuntime = (__dcm_env, )
(__dcm_previousRuntime) == (__dcm_previousRuntime.stop) ==
(__dcm_previousRuntime.stop)
__dcm_env.__DeltaCustomizationModuleLoaded =
__dcm_shared.__DeltaCustomizationModuleLoaded =
__dcm_env.__DeltaVisualPatchLoaded =
__dcm_env.__DeltaThemeMenuPatchLoaded =
__dcm_flag = {
version = ,
loadedAt = (),
}
__dcm_env.__DeltaCustomizationModuleLoaded = __dcm_flag
__dcm_shared.__DeltaCustomizationModuleLoaded = __dcm_flag
httpTxt
UIS
root
settingsPath
notify
_naConns
NAlib
writeJsonFile
deltaEnv = __dcm_boot.runtimeEnv
_ref = cloneref (cloneref) == cloneref (v)
v
SRV = ({}, {
__index = (self, n)
ok, s = (()
__lt.(n, _ref)
)
ok s
(self, n, s)
s
,
})
(n)
SRV[n]
httpTxt = (u, hdr)
(u) ~= u ==
,
rq = ( .request) ( .request)
(rq) ==
h = {
[] = ,
[] = ,
}
(hdr) ==
k, v hdr
h[k] = v
ok, res = (rq, {
Url = u,
Method = ,
Headers = h,
})
ok (res) ==
code = (res.StatusCode res.Status res.status_code)
body = res.Body res.body
(code == code >= code < ) (body) == body ~=
body
ok, body = (()
:(u)
)
ok (body) == body ~=
body
, .. ( (body) (body))
(u, name, hdr)
ld = __dcm_boot.()
(ld) ~=
,
src, er = (u, hdr)
(src) ~= src ==
, er
fn, er2 = (src, name ( .. u))
(fn) ~=
, er2
(__dcm_boot.hostSetfenv) ==
(__dcm_boot.hostSetfenv, fn, __dcm_boot.runtimeEnv)
(fn)
UIS = ()
CG = ()
HS = ()
RS = ()
Stats = ()
TS = ()
notifMod
nt
colorsPath =
colorConfig = {}
HS (isfile) == (readfile) ==
(colorsPath)
ok, data = (readfile, colorsPath)
ok data
ok2, decoded = (()
__lt.(, , data)
)
ok2 (decoded) ==
colorConfig = decoded
settingsPath =
settingsConfig = {}
HS (isfile) == (readfile) ==
(settingsPath)
ok, data = (readfile, settingsPath)
ok data
ok2, decoded = (()
__lt.(, , data)
)
ok2 (decoded) ==
settingsConfig = decoded
n =
tries =
tries +=
s, r = (
,
)
s (r) == (r.Notify) ==
n = r
notifMod = r
nt = r.Notify
.()
n ~= tries >=
notify = (info)
nt (info) ~=
(()
(info)
)
_naConns = {}
NAlib = {}
NAlib.(n)
t = _naConns[n]
t
_, c t
(()
c:()
)
_naConns[n] =
NAlib.(n, c)
c
_naConns[n] = _naConns[n] {}
.(_naConns[n], c)
c
NAlib.(o, p)
(()
o[p]
)
NAlib.(o, p, v)
(()
o[p] = v
)
uiLib = {}
uiLib.draggerV2 = (ui, dragui)
dragui = dragui ui
dragging, dragInput, dragStart, startPos
anchor = ui.AnchorPoint
sg = ui:() ui.Parent
(v, lo, hi)
hi < lo
hi = lo
.(v, lo, hi)
(input)
(()
p = sg.AbsoluteSize
s = ui.AbsoluteSize
p.X <= p.Y <=
sx = startPos.X.Scale * p.X + startPos.X.Offset
sy = startPos.Y.Scale * p.Y + startPos.Y.Offset
dx = input.Position.X - dragStart.X
dy = input.Position.Y - dragStart.Y
minX = anchor.X * s.X
maxX = p.X - ( - anchor.X) * s.X
minY = anchor.Y * s.Y
maxY = p.Y - ( - anchor.Y) * s.Y
nx = (sx + dx, minX, maxX)
ny = (sy + dy, minY, maxY)
ui.Position = .(nx / p.X, , ny / p.Y, )
)
id = .. ui:()
NAlib.(id)
NAlib.(
id,
dragui.InputBegan:((input)
(()
input.UserInputType == .UserInputType.MouseButton1
input.UserInputType == .UserInputType.Touch
dragging =
dragStart = input.Position
startPos = ui.Position
c = input.Changed:(()
(()
input.UserInputState == .UserInputState.End
dragging =
)
)
NAlib.(id, c)
)
)
)
NAlib.(
id,
dragui.InputChanged:((input)
(()
input.UserInputType == .UserInputType.MouseMovement
input.UserInputType == .UserInputType.Touch
dragInput = input
)
)
)
NAlib.(
id,
UIS.InputChanged:((input)
(()
input == dragInput dragging
(input)
)
)
)
()
(()
p = sg.AbsoluteSize
s = ui.AbsoluteSize
p.X <= p.Y <=
pos = ui.Position
ax = pos.X.Scale * p.X + pos.X.Offset
ay = pos.Y.Scale * p.Y + pos.Y.Offset
minX = anchor.X * s.X
maxX = p.X - ( - anchor.X) * s.X
minY = anchor.Y * s.Y
maxY = p.Y - ( - anchor.Y) * s.Y
nx = (ax, minX, maxX)
ny = (ay, minY, maxY)
ui.Position = .(nx / p.X, , ny / p.Y, )
)
NAlib.(id, (sg:()):(clampToView))
ui ui.GetPropertyChangedSignal
NAlib.(id, (ui:()):(clampToView))
()
ui NAlib.(ui, )
NAlib.(ui, , )
dragui NAlib.(dragui, )
NAlib.(dragui, , )
root = gethui () CG
(n)
(n) ~= n ==
n:()
()
best
bestScore =
_, g root:()
g:()
score =
g:()
score +=
g:(, )
score +=
g:()
score +=
g:(, )
score +=
_, name { , , , }
g:(name)
score +=
g:(name, )
score +=
g:()
score +=
(g.Name)
score +=
score > bestScore
best = g
bestScore = score
bestScore >=
best
(rootGui)
rootGui
side = rootGui:(, ) rootGui
net = side side:(, )
(net net:())
over = net:()
(over over:())
over = .()
over.Name =
over.BackgroundTransparency =
over.BorderSizePixel =
over.Position = .(, )
over.Size = .(, )
over.ClipsDescendants =
over.ZIndex = net.ZIndex +
over.Parent = net
_, name { , }
ch = net:(name)
ch ch ~= over ch.Parent == net over:(name)
ch.Parent = over
over
()
bestGui
bestButton
bestScore = -.huge
_, g root:()
g:() g:(, )
buttons = {}
guiCount =
_, d g:()
d:()
guiCount +=
d:()
.(buttons, d)
#buttons == guiCount <=
button = buttons[]
score =
button.Parent == g
score +=
(button.Image) == button.Image ~=
score +=
size = button.AbsoluteSize
size.X > size.Y >
ratio = size.X / size.Y
ratio >= ratio <=
score +=
(g.Name)
score +=
score > bestScore
bestScore = score
bestGui = g
bestButton = button
bestGui, bestButton
mainGui = ()
_iconGui0, _iconBtn0 = ()
__dcm_masterRuntime = {
alive = ,
stopping = ,
objects = {},
baseline = {},
mutations = ({}, { __mode = }),
customObjects = {},
roots = {},
}
__dcm_env.__DeltaCustomizationMasterRuntime = __dcm_masterRuntime
__dcm_shared.__DeltaCustomizationMasterRuntime = __dcm_masterRuntime
__dcm_snapshotProperties = {
,
,
}
__dcm_guiProperties = {
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
}
__dcm_textProperties = {
,
,
,
,
,
,
,
,
,
,
,
,
,
}
__dcm_imageProperties = {
,
,
,
,
,
,
,
,
}
__dcm_scrollingProperties = {
,
,
,
,
,
,
,
,
,
,
,
,
}
(object, values, property)
ok, value = (()
object[property]
)
ok
values[property] = value
(object)
object __dcm_masterRuntime.baseline[object]
values = {}
_, property __dcm_snapshotProperties
(object, values, property)
object:()
_, property { , , }
(object, values, property)
object:()
_, property { , , , , }
(object, values, property)
object:()
_, property { , }
(object, values, property)
object:()
_, property { , , }
(object, values, property)
object:()
_, property __dcm_guiProperties
(object, values, property)
object:() object:() object:()
_, property __dcm_textProperties
(object, values, property)
object:() object:()
_, property __dcm_imageProperties
(object, values, property)
object:()
_, property __dcm_scrollingProperties
(object, values, property)
object:() object:()
_, property { , , , , , , , }
(object, values, property)
object:()
_, property { , , , }
(object, values, property)
object:()
_, property { , , , , }
(object, values, property)
object:()
(object, values, )
object:()
_, property { , , , , , }
(object, values, property)
object:()
(object, values, )
object:()
(object, values, )
__dcm_masterRuntime.baseline[object] =
attributes = {}
(()
attributes = object:()
)
__dcm_masterRuntime.objects[object] = {
Parent = object.Parent,
Values = values,
Attributes = attributes,
}
(target)
target
.(__dcm_masterRuntime.roots, target)
(target)
_, object target:()
(object)
(object, property)
(object (property) == )
state = __dcm_masterRuntime.mutations[object]
state
state = {}
__dcm_masterRuntime.mutations[object] = state
state[property] ~=
ok, value = (()
object[property]
)
ok
state[property] = { value = value }
(object, property, value)
object
(object, property)
(()
object[property] = value
)
(object)
object
__dcm_masterRuntime.customObjects[object] =
object
__dcm_masterRuntime.captureMutation = __dcm_captureMutation
__dcm_masterRuntime.setTracked = __dcm_setTracked
__dcm_masterRuntime.registerCustom = __dcm_registerCustom
(mainGui)
_iconGui0 _iconGui0 ~= mainGui
(_iconGui0)
(object)
name = object.Name
name:(, ) == name == name:(, ) ==
name ==
name ==
name ==
name ==
name ==
name ==
name ==
name ==
name ==
()
object __dcm_masterRuntime.customObjects
object object.Parent
(()
object:()
)
object, snapshot __dcm_masterRuntime.objects
object snapshot.Parent
(()
object.Parent = snapshot.Parent
)
_, target __dcm_masterRuntime.roots
target target.Parent
settings = target:() target:(, )
holder = settings settings:()
holder
_, child holder:()
__dcm_masterRuntime.baseline[child] (child)
(()
child:()
)
_, object target:()
__dcm_masterRuntime.baseline[object] (object)
(()
object:()
)
object, snapshot __dcm_masterRuntime.objects
object object.Parent
property, value snapshot.Values
(()
object[property] = value
)
object, state __dcm_masterRuntime.mutations
object object.Parent
baselineSnapshot = __dcm_masterRuntime.objects[object]
property, wrapped state
ownedByBaseline = baselineSnapshot
(property == baselineSnapshot.Values[property] ~= )
ownedByBaseline
(()
object[property] = wrapped.value
)
object, snapshot __dcm_masterRuntime.objects
object object.Parent
(()
original = snapshot.Attributes {}
name object:()
original[name] ==
object:(name, )
name, value original
object:(name, value)
)
__dcm_masterRuntime.stop = ()
__dcm_masterRuntime.alive __dcm_masterRuntime.stopping
__dcm_masterRuntime.stopping =
_, key { , , }
current = (__dcm_env, key)
(current) == current ~= __dcm_masterRuntime (current.stop) ==
(current.stop)
(_naConns) == (NAlib) ==
name _naConns
NAlib.(name)
()
__dcm_masterRuntime.alive =
__dcm_masterRuntime.stopping =
(__dcm_env, ) == __dcm_masterRuntime
__dcm_env.__DeltaCustomizationMasterRuntime =
(__dcm_shared, ) == __dcm_masterRuntime
__dcm_shared.__DeltaCustomizationMasterRuntime =
__dcm_env.__DeltaCustomizationModuleLoaded =
__dcm_shared.__DeltaCustomizationModuleLoaded =
__dcm_env.__DeltaVisualPatchLoaded =
__dcm_env.__DeltaThemeMenuPatchLoaded =
__dcm_env.DeltaIcon =
__dcm_env.__NewDeltaUIToggle =
restoreToken = {}
__dcm_env.__DeltaCustomizationRestoreToken = restoreToken
__dcm_shared.__DeltaCustomizationRestoreToken = restoreToken
()
(__dcm_env, ) ~= restoreToken
(__dcm_env, ) ~=
()
.(stabilizeRestore)
.(, stabilizeRestore)
.(, stabilizeRestore)
.(, ()
()
(__dcm_env, ) == restoreToken
__dcm_env.__DeltaCustomizationRestoreToken =
(__dcm_shared, ) == restoreToken
__dcm_shared.__DeltaCustomizationRestoreToken =
.(__dcm_masterRuntime.mutations)
)
managedIcon = {
deltaGui = _iconGui0,
deltaBtn = _iconBtn0,
customGui = ,
customBtn = ,
}
managedIcon.deltaStroke = managedIcon.deltaBtn
(
managedIcon.deltaBtn:()
managedIcon.deltaBtn:(, )
)
managedIcon.deltaCorner = managedIcon.deltaBtn
(
managedIcon.deltaBtn:()
managedIcon.deltaBtn:(, )
)
managedIcon.customStroke =
managedIcon.customCorner =
iconGui, iconBtn = managedIcon.deltaGui, managedIcon.deltaBtn
iconStroke = managedIcon.deltaStroke
iconCorner = managedIcon.deltaCorner
iconBaseColor = iconStroke iconStroke.Color
iconBaseSize = iconBtn iconBtn.Size
iconBaseCorner = iconCorner iconCorner.CornerRadius
iconSzLock =
iconColorUseCustom =
iconApplyBusy =
updateIconStatusUI
applyIconStrokeState
applyIconShapeChoice
applySavedManagedIconPosition
bindManagedIconPositionSaver
bindManagedIconToggle
ensureManagedIcon
(button, clickCallback)
button (clickCallback) ~=
{ Disconnect = () }
clickTimeThreshold =
moveThreshold =
mouseDownTime =
isPointerDown =
startPosition =
maxMoveDistance =
connections = {}
(obj, signalName)
ok, signal = (()
obj[signalName]
)
ok signal
signal
(signal, fn)
signal
ok, conn = (()
signal:(fn)
)
ok conn
connections[#connections + ] = conn
(inputType)
inputType == .UserInputType.MouseButton1 inputType == .UserInputType.Touch
()
mouseDownTime =
isPointerDown =
startPosition =
maxMoveDistance =
(input)
isPointerDown =
mouseDownTime = ()
maxMoveDistance =
pos = input input.Position
startPosition = pos .(pos.X, pos.Y)
()
isPointerDown mouseDownTime ==
()
holdDuration = () - mouseDownTime
isClick = holdDuration < clickTimeThreshold maxMoveDistance <= moveThreshold
()
isClick
()
boundPress =
isGuiButton = (button.IsA) == button:()
isGuiButton
downSignal = (button, )
upSignal = (button, )
downBound = (downSignal, ()
()
)
upBound = (upSignal, ()
()
)
boundPress = downBound upBound
boundPress
beganSignal = (button, )
endedSignal = (button, )
beganBound = (beganSignal, (input)
input (input.UserInputType)
(input)
)
endedBound = (endedSignal, (input)
input (input.UserInputType)
()
)
boundPress = beganBound endedBound
changedSignal = (button, )
(changedSignal, (input)
isPointerDown
input.UserInputType ~= .UserInputType.MouseMovement input.UserInputType ~= .UserInputType.Touch
pos = input.Position
pos
startPosition
startPosition = .(pos.X, pos.Y)
currentPos = .(pos.X, pos.Y)
delta = (currentPos - startPosition).Magnitude
delta > maxMoveDistance
maxMoveDistance = delta
)
boundPress
{ Disconnect = () }
{
Disconnect = ()
_, conn connections
conn conn.Disconnect
conn:()
,
}
()
managedIcon.deltaGui
(managedIcon.deltaGui, , )
managedIcon.deltaBtn
(managedIcon.deltaBtn, , )
(managedIcon.deltaBtn, , )
(managedIcon.deltaBtn, , )
(managedIcon.deltaBtn, , )
managedIcon.deltaStroke
(managedIcon.deltaStroke, , )
()
prevIconGui = iconGui
prevIconBtn = iconBtn
ig, ib = ()
deltaChanged = ig ~= managedIcon.deltaGui ib ~= managedIcon.deltaBtn
managedIcon.deltaGui = ig
managedIcon.deltaBtn = ib
managedIcon.deltaStroke = managedIcon.deltaBtn
(
managedIcon.deltaBtn:()
managedIcon.deltaBtn:(, )
)
managedIcon.deltaCorner = managedIcon.deltaBtn
(
managedIcon.deltaBtn:()
managedIcon.deltaBtn:(, )
)
managedIcon.deltaGui managedIcon.deltaBtn
()
NAlib.()
managedIcon.deltaGui
NAlib.(
,
managedIcon.deltaGui:():(()
managedIcon.deltaGui.Enabled
()
)
)
NAlib.()
managedIcon.deltaBtn
NAlib.(
,
managedIcon.deltaBtn:():(()
managedIcon.deltaBtn.Visible
()
)
)
ensureManagedIcon
()
managedIcon.customBtn managedIcon.customBtn.Parent
iconGui = managedIcon.customGui
iconBtn = managedIcon.customBtn
iconStroke = managedIcon.customStroke
iconCorner = managedIcon.customCorner
iconGui = managedIcon.deltaGui
iconBtn = managedIcon.deltaBtn
iconStroke = managedIcon.deltaStroke
iconCorner = managedIcon.deltaCorner
changed = deltaChanged iconGui ~= prevIconGui iconBtn ~= prevIconBtn
iconBtn
changed iconBaseSize
iconBaseSize = iconBtn.Size
iconStroke iconColorUseCustom (changed iconBaseColor)
iconBaseColor = iconStroke.Color
iconCorner (changed iconBaseCorner)
iconBaseCorner = iconCorner.CornerRadius
changed applyIconStrokeState
.(applyIconStrokeState)
changed applyIconShapeChoice
.(applyIconShapeChoice)
changed applySavedManagedIconPosition
.(applySavedManagedIconPosition)
changed bindManagedIconPositionSaver
.(bindManagedIconPositionSaver)
changed bindManagedIconToggle
.(bindManagedIconToggle)
changed
()
(isfile) == (writefile) ==
()
(getcustomasset) ==
()
() ()
(s)
(s) ~=
s:()
(name)
(name) ~=
t = (name)
t = t:(, )
t = t:(, )
t = t:(, )
t = t:(, )
t ==
t
(path)
(path) ~=
n = path:(, )
n:()
(u)
(u) ~=
u:()
(u)
(u) ~=
t = (u)
t ==
t = t:(, )
q = t:()
base = q t:(, q - ) t
t, base
(u)
t, base = (u)
t
owner, repo, kind, rest = base:()
owner repo kind rest
s = rest
s:(, ) ==
s = s:()
s:(, ) ==
s = s:()
branch, path = s:()
branch path (kind == kind == )
branch = branch:(, )
path = path:(, )
.(, owner, repo, branch, path)
rawDir = base:()
rawDir
t
t
(path)
()
(isfolder) ==
ok, ex = (isfolder, path)
ok ex
(makefolder) ~=
okMk = (makefolder, path)
okMk ==
(path)
(path) ~= path ==
dir = path:(, ):()
dir dir ==
(dir)
writeJsonFile = (path, payload)
(HS ())
(path)
okEnc, enc = (()
__lt.(, , payload)
)
(okEnc (enc) == )
okW = (writefile, path, enc)
okW
(writefile, path, enc)
baseDir =
iconDir = baseDir ..
cfgPath = baseDir ..
dIcons = {
entries = {},
index = ,
enabled = ,
localPath = ,
assetId = ,
defaultImage = ,
pendingInput = ,
}
()
(baseDir)
(iconDir)
()
() HS
(isfolder) == (makefolder) ==
okB, exB = (isfolder, baseDir)
(okB exB)
(makefolder, baseDir)
(isfile) == (writefile) ==
(cfgPath)
(
writefile,
cfgPath,
__lt.(, , {
enabled = ,
assetId = ,
localPath = ,
index = ,
})
)
(isfile) ~= (readfile) ~=
(cfgPath)
ok, raw = (readfile, cfgPath)
(ok (raw) == )
okD, dec = (HS.JSONDecode, HS, raw)
(okD (dec) == )
(dec.enabled) ==
dIcons.enabled = dec.enabled
(dec.assetId) ==
dIcons.assetId = dec.assetId
(dec.localPath) ==
dIcons.localPath = dec.localPath
(dec.index) ==
dIcons.index = dec.index
()
() HS
payload = {
enabled = dIcons.enabled ,
assetId = (dIcons.assetId) == dIcons.assetId ,
localPath = (dIcons.localPath) == dIcons.localPath ,
index = (dIcons.index) ,
}
(cfgPath, payload)
()
dIcons.entries = {}
dIcons.index =
(() (listfiles) == )
()
ok, items = (listfiles, iconDir)
(ok (items) == )
list = {}
_, full items
n = (full)
n
list[#list + ] = { file = n }
dIcons.entries = list
(dIcons.localPath) == dIcons.localPath ~=
cur = (dIcons.localPath)
cur
i, e list
e.file == cur
dIcons.index = i
updateIconStatusUI
()
#list >
dIcons.index =
updateIconStatusUI
()
()
list = dIcons.entries
n = #list
n ==
n ==
(n) ..
(full)
() (full) ~= full ==
tried = {}
(path)
(path) ~= path == tried[path]
tried[path] =
okA, asset = (getcustomasset, path)
okA (asset) == asset ~=
asset
asset = (full)
asset
asset
slash = full:(, )
slash ~= full
asset = (slash)
asset
asset
back = full:(, )
back ~= full
asset = (back)
asset
asset
name = (full)
name
asset = (iconDir .. .. name) (iconDir .. .. name) (name)
asset
asset
(url, headers)
(url) ~= url ==
(hdr)
(rq) ~=
h = {}
(hdr) ==
k, v hdr
h[k] = v
h[] = h[]
h[] = h[]
ok, res = (rq, {
Url = url,
Method = ,
Headers = h,
})
ok res
code = res.StatusCode res.Status res.status_code
body = res.Body res.body
(code == (code >= code < )) (body) == body ~=
body
data = (headers)
(data) == data ~=
data
ok2, body2 = (()
:(url)
)
ok2 (body2) == body2 ~=
body2
()
(url)
()
,
()
,
norm = (url)
norm
,
data = (norm)
((data) == data ~= )
,
remote = (norm)
safe = (remote) .. (.()) ..
full = iconDir .. .. safe
okW, errW = (writefile, full, data)
okW
, errW
asset = (full)
asset
,
dIcons.localPath = full
list = dIcons.entries
idx
i, e list
e.file == safe
idx = i
idx
list[#list + ] = { file = safe }
idx = #list
dIcons.entries = list
dIcons.index = idx
updateIconStatusUI
()
, asset
()
()
iconBtn ( iconBtn:())
img
dIcons.enabled (dIcons.assetId) == dIcons.assetId ~=
img = dIcons.assetId
(dIcons.defaultImage) == dIcons.defaultImage ~=
img = dIcons.defaultImage
iconApplyBusy =
img img ~=
iconBtn.Image = img
iconApplyBusy =
iconBtn.Image =
iconApplyBusy =
(flag)
()
,
flag = flag
flag ( dIcons.assetId dIcons.assetId == )
,
dIcons.enabled = flag
()
()
(input, opts)
opts = opts {}
()
,
raw = (input) == input (input)
(raw) ~=
,
raw = (raw)
raw ==
,
digits = raw:() raw:() raw:()
newAsset
dIcons.localPath =
digits
newAsset = .. digits
okIcon, res = (raw)
okIcon
, res
newAsset = res
()
dIcons.assetId = newAsset
opts.autoEnable ~=
dIcons.enabled =
()
()
digits
, digits
, raw
(delta)
list = dIcons.entries
#list ==
delta = delta
idx = dIcons.index
idx < idx > #list
idx =
idx = (idx - + delta) % #list +
e = list[idx]
e e.file
full = iconDir .. .. e.file
() (isfile) ==
okEx, ex = (isfile, full)
(okEx ex)
()
asset = (full)
asset
dIcons.localPath = full
dIcons.assetId = asset
dIcons.index = idx
dIcons.enabled =
()
()
updateIconStatusUI
()
(name)
(name) ~= name ==
(() (delfile) == (isfile) == )
full = iconDir .. .. name
okEx, ex = (isfile, full)
okEx ex
(delfile, full)
(name)
(name) ~= name ==
full = iconDir .. .. name
dIcons.localPath == full
dIcons.localPath =
dIcons.assetId =
dIcons.index =
dIcons.enabled =
()
()
(entry)
(entry entry.file)
(entry.file)
(entry.file)
()
()
list = dIcons.entries {}
_, e list
e e.file
(e.file)
dIcons.entries = {}
dIcons.index =
dIcons.localPath =
dIcons.assetId =
dIcons.enabled =
()
()
()
ensureManagedIcon = ()
mainGui
managedIcon.customBtn
managedIcon.customBtn.Parent == mainGui
managedIcon.customGui = mainGui
managedIcon.customStroke = managedIcon.customBtn
(
managedIcon.customBtn:()
managedIcon.customBtn:(, )
)
managedIcon.customCorner = managedIcon.customBtn
(
managedIcon.customBtn:()
managedIcon.customBtn:(, )
)
(mainGui managedIcon.deltaGui managedIcon.deltaBtn)
()
btn = managedIcon.deltaBtn:()
btn.Name =
btn.Visible =
btn.Active =
btn.ImageTransparency = managedIcon.deltaBtn.ImageTransparency
btn.BackgroundTransparency = managedIcon.deltaBtn.BackgroundTransparency
btn.Parent = mainGui
managedIcon.customGui = mainGui
managedIcon.customBtn = btn
managedIcon.customStroke = btn:() btn:(, )
managedIcon.customCorner = btn:() btn:(, )
iconGui = managedIcon.customGui
iconBtn = managedIcon.customBtn
iconStroke = managedIcon.customStroke
iconCorner = managedIcon.customCorner
()
()
iconBtn (iconBtn.Image) == iconBtn.Image ~=
dIcons.defaultImage = iconBtn.Image
()
()
()
()
(dIcons.localPath) ~= dIcons.localPath ==
full = dIcons.localPath
okEx, ex = (isfile, full)
(okEx ex)
dIcons.localPath =
dIcons.assetId =
dIcons.enabled =
()
asset = (full)
asset
dIcons.assetId =
dIcons.enabled =
()
dIcons.assetId = asset
()
()
dIcons.enabled (dIcons.assetId) == dIcons.assetId ~=
()
()
NAlib.()
(iconBtn iconBtn:())
NAlib.(
,
iconBtn:():(()
iconApplyBusy
dIcons.enabled
(dIcons.assetId) ==
dIcons.assetId ~=
iconBtn.Image ~= dIcons.assetId
.(applyIcon)
)
)
()
changed = ()
iconBtn (iconBtn.Image) == iconBtn.Image ~=
(
dIcons.enabled
(dIcons.assetId) ==
dIcons.assetId ~=
iconBtn.Image == dIcons.assetId
)
dIcons.defaultImage = iconBtn.Image
()
changed dIcons.enabled (dIcons.assetId) == dIcons.assetId ~=
.(applyIcon)
()
NAlib.()
NAlib.(
,
root.ChildAdded:(()
.(refreshIconButtonState)
)
)
deltaIconApi = {
status = formatIconStatus,
setEnabled = setIconEnabled,
setAsset = setIconAsset,
cycle = cycleIcon,
scan = scanIcons,
removeEntry = removeIconEntry,
removeAll = removeAllIcons,
getButton = ()
()
iconBtn
,
rebindToggle = ()
bindManagedIconToggle
()
,
data = dIcons,
}
deltaEnv.DeltaIcon = deltaIconApi
__dcm_env.DeltaIcon = deltaIconApi
__dcm_shared.DeltaIcon = deltaIconApi
.(()
mainGui
mainGui = ()
mainGui
.()
mainGui
({
Title = ,
Description = ,
Duration = ,
})
(mainGui, , )
(mainGui)
NAlib.()
NAlib.(, mainGui.DescendantAdded:((d)
d d.Name ==
.(()
(mainGui)
)
))
execFrame = mainGui:()
(execFrame execFrame:())
({
Title = ,
Description = ,
Duration = ,
})
execImage = execFrame:()
(execImage execImage:())
({
Title = ,
Description = ,
Duration = ,
})
overlay = execImage:()
overlay
({
Title = ,
Description = ,
Duration = ,
})
sidebar = mainGui:(, )
toggleUIBtn = sidebar sidebar:(, )
activeColorValue = sidebar sidebar:()
inactiveColorValue = sidebar sidebar:()
darkOverlay = mainGui:()
sidebarGradient =
sidebarGrad1 =
sidebarGrad2 =
sidebarClosedPos = .(, , , )
sidebarOpenPos = .(, , , )
sidebarNormalizeBusy =
()
sidebarNormalizeBusy (sidebar sidebar:())
sidebarNormalizeBusy =
(()
sidebar.Size.Y.Scale ~= sidebar.Size.Y.Offset ~=
sidebar.Size = .(sidebar.Size.X.Scale, sidebar.Size.X.Offset, , )
sidebar.Position.Y.Scale ~= sidebar.Position.Y.Offset ~=
sidebar.Position = .(sidebar.Position.X.Scale, sidebar.Position.X.Offset, , )
)
sidebarNormalizeBusy =
(targetPos)
(sidebar sidebar:())
sidebar.Position = .(targetPos.X.Scale, targetPos.X.Offset, , )
sidebar sidebar:()
()
NAlib.()
NAlib.(
,
sidebar:():(()
.(normalizeSidebarGeometry)
)
)
NAlib.(
,
sidebar:():(()
.(normalizeSidebarGeometry)
)
)
iconGui iconGui:()
(iconGui, , )
iconBtn
(iconBtn, , )
uiLib.(iconBtn, iconBtn)
darkOverlay
(darkOverlay, , )
(darkOverlay, , )
NAlib.(
,
darkOverlay:():(()
darkOverlay.Visible =
)
)
settingsFrame
cand = mainGui:(, )
cand cand:() cand:()
settingsFrame = cand
settingsHolder = settingsFrame settingsFrame:()
settingTemplate
(key, payload)
(HS (writefile) == )
settingsConfig[key] = payload
(settingsPath, settingsConfig)
uiScaleState = {
object = ,
value = ,
refreshers = ({}, { __mode = }),
}
()
cam = .CurrentCamera
cam cam.ViewportSize.X > cam.ViewportSize.Y >
cam.ViewportSize
mainGui.AbsoluteSize
()
vp = ()
vp
()
uiScaleState.object uiScaleState.object.Parent == mainGui
uiScaleState.object
sc = mainGui:()
(sc sc:())
sc = .()
sc.Name =
sc.Parent = mainGui
uiScaleState.object = sc
sc
(v)
sc = ()
sc
(()
sc.Scale = .((v) , , )
)
.(()
_, delayTime { , , }
delayTime >
.(delayTime)
sf, refresh uiScaleState.refreshers
sf sf.Parent (refresh) ==
(refresh)
uiScaleState.refreshers[sf] =
)
uiScaleState.value = .()
uiScaleState.value.Name =
cfg = settingsConfig.InterfaceScale
def = ()
(cfg) == (cfg.value) ==
def = .(cfg.value, , )
uiScaleState.value.Value = def
(uiScaleState.value.Value)
(sf, fixRows, verticalOnly)
(sf sf:())
(()
sf.AutomaticCanvasSize = .AutomaticSize.None
sf.CanvasSize = .(, , , )
verticalOnly
sf.ScrollingDirection = .ScrollingDirection.Y
)
lay = sf:() sf:()
lay
id = .. sf:()
NAlib.(id)
boundVerticalGuis = ({}, { __mode = })
()
sc = uiScaleState uiScaleState.object
factor = sc (sc.Scale)
factor factor <=
factor =
factor
(gui)
cur = gui
cur cur ~= sf
cur:() cur.Visible
cur = cur.Parent
cur == sf
()
maxX =
maxY =
canvasPos = sf.CanvasPosition
uiScaleFactor = ()
verticalOnly
_, child sf:()
child:() (child)
relY = ((child.AbsolutePosition.Y - sf.AbsolutePosition.Y) / uiScaleFactor) + canvasPos.Y
maxY = math.max(maxY, relY + (child.AbsoluteSize.Y / uiScaleFactor))
for _, desc in child:QueryDescendants("GuiObject") do
if desc.Name == "Dropdown" and isVisibleInScroll(desc) then local dRelY = ((desc.AbsolutePosition.Y - sf.AbsolutePosition.Y) / uiScaleFactor) + canvasPos.Y
maxY = math.max(maxY, dRelY + (desc.AbsoluteSize.Y / uiScaleFactor))
end
end
end
end
else
for _, desc in sf:QueryDescendants("GuiObject") do
if isVisibleInScroll(desc) then local relX = ((desc.AbsolutePosition.X - sf.AbsolutePosition.X) / uiScaleFactor) + canvasPos.X
local relY = ((desc.AbsolutePosition.Y - sf.AbsolutePosition.Y) / uiScaleFactor) + canvasPos.Y
maxX = math.max(maxX, relX + (desc.AbsoluteSize.X / uiScaleFactor))
maxY = math.max(maxY, relY + (desc.AbsoluteSize.Y / uiScaleFactor))
end
end
end
return maxX, maxY
end
local function applyRows()
if not fixRows then
return
end
for _, ch in sf:GetChildren() do
if
ch:IsA("GuiObject")
and ch.Visible
and not ch:IsA("UIListLayout")
and not ch:IsA("UIGridLayout")
and not ch:IsA("UIPadding")
and ch.Name ~= "LT_SettingDropdown"
then
local s = ch.Size
if s.Y.Scale ~= 0 or s.Y.Offset ~= 50 then
ch.Size = UDim2.new(s.X.Scale, s.X.Offset, 0, 50)
end
end
end
end
local function upd()
if not __dcm_masterRuntime.alive or __dcm_masterRuntime.stopping then
return
end
applyRows()
local uiScaleFactor = getUiScaleFactor()
local size = lay.AbsoluteContentSize
local sizeX = size.X / uiScaleFactor
local sizeY = size.Y / uiScaleFactor
local x
local y
if verticalOnly then
local _, descY = descendantBounds()
x = 0
y = math.max(0, math.floor(math.max(sizeY + 12.5, descY + 12.5) + 0.5))
else
local descX, descY = descendantBounds()
x = math.max(0, math.floor(math.max(sizeX, descX) + 0.5))
y = math.max(0, math.floor(math.max(sizeY + 12.5, descY + 12.5) + 0.5))
end
pcall(function()
if verticalOnly then
sf.CanvasSize = UDim2.new(0, 0, 0, y)
else
sf.CanvasSize = UDim2.new(0, x, 0, y)
end
end)
end
uiScaleState.refreshers[sf] = upd
if verticalOnly then
local function bindVerticalGui(gui)
if not (gui and gui:IsA("GuiObject")) or boundVerticalGuis[gui] then
return
end
local isDirectChild = gui.Parent == sf
local isDropdownGui = gui.Name == "Dropdown" or gui.Name == "LT_SettingDropdown"
if not (isDirectChild or isDropdownGui) then
return
end
boundVerticalGuis[gui] = true
NAlib.connect(
id,
gui:GetPropertyChangedSignal("Visible"):Connect(function()
task.defer(upd)
end)
)
NAlib.connect(
id,
gui:GetPropertyChangedSignal("Size"):Connect(function()
task.defer(upd)
end)
)
NAlib.connect(
id,
gui:GetPropertyChangedSignal("Position"):Connect(function()
task.defer(upd)
end)
)
NAlib.connect(
id,
gui:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
task.defer(upd)
end)
)
end
local function bindVerticalRow(row)
if not (row and row:IsA("GuiObject")) then
return
end
bindVerticalGui(row)
for _, desc in row:QueryDescendants("GuiObject") do
if desc.Name == "Dropdown" then bindVerticalGui(desc)
end
end
NAlib.connect(
id,
row.DescendantAdded:Connect(function(desc)
if desc:IsA("GuiObject") and desc.Name == "Dropdown" then
bindVerticalGui(desc)
task.defer(upd)
end
end)
)
NAlib.connect(
id,
row.DescendantRemoving:Connect(function(desc)
if desc:IsA("GuiObject") and desc.Name == "Dropdown" then
task.defer(upd)
end
end)
)
end
for _, child in sf:GetChildren() do
bindVerticalRow(child)
end
upd()
NAlib.connect(id, lay:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(upd))
NAlib.connect(
id,
sf.DescendantAdded:Connect(function(desc)
if desc.Parent == sf then
bindVerticalRow(desc)
task.defer(upd)
end
end)
)
NAlib.connect(
id,
sf.DescendantRemoving:Connect(function()
task.defer(upd)
end)
)
NAlib.connect(
id,
sf:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
task.defer(upd)
end)
)
if uiScaleState and uiScaleState.object and uiScaleState.object.GetPropertyChangedSignal then
NAlib.connect(
id,
uiScaleState.object:GetPropertyChangedSignal("Scale"):Connect(function()
task.defer(upd)
end)
)
end
return
end
local function bindGui(gui)
if not (gui and gui:IsA("GuiObject")) then
return
end
NAlib.connect(
id,
gui:GetPropertyChangedSignal("Visible"):Connect(function()
task.defer(upd)
end)
)
NAlib.connect(
id,
gui:GetPropertyChangedSignal("Size"):Connect(function()
task.defer(upd)
end)
)
NAlib.connect(
id,
gui:GetPropertyChangedSignal("Position"):Connect(function()
task.defer(upd)
end)
)
NAlib.connect(
id,
gui:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
task.defer(upd)
end)
)
end
for _, desc in sf:QueryDescendants("Instance") do
bindGui(desc)
end
upd()
NAlib.connect(id, lay:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(upd))
NAlib.connect(
id,
sf.DescendantAdded:Connect(function(desc)
bindGui(desc)
task.defer(upd)
end)
)
NAlib.connect(
id,
sf.DescendantRemoving:Connect(function()
task.defer(upd)
end)
)
NAlib.connect(
id,
sf:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
task.defer(upd)
end)
)
if uiScaleState and uiScaleState.object and uiScaleState.object.GetPropertyChangedSignal then
NAlib.connect(
id,
uiScaleState.object:GetPropertyChangedSignal("Scale"):Connect(function()
task.defer(upd)
end)
)
end
end
local function mkDock(fr)
local d = Instance.new("Frame")
d.Name = "Dock"
d.BackgroundTransparency = 1
d.AnchorPoint = Vector2.new(1, 0.5)
d.Position = UDim2.new(1, -14, 0.5, 0)
d.Size = UDim2.new(0, 320, 0, 18)
d.Parent = fr
local l = Instance.new("UIListLayout")
l.FillDirection = Enum.FillDirection.Horizontal
l.HorizontalAlignment = Enum.HorizontalAlignment.Right
l.VerticalAlignment = Enum.VerticalAlignment.Center
l.Padding = UDim.new(0, 8)
l.Parent = d
return d
end
local function mkTog(par)
local t = Instance.new("TextButton")
t.Name = "Toggle"
t.Size = UDim2.new(0, 18, 0, 18)
t.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
t.BorderSizePixel = 0
t.Font = Enum.Font.GothamBold
t.TextSize = 11
t.TextColor3 = Color3.new(1, 1, 1)
t.Text = "C"
t.Parent = par
local c = Instance.new("UICorner")
c.CornerRadius = UDim.new(0, 4)
c.Parent = t
return t
end
local function mkBox(par)
local b = Instance.new("TextBox")
b.Name = "ValueBox"
b.Size = UDim2.new(0, 70, 0, 18)
b.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
b.BorderSizePixel = 0
b.ClearTextOnFocus = false
b.TextXAlignment = Enum.TextXAlignment.Center
b.Font = Enum.Font.Gotham
b.TextSize = 12
b.TextColor3 = Color3.new(1, 1, 1)
b.Parent = par
return b
end
local function mkSl(par, w)
local s = Instance.new("Frame")
s.Name = "Slider"
s.BackgroundTransparency = 1
s.Size = UDim2.new(0, w or 150, 0, 18)
s.Parent = par
local bar = Instance.new("Frame")
bar.Name = "Bar"
bar.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
bar.BorderSizePixel = 0
bar.AnchorPoint = Vector2.new(0.5, 0.5)
bar.Position = UDim2.new(0.5, 0, 0.5, 0)
bar.Size = UDim2.new(1, 0, 0, 6)
bar.Parent = s
local bc = Instance.new("UICorner")
bc.CornerRadius = UDim.new(0, 3)
bc.Parent = bar
local fill = Instance.new("Frame")
fill.Name = "Fill"
fill.BorderSizePixel = 0
fill.AnchorPoint = Vector2.new(0, 0.5)
fill.Position = UDim2.new(0, 0, 0.5, 0)
fill.Size = UDim2.new(0, 0, 1, 0)
fill.Parent = bar
local fc = Instance.new("UICorner")
fc.CornerRadius = UDim.new(0, 3)
fc.Parent = fill
local kb = Instance.new("Frame")
kb.Name = "Knob"
kb.Size = UDim2.new(0, 12, 0, 12)
kb.AnchorPoint = Vector2.new(0.5, 0.5)
kb.BackgroundColor3 = Color3.new(1, 1, 1)
kb.BorderSizePixel = 0
kb.Parent = bar
local kc = Instance.new("UICorner")
kc.CornerRadius = UDim.new(1, 0)
kc.Parent = kb
return s, bar, fill, kb
end
local customDropdownMenus = {}
local function closeCustomDropdowns(exceptMenu)
for i = #customDropdownMenus, 1, -1 do
local entry = customDropdownMenus[i]
local menu = type(entry) == "table" and entry.menu or entry
if not (menu and menu.Parent) then
table.remove(customDropdownMenus, i)
elseif menu ~= exceptMenu then
if type(entry) == "table" then
if type(entry.collapse) == "function" then
pcall(entry.collapse)
elseif entry.row and entry.row.Parent then
pcall(function()
menu.Visible = false
end)
local baseHeight = tonumber(entry.baseHeight) or 50
local s = entry.row.Size
entry.row.Size = UDim2.new(s.X.Scale, s.X.Offset, 0, baseHeight)
end
else
pcall(function()
menu.Visible = false
end)
end
end
end
end
if settingsHolder then
for _, c in settingsHolder:GetChildren() do
if c:IsA("Frame") and c.Name == "Button" then
settingTemplate = c
break
end
end
end
local hiddenStockDropdownTitles = {
["fps cap"] = true,
["icon size"] = true,
["icon color"] = true,
["icon shape"] = true,
}
local hiddenStockDropdownBound = setmetatable({}, { __mode = "k" })
local function enforceHiddenStockDropdownRow(child)
if not (child and child.Parent and child:IsA("Frame")) then
return
end
local size = child.Size
__dcm_setTracked(child, "Visible", false)
__dcm_setTracked(child, "Size", UDim2.new(size.X.Scale, size.X.Offset, 0, 0))
end
local function bindHiddenStockDropdownRow(child)
if not (child and child:IsA("Frame") and child.Name == "SettingDropdown") then
return
end
local title = child:FindFirstChild("Title", true)
local titleText = title and title:IsA("TextLabel") and string.lower(title.Text or "") or ""
if not hiddenStockDropdownTitles[titleText] then
return
end
enforceHiddenStockDropdownRow(child)
if not hiddenStockDropdownBound[child] then
hiddenStockDropdownBound[child] = true
local guardId = "HideManagedStockDropdownRows_" .. child:GetDebugId()
NAlib.disconnect(guardId)
NAlib.connect(
guardId,
child:GetPropertyChangedSignal("Visible"):Connect(function()
if child.Visible then
enforceHiddenStockDropdownRow(child)
end
end)
)
NAlib.connect(
guardId,
child:GetPropertyChangedSignal("Size"):Connect(function()
if child.Visible or child.Size.Y.Offset ~= 0 or child.Size.Y.Scale ~= 0 then
enforceHiddenStockDropdownRow(child)
end
end)
)
child.Destroying:Connect(function()
hiddenStockDropdownBound[child] = nil
NAlib.disconnect(guardId)
end)
end
end
local function hideManagedStockDropdownRows()
if not settingsHolder then
return
end
for _, child in settingsHolder:GetChildren() do
if child:IsA("Frame") then
bindHiddenStockDropdownRow(child)
end
end
end
if settingsHolder then
task.defer(hideManagedStockDropdownRows)
NAlib.disconnect("HideManagedStockDropdownRows")
NAlib.connect(
"HideManagedStockDropdownRows",
settingsHolder.ChildAdded:Connect(function(child)
task.defer(function()
bindHiddenStockDropdownRow(child)
end)
end)
)
end
if settingsHolder and settingTemplate then
local function makeSectionTitle(text, order, isCustom)
local f = __dcm_registerCustom(settingTemplate:Clone())
f.Name = isCustom and "Section_Customization" or "Section_Delta"
f.Parent = settingsHolder
f.LayoutOrder = order
for _, d in f:QueryDescendants("LocalScript") do
d:Destroy()
end
local btn = f:FindFirstChild("Button", true)
if btn then
btn:Destroy()
end
local tLabel = f:FindFirstChild("Title", true)
local dLabel = f:FindFirstChild("Desc", true)
local baseCol = isCustom and Color3.fromRGB(79, 164, 242) or Color3.fromRGB(112, 118, 132)
local fillCol = Color3.fromRGB(25, 28, 35)
local edgeCol = isCustom and Color3.fromRGB(88, 152, 223) or Color3.fromRGB(63, 68, 80)
f.BackgroundColor3 = fillCol
local outline = f:FindFirstChildWhichIsA("UIStroke", true)
if outline then
outline.Color = edgeCol
outline.Transparency = 0.34
outline.Thickness = 1
end
local panelGrad = f:FindFirstChildWhichIsA("UIGradient", true)
if panelGrad then
panelGrad.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(28, 31, 38)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(23, 25, 31)),
})
panelGrad.Rotation = 0
else
panelGrad = Instance.new("UIGradient")
panelGrad.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(28, 31, 38)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(23, 25, 31)),
})
panelGrad.Rotation = 0
panelGrad.Parent = f
end
if tLabel then
tLabel.Text = isCustom and "Customization" or "Delta settings"
tLabel.AnchorPoint = Vector2.new(0.5, 0.5)
tLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
tLabel.Size = UDim2.new(1, -32, 0, 18)
tLabel.TextColor3 = Color3.fromRGB(236, 240, 247)
tLabel.TextXAlignment = Enum.TextXAlignment.Center
tLabel.TextYAlignment = Enum.TextYAlignment.Center
if isCustom then
local textGrad = tLabel:FindFirstChildOfClass("UIGradient") or Instance.new("UIGradient")
textGrad.Color = ColorSequence.new({
ColorSequenceKeypoint.new(
0,
activeColorValue and activeColorValue.Value or Color3.fromRGB(79, 164, 242)
),
ColorSequenceKeypoint.new(0.5, Color3.fromRGB(235, 244, 255)),
ColorSequenceKeypoint.new(
1,
inactiveColorValue and inactiveColorValue.Value or Color3.fromRGB(63, 72, 92)
),
})
textGrad.Offset = Vector2.new(-0.8, 0)
textGrad.Parent = tLabel
local function refreshCustomSectionColors()
local activeCol = activeColorValue and activeColorValue.Value or Color3.fromRGB(79, 164, 242)
local inactiveCol = inactiveColorValue and inactiveColorValue.Value
or Color3.fromRGB(63, 72, 92)
textGrad.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, activeCol),
ColorSequenceKeypoint.new(0.5, Color3.fromRGB(235, 244, 255)),
ColorSequenceKeypoint.new(1, inactiveCol),
})
if panelGrad then
panelGrad.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, activeCol:Lerp(Color3.fromRGB(14, 16, 22), 0.74)),
ColorSequenceKeypoint.new(1, inactiveCol:Lerp(Color3.fromRGB(14, 16, 22), 0.8)),
})
end
end
refreshCustomSectionColors()
if activeColorValue then
activeColorValue:GetPropertyChangedSignal("Value"):Connect(refreshCustomSectionColors)
end
if inactiveColorValue then
inactiveColorValue:GetPropertyChangedSignal("Value"):Connect(refreshCustomSectionColors)
end
if TS then
local alive = true
f.Destroying:Connect(function()
alive = false
end)
local function animateTextGradient()
if not alive or not textGrad.Parent then
return
end
textGrad.Offset = Vector2.new(-0.8, 0)
local tw = TS:Create(
textGrad,
TweenInfo.new(1.7, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut),
{
Offset = Vector2.new(0.8, 0),
}
)
tw:Play()
tw.Completed:Connect(function()
if alive then
task.delay(0.12, animateTextGradient)
end
end)
end
local function animateBackground()
if not alive or not f.Parent then
return
end
local activeCol = activeColorValue and activeColorValue.Value
or Color3.fromRGB(79, 164, 242)
local inactiveCol = inactiveColorValue and inactiveColorValue.Value
or Color3.fromRGB(63, 72, 92)
local a = activeCol:Lerp(Color3.fromRGB(12, 14, 18), 0.78)
local b = inactiveCol:Lerp(Color3.fromRGB(12, 14, 18), 0.78)
local tw1 =
TS:Create(f, TweenInfo.new(1.25, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
BackgroundColor3 = a,
})
tw1:Play()
tw1.Completed:Connect(function()
if not alive or not f.Parent then
return
end
local tw2 = TS:Create(
f,
TweenInfo.new(1.25, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut),
{
BackgroundColor3 = b,
}
)
tw2:Play()
tw2.Completed:Connect(function()
if alive then
animateBackground()
end
end)
end)
end
animateTextGradient()
animateBackground()
end
end
end
if dLabel then
dLabel.Text = ""
dLabel.Visible = false
end
return f
end
makeSectionTitle("Customization", -3, true)
makeSectionTitle("Delta settings", -1, false)
end
if sidebar then
local existingGrad = sidebar:FindFirstChildOfClass("UIGradient")
local c1
local c2
if existingGrad then
local kps = existingGrad.Color.Keypoints
c1 = kps[1] and kps[1].Value or Color3.fromRGB(79, 164, 242)
c2 = kps[#kps] and kps[#kps].Value or Color3.fromRGB(28, 34, 46)
sidebarGradient = existingGrad
else
c1 = Color3.fromRGB(79, 164, 242)
c2 = Color3.fromRGB(28, 34, 46)
sidebarGradient = Instance.new("UIGradient")
sidebarGradient.Name = "DeltaCustomGradient"
sidebarGradient.Parent = sidebar
end
sidebarGradient.Rotation = 100
sidebarGradient.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, c1),
ColorSequenceKeypoint.new(1, c2),
})
sidebarGrad1 = Instance.new("Color3Value")
sidebarGrad1.Name = "SidebarGradientColor1"
sidebarGrad1.Value = c1
sidebarGrad2 = Instance.new("Color3Value")
sidebarGrad2.Name = "SidebarGradientColor2"
sidebarGrad2.Value = c2
local sidebarSnapPending = false
NAlib.disconnect("Sidebar_OvershootSnap")
NAlib.connect(
"Sidebar_OvershootSnap",
(sidebar:GetPropertyChangedSignal("Position")):Connect(function()
local p = sidebar.Position
if p.X.Scale > sidebarOpenPos.X.Scale and not sidebarSnapPending then
sidebarSnapPending = true
task.spawn(function()
local last = p
local stable = 0
local step = 0.05
while stable < 0.1 do
task.wait(step)
local cur = sidebar.Position
if cur ~= last then
last = cur
stable = 0
else
stable += step
end
end
sidebarSnapPending = false
if sidebar.Parent and sidebar.Position.X.Scale > sidebarOpenPos.X.Scale then
setSidebarPosition(sidebarClosedPos)
normalizeSidebarGeometry()
end
end)
end
end)
)
end
local iconColorValue
if iconStroke then
iconColorValue = Instance.new("Color3Value")
iconColorValue.Name = "IconColorValue"
iconColorValue.Value = iconBaseColor or iconStroke.Color
NAlib.connect(
"IconColorValue_Changed",
iconColorValue.Changed:Connect(function()
if not iconColorUseCustom then
return
end
pcall(function()
iconStroke.Color = iconColorValue.Value
end)
end)
)
end
local iconSizeValue
if iconBtn and iconBaseSize then
iconSizeValue = Instance.new("NumberValue")
iconSizeValue.Name = "IconSizeValue"
iconSizeValue.Value = 1
local sizeCfg = settingsConfig.IconSize
if type(sizeCfg) == "table" and type(sizeCfg.value) == "number" then
iconSizeValue.Value = math.clamp(sizeCfg.value, 0.5, 5)
end
local function applyIconSize(v)
v = math.clamp(v, 0.5, 5)
if not iconBtn or not iconBaseSize then
return
end
iconSzLock = true
iconBtn.Size = UDim2.new(
iconBaseSize.X.Scale * v,
iconBaseSize.X.Offset * v,
iconBaseSize.Y.Scale * v,
iconBaseSize.Y.Offset * v
)
iconSzLock = false
end
if iconBtn and iconBtn.GetPropertyChangedSignal and mainGui and mainGui.GetPropertyChangedSignal then
NAlib.connect(
"IconSizeRebase",
(mainGui:GetPropertyChangedSignal("AbsoluteSize")):Connect(function()
task.defer(function()
if iconBtn and iconSizeValue and not iconSzLock then
local v = math.clamp(iconSizeValue.Value, 0.5, 5)
local s = iconBtn.Size
iconBaseSize = UDim2.new(s.X.Scale / v, s.X.Offset / v, s.Y.Scale / v, s.Y.Offset / v)
applyIconSize(v)
end
end)
end)
)
end
NAlib.connect(
"IconSizeValue_Changed",
iconSizeValue.Changed:Connect(function()
applyIconSize(iconSizeValue.Value)
if HS and type(writefile) == "function" then
settingsConfig.IconSize = { value = math.clamp(iconSizeValue.Value, 0.5, 5) }
writeJsonFile(settingsPath, settingsConfig)
end
end)
)
applyIconSize(iconSizeValue.Value)
end
local function ensureIconCorner()
refreshIconRefs()
if not iconBtn then
return nil
end
if not iconCorner then
iconCorner = Instance.new("UICorner")
iconCorner.Name = "DeltaIconCorner"
iconCorner.Parent = iconBtn
end
if not iconBaseCorner then
iconBaseCorner = iconCorner.CornerRadius
end
return iconCorner
end
local iconShapeName = "Squircle"
do
local cfg = settingsConfig.IconShape
if type(cfg) == "table" and type(cfg.name) == "string" and cfg.name ~= "" then
iconShapeName = cfg.name
end
end
if iconShapeName == "Default" then
iconShapeName = "Squircle"
elseif iconShapeName == "Pill" then
iconShapeName = "Circle"
end
local function getIconShapeCorner(shapeName)
if shapeName == "Square" then
return UDim.new(0, 0)
elseif shapeName == "Rounded" then
return UDim.new(0, 8)
elseif shapeName == "Squircle" then
return UDim.new(0, 12)
elseif shapeName == "Circle" then
return UDim.new(1, 0)
end
return UDim.new(0, 12)
end
applyIconShapeChoice = function()
local corner = ensureIconCorner()
if not corner then
return
end
pcall(function()
corner.CornerRadius = getIconShapeCorner(iconShapeName)
end)
end
task.defer(applyIconShapeChoice)
local iconRgbSpeedValue
if iconStroke then
iconRgbSpeedValue = Instance.new("NumberValue")
iconRgbSpeedValue.Name = "IconRgbSpeedValue"
local sp = 0.2
local spCfg = settingsConfig.IconRgbSpeed
if type(spCfg) == "table" and type(spCfg.value) == "number" then
sp = math.clamp(spCfg.value, 0.05, 2)
end
iconRgbSpeedValue.Value = sp
end
local iconVisible = true
do
local cfg = settingsConfig.IconVisible
if type(cfg) == "table" and cfg.enabled ~= nil then
iconVisible = cfg.enabled and true or false
end
end
local iconPositionSaveEnabled = false
do
local cfg = settingsConfig.IconPositionSave
if type(cfg) == "table" and cfg.enabled ~= nil then
iconPositionSaveEnabled = cfg.enabled and true or false
end
end
local iconStrokeUserEnabled = true
do
local cfg = settingsConfig.IconStrokeEnabled
if type(cfg) == "table" and cfg.enabled ~= nil then
iconStrokeUserEnabled = cfg.enabled and true or false
end
end
local iconForcedHidden = false
local tabNotifEnabled = true
do
local cfg = settingsConfig.TabNotifications
if type(cfg) == "table" and cfg.enabled ~= nil then
tabNotifEnabled = cfg.enabled and true or false
end
end
local function tweenIconVisual(imgT, bgT, instant)
if not iconBtn then
return
end
if imgT < 1 or bgT < 1 then
pcall(function()
iconBtn.Visible = true
end)
end
if TS and not instant then
pcall(function()
(__lt.cm(
"TweenService",
"Create",
iconBtn,
TweenInfo.new(0.18, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{
ImageTransparency = imgT,
BackgroundTransparency = bgT,
}
)):Play()
end)
else
pcall(function()
iconBtn.ImageTransparency = imgT
iconBtn.BackgroundTransparency = bgT
end)
end
end
local function updateManagedIconDisplay(instant)
if not iconBtn then
return
end
local shouldShow = iconVisible and not iconForcedHidden
pcall(function()
iconBtn.Active = true
end)
pcall(function()
iconBtn.Interactable = true
end)
if shouldShow then
pcall(function()
iconBtn.Visible = true
end)
tweenIconVisual(0, 0, instant)
else
if not iconForcedHidden then
pcall(function()
iconBtn.Visible = true
end)
end
tweenIconVisual(1, 1, instant)
if iconForcedHidden then
local stamp = tick()
task.delay(instant and 0 or 0.2, function()
if not iconBtn or not iconBtn.Parent then
return
end
if stamp and not iconForcedHidden then
return
end
pcall(function()
iconBtn.Visible = false
end)
end)
end
end
applyIconStrokeState()
end
applyIconStrokeState = function()
if not iconStroke then
return
end
pcall(function()
iconStroke.Enabled = iconVisible and iconStrokeUserEnabled and not iconForcedHidden
end)
end
local function saveManagedIconPosition()
if not (iconPositionSaveEnabled and iconBtn and iconBtn.Parent) then
return
end
saveSettingsEntry("IconPosition", {
xScale = iconBtn.Position.X.Scale,
xOffset = iconBtn.Position.X.Offset,
yScale = iconBtn.Position.Y.Scale,
yOffset = iconBtn.Position.Y.Offset,
})
end
applySavedManagedIconPosition = function()
if not (iconPositionSaveEnabled and iconBtn and iconBtn.Parent) then
return
end
local cfg = settingsConfig.IconPosition
if type(cfg) ~= "table" then
return
end
local xs = tonumber(cfg.xScale)
local xo = tonumber(cfg.xOffset)
local ys = tonumber(cfg.yScale)
local yo = tonumber(cfg.yOffset)
if xs and xo and ys and yo then
pcall(function()
iconBtn.Position = UDim2.new(xs, xo, ys, yo)
end)
end
end
bindManagedIconPositionSaver = function()
NAlib.disconnect("ManagedIcon_PositionSave")
if not (iconBtn and iconBtn.Parent) then
return
end
local stamp = 0
NAlib.connect(
"ManagedIcon_PositionSave",
iconBtn:GetPropertyChangedSignal("Position"):Connect(function()
if not iconPositionSaveEnabled then
return
end
stamp += 1
local cur = stamp
task.delay(0.2, function()
if cur == stamp then
saveManagedIconPosition()
end
end)
end)
)
end
local function applyIconUserVisibility(instant)
updateManagedIconDisplay(instant)
end
local function setIconForcedHidden(hidden)
iconForcedHidden = hidden and true or false
if not iconBtn then
return
end
updateManagedIconDisplay(false)
end
task.defer(function()
applySavedManagedIconPosition()
bindManagedIconPositionSaver()
end)
applyIconUserVisibility(true)
local scriptHubHolder
local homeHolder
do
local sh = mainGui:FindFirstChild("Scripthub")
if sh then
scriptHubHolder = sh:FindFirstChild("Holder")
end
local ho = mainGui:FindFirstChild("Home")
if ho then
homeHolder = ho:FindFirstChild("Holder")
end
end
setupAutoScroll(settingsHolder, true, true)
setupAutoScroll(scriptHubHolder, false, false)
setupAutoScroll(homeHolder, true, true)
local function makeColorSlider(id, tt, dt, cVal)
if not (settingsHolder and settingTemplate and cVal) then
return
end
local key = id or tt or "Color_" .. tostring(math.random(1, 1000000000))
local slId = "ColorSlider_" .. key
local isIc = id == "IconColor" and iconStroke ~= nil
local fr = __dcm_registerCustom(settingTemplate:Clone())
fr.Parent = settingsHolder
fr.Visible = true
fr.LayoutOrder = -2
for _, d in fr:QueryDescendants("LocalScript") do
d:Destroy()
end
local tL = fr:FindFirstChild("Title", true)
local dL = fr:FindFirstChild("Desc", true)
if tL then
tL.Text = tt
end
if dL then
dL.Text = dt
end
local ob = fr:FindFirstChild("Button", true)
local ord = 0
if ob then
ord = ob.LayoutOrder
ob:Destroy()
end
local pad = 14
local vbW = 74
local tgW = 20
local slW = 190
local sl = Instance.new("Frame")
sl.Name = "ColorSlider"
sl.BackgroundTransparency = 1
sl.Size = UDim2.new(0, slW, 1, 0)
sl.AnchorPoint = Vector2.new(1, 0.5)
sl.LayoutOrder = ord
sl.Parent = fr
local vb = Instance.new("TextBox")
vb.Name = "ColorValue"
vb.Size = UDim2.new(0, vbW, 0, 18)
vb.AnchorPoint = Vector2.new(1, 0.5)
vb.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
vb.BorderSizePixel = 0
vb.ClearTextOnFocus = false
vb.TextXAlignment = Enum.TextXAlignment.Center
vb.Font = Enum.Font.Gotham
vb.TextSize = 12
vb.TextColor3 = Color3.new(1, 1, 1)
vb.Parent = fr
local tg = Instance.new("TextButton")
tg.Name = "Toggle"
tg.Size = UDim2.new(0, tgW, 0, 18)
tg.AnchorPoint = Vector2.new(1, 0.5)
tg.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
tg.BorderSizePixel = 0
tg.Font = Enum.Font.GothamBold
tg.TextSize = 11
tg.TextColor3 = Color3.new(1, 1, 1)
tg.Text = "C"
tg.Parent = fr
local tgc = Instance.new("UICorner")
tgc.CornerRadius = UDim.new(0, 4)
tgc.Parent = tg
local function lay()
local y = 0.5
vb.Position = UDim2.new(1, -pad, y, 0)
tg.Position = UDim2.new(1, -(pad + vbW + 8), y, 0)
sl.Position = UDim2.new(1, -(pad + vbW + 8 + tgW + 8), y, 0)
end
lay();
(fr:GetPropertyChangedSignal("AbsoluteSize")):Connect(lay)
local function mkBar(nm, yy)
local b = Instance.new("Frame")
b.Name = nm
b.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
b.BorderSizePixel = 0
b.AnchorPoint = Vector2.new(0.5, 0)
b.Position = UDim2.new(0.5, 0, yy, 0)
b.Size = UDim2.new(1, 0, 0, 5)
b.Active = true
b.Parent = sl
local bc = Instance.new("UICorner")
bc.CornerRadius = UDim.new(0, 3)
bc.Parent = b
local k = Instance.new("Frame")
k.Name = "Knob"
k.Size = UDim2.new(0, 9, 0, 9)
k.AnchorPoint = Vector2.new(0.5, 0.5)
k.Position = UDim2.new(0, 0, 0.5, 0)
k.BackgroundColor3 = Color3.new(1, 1, 1)
k.BorderSizePixel = 0
k.Parent = b
local kc = Instance.new("UICorner")
kc.CornerRadius = UDim.new(1, 0)
kc.Parent = k
return b, k
end
local bH, kH = mkBar("Hue", 0.2)
local bS, kS = mkBar("Sat", 0.5)
local bV, kV = mkBar("Val", 0.8)
local gH = Instance.new("UIGradient")
gH.Rotation = 0
gH.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)),
ColorSequenceKeypoint.new(0.17, Color3.fromRGB(255, 255, 0)),
ColorSequenceKeypoint.new(0.33, Color3.fromRGB(0, 255, 0)),
ColorSequenceKeypoint.new(0.5, Color3.fromRGB(0, 255, 255)),
ColorSequenceKeypoint.new(0.67, Color3.fromRGB(0, 0, 255)),
ColorSequenceKeypoint.new(0.83, Color3.fromRGB(255, 0, 255)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 0, 0)),
})
gH.Parent = bH
local gS = Instance.new("UIGradient")
gS.Rotation = 0
gS.Parent = bS
local gV = Instance.new("UIGradient")
gV.Rotation = 0
gV.Parent = bV
local defC = cVal.Value or Color3.new(1, 1, 1)
local cOn = true
local lastC = defC
local sv = colorConfig[key]
if type(sv) == "table" then
if type(sv.customColor) == "table" and #sv.customColor == 3 then
lastC = Color3.new(sv.customColor[1], sv.customColor[2], sv.customColor[3])
end
if sv.useCustom ~= nil then
cOn = sv.useCustom and true or false
end
end
local h, s, v = Color3.toHSV(lastC)
local function boxC(c)
vb.Text = string.format(
"%d,%d,%d",
math.floor(c.R * 255 + 0.5),
math.floor(c.G * 255 + 0.5),
math.floor(c.B * 255 + 0.5)
)
end
local function save()
if not (HS and type(writefile) == "function") then
return
end
colorConfig[key] = {
useCustom = cOn,
customColor = { lastC.R, lastC.G, lastC.B },
}
writeJsonFile(colorsPath, colorConfig)
end
local function updGrad()
gS.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromHSV(h, 0, v)),
ColorSequenceKeypoint.new(1, Color3.fromHSV(h, 1, v)),
})
gV.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromHSV(h, s, 0)),
ColorSequenceKeypoint.new(1, Color3.fromHSV(h, s, 1)),
})
end
local function setVis()
kH.Position = UDim2.new(h, 0, 0.5, 0)
kS.Position = UDim2.new(s, 0, 0.5, 0)
kV.Position = UDim2.new(v, 0, 0.5, 0)
updGrad()
boxC(Color3.fromHSV(h, s, v))
end
local function applyC(col, st)
if cVal then
cVal.Value = col
end
if st then
lastC = col
end
save()
end
local function setHSV(nh, ns, nv, st)
h = math.clamp(nh, 0, 1)
s = math.clamp(ns, 0, 1)
v = math.clamp(nv, 0, 1)
setVis()
applyC(Color3.fromHSV(h, s, v), st)
end
local function syncFromC(col)
h, s, v = Color3.toHSV(col)
setVis()
end
if cOn then
if isIc then
iconColorUseCustom = true
end
syncFromC(lastC)
applyC(lastC, false)
tg.Text = "C"
else
if isIc then
iconColorUseCustom = false
if iconStroke then
pcall(function()
iconStroke.Color = iconBaseColor or iconStroke.Color
end)
end
end
syncFromC(defC)
applyC(defC, false)
tg.Text = "D"
end
local drag = nil
local function relX(bar, inp)
local w = bar.AbsoluteSize.X
if w <= 1 then
return nil
end
local x = (inp.Position.X - bar.AbsolutePosition.X) / w
if x ~= x then
x = 0
end
return math.clamp(x, 0, 1)
end
local function useDrag(inp)
if not drag then
return
end
local a = relX(drag, inp)
if not a then
return
end
cOn = true
tg.Text = "C"
if isIc then
iconColorUseCustom = true
end
if drag == bH then
setHSV(a, s, v, true)
elseif drag == bS then
setHSV(h, a, v, true)
elseif drag == bV then
setHSV(h, s, a, true)
end
end
local function beg(bar, inp)
if
inp.UserInputType ~= Enum.UserInputType.MouseButton1
and inp.UserInputType ~= Enum.UserInputType.Touch
then
return
end
drag = bar
useDrag(inp)
end
bH.InputBegan:Connect(function(i)
beg(bH, i)
end)
bS.InputBegan:Connect(function(i)
beg(bS, i)
end)
bV.InputBegan:Connect(function(i)
beg(bV, i)
end)
NAlib.disconnect(slId)
NAlib.connect(
slId,
UIS.InputChanged:Connect(function(i)
if not drag then
return
end
if
i.UserInputType == Enum.UserInputType.MouseMovement
or i.UserInputType == Enum.UserInputType.Touch
then
useDrag(i)
end
end)
)
NAlib.connect(
slId,
UIS.InputEnded:Connect(function(i)
if
i.UserInputType == Enum.UserInputType.MouseButton1
or i.UserInputType == Enum.UserInputType.Touch
then
drag = nil
end
end)
)
fr.Destroying:Connect(function()
NAlib.disconnect(slId)
end)
vb.FocusLost:Connect(function()
local txt = vb.Text or ""
local r, g, b = txt:match("(%d+)%s*,%s*(%d+)%s*,%s*(%d+)")
r, g, b = tonumber(r), tonumber(g), tonumber(b)
if r and g and b then
local col =
Color3.new(math.clamp(r, 0, 255) / 255, math.clamp(g, 0, 255) / 255, math.clamp(b, 0, 255) / 255)
cOn = true
tg.Text = "C"
if isIc then
iconColorUseCustom = true
end
syncFromC(col)
applyC(col, true)
else
boxC(cVal.Value)
end
end)
tg.MouseButton1Click:Connect(function()
if cOn then
cOn = false
tg.Text = "D"
if isIc then
iconColorUseCustom = false
if iconStroke then
pcall(function()
iconStroke.Color = iconBaseColor or iconStroke.Color
end)
end
end
syncFromC(defC)
applyC(defC, false)
else
cOn = true
tg.Text = "C"
if isIc then
iconColorUseCustom = true
end
syncFromC(lastC or defC)
applyC(lastC or defC, true)
end
save()
end)
end
local function makeSizeSlider(id, titleText, descText, numValue, minV, maxV, opts)
if not (settingsHolder and settingTemplate and numValue) then
return
end
opts = type(opts) == "table" and opts or {}
local key = id or titleText or "Size_" .. tostring(math.random(1, 1000000000))
local slId = "SizeSlider_" .. key
minV = minV or 0.5
maxV = maxV or 5
local fr = __dcm_registerCustom(settingTemplate:Clone())
fr.Parent = settingsHolder
fr.Visible = true
fr.LayoutOrder = -2
local tl = fr:FindFirstChild("Title", true)
local dl = fr:FindFirstChild("Desc", true)
if tl then
tl.Text = titleText
end
if dl then
dl.Text = descText
end
local ob = fr:FindFirstChild("Button", true)
if ob then
ob:Destroy()
end
local dock = mkDock(fr)
local vb = mkBox(dock)
local sl, bar, fill, kb = mkSl(dock, 150)
local sv = settingsConfig[key]
if type(sv) == "table" and type(sv.value) == "number" then
numValue.Value = math.clamp(sv.value, minV, maxV)
end
local function save(v)
if opts.persist == false then
return
end
if not (HS and type(writefile) == "function") then
return
end
settingsConfig[key] = { value = v }
writeJsonFile(settingsPath, settingsConfig)
end
local function setVis(v)
if opts.integer then
v = math.floor((tonumber(v) or minV) + 0.5)
end
v = math.clamp(v, minV, maxV)
local denom = maxV - minV
local a = denom ~= 0 and ((v - minV) / denom) or 0
fill.Size = UDim2.new(a, 0, 1, 0)
kb.Position = UDim2.new(a, 0, 0.5, 0)
vb.Text = opts.integer and tostring(v) or string.format("%.2f", v)
end
local function commit(v)
if opts.integer then
v = math.floor((tonumber(v) or minV) + 0.5)
end
v = math.clamp(v, minV, maxV)
numValue.Value = v
setVis(v)
save(v)
if type(opts.apply) == "function" then
pcall(opts.apply, v)
end
end
setVis(numValue.Value)
local drag = false
local pendingValue = numValue.Value
local function fromIn(input)
local rel = 0
pcall(function()
rel = (input.Position.X - bar.AbsolutePosition.X) / bar.AbsoluteSize.X
end)
rel = math.clamp(rel, 0, 1)
local nextV = minV + (maxV - minV) * rel
if opts.integer then
nextV = math.floor(nextV + 0.5)
end
if opts.applyOnRelease then
pendingValue = nextV
setVis(nextV)
else
commit(nextV)
end
end
bar.InputBegan:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
drag = true
fromIn(input)
end
end)
NAlib.disconnect(slId)
NAlib.connect(
slId,
UIS.InputChanged:Connect(function(input)
if not drag then
return
end
if
input.UserInputType == Enum.UserInputType.MouseMovement
or input.UserInputType == Enum.UserInputType.Touch
then
fromIn(input)
end
end)
)
NAlib.connect(
slId,
UIS.InputEnded:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
if drag and opts.applyOnRelease then
commit(pendingValue)
end
drag = false
end
end)
)
fr.Destroying:Connect(function()
NAlib.disconnect(slId)
end)
vb.FocusLost:Connect(function()
local v = tonumber(vb.Text or "")
if v then
commit(v)
else
setVis(numValue.Value)
end
end)
local function updDock()
local w = math.clamp(math.floor(fr.AbsoluteSize.X * 0.46), 240, 380)
dock.Size = UDim2.new(0, w, 0, 18)
local sw = math.clamp(w - 78, 140, 280)
sl.Size = UDim2.new(0, sw, 0, 18)
end
updDock()
fr:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
task.defer(updDock)
end)
end
local function makeEnumDropdown(id, titleText, descText, enumItems, getCurrentName, setSelectedName, opts)
if not (settingsHolder and settingTemplate and type(setSelectedName) == "function") then
return
end
opts = type(opts) == "table" and opts or {}
local names = {}
for _, item in enumItems or {} do
if typeof(item) == "EnumItem" then
names[#names + 1] = item.Name
elseif type(item) == "string" and item ~= "" then
names[#names + 1] = item
end
end
if #names == 0 then
return
end
local baseHeight = 50
local fr = Instance.new("Frame")
fr.Name = "LT_SettingDropdown"
fr.Parent = settingsHolder
fr.Visible = true
fr.LayoutOrder = -2
fr.BackgroundTransparency = 1
fr.BorderSizePixel = 0
fr.ClipsDescendants = false
fr.Size = UDim2.new(1, 0, 0, baseHeight)
local card = __dcm_registerCustom(settingTemplate:Clone())
card.Name = "Card"
card.Parent = fr
card.Visible = true
card.Size = UDim2.new(1, 0, 0, baseHeight)
card.Position = UDim2.new(0, 0, 0, 0)
for _, d in card:QueryDescendants("LocalScript") do
d:Destroy()
end
local tl = card:FindFirstChild("Title", true)
local dl = card:FindFirstChild("Desc", true)
if tl then
tl.Text = titleText
tl.TextScaled = false
tl.TextWrapped = false
tl.TextTruncate = Enum.TextTruncate.AtEnd
tl.TextYAlignment = Enum.TextYAlignment.Center
end
if dl then
dl.Text = descText
dl.TextScaled = false
dl.TextWrapped = false
dl.TextTruncate = Enum.TextTruncate.AtEnd
dl.TextYAlignment = Enum.TextYAlignment.Center
end
local ob = card:FindFirstChild("Button", true)
if ob then
ob:Destroy()
end
local dock = mkDock(card)
local dockLayout = dock:FindFirstChildWhichIsA("UIListLayout")
if dockLayout then
dockLayout:Destroy()
end
dock.Size = UDim2.new(0, 168, 0, 30)
local openBg = Instance.new("Frame")
openBg.Name = "DropdownBackground"
openBg.AnchorPoint = Vector2.new(1, 0.5)
openBg.Position = UDim2.new(1, 0, 0.5, 0)
openBg.Size = UDim2.new(1, 0, 1, 0)
openBg.BackgroundColor3 = Color3.fromRGB(39, 42, 52)
openBg.BorderSizePixel = 0
openBg.ZIndex = 25
openBg.Parent = dock
local openBgCorner = Instance.new("UICorner")
openBgCorner.CornerRadius = UDim.new(0, 12)
openBgCorner.Parent = openBg
local openBtn = Instance.new("TextButton")
openBtn.Name = "DropdownButton"
openBtn.Size = UDim2.new(1, 0, 1, 0)
openBtn.BackgroundTransparency = 1
openBtn.BorderSizePixel = 0
openBtn.AutoButtonColor = false
openBtn.Font = Enum.Font.GothamBold
openBtn.TextSize = 12
openBtn.TextColor3 = Color3.fromRGB(164, 169, 182)
openBtn.TextXAlignment = Enum.TextXAlignment.Right
openBtn.ZIndex = 27
openBtn.Parent = dock
local openPad = Instance.new("UIPadding")
openPad.PaddingLeft = UDim.new(0, 8)
openPad.PaddingRight = UDim.new(0, 30)
openPad.Parent = openBtn
local arrow = Instance.new("Frame")
arrow.Name = "Arrow"
arrow.BackgroundTransparency = 1
arrow.AnchorPoint = Vector2.new(1, 0.5)
arrow.Position = UDim2.new(1, -8, 0.5, 0)
arrow.Size = UDim2.new(0, 12, 0, 18)
arrow.ZIndex = 28
arrow.Parent = dock
local arrowLayout = Instance.new("UIListLayout")
arrowLayout.FillDirection = Enum.FillDirection.Vertical
arrowLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
arrowLayout.VerticalAlignment = Enum.VerticalAlignment.Center
arrowLayout.Padding = UDim.new(0, 0)
arrowLayout.Parent = arrow
local upArrow = Instance.new("TextLabel")
upArrow.Name = "Up"
upArrow.BackgroundTransparency = 1
upArrow.Size = UDim2.new(1, 0, 0, 9)
upArrow.Font = Enum.Font.GothamBold
upArrow.TextSize = 9
upArrow.TextColor3 = Color3.fromRGB(104, 110, 124)
upArrow.Text = "^"
upArrow.ZIndex = 28
upArrow.Parent = arrow
local downArrow = Instance.new("TextLabel")
downArrow.Name = "Down"
downArrow.BackgroundTransparency = 1
downArrow.Size = UDim2.new(1, 0, 0, 9)
downArrow.Font = Enum.Font.GothamBold
downArrow.TextSize = 9
downArrow.TextColor3 = Color3.fromRGB(160, 166, 180)
downArrow.Text = "v"
downArrow.ZIndex = 28
downArrow.Parent = arrow
local menu = Instance.new("ScrollingFrame")
menu.Name = "Dropdown"
menu.AnchorPoint = Vector2.new(1, 0)
menu.Position = UDim2.new(1, -14, 0, baseHeight + 6)
menu.Size = UDim2.new(0, 168, 0, math.min(132, #names * 30 + 8))
menu.Visible = false
menu.BackgroundColor3 = Color3.fromRGB(43, 47, 58)
menu.BorderSizePixel = 0
menu.ScrollBarThickness = 3
menu.ScrollingDirection = Enum.ScrollingDirection.Y
menu.CanvasSize = UDim2.new(0, 0, 0, 0)
menu.AutomaticCanvasSize = Enum.AutomaticSize.Y
menu.ZIndex = 26
menu.Parent = fr
local menuCorner = Instance.new("UICorner")
menuCorner.CornerRadius = UDim.new(0, 10)
menuCorner.Parent = menu
local menuPad = Instance.new("UIPadding")
menuPad.PaddingTop = UDim.new(0, 4)
menuPad.PaddingBottom = UDim.new(0, 4)
menuPad.PaddingLeft = UDim.new(0, 12)
menuPad.PaddingRight = UDim.new(0, 12)
menuPad.Parent = menu
local menuLayout = Instance.new("UIListLayout")
menuLayout.Padding = UDim.new(0, 0)
menuLayout.SortOrder = Enum.SortOrder.LayoutOrder
menuLayout.Parent = menu
local dropdownEntry = {
menu = menu,
row = fr,
baseHeight = baseHeight,
}
table.insert(customDropdownMenus, dropdownEntry)
local selectedName
local optionButtons = {}
local hover = false
local dropdownOpen = false
local function getDropdownScale()
local sc = uiScaleState and uiScaleState.object
local factor = sc and tonumber(sc.Scale) or 1
if not factor or factor <= 0 then
factor = 1
end
return factor
end
local function syncExpandedHeight()
local s = fr.Size
local menuLogicalHeight = menu.Size.Y.Offset
local uiScaleFactor = getDropdownScale()
if menu.AbsoluteSize.Y > 0 then
menuLogicalHeight = math.max(menuLogicalHeight, math.floor((menu.AbsoluteSize.Y / uiScaleFactor) + 0.5))
end
local expandedHeight = baseHeight + menuLogicalHeight + 6
fr.Size = UDim2.new(s.X.Scale, s.X.Offset, 0, dropdownOpen and expandedHeight or baseHeight)
end
local function setExpanded(open)
dropdownOpen = open and true or false
menu.Visible = dropdownOpen
upArrow.TextColor3 = open and Color3.fromRGB(160, 166, 180) or Color3.fromRGB(104, 110, 124)
downArrow.TextColor3 = open and Color3.fromRGB(104, 110, 124) or Color3.fromRGB(160, 166, 180)
syncExpandedHeight()
openBg.BackgroundColor3 = open and Color3.fromRGB(48, 52, 64)
or (hover and Color3.fromRGB(45, 49, 60) or Color3.fromRGB(39, 42, 52))
end
dropdownEntry.collapse = function()
setExpanded(false)
end
local function refreshOptions()
for name, btn in optionButtons do
if btn and btn.Parent then
btn.TextColor3 = name == selectedName and Color3.fromRGB(255, 255, 255)
or Color3.fromRGB(245, 247, 252)
local check = btn:FindFirstChild("Check")
if check and check:IsA("TextLabel") then
check.Visible = name == selectedName
end
end
end
openBtn.Text = selectedName or "Select"
end
local function applySelection(name)
if not table.find(names, name) then
return
end
selectedName = name
pcall(function()
setSelectedName(name)
end)
if opts.persist and id then
saveSettingsEntry(id, { name = name })
end
refreshOptions()
end
for idx, name in names do
local option = Instance.new("TextButton")
option.Name = name
option.Size = UDim2.new(1, 0, 0, 30)
option.BackgroundTransparency = 1
option.BorderSizePixel = 0
option.AutoButtonColor = false
option.Font = Enum.Font.GothamMedium
option.TextSize = 12
option.TextColor3 = Color3.new(1, 1, 1)
option.TextXAlignment = Enum.TextXAlignment.Left
option.Text = name
option.LayoutOrder = idx
option.ZIndex = 27
option.Parent = menu
local optionPad = Instance.new("UIPadding")
optionPad.PaddingRight = UDim.new(0, 24)
optionPad.Parent = option
local divider = Instance.new("Frame")
divider.Name = "Divider"
divider.AnchorPoint = Vector2.new(0, 1)
divider.Position = UDim2.new(0, 0, 1, 0)
divider.Size = UDim2.new(1, 0, 0, idx < #names and 1 or 0)
divider.BackgroundColor3 = Color3.fromRGB(66, 96, 128)
divider.BorderSizePixel = 0
divider.ZIndex = 27
divider.Parent = option
local check = Instance.new("TextLabel")
check.Name = "Check"
check.BackgroundTransparency = 1
check.AnchorPoint = Vector2.new(1, 0.5)
check.Position = UDim2.new(1, 0, 0.5, 0)
check.Size = UDim2.new(0, 16, 0, 16)
check.Font = Enum.Font.GothamBold
check.TextSize = 15
check.TextColor3 = Color3.fromRGB(79, 164, 242)
check.Text = "✓"
check.Visible = false
check.ZIndex = 28
check.Parent = option
optionButtons[name] = option
option.MouseButton1Click:Connect(function()
closeCustomDropdowns(menu)
setExpanded(false)
applySelection(name)
end)
end
openBtn.MouseEnter:Connect(function()
hover = true
if not menu.Visible then
openBg.BackgroundColor3 = Color3.fromRGB(45, 49, 60)
end
end)
openBtn.MouseLeave:Connect(function()
hover = false
if not menu.Visible then
openBg.BackgroundColor3 = Color3.fromRGB(39, 42, 52)
end
end)
openBtn.MouseButton1Click:Connect(function()
local willOpen = not menu.Visible
closeCustomDropdowns(menu)
setExpanded(willOpen)
end)
menu:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
task.defer(syncExpandedHeight)
end)
menu:GetPropertyChangedSignal("Size"):Connect(function()
task.defer(syncExpandedHeight)
end)
if uiScaleState and uiScaleState.object and uiScaleState.object.GetPropertyChangedSignal then
uiScaleState.object:GetPropertyChangedSignal("Scale"):Connect(function()
task.defer(syncExpandedHeight)
end)
end
local initialName
if opts.persist and id then
local saved = settingsConfig[id]
if type(saved) == "table" and type(saved.name) == "string" then
initialName = saved.name
end
end
if type(getCurrentName) == "function" then
initialName = initialName or getCurrentName()
end
if not table.find(names, initialName) then
initialName = names[1]
end
setExpanded(false)
applySelection(initialName)
end
local function makeIconRgbToggle()
if not (settingsHolder and settingTemplate and iconBtn and iconStroke) then
return
end
local key = "IconRGB"
local frame = __dcm_registerCustom(settingTemplate:Clone())
frame.Parent = settingsHolder
frame.Visible = true
frame.LayoutOrder = -2
for _, d in frame:QueryDescendants("LocalScript") do
d:Destroy()
end
local tLabel = frame:FindFirstChild("Title", true)
local dLabel = frame:FindFirstChild("Desc", true)
if tLabel then
tLabel.Text = "RGB icon"
end
if dLabel then
dLabel.Text = "Rainbow outline on the Delta icon."
end
local btnFrame = frame:FindFirstChild("Button", true)
if not btnFrame then
return
end
local btnLabel = btnFrame:FindFirstChildWhichIsA("TextLabel")
if btnLabel then
btnLabel.Text = "Toggle"
end
local clickable = btnFrame:FindFirstChildWhichIsA("GuiButton") or btnFrame
local saved = settingsConfig[key]
local enabled = false
if type(saved) == "table" and saved.enabled ~= nil then
enabled = saved.enabled and true or false
end
local hue = 0
local function saveState()
if not (HS and type(writefile) == "function") then
return
end
settingsConfig[key] = { enabled = enabled }
writeJsonFile(settingsPath, settingsConfig)
end
local function setVisualToggle()
btnFrame.BackgroundColor3 = enabled and Color3.fromRGB(79, 164, 242) or Color3.fromRGB(30, 30, 30)
end
local function startLoop()
NAlib.disconnect("IconRGB_Loop")
NAlib.connect(
"IconRGB_Loop",
RS.Heartbeat:Connect(function(dt)
local spd = iconRgbSpeedValue and math.clamp(iconRgbSpeedValue.Value, 0.05, 2) or 0.2
hue = (hue + dt * spd) % 1
pcall(function()
iconStroke.Color = Color3.fromHSV(hue, 1, 1)
end)
end)
)
end
local function stopLoop()
NAlib.disconnect("IconRGB_Loop")
pcall(function()
if iconColorUseCustom and iconColorValue then
iconStroke.Color = iconColorValue.Value
else
iconStroke.Color = iconBaseColor or iconStroke.Color
end
end)
end
local function applyState()
setVisualToggle()
if enabled then
startLoop()
else
stopLoop()
end
saveState()
end
applyState()
local function toggleClick()
enabled = not enabled
applyState()
end
if clickable:IsA("GuiButton") then
clickable.MouseButton1Click:Connect(toggleClick)
else
clickable.InputBegan:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
toggleClick()
end
end)
end
end
local function makeIconVisibilityToggle()
if not (settingsHolder and settingTemplate and iconBtn) then
return
end
local key = "IconVisible"
local frame = __dcm_registerCustom(settingTemplate:Clone())
frame.Parent = settingsHolder
frame.Visible = true
frame.LayoutOrder = -2
for _, d in frame:QueryDescendants("LocalScript") do
d:Destroy()
end
local tLabel = frame:FindFirstChild("Title", true)
local dLabel = frame:FindFirstChild("Desc", true)
if tLabel then
tLabel.Text = "Icon visibility"
end
if dLabel then
dLabel.Text = "Makes the Delta icon invisible"
end
local btnFrame = frame:FindFirstChild("Button", true)
if not btnFrame then
return
end
local btnLabel = btnFrame:FindFirstChildWhichIsA("TextLabel")
if btnLabel then
btnLabel.Text = "Toggle"
end
local clickable = btnFrame:FindFirstChildWhichIsA("GuiButton") or btnFrame
local function saveState()
if not (HS and type(writefile) == "function") then
return
end
settingsConfig[key] = { enabled = iconVisible }
writeJsonFile(settingsPath, settingsConfig)
end
local function setVisual()
btnFrame.BackgroundColor3 = iconVisible and Color3.fromRGB(79, 164, 242) or Color3.fromRGB(30, 30, 30)
end
setVisual()
local function toggleClick()
iconVisible = not iconVisible
applyIconUserVisibility(false)
setVisual()
saveState()
end
if clickable:IsA("GuiButton") then
clickable.MouseButton1Click:Connect(toggleClick)
else
clickable.InputBegan:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
toggleClick()
end
end)
end
end
local function makeIconStrokeToggle()
if not (settingsHolder and settingTemplate and iconStroke) then
return
end
local key = "IconStrokeEnabled"
local frame = __dcm_registerCustom(settingTemplate:Clone())
frame.Parent = settingsHolder
frame.Visible = true
frame.LayoutOrder = -2
for _, d in frame:QueryDescendants("LocalScript") do
d:Destroy()
end
local tLabel = frame:FindFirstChild("Title", true)
local dLabel = frame:FindFirstChild("Desc", true)
if tLabel then
tLabel.Text = "Icon stroke"
end
if dLabel then
dLabel.Text = "Toggle the Delta icon outline"
end
local btnFrame = frame:FindFirstChild("Button", true)
if not btnFrame then
return
end
local btnLabel = btnFrame:FindFirstChildWhichIsA("TextLabel")
if btnLabel then
btnLabel.Text = "Toggle"
end
local clickable = btnFrame:FindFirstChildWhichIsA("GuiButton") or btnFrame
local function saveState()
saveSettingsEntry(key, { enabled = iconStrokeUserEnabled })
end
local function setVisual()
btnFrame.BackgroundColor3 = iconStrokeUserEnabled and Color3.fromRGB(79, 164, 242)
or Color3.fromRGB(30, 30, 30)
end
setVisual()
local function toggleClick()
iconStrokeUserEnabled = not iconStrokeUserEnabled
applyIconStrokeState()
setVisual()
saveState()
end
if clickable:IsA("GuiButton") then
clickable.MouseButton1Click:Connect(toggleClick)
else
clickable.InputBegan:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
toggleClick()
end
end)
end
end
local function makeIconPositionSaveToggle()
if not (settingsHolder and settingTemplate and iconBtn) then
return
end
local key = "IconPositionSave"
local frame = __dcm_registerCustom(settingTemplate:Clone())
frame.Parent = settingsHolder
frame.Visible = true
frame.LayoutOrder = -2
for _, d in frame:QueryDescendants("LocalScript") do
d:Destroy()
end
local tLabel = frame:FindFirstChild("Title", true)
local dLabel = frame:FindFirstChild("Desc", true)
if tLabel then
tLabel.Text = "Save icon position"
end
if dLabel then
dLabel.Text = "Load your dragged icon position on execute"
end
local btnFrame = frame:FindFirstChild("Button", true)
if not btnFrame then
return
end
local btnLabel = btnFrame:FindFirstChildWhichIsA("TextLabel")
if btnLabel then
btnLabel.Text = "Toggle"
end
local clickable = btnFrame:FindFirstChildWhichIsA("GuiButton") or btnFrame
local function saveState()
saveSettingsEntry(key, { enabled = iconPositionSaveEnabled })
if iconPositionSaveEnabled then
saveManagedIconPosition()
end
end
local function setVisual()
btnFrame.BackgroundColor3 = iconPositionSaveEnabled and Color3.fromRGB(79, 164, 242)
or Color3.fromRGB(30, 30, 30)
end
setVisual()
local function toggleClick()
iconPositionSaveEnabled = not iconPositionSaveEnabled
if iconPositionSaveEnabled then
applySavedManagedIconPosition()
end
setVisual()
saveState()
end
if clickable:IsA("GuiButton") then
clickable.MouseButton1Click:Connect(toggleClick)
else
clickable.InputBegan:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
toggleClick()
end
end)
end
end
local function makeTabNotifToggle()
if not (settingsHolder and settingTemplate) then
return
end
local key = "TabNotifications"
local frame = __dcm_registerCustom(settingTemplate:Clone())
frame.Parent = settingsHolder
frame.Visible = true
frame.LayoutOrder = -2
for _, d in frame:QueryDescendants("LocalScript") do
d:Destroy()
end
local tLabel = frame:FindFirstChild("Title", true)
local dLabel = frame:FindFirstChild("Desc", true)
if tLabel then
tLabel.Text = "Tab notifications"
end
if dLabel then
dLabel.Text = "Show info popups about saved tabs"
end
local btnFrame = frame:FindFirstChild("Button", true)
if not btnFrame then
return
end
local btnLabel = btnFrame:FindFirstChildWhichIsA("TextLabel")
if btnLabel then
btnLabel.Text = "Toggle"
end
local clickable = btnFrame:FindFirstChildWhichIsA("GuiButton") or btnFrame
local function saveState()
if not (HS and type(writefile) == "function") then
return
end
settingsConfig[key] = { enabled = tabNotifEnabled }
writeJsonFile(settingsPath, settingsConfig)
end
local function setVisual()
btnFrame.BackgroundColor3 = tabNotifEnabled and Color3.fromRGB(79, 164, 242) or Color3.fromRGB(30, 30, 30)
end
setVisual()
local function toggleClick()
tabNotifEnabled = not tabNotifEnabled
setVisual()
saveState()
end
if clickable:IsA("GuiButton") then
clickable.MouseButton1Click:Connect(toggleClick)
else
clickable.InputBegan:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
toggleClick()
end
end)
end
end
local function makeDestroyUIButton()
if not (settingsHolder and settingTemplate) then
return
end
local frame = __dcm_registerCustom(settingTemplate:Clone())
frame.Parent = settingsHolder
frame.Visible = true
frame.LayoutOrder = -2
for _, d in frame:QueryDescendants("LocalScript") do
d:Destroy()
end
local tLabel = frame:FindFirstChild("Title", true)
local dLabel = frame:FindFirstChild("Desc", true)
if tLabel then
tLabel.Text = "Destroy Delta UI"
tLabel.TextColor3 = Color3.fromRGB(255, 80, 80)
end
if dLabel then
dLabel.Text = "Deletes Delta's UI and icon until you rejoin."
dLabel.TextColor3 = Color3.fromRGB(255, 120, 120)
end
local btnFrame = frame:FindFirstChild("Button", true)
if not btnFrame then
return
end
local btnLabel = btnFrame:FindFirstChildWhichIsA("TextLabel")
if btnLabel then
btnLabel.Text = "KILL"
end
btnFrame.BackgroundColor3 = Color3.fromRGB(255, 80, 80)
local clickable = btnFrame:FindFirstChildWhichIsA("GuiButton") or btnFrame
local function click()
if iconGui and iconGui ~= mainGui then
pcall(function()
iconGui:Destroy()
end)
iconGui = nil
end
if mainGui then
pcall(function()
mainGui:Destroy()
end)
mainGui = nil
end
end
if clickable:IsA("GuiButton") then
clickable.MouseButton1Click:Connect(click)
else
clickable.InputBegan:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
click()
end
end)
end
end
local function makeIconEnableToggle()
if not (settingsHolder and settingTemplate and iconBtn) then
return
end
local key = "IconEnabled"
local frame = __dcm_registerCustom(settingTemplate:Clone())
frame.Parent = settingsHolder
frame.Visible = true
frame.LayoutOrder = -2
for _, d in frame:QueryDescendants("LocalScript") do
d:Destroy()
end
local tLabel = frame:FindFirstChild("Title", true)
local dLabel = frame:FindFirstChild("Desc", true)
if tLabel then
tLabel.Text = "Use custom icon"
end
if dLabel then
dLabel.Text = iconFsOk() and "Toggle between default and custom Delta icon"
or "Requires file system + getcustomasset support"
end
local btnFrame = frame:FindFirstChild("Button", true)
if not btnFrame then
return
end
local btnLabel = btnFrame:FindFirstChildWhichIsA("TextLabel")
if btnLabel then
btnLabel.Text = "Toggle"
end
local clickable = btnFrame:FindFirstChildWhichIsA("GuiButton") or btnFrame
local enabled = dIcons.enabled and true or false
local function setVisual()
btnFrame.BackgroundColor3 = enabled and Color3.fromRGB(79, 164, 242) or Color3.fromRGB(30, 30, 30)
end
setVisual()
local function toggleClick()
local target = not enabled
local ok, err = setIconEnabled(target)
if not ok then
notify({
Title = "Delta Icon",
Description = err or "Failed to toggle custom icon.",
Duration = 5,
})
return
end
enabled = target
setVisual()
end
if clickable:IsA("GuiButton") then
clickable.MouseButton1Click:Connect(toggleClick)
else
clickable.InputBegan:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
toggleClick()
end
end)
end
end
local function makeIconInputRow()
if not (settingsHolder and settingTemplate and iconBtn) then
return
end
local frame = __dcm_registerCustom(settingTemplate:Clone())
frame.Parent = settingsHolder
frame.Visible = true
frame.LayoutOrder = -2
for _, d in frame:QueryDescendants("LocalScript") do
d:Destroy()
end
local tLabel = frame:FindFirstChild("Title", true)
local dLabel = frame:FindFirstChild("Desc", true)
if tLabel then
tLabel.Text = "Icon source"
end
if dLabel then
dLabel.Text = "Asset id or image URL (GitHub/External supported)"
end
local oldBtn = frame:FindFirstChild("Button", true)
local pos
if oldBtn then
pos = oldBtn.Position
oldBtn:Destroy()
end
local basePos = pos or UDim2.new(1, -160, 0.5, 0)
local bx, bo = basePos.X.Scale, basePos.X.Offset
local by, byo = basePos.Y.Scale, basePos.Y.Offset
local box = Instance.new("TextBox")
box.Name = "IconInput"
box.Size = UDim2.new(0, 160, 0, 18)
box.AnchorPoint = Vector2.new(1, 0.5)
box.Position = UDim2.new(bx, bo, by, byo)
box.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
box.BorderSizePixel = 0
box.ClearTextOnFocus = true
box.TextXAlignment = Enum.TextXAlignment.Center
box.Font = Enum.Font.Gotham
box.TextSize = 12
box.TextColor3 = Color3.new(1, 1, 1)
box.Text = ""
box.PlaceholderText = "ID or image URL"
box.Parent = frame
local setBtn = Instance.new("TextButton")
setBtn.Name = "Apply"
setBtn.Size = UDim2.new(0, 50, 0, 18)
setBtn.AnchorPoint = Vector2.new(1, 0.5)
setBtn.Position = UDim2.new(bx, bo - 170, by, byo)
setBtn.BackgroundColor3 = Color3.fromRGB(79, 164, 242)
setBtn.BorderSizePixel = 0
setBtn.Font = Enum.Font.GothamBold
setBtn.TextSize = 11
setBtn.TextColor3 = Color3.new(1, 1, 1)
setBtn.Text = "SET"
setBtn.Parent = frame
local setCorner = Instance.new("UICorner")
setCorner.CornerRadius = UDim.new(0, 4)
setCorner.Parent = setBtn
local defBtn = Instance.new("TextButton")
defBtn.Name = "Default"
defBtn.Size = UDim2.new(0, 50, 0, 18)
defBtn.AnchorPoint = Vector2.new(1, 0.5)
defBtn.Position = UDim2.new(bx, bo - 230, by, byo)
defBtn.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
defBtn.BorderSizePixel = 0
defBtn.Font = Enum.Font.GothamBold
defBtn.TextSize = 11
defBtn.TextColor3 = Color3.new(1, 1, 1)
defBtn.Text = "DEF"
defBtn.Parent = frame
local defCorner = Instance.new("UICorner")
defCorner.CornerRadius = UDim.new(0, 4)
defCorner.Parent = defBtn
local function applyInput()
if not iconFsOk() then
notify({
Title = "Delta Icon",
Description = "Custom icons require file system + getcustomasset.",
Duration = 5,
})
return
end
local txt = trim(box.Text or "")
if txt == "" then
notify({
Title = "Delta Icon",
Description = "Enter an asset id or image URL.",
Duration = 4,
})
return
end
local ok, msg = setIconAsset(txt, { autoEnable = true })
if not ok then
notify({
Title = "Delta Icon",
Description = msg or "Failed to set custom icon.",
Duration = 5,
})
return
end
if updateIconStatusUI then
updateIconStatusUI()
end
box.Text = ""
notify({
Title = "Delta Icon",
Description = "Custom icon updated.",
Duration = 4,
})
end
local function resetDefault()
dIcons.enabled = false
dIcons.assetId = ""
dIcons.localPath = ""
applyIcon()
saveIconCfg()
if updateIconStatusUI then
updateIconStatusUI()
end
notify({
Title = "Delta Icon",
Description = "Reverted to default icon.",
Duration = 4,
})
end
setBtn.MouseButton1Click:Connect(applyInput)
defBtn.MouseButton1Click:Connect(resetDefault)
box.FocusLost:Connect(function(enter)
if enter then
applyInput()
end
end)
end
local function makeIconManagerRow()
if not (settingsHolder and settingTemplate) then
return
end
local frame = __dcm_registerCustom(settingTemplate:Clone())
frame.Parent = settingsHolder
frame.Visible = true
frame.LayoutOrder = -2
for _, d in frame:QueryDescendants("LocalScript") do
d:Destroy()
end
local tLabel = frame:FindFirstChild("Title", true)
local dLabel = frame:FindFirstChild("Desc", true)
if tLabel then
tLabel.Text = "Icon manager"
end
if dLabel then
dLabel.Text = iconFsOk() and formatIconStatus() or "File system/getcustomasset not supported."
end
local oldBtn = frame:FindFirstChild("Button", true)
local pos
if oldBtn then
pos = oldBtn.Position
oldBtn:Destroy()
end
local basePos = pos or UDim2.new(1, -160, 0.5, 0)
local bx, bo = basePos.X.Scale, basePos.X.Offset
local by, byo = basePos.Y.Scale, basePos.Y.Offset
local function mkMgrBtn(nm, w, xOff, bgColor, txt)
local b = Instance.new("TextButton")
b.Name = nm
b.Size = UDim2.new(0, w, 0, 18)
b.AnchorPoint = Vector2.new(1, 0.5)
b.Position = UDim2.new(bx, bo + xOff, by, byo)
b.BackgroundColor3 = bgColor
b.BorderSizePixel = 0
b.Font = Enum.Font.GothamBold
b.TextSize = 11
b.TextColor3 = Color3.new(1, 1, 1)
b.Text = txt
b.Parent = frame
local c = Instance.new("UICorner")
c.CornerRadius = UDim.new(0, 4)
c.Parent = b
return b
end
local gray = Color3.fromRGB(30, 30, 30)
local prevBtn = mkMgrBtn("Prev", 24, -210, gray, "<")
local nextBtn = mkMgrBtn("Next", 24, -180, gray, ">")
local delBtn = mkMgrBtn("Del", 32, -140, Color3.fromRGB(80, 40, 40), "DEL")
local clrBtn = mkMgrBtn("Clr", 36, -95, Color3.fromRGB(60, 30, 30), "CLR")
local statusLabel = Instance.new("TextLabel")
statusLabel.Name = "Status"
statusLabel.Size = UDim2.new(0, 60, 0, 18)
statusLabel.AnchorPoint = Vector2.new(1, 0.5)
statusLabel.Position = UDim2.new(bx, bo, by, byo)
statusLabel.BackgroundTransparency = 1
statusLabel.Font = Enum.Font.Gotham
statusLabel.TextSize = 11
statusLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
statusLabel.TextXAlignment = Enum.TextXAlignment.Right
statusLabel.Text = "-/-"
statusLabel.Parent = frame
function updateIconStatusUI()
if not statusLabel then
return
end
local n = #dIcons.entries
local idx = dIcons.index
if dLabel then
dLabel.Text = iconFsOk() and formatIconStatus() or "File system/getcustomasset not supported."
end
if n <= 0 then
statusLabel.Text = "-/-"
else
if idx < 1 or idx > n then
idx = 1
end
statusLabel.Text = tostring(idx) .. "/" .. tostring(n)
end
end
updateIconStatusUI()
local function chkFs()
if iconFsOk() then
return true
end
notify({
Title = "Delta Icon",
Description = "Custom icon manager requires file system + getcustomasset.",
Duration = 5,
})
return false
end
prevBtn.MouseButton1Click:Connect(function()
if not chkFs() then
return
end
if #dIcons.entries == 0 then
notify({ Title = "Delta Icon", Description = "No custom icons to cycle.", Duration = 4 })
return
end
cycleIcon(-1)
end)
nextBtn.MouseButton1Click:Connect(function()
if not chkFs() then
return
end
if #dIcons.entries == 0 then
notify({ Title = "Delta Icon", Description = "No custom icons to cycle.", Duration = 4 })
return
end
cycleIcon(1)
end)
delBtn.MouseButton1Click:Connect(function()
if not chkFs() then
return
end
local list = dIcons.entries
local idx = dIcons.index
if #list == 0 or idx < 1 or idx > #list then
notify({ Title = "Delta Icon", Description = "No icon selected to delete.", Duration = 4 })
return
end
local e = list[idx]
if not e or not e.file then
return
end
removeIconEntry(e)
if updateIconStatusUI then
updateIconStatusUI()
end
end)
clrBtn.MouseButton1Click:Connect(function()
if not chkFs() then
return
end
if #dIcons.entries == 0 then
notify({ Title = "Delta Icon", Description = "No custom icons to clear.", Duration = 4 })
return
end
removeAllIcons()
if updateIconStatusUI then
updateIconStatusUI()
end
notify({ Title = "Delta Icon", Description = "Cleared all custom icons.", Duration = 4 })
end)
end
local sidebarGestureEnabled = false
local sidebarGestureVisible = true
local sidebarGestureWidth = 18
local sidebarGestureHeight = 120
local sidebarGestureFrame
local sidebarDragActive = false
local sidebarDragStartX = 0
local sidebarDragStartAlpha = 0
local sidebarDragAlpha = 0
local getCurrentSectionName
local sidebarCurrentSection = nil
local autoCloseOnLoad = true
local sectionsList = { "Executor", "Home", "Scripthub", "Settings", "Console", "Music" }
local gestureWidthValue = Instance.new("NumberValue")
gestureWidthValue.Name = "GestureWidthValue"
gestureWidthValue.Value = sidebarGestureWidth
local gestureHeightValue = Instance.new("NumberValue")
gestureHeightValue.Name = "GestureHeightValue"
gestureHeightValue.Value = sidebarGestureHeight
do
local cfg = settingsConfig.GestureWidth
if type(cfg) == "table" and type(cfg.value) == "number" then
gestureWidthValue.Value = math.clamp(cfg.value, 6, 80)
end
end
do
local cfg = settingsConfig.GestureHeight
if type(cfg) == "table" and type(cfg.value) == "number" then
gestureHeightValue.Value = math.clamp(cfg.value, 60, 400)
end
end
do
local cfg = settingsConfig.SidebarGesture
if type(cfg) == "table" and cfg.enabled ~= nil then
sidebarGestureEnabled = cfg.enabled and true or false
end
end
do
local cfg = settingsConfig.SidebarGestureVisible
if type(cfg) == "table" and cfg.enabled ~= nil then
sidebarGestureVisible = cfg.enabled and true or false
end
end
do
local cfg = settingsConfig.AutoCloseOnLoad
if type(cfg) == "table" and cfg.enabled ~= nil then
autoCloseOnLoad = cfg.enabled and true or false
end
end
local gestCol = Instance.new("Color3Value")
gestCol.Name = "GestureColorValue"
gestCol.Value = Color3.fromRGB(255, 255, 255)
gestCol.Changed:Connect(function()
if sidebarGestureFrame then
sidebarGestureFrame.BackgroundColor3 = gestCol.Value
end
end)
local function closeDeltaSidebar()
if sidebar then
setSidebarPosition(sidebarClosedPos)
normalizeSidebarGeometry()
end
if mainGui then
for _, n in sectionsList do
local fr = mainGui:FindFirstChild(n)
if fr and fr:IsA("GuiObject") then
fr.Visible = false
end
end
end
setIconForcedHidden(sidebarGestureEnabled)
end
local function openDeltaFromIcon()
if not sidebar then
return
end
local curSec = getCurrentSectionName()
if curSec then
sidebarCurrentSection = curSec
end
if not sidebarCurrentSection then
sidebarCurrentSection = sectionsList[1]
end
if TS and sidebar then
local tw = __lt.cm(
"TweenService",
"Create",
sidebar,
TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{
Position = UDim2.new(sidebarOpenPos.X.Scale, sidebarOpenPos.X.Offset, 0.5, 0),
}
)
tw:Play()
else
setSidebarPosition(sidebarOpenPos)
end
normalizeSidebarGeometry()
setIconForcedHidden(true)
if mainGui and sidebarCurrentSection then
for _, n in sectionsList do
local fr = mainGui:FindFirstChild(n)
if fr and fr:IsA("GuiObject") then
fr.Visible = n == sidebarCurrentSection
end
end
end
end
bindManagedIconToggle = function()
NAlib.disconnect("ManagedIcon_Toggle")
if not (iconBtn and iconBtn:IsA("GuiButton")) then
return
end
NAlib.connect("ManagedIcon_Toggle", MouseButtonFix(iconBtn, function()
local override = rawget(__dcm_env, "__NewDeltaUIToggle")
if type(override) == "function" then
local ok, handled = pcall(override)
if ok and handled ~= false then
return
end
end
if not sidebar then
return
end
local isOpen = math.abs(sidebar.Position.X.Scale - sidebarOpenPos.X.Scale) <= 0.001
if isOpen then
closeDeltaSidebar()
else
openDeltaFromIcon()
end
end))
end
bindManagedIconToggle()
local function saveSidebarGesture()
if not (HS and type(writefile) == "function") then
return
end
settingsConfig.SidebarGesture = { enabled = sidebarGestureEnabled }
writeJsonFile(settingsPath, settingsConfig)
end
local function saveSidebarGestureVisible()
if not (HS and type(writefile) == "function") then
return
end
settingsConfig.SidebarGestureVisible = { enabled = sidebarGestureVisible }
writeJsonFile(settingsPath, settingsConfig)
end
local function applyGestureVisual()
if sidebarGestureFrame then
sidebarGestureFrame.BackgroundTransparency = sidebarGestureVisible and 0.4 or 1
end
end
local function applyGestureSize()
if not sidebarGestureFrame then
return
end
local h = math.clamp(gestureHeightValue and gestureHeightValue.Value or sidebarGestureHeight, 60, 400)
local w = math.clamp(gestureWidthValue and gestureWidthValue.Value or sidebarGestureWidth, 6, 80)
if UIS and UIS.TouchEnabled then
w = math.floor(w * 1.6)
end
sidebarGestureFrame.Size = UDim2.new(0, w, 0, h)
end
gestureWidthValue.Changed:Connect(function()
if sidebarGestureFrame then
applyGestureSize()
end
end)
gestureHeightValue.Changed:Connect(function()
if sidebarGestureFrame then
applyGestureSize()
end
end)
local function ensureSidebarGestureFrame()
if sidebarGestureFrame or not (sidebar and mainGui) then
return
end
local f = Instance.new("Frame")
sidebarGestureFrame = f
f.Name = "SidebarGestureZone"
f.BackgroundColor3 = gestCol.Value
f.BorderSizePixel = 0
f.AnchorPoint = Vector2.new(1, 0.5)
f.Position = UDim2.new(1, 0, 0.5, 0)
f.Size = UDim2.new(0, sidebarGestureWidth, 0, sidebarGestureHeight)
f.Active = false
f.Visible = false
f.Parent = mainGui
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 6)
corner.Parent = f
applyGestureSize()
applyGestureVisual()
end
local function makeSidebarGestureToggle()
if not (settingsHolder and settingTemplate and sidebar) then
return
end
local frame = __dcm_registerCustom(settingTemplate:Clone())
frame.Parent = settingsHolder
frame.Visible = true
frame.LayoutOrder = -2
for _, d in frame:QueryDescendants("LocalScript") do
d:Destroy()
end
local tLabel = frame:FindFirstChild("Title", true)
local dLabel = frame:FindFirstChild("Desc", true)
if tLabel then
tLabel.Text = "Sidebar gesture"
end
if dLabel then
dLabel.Text = "Drag from the right edge to open/close the sidebar"
end
local btnFrame = frame:FindFirstChild("Button", true)
if not btnFrame then
return
end
local btnLabel = btnFrame:FindFirstChildWhichIsA("TextLabel")
if btnLabel then
btnLabel.Text = "Toggle"
end
local clickable = btnFrame:FindFirstChildWhichIsA("GuiButton") or btnFrame
local function setVisual()
btnFrame.BackgroundColor3 = sidebarGestureEnabled and Color3.fromRGB(79, 164, 242)
or Color3.fromRGB(30, 30, 30)
end
setVisual()
local function toggleClick()
sidebarGestureEnabled = not sidebarGestureEnabled
setVisual()
saveSidebarGesture()
setIconForcedHidden(sidebarGestureEnabled)
task.defer(function()
if applySidebarGestureState then
applySidebarGestureState()
end
end)
end
if clickable:IsA("GuiButton") then
clickable.MouseButton1Click:Connect(toggleClick)
else
clickable.InputBegan:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
toggleClick()
end
end)
end
end
local function makeSidebarGestureBarVisibilityToggle()
if not (settingsHolder and settingTemplate) then
return
end
local frame = __dcm_registerCustom(settingTemplate:Clone())
frame.Parent = settingsHolder
frame.Visible = true
frame.LayoutOrder = -2
for _, d in frame:QueryDescendants("LocalScript") do
d:Destroy()
end
local tLabel = frame:FindFirstChild("Title", true)
local dLabel = frame:FindFirstChild("Desc", true)
if tLabel then
tLabel.Text = "Gesture bar visible"
end
if dLabel then
dLabel.Text = "Hide the sidebar gesture bar but keep it usable"
end
local btnFrame = frame:FindFirstChild("Button", true)
if not btnFrame then
return
end
local btnLabel = btnFrame:FindFirstChildWhichIsA("TextLabel")
if btnLabel then
btnLabel.Text = "Toggle"
end
local clickable = btnFrame:FindFirstChildWhichIsA("GuiButton") or btnFrame
local function setVisual()
btnFrame.BackgroundColor3 = sidebarGestureVisible and Color3.fromRGB(79, 164, 242)
or Color3.fromRGB(30, 30, 30)
end
setVisual()
applyGestureVisual()
local function toggleClick()
sidebarGestureVisible = not sidebarGestureVisible
setVisual()
applyGestureVisual()
saveSidebarGestureVisible()
end
if clickable:IsA("GuiButton") then
clickable.MouseButton1Click:Connect(toggleClick)
else
clickable.InputBegan:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
toggleClick()
end
end)
end
end
local function makeAutoCloseToggle()
if not (settingsHolder and settingTemplate and sidebar) then
return
end
local key = "AutoCloseOnLoad"
local frame = __dcm_registerCustom(settingTemplate:Clone())
frame.Parent = settingsHolder
frame.Visible = true
frame.LayoutOrder = -2
for _, d in frame:QueryDescendants("LocalScript") do
d:Destroy()
end
local tLabel = frame:FindFirstChild("Title", true)
local dLabel = frame:FindFirstChild("Desc", true)
if tLabel then
tLabel.Text = "Auto-close on load"
end
if dLabel then
dLabel.Text = "Close the Delta sidebar right after it loads"
end
local btnFrame = frame:FindFirstChild("Button", true)
if not btnFrame then
return
end
local btnLabel = btnFrame:FindFirstChildWhichIsA("TextLabel")
if btnLabel then
btnLabel.Text = "Toggle"
end
local clickable = btnFrame:FindFirstChildWhichIsA("GuiButton") or btnFrame
local function saveState()
if not (HS and type(writefile) == "function") then
return
end
settingsConfig[key] = { enabled = autoCloseOnLoad }
writeJsonFile(settingsPath, settingsConfig)
end
local function setVisual()
btnFrame.BackgroundColor3 = autoCloseOnLoad and Color3.fromRGB(79, 164, 242) or Color3.fromRGB(30, 30, 30)
end
setVisual()
local function toggleClick()
autoCloseOnLoad = not autoCloseOnLoad
setVisual()
saveState()
end
if clickable:IsA("GuiButton") then
clickable.MouseButton1Click:Connect(toggleClick)
else
clickable.InputBegan:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
toggleClick()
end
end)
end
end
function getCurrentSectionName()
if not mainGui then
return nil
end
local cur
for _, name in sectionsList do
local fr = mainGui:FindFirstChild(name)
if fr and fr:IsA("GuiObject") and fr.Visible then
cur = name
end
end
return cur
end
do
local iconApi = rawget(__dcm_env, "DeltaIcon")
if type(iconApi) == "table" then
iconApi.getCurrentSectionName = getCurrentSectionName
iconApi.setForcedHidden = setIconForcedHidden
iconApi.openClassic = openDeltaFromIcon
iconApi.closeClassic = closeDeltaSidebar
iconApi.setCurrentSection = function(name)
if table.find(sectionsList, name) then
sidebarCurrentSection = name
end
end
end
end
local function bindSidebarSectionMemory()
NAlib.disconnect("SidebarSectionMemory")
if not mainGui then
return
end
local current = getCurrentSectionName()
if current then
sidebarCurrentSection = current
end
for _, name in sectionsList do
local fr = mainGui:FindFirstChild(name)
if fr and fr:IsA("GuiObject") then
NAlib.connect(
"SidebarSectionMemory",
fr:GetPropertyChangedSignal("Visible"):Connect(function()
if fr.Visible then
sidebarCurrentSection = name
end
end)
)
end
end
end
bindSidebarSectionMemory()
function applySidebarGestureState()
if not sidebar then
sidebarGestureEnabled = false
saveSidebarGesture()
return
end
ensureSidebarGestureFrame()
if not sidebarGestureFrame then
sidebarGestureEnabled = false
saveSidebarGesture()
return
end
if toggleUIBtn and toggleUIBtn:IsA("ImageButton") then
pcall(function()
toggleUIBtn.Visible = not sidebarGestureEnabled
end)
end
NAlib.disconnect("SidebarGesture")
sidebarGestureFrame.Active = false
sidebarGestureFrame.Visible = false
if not sidebarGestureEnabled then
setIconForcedHidden(false)
saveSidebarGesture()
return
end
setIconForcedHidden(true)
sidebarGestureFrame.Active = true
sidebarGestureFrame.Visible = true
applyGestureVisual()
applyGestureSize()
local id = "SidebarGesture"
local function recalcGesturePosition()
if not (mainGui and sidebar and sidebarGestureFrame) then
return
end
local sgSize = mainGui.AbsoluteSize
if sgSize.X <= 0 or sgSize.Y <= 0 then
return
end
local sbPos = sidebar.AbsolutePosition
local sbSize = sidebar.AbsoluteSize
local px = sbPos.X - 8
sidebarGestureFrame.Position = UDim2.new(px / sgSize.X, 0, 0.5, 0)
end
local function getSidebarAlpha()
if not sidebar then
return 0
end
local sx = sidebar.Position.X.Scale
local denom = sidebarClosedPos.X.Scale - sidebarOpenPos.X.Scale
if denom == 0 then
return 0
end
return math.clamp((sidebarClosedPos.X.Scale - sx) / denom, 0, 1)
end
recalcGesturePosition()
NAlib.connect(id, (sidebar:GetPropertyChangedSignal("Position")):Connect(recalcGesturePosition))
if sidebar.GetPropertyChangedSignal then
NAlib.connect(id, (sidebar:GetPropertyChangedSignal("Size")):Connect(recalcGesturePosition))
end
if mainGui and mainGui.GetPropertyChangedSignal then
NAlib.connect(id, (mainGui:GetPropertyChangedSignal("AbsoluteSize")):Connect(recalcGesturePosition))
end
local function updateSidebarFromInput(input)
if not sidebar or not mainGui then
return
end
local dx = input.Position.X - sidebarDragStartX
local guiSize = mainGui.AbsoluteSize
local dist = guiSize.X * math.abs(sidebarClosedPos.X.Scale - sidebarOpenPos.X.Scale)
if dist <= 0 then
dist = 100
end
local alpha = math.clamp(sidebarDragStartAlpha - dx / dist, 0, 1)
sidebarDragAlpha = alpha
setSidebarPosition(
UDim2.new(
sidebarClosedPos.X.Scale + (sidebarOpenPos.X.Scale - sidebarClosedPos.X.Scale) * alpha,
0,
0.5,
0
)
)
end
NAlib.connect(
id,
sidebarGestureFrame.InputBegan:Connect(function(input)
if not sidebarGestureEnabled then
return
end
if
input.UserInputType ~= Enum.UserInputType.MouseButton1
and input.UserInputType ~= Enum.UserInputType.Touch
then
return
end
sidebarDragAlpha = getSidebarAlpha()
sidebarDragStartAlpha = sidebarDragAlpha
sidebarDragStartX = input.Position.X
sidebarDragActive = true
end)
)
NAlib.connect(
id,
UIS.InputChanged:Connect(function(input)
if not sidebarDragActive or not sidebarGestureEnabled then
return
end
if
input.UserInputType == Enum.UserInputType.MouseMovement
or input.UserInputType == Enum.UserInputType.Touch
then
updateSidebarFromInput(input)
end
end)
)
NAlib.connect(
id,
UIS.InputEnded:Connect(function(input)
if not sidebarDragActive or not sidebarGestureEnabled then
return
end
if
input.UserInputType ~= Enum.UserInputType.MouseButton1
and input.UserInputType ~= Enum.UserInputType.Touch
then
return
end
sidebarDragActive = false
local curSec = getCurrentSectionName()
if curSec then
sidebarCurrentSection = curSec
end
local targetPos = sidebarDragAlpha > 0.5 and sidebarOpenPos or sidebarClosedPos
if TS and sidebar then
local tw = __lt.cm(
"TweenService",
"Create",
sidebar,
TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{
Position = UDim2.new(targetPos.X.Scale, targetPos.X.Offset, 0.5, 0),
}
)
tw:Play()
elseif sidebar then
setSidebarPosition(targetPos)
end
if targetPos == sidebarOpenPos then
if not sidebarCurrentSection then
sidebarCurrentSection = getCurrentSectionName()
end
setIconForcedHidden(true)
if mainGui and sidebarCurrentSection then
for _, n in sectionsList do
local fr = mainGui:FindFirstChild(n)
if fr and fr:IsA("GuiObject") then
fr.Visible = n == sidebarCurrentSection
end
end
end
else
if mainGui then
if curSec then
sidebarCurrentSection = curSec
end
for _, n in sectionsList do
local fr = mainGui:FindFirstChild(n)
if fr and fr:IsA("GuiObject") then
fr.Visible = false
end
end
end
setIconForcedHidden(sidebarGestureEnabled)
end
end)
)
saveSidebarGesture()
end
if toggleUIBtn and toggleUIBtn:IsA("GuiButton") then
NAlib.disconnect("ManagedToggleUI_ForcedHidden")
NAlib.connect(
"ManagedToggleUI_ForcedHidden",
toggleUIBtn.MouseButton1Click:Connect(function()
setIconForcedHidden(sidebarGestureEnabled)
end)
)
end
if activeColorValue then
makeColorSlider("ActiveColor", "Active Color", "Sidebar active button color", activeColorValue)
end
if inactiveColorValue then
makeColorSlider("InactiveColor", "Inactive Color", "Sidebar inactive button color", inactiveColorValue)
end
if iconColorValue then
makeColorSlider("IconColor", "Icon Color", "Custom color for the Delta icon", iconColorValue)
end
if uiScaleState.value then
makeSizeSlider(
"InterfaceScale",
"Interface size",
"Adjust Delta's interface size",
uiScaleState.value,
0.5,
1.65,
{
apply = applyInterfaceScale,
applyOnRelease = true,
}
)
end
if iconSizeValue then
makeSizeSlider("IconSize", "Icon Size", "Scale the Delta icon size", iconSizeValue, 0.5, 5)
end
makeEnumDropdown(
"IconShape",
"Icon Shape",
"Choose the shape of the Delta icon",
{ "Squircle", "Rounded", "Square", "Circle" },
function()
return iconShapeName
end,
function(name)
iconShapeName = name
applyIconShapeChoice()
end,
{ persist = true }
)
if iconRgbSpeedValue then
makeSizeSlider("IconRgbSpeed", "RGB Speed", "Speed of the RGB icon effect", iconRgbSpeedValue, 0.05, 2)
end
do
local lighting = game:GetService("Lighting")
local techItems = Enum.Technology:GetEnumItems()
makeEnumDropdown(
"LightingTechnology",
"Lighting Technology",
"Set Lighting.Technology from Delta settings",
techItems,
function()
return lighting and lighting.Technology and lighting.Technology.Name
or techItems[1] and techItems[1].Name
end,
function(name)
local enumItem = Enum.Technology[name]
if lighting and enumItem then
pcall(function()
lighting.Technology = enumItem
end)
end
end,
{ persist = false }
)
end
do
local selectedCameraType
local camItems = Enum.CameraType:GetEnumItems()
local function applyCameraType(name)
local enumItem = Enum.CameraType[name]
if not enumItem then
return
end
selectedCameraType = name
local cam = workspace.CurrentCamera
if cam then
pcall(function()
cam.CameraType = enumItem
end)
end
end
makeEnumDropdown(
"CameraType",
"Camera Type",
"Set CurrentCamera.CameraType from Delta settings",
camItems,
function()
local cam = workspace.CurrentCamera
return cam and cam.CameraType and cam.CameraType.Name or camItems[1] and camItems[1].Name
end,
applyCameraType,
{ persist = false }
)
NAlib.disconnect("CameraType_Reapply")
NAlib.connect(
"CameraType_Reapply",
workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
task.defer(function()
if selectedCameraType then
applyCameraType(selectedCameraType)
end
end)
end)
)
end
do
local soundService = game:GetService("SoundService")
local reverbItems = Enum.ReverbType:GetEnumItems()
makeEnumDropdown(
"SoundReverb",
"Sound Reverb",
"Set SoundService.AmbientReverb from Delta settings",
reverbItems,
function()
return soundService and soundService.AmbientReverb and soundService.AmbientReverb.Name
or reverbItems[1] and reverbItems[1].Name
end,
function(name)
local enumItem = Enum.ReverbType[name]
if soundService and enumItem then
pcall(function()
soundService.AmbientReverb = enumItem
end)
end
end,
{ persist = false }
)
end
if type(setfpscap) == "function" then
local fpsCapValue = Instance.new("NumberValue")
fpsCapValue.Name = "FpsCapValue"
local fpsSaved = settingsConfig.FpsCap
local fpsHasSaved = type(fpsSaved) == "table" and type(fpsSaved.value) == "number"
fpsCapValue.Value = fpsHasSaved and math.clamp(math.floor(fpsSaved.value + 0.5), 30, 999) or 60
local fpsCapTarget = fpsCapValue.Value
local function applyFpsCap(v)
local n = math.clamp(math.floor((tonumber(v) or 60) + 0.5), 30, 999)
if fpsCapValue.Value ~= n then
fpsCapValue.Value = n
end
fpsCapTarget = n
pcall(setfpscap, n)
end
NAlib.disconnect("FpsCap_Enforce")
local function reapplyFpsCap()
if fpsCapTarget then
pcall(setfpscap, fpsCapTarget)
end
end
if UIS and UIS.WindowFocused then
NAlib.connect("FpsCap_Reapply", UIS.WindowFocused:Connect(reapplyFpsCap))
end
makeSizeSlider("FpsCap", "FPS cap", "set your FPS cap to anything you like", fpsCapValue, 1, 999, {
integer = true,
apply = applyFpsCap,
})
if fpsHasSaved then
task.defer(function()
applyFpsCap(fpsCapValue.Value)
end)
end
end
if sidebarGrad1 and sidebarGrad2 and sidebarGradient then
makeColorSlider("SidebarGradient1", "Sidebar Gradient 1", "First sidebar gradient color", sidebarGrad1)
makeColorSlider("SidebarGradient2", "Sidebar Gradient 2", "Second sidebar gradient color", sidebarGrad2)
local function updateSidebarGradient()
sidebarGradient.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, sidebarGrad1.Value),
ColorSequenceKeypoint.new(1, sidebarGrad2.Value),
})
end
updateSidebarGradient();
(sidebarGrad1:GetPropertyChangedSignal("Value")):Connect(updateSidebarGradient);
(sidebarGrad2:GetPropertyChangedSignal("Value")):Connect(updateSidebarGradient)
end
makeIconVisibilityToggle()
makeIconPositionSaveToggle()
makeIconStrokeToggle()
makeIconRgbToggle()
makeTabNotifToggle()
makeIconEnableToggle()
makeIconInputRow()
makeIconManagerRow()
makeColorSlider("GestureColor", "Gesture Color", "Color of the sidebar gesture bar", gestCol)
makeSidebarGestureToggle()
makeSidebarGestureBarVisibilityToggle()
if gestureWidthValue then
makeSizeSlider("GestureWidth", "Gesture width", "Width of the sidebar gesture area", gestureWidthValue, 6, 80)
end
if gestureHeightValue then
makeSizeSlider(
"GestureHeight",
"Gesture height",
"Height of the sidebar gesture area",
gestureHeightValue,
60,
400
)
end
makeAutoCloseToggle()
makeDestroyUIButton()
task.defer(function()
task.wait()
pcall(function()
capUi()
apRad()
apPan()
apStk()
fxSync()
end)
end)
applySidebarGestureState()
if autoCloseOnLoad and sidebar then
task.defer(function()
task.wait(1.5)
closeDeltaSidebar()
end)
end
local sidemenu = execFrame:FindFirstChild("Sidemenu", true)
if sidemenu then
local oldCard = sidemenu:FindFirstChild("Script", true)
if oldCard and oldCard:IsA("ImageLabel") then
local parent = oldCard.Parent
local newCard = oldCard:Clone()
__dcm_setTracked(oldCard, "Parent", nil)
newCard.Name = "LT_FeaturedScriptCard"
newCard.Parent = parent
local labs = {}
for _, d in newCard:QueryDescendants("TextLabel") do
table.insert(labs, d)
end
if #labs >= 3 then
table.sort(labs, function(a, b)
return a.AbsolutePosition.Y < b.AbsolutePosition.Y
end)
local bigHeader = labs[1]
local subTitle = labs[2]
local desc = labs[3]
if bigHeader then
bigHeader.Text = "Featured"
end
if subTitle then
subTitle.Text = "Nameless Admin"
end
if desc then
desc.Text =
"continuation of Nameless Admin with advanced features, fixed commands and lots of customization."
end
end
local clickable = nil
for _, d in newCard:QueryDescendants("Instance") do
if d:IsA("LocalScript") then
d:Destroy()
elseif d:IsA("TextButton") then
clickable = d
end
end
if not clickable then
clickable = newCard:FindFirstChildWhichIsA("GuiButton")
or newCard:FindFirstChildWhichIsA("GuiButton", true)
or newCard
end
local function runNA()
fixNet(mainGui)
local ok, er = runUrl(
"https://gitlab.com/ltseverydayyou/Nameless-Admin/-/raw/main/Source.lua",
"@NamelessAdminSource.lua"
)
if not ok then
toast("ScriptHub", tostring(er))
end
end
if clickable:IsA("GuiButton") then
clickable.MouseButton1Click:Connect(runNA)
else
clickable.InputBegan:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
runNA()
end
end)
end
end
end
local pingLabel
do
local nFrame = sidemenu and sidemenu:FindFirstChild("Network", true)
if nFrame then
local overlayNet = nFrame:FindFirstChild("Overlay", true)
local holderNet = overlayNet and overlayNet:FindFirstChild("Holder", true)
local infoNet = holderNet and holderNet:FindFirstChild("Information", true)
pingLabel = infoNet and infoNet:FindFirstChild("Ping")
end
end
if pingLabel and Stats and RS then
local net = Stats.Network
local item = net and net.ServerStatsItem and net.ServerStatsItem["Data Ping"]
if item then
pingLabel.RichText = true
local pingId = "DeltaCustom_Ping"
NAlib.disconnect(pingId)
local function updatePing()
local v = 0
pcall(function()
if item.GetValue then
v = item:GetValue()
elseif item.Value ~= nil then
v = item.Value
end
end)
pingLabel.Text = string.format('<font color="#4FA4F2">%d</font> MS Ping', math.floor(tonumber(v) or 0))
end
updatePing()
local pingAccum = 0
NAlib.connect(
pingId,
RS.Heartbeat:Connect(function(dt)
pingAccum += dt
if pingAccum < 0.5 then
return
end
pingAccum = 0
updatePing()
end)
)
end
end
local tabs = overlay:FindFirstChild("Tabs", true)
local codeSf = overlay:FindFirstChild("Code", true)
if not tabs then
notify({ Title = "Delta Customization", Description = "Tabs frame not found.", Duration = 4 })
return
end
if not codeSf then
notify({ Title = "Delta Customization", Description = "Code frame not found.", Duration = 4 })
return
end
local hasFS = type(isfolder) == "function"
and type(makefolder) == "function"
and type(isfile) == "function"
and type(writefile) == "function"
and type(readfile) == "function"
and type(listfiles) == "function"
if not hasFS then
notify({
Title = "Delta Customization",
Description = "Your executor does not support saving tabs.",
Duration = 5,
})
return
end
local rootDir = "DeltaCustom"
local tabsDir = rootDir .. "/DeltaTabs"
if not isfolder(rootDir) then
pcall(makefolder, rootDir)
end
if not isfolder(tabsDir) then
pcall(makefolder, tabsDir)
end
local function parseIndex(nm)
return tonumber(nm:match("^script(%d+)%.lua$"))
end
local function isScriptName(nm)
return parseIndex(nm) ~= nil
end
local function getCodeBoxes()
local t = {}
for _, c in codeSf:QueryDescendants("TextBox") do
if isScriptName(c.Name) then table.insert(t, c)
end
end
table.sort(t, function(a, b)
return (parseIndex(a.Name) or 0) < (parseIndex(b.Name) or 0)
end)
return t
end
local function getSavedNames()
local list = {}
for _, p in listfiles(tabsDir) do
local nm = p:match("([^/\\]+)$")
if nm and isScriptName(nm) then
table.insert(list, nm)
end
end
table.sort(list, function(a, b)
return (parseIndex(a) or 0) < (parseIndex(b) or 0)
end)
return list
end
local saved = getSavedNames()
local boxes = getCodeBoxes()
if tabNotifEnabled then
if #saved > 0 then
local desc
if #saved > #boxes then
desc = "Saved tabs: "
.. tostring(#saved)
.. "\nCreate your tabs in Delta and the saved code will load automatically."
else
desc = "Saved tabs: "
.. tostring(#saved)
.. "\nYour saved code will load into matching tabs automatically."
end
notify({ Title = "Delta Customization", Description = desc, Duration = 8 })
else
notify({
Title = "Delta Customization",
Description = "No saved tabs yet. Anything you type will be saved automatically.",
Duration = 6,
})
end
end
local hooked = {}
local function hookBox(box)
if not box or hooked[box] then
return
end
hooked[box] = true
local ready = false
local function setupForName(nm)
if ready then
return
end
if not isScriptName(nm) then
return
end
ready = true
local path = tabsDir .. "/" .. nm
if isfile(path) then
local ok, data = pcall(readfile, path)
if ok and type(data) == "string" then
box.Text = data
end
else
pcall(writefile, path, box.Text or "")
end
local last = 0
(box:GetPropertyChangedSignal("Text")):Connect(function()
last = tick()
local id = last
task.delay(0.4, function()
if id ~= last then
return
end
local txt = box.Text
pcall(writefile, path, txt)
end)
end)
end
setupForName(box.Name);
(box:GetPropertyChangedSignal("Name")):Connect(function()
setupForName(box.Name)
end)
end
for _, b in boxes do
hookBox(b)
end
codeSf.DescendantAdded:Connect(function(obj)
if obj:IsA("TextBox") then
task.wait(0.05)
hookBox(obj)
end
end)
codeSf.DescendantRemoving:Connect(function(obj)
if not (obj:IsA("TextBox") and isScriptName(obj.Name) and type(delfile) == "function") then
return
end
local txt = ""
pcall(function()
txt = obj.Text
end)
if type(txt) ~= "string" or txt:match("^%s*$") then
local path = tabsDir .. "/" .. obj.Name
if isfile(path) then
pcall(delfile, path)
end
end
end)
end)
__lt.deltaPatchState = __lt.deltaPatchState or {}
__lt.deltaPatchState.visualEnv = __dcm_env
if type(__lt.deltaPatchState.visualEnv) == "table" and not __lt.deltaPatchState.visualEnv.__DeltaVisualPatchLoaded then
__lt.deltaPatchState.visualEnv.__DeltaVisualPatchLoaded = true
task.defer(function()
if (identifyexecutor and identifyexecutor() or ""):lower() ~= "delta" then
return
end
local function S(n)
local ok, s = pcall(function()
return __lt.cs(n, cloneref and cloneref or function(v)
return v
end)
end)
if ok then
return s
end
end
local HS = S("HttpService")
local TS = S("TweenService")
local CG = S("CoreGui")
local root = gethui and gethui() or CG
local function isGib(n)
if typeof(n) ~= "string" or n == "" then
return false
end
return not n:match("^[%w _%-]+$")
end
local function getMain()
for _, g in root:GetChildren() do
if g:IsA("ScreenGui") and isGib(g.Name) then
if
g:FindFirstChild("Executor", true)
and g:FindFirstChild("Scripthub", true)
and g:FindFirstChild("Sidebar", true)
then
return g
end
end
end
end
local mainGui = getMain()
if not mainGui then
return
end
do
local vp = workspace.CurrentCamera and workspace.CurrentCamera.ViewportSize or mainGui.AbsoluteSize
if UIS and UIS.TouchEnabled and (vp.X <= 1100 or vp.Y <= 820) then
local darkOverlay = mainGui:FindFirstChild("DarkOverlay")
if darkOverlay then
pcall(function()
darkOverlay.Visible = false
darkOverlay.Active = false
end)
end
return
end
end
local sectionsList = { "Executor", "Home", "Scripthub", "Settings", "Console", "Music" }
local settingsPath = "DeltaCustom/Settings.json"
local settingsConfig = {}
if HS and type(isfile) == "function" and type(readfile) == "function" and isfile(settingsPath) then
local ok, data = pcall(readfile, settingsPath)
if ok and data then
local ok2, dec = pcall(function()
return __lt.cm("HttpService", "JSONDecode", data)
end)
if ok2 and type(dec) == "table" then
settingsConfig = dec
end
end
end
local function saveCfg(k, t)
if not (HS and type(writefile) == "function") then
return
end
settingsConfig[k] = t
writeJsonFile(settingsPath, settingsConfig)
end
local darkOverlay = mainGui:FindFirstChild("DarkOverlay")
NAlib.disconnect("DarkOverlay_Hide")
local dimFr = darkOverlay
if not dimFr then
dimFr = Instance.new("Frame")
dimFr.Name = "DarkOverlay"
dimFr.BackgroundColor3 = Color3.new(0, 0, 0)
dimFr.BorderSizePixel = 0
dimFr.Position = UDim2.fromScale(0, 0)
dimFr.Size = UDim2.fromScale(1, 1)
dimFr.ZIndex = 1
dimFr.Visible = false
dimFr.Active = false
dimFr.Parent = mainGui
end
pcall(function()
dimFr.BackgroundColor3 = Color3.new(0, 0, 0)
dimFr.BorderSizePixel = 0
dimFr.Position = UDim2.fromScale(0, 0)
dimFr.Size = UDim2.fromScale(1, 1)
dimFr.ZIndex = 1
dimFr.Active = false
end)
local base = { cor = {}, pan = {}, str = {}, got = false }
local okNm = {
Sidebar = true,
Overlay = true,
Popup = true,
Searchbar = true,
Script = true,
Network = true,
Information = true,
RobloxConsole = true,
RConsole = true,
Source = true,
Title = true,
Executor = true,
Console = true,
Home = true,
Scripthub = true,
Settings = true,
Dropdown = true,
SettingDropdown = true,
SettingTextbox = true,
SettingSwitch = true,
SettingSwitchOn = true,
Button = true,
InputText = true,
LT_ScriptHub = true,
LT_Music = true,
Top = true,
Bottom = true,
List = true,
Card = true,
Card1 = true,
}
local skip = {
Knob = true,
Hue = true,
Sat = true,
Val = true,
Fill = true,
DarkOverlay = true,
SidebarGestureZone = true,
}
local function capUi()
if not mainGui then
return
end
for _, o in mainGui:QueryDescendants("Instance") do
if o:IsA("UICorner") then
local p = o.Parent
if p and p:IsA("GuiObject") and not skip[p.Name] then
local s = p.AbsoluteSize
if okNm[p.Name] or (s.X >= 44 and s.Y >= 18) then
if base.cor[o] == nil then
base.cor[o] = o.CornerRadius
end
end
end
elseif o:IsA("UIStroke") then
if base.str[o] == nil then
base.str[o] = o.Thickness
end
elseif
o:IsA("Frame")
or o:IsA("ImageLabel")
or o:IsA("TextBox")
or o:IsA("TextButton")
or o:IsA("ImageButton")
or o:IsA("ScrollingFrame")
then
if not skip[o.Name] then
local s = o.AbsoluteSize
if okNm[o.Name] or s.X >= 120 or s.Y >= 28 then
local pr = (o:IsA("ImageLabel") or o:IsA("ImageButton")) and "ImageTransparency"
or "BackgroundTransparency"
if base.pan[o] == nil then
base.pan[o] = { pr, o[pr] }
end
end
end
end
end
base.got = true
end
local radVal = Instance.new("NumberValue")
radVal.Value = type(settingsConfig.UiRound) == "table" and math.clamp(settingsConfig.UiRound.value or 0, 0, 18)
or 0
local panVal = Instance.new("NumberValue")
panVal.Value = type(settingsConfig.UiAlpha) == "table"
and math.clamp(settingsConfig.UiAlpha.value or 0, 0, 0.35)
or 0
local stkVal = Instance.new("NumberValue")
stkVal.Value = type(settingsConfig.UiStroke) == "table"
and math.clamp(settingsConfig.UiStroke.value or 1, 0, 2.5)
or 1
local dimVal = Instance.new("NumberValue")
dimVal.Value = type(settingsConfig.UiDim) == "table" and math.clamp(settingsConfig.UiDim.value or 0.28, 0, 0.65)
or 0.28
local dimDesiredVisible = false
local dimDesiredTransparency = 1
local dimGuardBusy = false
local function applyDimState(force)
if dimGuardBusy then
return
end
dimGuardBusy = true
pcall(function()
if force or dimFr.Visible ~= dimDesiredVisible then
dimFr.Visible = dimDesiredVisible
end
if force or math.abs(dimFr.BackgroundTransparency - dimDesiredTransparency) > 0.001 then
dimFr.BackgroundTransparency = dimDesiredTransparency
end
dimFr.Active = false
if force or dimFr.BackgroundColor3 ~= Color3.new(0, 0, 0) then
dimFr.BackgroundColor3 = Color3.new(0, 0, 0)
end
end)
dimGuardBusy = false
end
local function syncDimLoop()
NAlib.disconnect("DeltaCustom_DimGuard")
NAlib.connect(
"DeltaCustom_DimGuard",
dimFr:GetPropertyChangedSignal("Visible"):Connect(function()
if not dimGuardBusy and dimFr.Visible ~= dimDesiredVisible then
task.defer(applyDimState, false)
end
end)
)
NAlib.connect(
"DeltaCustom_DimGuard",
dimFr:GetPropertyChangedSignal("BackgroundTransparency"):Connect(function()
if
not dimGuardBusy
and math.abs(dimFr.BackgroundTransparency - dimDesiredTransparency) > 0.001
then
task.defer(applyDimState, false)
end
end)
)
end
local function apRad()
capUi()
local v = math.floor(math.clamp(radVal.Value, 0, 18) + 0.5)
for o, b in base.cor do
if o and o.Parent then
pcall(function()
o.CornerRadius = UDim.new(b.Scale, math.max(b.Offset, v))
end)
end
end
end
local function apPan()
capUi()
local a = math.clamp(panVal.Value, 0, 0.35)
for o, b in base.pan do
if o and o.Parent then
pcall(function()
o[b[1]] = math.clamp(b[2] + a, 0, 1)
end)
end
end
end
local function apStk()
capUi()
local m = math.clamp(stkVal.Value, 0, 2.5)
for o, b in base.str do
if o and o.Parent then
pcall(function()
o.Thickness = b * m
end)
end
end
end
local function uiOpen()
for _, n in sectionsList do
local fr = mainGui:FindFirstChild(n)
if fr and fr:IsA("GuiObject") and fr.Visible then
return true
end
end
return false
end
local function fxSync()
local on = uiOpen()
dimDesiredVisible = on and dimVal.Value > 0.01
dimDesiredTransparency = 1 - math.clamp(dimVal.Value, 0, 0.85)
applyDimState(true)
syncDimLoop()
end
capUi()
apRad()
apPan()
apStk()
fxSync()
radVal.Changed:Connect(function()
apRad()
saveCfg("UiRound", { value = math.clamp(radVal.Value, 0, 18) })
end)
panVal.Changed:Connect(function()
apPan()
saveCfg("UiAlpha", { value = math.clamp(panVal.Value, 0, 0.35) })
end)
stkVal.Changed:Connect(function()
apStk()
saveCfg("UiStroke", { value = math.clamp(stkVal.Value, 0, 2.5) })
end)
dimVal.Changed:Connect(function()
fxSync()
saveCfg("UiDim", { value = math.clamp(dimVal.Value, 0, 0.65) })
end)
for _, n in sectionsList do
local fr = mainGui:FindFirstChild(n)
if fr and fr.GetPropertyChangedSignal then
fr:GetPropertyChangedSignal("Visible"):Connect(function()
task.defer(fxSync)
end)
end
end
local settings = mainGui:FindFirstChild("Settings", true)
local holder = settings and settings:FindFirstChild("Holder")
local template
if holder then
for _, c in holder:GetChildren() do
if c:IsA("Frame") and c.Name == "Button" then
template = c
break
end
end
end
if holder and template then
local function mkDock(fr)
local d = Instance.new("Frame")
d.Name = "Dock"
d.BackgroundTransparency = 1
d.AnchorPoint = Vector2.new(1, 0.5)
d.Position = UDim2.new(1, -14, 0.5, 0)
d.Size = UDim2.new(0, 320, 0, 18)
d.Parent = fr
local l = Instance.new("UIListLayout")
l.FillDirection = Enum.FillDirection.Horizontal
l.HorizontalAlignment = Enum.HorizontalAlignment.Right
l.VerticalAlignment = Enum.VerticalAlignment.Center
l.Padding = UDim.new(0, 8)
l.Parent = d
return d
end
local function mkBox(par)
local b = Instance.new("TextBox")
b.Name = "ValueBox"
b.Size = UDim2.new(0, 70, 0, 18)
b.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
b.BorderSizePixel = 0
b.ClearTextOnFocus = false
b.TextXAlignment = Enum.TextXAlignment.Center
b.Font = Enum.Font.Gotham
b.TextSize = 12
b.TextColor3 = Color3.new(1, 1, 1)
b.Parent = par
return b
end
local function mkSl(par, w)
local s = Instance.new("Frame")
s.Name = "Slider"
s.BackgroundTransparency = 1
s.Size = UDim2.new(0, w or 150, 0, 18)
s.Parent = par
local bar = Instance.new("Frame")
bar.Name = "Bar"
bar.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
bar.BorderSizePixel = 0
bar.AnchorPoint = Vector2.new(0.5, 0.5)
bar.Position = UDim2.new(0.5, 0, 0.5, 0)
bar.Size = UDim2.new(1, 0, 0, 6)
bar.Parent = s
local bc = Instance.new("UICorner")
bc.CornerRadius = UDim.new(0, 3)
bc.Parent = bar
local fill = Instance.new("Frame")
fill.Name = "Fill"
fill.BorderSizePixel = 0
fill.AnchorPoint = Vector2.new(0, 0.5)
fill.Position = UDim2.new(0, 0, 0.5, 0)
fill.Size = UDim2.new(0, 0, 1, 0)
fill.Parent = bar
local fc = Instance.new("UICorner")
fc.CornerRadius = UDim.new(0, 3)
fc.Parent = fill
local kb = Instance.new("Frame")
kb.Name = "Knob"
kb.Size = UDim2.new(0, 12, 0, 12)
kb.AnchorPoint = Vector2.new(0.5, 0.5)
kb.BackgroundColor3 = Color3.new(1, 1, 1)
kb.BorderSizePixel = 0
kb.Parent = bar
local kc = Instance.new("UICorner")
kc.CornerRadius = UDim.new(1, 0)
kc.Parent = kb
return s, bar, fill, kb
end
local function makeSizeSlider(id, titleText, descText, numValue, minV, maxV)
local fr = __dcm_registerCustom(template:Clone())
fr.Parent = holder
fr.Visible = true
fr.LayoutOrder = -2
local tl = fr:FindFirstChild("Title", true)
local dl = fr:FindFirstChild("Desc", true)
if tl then
tl.Text = titleText
end
if dl then
dl.Text = descText
end
local ob = fr:FindFirstChild("Button", true)
if ob then
ob:Destroy()
end
local dock = mkDock(fr)
local vb = mkBox(dock)
local sl, bar, fill, kb = mkSl(dock, 150)
local function setVis(v)
v = math.clamp(v, minV, maxV)
local a = (v - minV) / (maxV - minV)
fill.Size = UDim2.new(a, 0, 1, 0)
kb.Position = UDim2.new(a, 0, 0.5, 0)
vb.Text = string.format("%.2f", v)
end
local function apply(v)
v = math.clamp(v, minV, maxV)
numValue.Value = v
setVis(v)
saveCfg(id, { value = v })
end
setVis(numValue.Value)
local drag = false
local function fromIn(input)
local rel = 0
pcall(function()
rel = (input.Position.X - bar.AbsolutePosition.X) / bar.AbsoluteSize.X
end)
rel = math.clamp(rel, 0, 1)
apply(minV + (maxV - minV) * rel)
end
bar.InputBegan:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
drag = true
fromIn(input)
end
end)
local ui = S("UserInputService")
if ui then
ui.InputChanged:Connect(function(input)
if
drag
and (
input.UserInputType == Enum.UserInputType.MouseMovement
or input.UserInputType == Enum.UserInputType.Touch
)
then
fromIn(input)
end
end)
ui.InputEnded:Connect(function(input)
if
input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch
then
drag = false
end
end)
end
vb.FocusLost:Connect(function()
local v = tonumber(vb.Text or "")
if v then
apply(v)
else
setVis(numValue.Value)
end
end)
local function updDock()
local w = math.clamp(math.floor(fr.AbsoluteSize.X * 0.46), 240, 380)
dock.Size = UDim2.new(0, w, 0, 18)
local sw = math.clamp(w - 78, 140, 280)
sl.Size = UDim2.new(0, sw, 0, 18)
end
updDock()
fr:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
task.defer(updDock)
end)
end
makeSizeSlider("UiRound", "UI roundness", "Adds extra roundness to panels and cards", radVal, 0, 18)
makeSizeSlider(
"UiAlpha",
"Panel transparency",
"Makes the heavy panels cleaner and less chunky",
panVal,
0,
0.35
)
makeSizeSlider("UiStroke", "Stroke scale", "Scales borders and outlines across Delta", stkVal, 0, 2.5)
makeSizeSlider("UiDim", "Open dim", "Darkens the game behind Delta while it is open", dimVal, 0, 0.65)
end
end)
end
end
do
local __lt = __lt
if (identifyexecutor and identifyexecutor() or ""):lower() ~= "delta" then
return
end
local env = __dcm_env
if type(env) ~= "table" then
return
end
if env.__DeltaHubMusicPatch and type(env.__DeltaHubMusicPatch.stop) == "function" then
pcall(env.__DeltaHubMusicPatch.stop)
end
local ref = cloneref and type(cloneref) == "function" and cloneref or function(v)
return v
end
local srv = setmetatable({}, {
__index = function(t, k)
local ok, v = pcall(function()
return __lt.cs(k, ref)
end)
if ok and v then
rawset(t, k, v)
return v
end
end,
})
local function S(n)
return srv[n]
end
local UIS = S("UserInputService")
local TS = S("TweenService")
local RS = S("RunService")
local SS = S("SoundService")
local HS = S("HttpService")
local CG = S("CoreGui")
local root = gethui and gethui() or CG
local rq = request or http_request or syn and syn.request
local st = {
con = {},
pg = {},
snd = nil,
muted = {},
gui = nil,
fn = {},
}
local function con(c)
if c then
st.con[#st.con + 1] = c
end
return c
end
local function disc()
for _, c in st.con do
pcall(function()
c:Disconnect()
end)
end
st.con = {}
end
local function stop()
disc()
if st.snd then
pcall(function()
st.snd:Destroy()
end)
st.snd = nil
end
if st.pg.music then
pcall(function()
st.pg.music:Destroy()
end)
end
if st.pg.musicButton then
pcall(function()
st.pg.musicButton:Destroy()
end)
st.pg.musicButton = nil
end
if st.pg.sh and st.pg.sh:FindFirstChild("LT_ScriptHub") then
pcall(function()
st.pg.sh.LT_ScriptHub:Destroy()
end)
end
for o, v in st.muted do
if o and o.Parent then
pcall(function()
o.Visible = v
end)
end
end
st.muted = {}
env.__DeltaHubMusicPatch = nil
end
env.__DeltaHubMusicPatch = {
stop = stop,
}
local function trim(s)
if type(s) ~= "string" then
return ""
end
return (s:gsub("^%s+", ""):gsub("%s+$", ""))
end
local function isg(s)
if typeof(s) ~= "string" or s == "" then
return false
end
return not s:match("^[%w _%-]+$")
end
local function getMain()
for _, g in root:GetChildren() do
if g:IsA("ScreenGui") and isg(g.Name) then
if
g:FindFirstChild("Executor", true)
and g:FindFirstChild("Scripthub", true)
and g:FindFirstChild("Sidebar", true)
then
return g
end
end
end
end
local gui = getMain()
if not gui then
return
end
st.gui = gui
local sb = gui:FindFirstChild("Sidebar", true)
local sh = gui:FindFirstChild("Scripthub")
local ex = gui:FindFirstChild("Executor")
local hm = gui:FindFirstChild("Home")
local se = gui:FindFirstChild("Settings")
local co = gui:FindFirstChild("Console")
if not (sb and sh) then
return
end
st.pg.sh = sh
local sec = {
"Executor",
"Home",
"Scripthub",
"Settings",
"Console",
"Music",
}
local musicState = {
openPos = UDim2.new(0.476246715, 0, 0.508232415, 0),
closedPos = UDim2.new(0.400000006, 0, 0.508232415, 0),
frame = nil,
button = nil,
tween = nil,
activeTab = nil,
icon = {
sheetUrl = "https://gitlab.com/ltseverydayyou/Nameless-Admin/-/raw/main/NAimages/sheet.png",
sheetAsset = nil,
rectOffset = Vector2.new(371, 806),
rectSize = Vector2.new(23, 33),
},
}
local syncTabColors
local function tweenMusic(toPos, show, hideAfter)
if not musicState.frame then
return
end
if musicState.tween then
pcall(function()
musicState.tween:Cancel()
end)
musicState.tween = nil
end
if show then
musicState.frame.Visible = true
end
if TS then
musicState.frame.Position = musicState.frame.Position
musicState.tween =
TS:Create(musicState.frame, TweenInfo.new(0.22, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
Position = toPos,
})
if hideAfter then
con(musicState.tween.Completed:Connect(function()
if musicState.frame then
musicState.frame.Visible = false
end
end))
end
musicState.tween:Play()
else
musicState.frame.Position = toPos
if hideAfter then
musicState.frame.Visible = false
end
end
end
local function openMusic()
if not musicState.frame then
return
end
musicState.activeTab = "Music"
for _, n in sec do
local p = gui:FindFirstChild(n)
if p and p:IsA("GuiObject") and p ~= musicState.frame then
p.Visible = false
end
end
musicState.frame.Position = musicState.closedPos
tweenMusic(musicState.openPos, true, false)
task.defer(function()
syncTabColors("Music")
end)
end
local function closeMusic(anim)
if not musicState.frame then
return
end
if not musicState.frame.Visible then
musicState.frame.Position = musicState.closedPos
return
end
if anim then
tweenMusic(musicState.closedPos, false, true)
else
musicState.frame.Position = musicState.closedPos
musicState.frame.Visible = false
end
end
local function hideAll(exn)
if exn == "Music" then
musicState.activeTab = "Music"
openMusic()
return
end
musicState.activeTab = exn
closeMusic(true)
for _, n in sec do
local p = gui:FindFirstChild(n)
if p and p:IsA("GuiObject") and n ~= "Music" then
p.Visible = n == exn
end
end
task.defer(function()
syncTabColors(exn)
end)
end
local function txtOf(o)
for _, d in o:QueryDescendants("Instance") do
if d:IsA("TextLabel") or d:IsA("TextButton") then
return d
end
end
end
local function gbtn(nm)
for _, d in sb:QueryDescendants("GuiButton") do
if d.Name == nm then return d
end
end
end
local sidebarRefs = {
home = gbtn("Home"),
scripthub = gbtn("Scripthub"),
settings = gbtn("Settings"),
executor = gbtn("Executor"),
console = gbtn("Console"),
toggle = gbtn("ToggleUI"),
activeColor = sb:FindFirstChild("ActiveColor"),
inactiveColor = sb:FindFirstChild("InactiveColor"),
}
local function imgOf(btn)
if not btn then
return nil
end
return btn:FindFirstChildWhichIsA("ImageLabel")
end
local function improveSidebarTouch(btn)
if not (btn and btn:IsA("GuiButton") and UIS and UIS.TouchEnabled) then
return btn
end
if btn:GetAttribute("LT_TouchSized") then
return btn
end
btn:SetAttribute("LT_TouchSized", true)
pcall(function()
btn.Size = UDim2.new(btn.Size.X.Scale, btn.Size.X.Offset + 8, btn.Size.Y.Scale, btn.Size.Y.Offset + 14)
end)
return btn
end
local offBg = sidebarRefs.scripthub and sidebarRefs.scripthub.BackgroundColor3 or Color3.fromRGB(41, 45, 58)
local offImg = imgOf(sidebarRefs.scripthub) and imgOf(sidebarRefs.scripthub).ImageColor3
or Color3.fromRGB(138, 145, 164)
local onImg = Color3.new(1, 1, 1)
improveSidebarTouch(sidebarRefs.home)
improveSidebarTouch(sidebarRefs.scripthub)
improveSidebarTouch(sidebarRefs.settings)
improveSidebarTouch(sidebarRefs.executor)
improveSidebarTouch(sidebarRefs.console)
improveSidebarTouch(sidebarRefs.toggle)
local function bgOn()
return sidebarRefs.activeColor and sidebarRefs.activeColor.Value or col.ac
end
local function bgOff()
return sidebarRefs.inactiveColor and sidebarRefs.inactiveColor.Value or offBg
end
local function applyBtnState(btn, on)
if not btn then
return
end
local targetBg = on and bgOn() or bgOff()
local targetImg = on and onImg or offImg
local img = imgOf(btn)
if TS then
pcall(function()
TS:Create(btn, TweenInfo.new(0.16, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
BackgroundColor3 = targetBg,
}):Play()
end)
if img then
pcall(function()
TS:Create(img, TweenInfo.new(0.16, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
ImageColor3 = targetImg,
}):Play()
end)
end
else
pcall(function()
btn.BackgroundColor3 = targetBg
end)
if img then
pcall(function()
img.ImageColor3 = targetImg
end)
end
end
end
local function visibleTab()
for _, n in sec do
local p = gui:FindFirstChild(n)
if p and p:IsA("GuiObject") and p.Visible then
return n
end
end
end
function syncTabColors(forceTab)
local curTab = forceTab or visibleTab()
local map = {
Home = sidebarRefs.home,
Executor = sidebarRefs.executor,
Scripthub = sidebarRefs.scripthub,
Settings = sidebarRefs.settings,
Console = sidebarRefs.console,
Music = musicState.button,
}
for n, b in map do
applyBtnState(b, curTab == n)
end
end
local function muteObj(d)
if not (d and d:IsA("GuiObject")) then
return
end
local keep = false
if d == sh then
keep = true
elseif d:FindFirstAncestor("LT_ScriptHub") then
keep = true
end
if keep then
return
end
if st.muted[d] == nil then
st.muted[d] = d.Visible
end
local master = rawget(__dcm_env, "__DeltaCustomizationMasterRuntime")
if type(master) == "table" and type(master.setTracked) == "function" then
master.setTracked(d, "Visible", false)
else
pcall(function()
d.Visible = false
end)
end
if d.GetPropertyChangedSignal then
con(d:GetPropertyChangedSignal("Visible"):Connect(function()
if d.Parent and not d:FindFirstAncestor("LT_ScriptHub") then
pcall(function()
d.Visible = false
end)
end
end))
end
end
local function muteSh()
for _, d in sh:QueryDescendants("Instance") do
muteObj(d)
end
end
st.fn.setupHubMusic = function()
local col = {
bg = Color3.fromRGB(20, 22, 26),
bg2 = Color3.fromRGB(30, 33, 40),
cd = Color3.fromRGB(26, 29, 36),
st = Color3.fromRGB(70, 75, 85),
ac = Color3.fromRGB(79, 164, 242),
tx = Color3.fromRGB(255, 255, 255),
td = Color3.fromRGB(186, 192, 205),
su = Color3.fromRGB(52, 211, 153),
wa = Color3.fromRGB(255, 179, 71),
er = Color3.fromRGB(244, 63, 94),
}
local function mk(class, props, kids)
local o = Instance.new(class)
for k, v in props or {} do
o[k] = v
end
for _, c in kids or {} do
c.Parent = o
end
return o
end
local function req(u)
local body
local status = 0
if type(rq) == "function" then
local ok, r = pcall(rq, {
Url = u,
Method = "GET",
Headers = {
["User-Agent"] = "Roblox/Http/1.1",
["Accept"] = "application/json",
},
})
if ok and r then
body = r.Body or r.body
status = r.StatusCode or r.Status or r.status_code or 0
end
end
if type(body) ~= "string" or body == "" then
local ok2, r2 = pcall(function()
return game:HttpGet(u)
end)
if ok2 and type(r2) == "string" and r2 ~= "" then
body = r2
status = 0
end
end
if type(body) ~= "string" or body == "" then
return nil, status
end
local ok3, dec = pcall(function()
return __lt.cm("HttpService", "JSONDecode", body)
end)
if ok3 then
return dec, status
end
return nil, status
end
local SCRIPTBLOX_BASE = "https://scriptblox.com"
local RSCRIPTS_BASE = "https://rscripts.net"
local ROSCRIPTS_BASE = "https://roscripts.io"
local HAXHELL_BASE = "https://haxhell.com"
local IMAGE_CACHE_DIR = "DeltaCustom/ScriptHubImages"
local MUSIC_CACHE_DIR = "DeltaCustom/DeltaMusic"
local MUSIC_CFG_PATH = MUSIC_CACHE_DIR .. "/_config.json"
local MUSIC_EXTS = {
mp3 = true,
ogg = true,
flac = true,
wav = true,
}
local musicCfg = {}
local function sanitizeFileName(str)
return tostring(str or ""):gsub("[^%w%._%-]", "_")
end
local function hashString(str)
local h = 0
for i = 1, #str do
h = (h * 31 + string.byte(str, i)) % 4294967296
end
return string.format("%08x", h)
end
local function clearImageCache()
if
type(isfolder) ~= "function"
or type(listfiles) ~= "function"
or type(isfile) ~= "function"
or type(delfile) ~= "function"
then
return false
end
local okExists, exists = pcall(isfolder, IMAGE_CACHE_DIR)
if not okExists or not exists then
return false
end
local okList, files = pcall(listfiles, IMAGE_CACHE_DIR)
if not okList or type(files) ~= "table" then
return false
end
for _, path in files do
if type(path) == "string" and path ~= "" then
pcall(delfile, path)
end
end
return true
end
local function ensureImageFolder()
if type(isfolder) ~= "function" or type(makefolder) ~= "function" then
return false
end
local ok, ex = pcall(isfolder, IMAGE_CACHE_DIR)
if ok and ex then
return true
end
return pcall(makefolder, IMAGE_CACHE_DIR) == true
end
local function ensureMusicFolder()
if type(isfolder) ~= "function" or type(makefolder) ~= "function" then
return false
end
local ok, ex = pcall(isfolder, MUSIC_CACHE_DIR)
if ok and ex then
return true
end
return pcall(makefolder, MUSIC_CACHE_DIR) == true
end
local function getAudioExt(path)
if type(path) ~= "string" then
return nil
end
local clean = path:match("([^?#]+)") or path
local ext = clean:match("%.([%w]+)$")
if not ext then
return nil
end
ext = ext:lower()
return MUSIC_EXTS[ext] and ext or nil
end
local function normalizeAudioUrl(url)
if type(url) ~= "string" then
return nil
end
local t = trim(url)
if t == "" then
return nil
end
t = t:gsub(" ", "%%20")
t = t:gsub(
"^https://github%.com/([^/]+)/([^/]+)/blob/([^/]+)/(.+)$",
"https://raw.githubusercontent.com/%1/%2/%3/%4"
)
return t
end
local function deriveAudioFileName(url, ext)
local name = url:match("/([^/%?#]+)") or "track"
name = name:match("([^?#]+)") or name
local base = sanitizeFileName(name:gsub("%.[^%.]+$", ""))
base = base ~= "" and base or "track"
return string.format("%s_%s.%s", base, hashString(url), ext)
end
local function resolveMusicAsset(full)
if type(full) ~= "string" or full == "" or type(getcustomasset) ~= "function" or type(isfile) ~= "function" then
return nil
end
local okEx, ex = pcall(isfile, full)
if not (okEx and ex) then
return nil
end
local okAsset, asset = pcall(getcustomasset, full)
if okAsset and type(asset) == "string" and asset ~= "" then
return asset
end
return nil
end
local function loadMusicCfg()
if HS and type(isfile) == "function" and type(readfile) == "function" and isfile(MUSIC_CFG_PATH) then
local ok, data = pcall(readfile, MUSIC_CFG_PATH)
if ok and type(data) == "string" and data ~= "" then
local okDec, dec = pcall(function()
return __lt.cm("HttpService", "JSONDecode", data)
end)
if okDec and type(dec) == "table" then
musicCfg = dec
return
end
end
end
musicCfg = {}
end
local function saveMusicCfg()
if not (HS and type(writefile) == "function" and ensureMusicFolder()) then
return false
end
return writeJsonFile(MUSIC_CFG_PATH, musicCfg)
end
local function scanMusicFiles()
local list = {}
if type(listfiles) ~= "function" or not ensureMusicFolder() then
return list
end
local okList, files = pcall(listfiles, MUSIC_CACHE_DIR)
if not okList or type(files) ~= "table" then
return list
end
for _, path in files do
if type(path) == "string" then
local ext = getAudioExt(path)
if ext then
local name = path:match("([^/\\]+)$") or path
list[#list + 1] = {
path = path,
name = name,
asset = resolveMusicAsset(path),
}
end
end
end
table.sort(list, function(a, b)
return (a.name or ""):lower() < (b.name or ""):lower()
end)
return list
end
local function makeMusicFolderDropdown(par, y, z, onPick, onToggle)
local state = {
open = false,
menuHeight = 0,
}
local hoverBg = mk("Frame", {
Name = "LocalTrackHover",
BackgroundColor3 = Color3.fromRGB(41, 45, 56),
BackgroundTransparency = 1,
BorderSizePixel = 0,
Position = UDim2.new(0, 16, 0, y),
Size = UDim2.new(1, -32, 0, 32),
Parent = par,
ZIndex = z,
}, {
mk("UICorner", {
CornerRadius = UDim.new(0, 10),
}),
})
local btn = mk("TextButton", {
Name = "LocalTrackButton",
BackgroundColor3 = col.bg,
BorderSizePixel = 0,
Position = UDim2.new(0, 16, 0, y),
Size = UDim2.new(1, -32, 0, 32),
Text = "",
AutoButtonColor = false,
Parent = par,
ZIndex = z + 1,
}, {
mk("UICorner", {
CornerRadius = UDim.new(0, 10),
}),
mk("UIStroke", {
Color = col.st,
Transparency = 0.3,
}),
})
local value = mk("TextLabel", {
Name = "Value",
BackgroundTransparency = 1,
Position = UDim2.new(0, 12, 0, 0),
Size = UDim2.new(1, -38, 1, 0),
Text = "Pick local audio from DeltaMusic",
TextColor3 = col.tx,
Font = Enum.Font.GothamSemibold,
TextSize = 13,
TextTruncate = Enum.TextTruncate.AtEnd,
TextXAlignment = Enum.TextXAlignment.Left,
Parent = btn,
ZIndex = z + 2,
})
local arrow = mk("TextLabel", {
Name = "Arrow",
BackgroundTransparency = 1,
AnchorPoint = Vector2.new(1, 0.5),
Position = UDim2.new(1, -12, 0.5, 0),
Size = UDim2.new(0, 18, 0, 18),
Text = "v",
TextColor3 = col.td,
Font = Enum.Font.GothamBold,
TextSize = 12,
Parent = btn,
ZIndex = z + 2,
})
local menu = mk("Frame", {
Name = "LocalTrackMenu",
BackgroundColor3 = Color3.fromRGB(37, 41, 52),
BorderSizePixel = 0,
Position = UDim2.new(0, 16, 0, y + 38),
Size = UDim2.new(1, -32, 0, 0),
Visible = false,
Parent = par,
ZIndex = z + 3,
}, {
mk("UICorner", {
CornerRadius = UDim.new(0, 12),
}),
mk("UIStroke", {
Color = Color3.fromRGB(71, 79, 97),
Transparency = 0.22,
}),
})
local menuList = mk("ScrollingFrame", {
Name = "List",
BackgroundTransparency = 1,
BorderSizePixel = 0,
CanvasSize = UDim2.new(0, 0, 0, 0),
ElasticBehavior = Enum.ElasticBehavior.Never,
ScrollBarThickness = 3,
ScrollBarImageColor3 = col.st,
ScrollingDirection = Enum.ScrollingDirection.Y,
TopImage = "",
MidImage = "",
BottomImage = "",
Size = UDim2.new(1, 0, 1, 0),
Parent = menu,
ZIndex = z + 4,
}, {
mk("UIPadding", {
PaddingTop = UDim.new(0, 8),
PaddingBottom = UDim.new(0, 8),
PaddingLeft = UDim.new(0, 10),
PaddingRight = UDim.new(0, 10),
}),
mk("UIListLayout", {
Padding = UDim.new(0, 6),
SortOrder = Enum.SortOrder.LayoutOrder,
}),
})
local function setHover(on)
hoverBg.BackgroundTransparency = on and 0 or 1
end
local function setMenuOpen(open)
if state.open == open then
return
end
state.open = open
menu.Visible = open
arrow.Text = open and "^" or "v"
if TS then
pcall(function()
TS:Create(btn, TweenInfo.new(0.14, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
BackgroundColor3 = open and Color3.fromRGB(34, 38, 49) or col.bg,
}):Play()
end)
else
btn.BackgroundColor3 = open and Color3.fromRGB(34, 38, 49) or col.bg
end
if onToggle then
onToggle(open, state.menuHeight)
end
end
local function setValueText(text)
value.Text = trim(text or "") ~= "" and tostring(text) or "Pick local audio from DeltaMusic"
end
local function rebuild()
for _, child in menuList:GetChildren() do
if not child:IsA("UIListLayout") and not child:IsA("UIPadding") then
child:Destroy()
end
end
local items = scanMusicFiles()
if #items == 0 then
mk("TextLabel", {
Name = "Empty",
BackgroundTransparency = 1,
Size = UDim2.new(1, 0, 0, 28),
Text = "No local audio files found",
TextColor3 = col.td,
Font = Enum.Font.Gotham,
TextSize = 12,
TextXAlignment = Enum.TextXAlignment.Left,
Parent = menuList,
ZIndex = z + 5,
})
else
for i, item in items do
local row = mk("TextButton", {
Name = "Track_" .. i,
BackgroundColor3 = Color3.fromRGB(43, 47, 58),
BorderSizePixel = 0,
Size = UDim2.new(1, 0, 0, 30),
Text = item.name or "",
TextColor3 = col.tx,
Font = Enum.Font.GothamSemibold,
TextSize = 12,
TextTruncate = Enum.TextTruncate.AtEnd,
TextXAlignment = Enum.TextXAlignment.Left,
AutoButtonColor = false,
Parent = menuList,
ZIndex = z + 5,
}, {
mk("UIPadding", {
PaddingLeft = UDim.new(0, 10),
PaddingRight = UDim.new(0, 10),
}),
mk("UICorner", {
CornerRadius = UDim.new(0, 8),
}),
})
con(row.MouseEnter:Connect(function()
row.BackgroundColor3 = Color3.fromRGB(51, 56, 68)
end))
con(row.MouseLeave:Connect(function()
row.BackgroundColor3 = Color3.fromRGB(43, 47, 58)
end))
con(row.MouseButton1Click:Connect(function()
setValueText(item.name)
setMenuOpen(false)
if onPick then
onPick(item)
end
end))
end
end
local count = math.max(#items, 1)
local fullHeight = count * 30 + math.max(count - 1, 0) * 6 + 16
local visibleHeight = math.min(fullHeight, 172)
state.menuHeight = visibleHeight
menu.Size = UDim2.new(1, -32, 0, visibleHeight)
menuList.CanvasSize = UDim2.new(0, 0, 0, fullHeight)
if state.open and onToggle then
onToggle(true, state.menuHeight)
end
end
con(btn.MouseButton1Click:Connect(function()
if not state.open then
rebuild()
end
setMenuOpen(not state.open)
end))
con(btn.MouseEnter:Connect(function()
setHover(true)
end))
con(btn.MouseLeave:Connect(function()
setHover(false)
end))
return {
button = btn,
menu = menu,
rebuild = rebuild,
close = function()
setMenuOpen(false)
end,
setText = setValueText,
}
end
local function findLocalMusicEntry(query)
query = trim(query)
if query == "" then
return nil
end
local lower = query:lower()
for _, item in scanMusicFiles() do
local nm = (item.name or ""):lower()
local base = nm:gsub("%.[^%.]+$", "")
if lower == nm or lower == base then
return item
end
end
return nil
end
local httpGetBinary
local function downloadMusicAsset(url)
if
type(getcustomasset) ~= "function"
or type(writefile) ~= "function"
or type(isfile) ~= "function"
or not ensureMusicFolder()
then
return nil, "Custom music requires file support and getcustomasset."
end
local norm = normalizeAudioUrl(url)
local ext = getAudioExt(norm)
if not norm or not ext then
return nil, "Unsupported audio format. Use mp3, ogg, flac, or wav."
end
local full = MUSIC_CACHE_DIR .. "/" .. deriveAudioFileName(norm, ext)
local okEx, ex = pcall(isfile, full)
if not (okEx and ex) then
local data = httpGetBinary(norm)
if not (type(data) == "string" and data ~= "") then
return nil, "Failed to download audio."
end
local okW = pcall(writefile, full, data)
if not okW then
return nil, "Failed to save audio."
end
end
local asset = resolveMusicAsset(full)
if not asset then
return nil, "Failed to load audio asset."
end
return {
asset = asset,
name = full:match("([^/\\]+)$") or full,
path = full,
}, nil
end
ensureMusicFolder()
loadMusicCfg()
local function deriveImageFileName(url)
local name = url:match("/([^/%?#]+)") or "image"
name = name:match("([^?#]+)") or name
local base = sanitizeFileName(name:match("(.+)%.") or name)
return string.format("%s_%s.bin", base ~= "" and base or "image", hashString(url))
end
clearImageCache()
local function normalizeImageUrl(url, base)
if type(url) ~= "string" or url == "" then
return nil
end
local t = trim(url)
if t == "" then
return nil
end
if t:match("^rbxassetid://") or t:match("^rbxthumb://") then
return nil
end
if t:match("^https?://") then
return t
end
if t:sub(1, 2) == "//" then
return "https:" .. t
end
if t:sub(1, 1) == "/" then
return (base or "") .. t
end
return base and (base .. "/" .. t) or t
end
local function isMeaningfulImageUrl(url)
if type(url) ~= "string" or url == "" then
return false
end
return not url:lower():find("no%-script")
end
function httpGetBinary(url, headers)
if type(url) ~= "string" or url == "" then
return nil
end
local function tryRequest(hdr)
if type(rq) ~= "function" then
return nil
end
local h = {}
if type(hdr) == "table" then
for k, v in hdr do
h[k] = v
end
end
h["User-Agent"] = h["User-Agent"] or "Roblox/Http/1.1"
h["Accept"] = h["Accept"] or "*/*"
local ok, res = pcall(rq, {
Url = url,
Method = "GET",
Headers = h,
})
if ok and res then
local code = res.StatusCode or res.Status or res.status_code or 0
local body = res.Body or res.body
if (code == 0 or code >= 200 and code < 300) and type(body) == "string" and body ~= "" then
return body
end
end
return nil
end
local data = tryRequest(headers)
if type(data) == "string" and data ~= "" then
return data
end
local ok2, body2 = pcall(function()
return game:HttpGet(url)
end)
if ok2 and type(body2) == "string" and body2 ~= "" then
return body2
end
return tryRequest(nil)
end
local function downloadImageAsset(url)
if type(url) ~= "string" or url == "" then
return nil
end
if type(getcustomasset) ~= "function" or type(writefile) ~= "function" or type(isfile) ~= "function" then
return nil
end
if not ensureImageFolder() then
return nil
end
local full = IMAGE_CACHE_DIR .. "/" .. deriveImageFileName(url)
local okEx, ex = pcall(isfile, full)
if not (okEx and ex) then
local host = url:match("^https?://([^/]+)") or ""
local hdr
if host:find("rscripts%.net") then
hdr = { Referer = RSCRIPTS_BASE }
elseif host:find("robloxscripts%.com") then
hdr = { Referer = "https://robloxscripts.com" }
elseif host:find("haxhell%.com") then
hdr = { Referer = HAXHELL_BASE }
elseif host:find("rbxcdn%.com") then
hdrLoads code from the internet. It downloads more code when it runs (loadstring + HttpGet), which can change after it was posted. From: gitlab.com, raw.githubusercontent.com, scriptblox.com, rscripts.net, roscripts.io, haxhell.com.
Remaking delta ui

Universal