Run it
Copy the script and paste it into your executor.
RunService = :()
UserInputService = :()
Players = :()
LocalPlayer = Players.LocalPlayer
PlayerScripts = LocalPlayer:()
Client = PlayerScripts:()
Gameplay = Client:()
UI = Client:()
Note = (Gameplay:())
Input = (Gameplay:())
Hud = (Gameplay:())
State = (Client:():())
Results = (UI:():())
Round = (Gameplay:())
.FunkyDuelsCleanup
(.FunkyDuelsCleanup)
Config = {
Autoplay = ,
HitMode = ,
LegitJitter = ,
AutoHold = ,
ServerReplication = ,
PreventMisses = ,
}
activeHolds = {}
handledNotes = ({}, { __mode = })
connections = {}
originalMethods = {}
cache = {
noteCtx = ,
noteCtxRound = ,
inputHp = ,
inputHr = ,
inputRound = ,
}
rawTryHitNote = Note.TryHitNote
rawGetResults = Note.GetResults
rawApplyGhostMiss = Note.ApplyGhostMiss
rawSetNoteResolvedCallback = Note.SetNoteResolvedCallback
(val, defaultVal, maxVal)
n = (val) (defaultVal )
n ~= n n == .huge n == -.huge
n = defaultVal
.(.(n), , maxVal )
()
ok, upvals = (debug.getupvalues, rawTryHitNote)
ok upvals
ctx = {
conductor = upvals[],
timingOffset = upvals[] ,
noteList = upvals[],
roundContext = upvals[],
match = upvals[],
hitNote = upvals[]
}
cache.noteCtx = ctx
cache.noteCtxRound = ctx.roundContext
ctx
()
ctx = cache.noteCtx
ctx
ctx.roundContext ~= cache.noteCtxRound
ctx.noteList
ctx.conductor
ctx.roundContext
()
ctx
(roundCtx)
ok, upvals = (debug.getupvalues, Input.Init)
ok upvals
bindKb = upvals[]
bindKb
ok2, inner = (debug.getupvalues, bindKb)
ok2 inner
cache.inputHp = inner[]
cache.inputHr = inner[]
cache.inputRound = roundCtx
(roundCtx)
cache.inputRound ~= roundCtx cache.inputHp
(roundCtx)
cache.inputHp, cache.inputHr
(note, context)
context context.SessionLocalSide
note.IsPlayer ==
(note.IsPlayer == ) == (context.SessionLocalSide == )
showStats = debug.(Results.Show)[]
origSetCount = debug.(showStats)[]
u63 = debug.(origSetCount)[]
(frame, count)
frame frame:()
Index = frame.Index
_, c (frame:())
c ~= Index c:()
c:()
Index.Visible =
num = (count, , )
str = .(, num)
i = , #str
digit = (str:(i, i))
digit u63[digit + ] u63[digit + ][]
clone = Index:()
clone.LayoutOrder = i
clone.Visible =
clone.Image = u63[digit + ][].assetId
clone.Parent = frame
debug.(showStats, , safeSetCount)
debug.(Results.Show, , safeSetCount)
originalMethods.SetNoteResolvedCallback = rawSetNoteResolvedCallback
Note.SetNoteResolvedCallback = (callback)
wrappedCallback = (target, count, isHit, dir, noteData)
target == Config.ServerReplication
noteData
noteData.ResolvedSongTimeMs = noteData.TimeMs
Config.PreventMisses
isHit =
(target, count, isHit, dir, noteData)
(wrappedCallback)
originalMethods.ApplyGhostMiss = rawApplyGhostMiss
Note.ApplyGhostMiss = (dir)
Config.PreventMisses
(dir)
originalMethods.Show = Results.Show
Results.Show = (pStats, songName, diff, oppStats, isSolo)
success = (()
originalMethods.(pStats, songName, diff, oppStats, isSolo)
)
success
(()
up = debug.(originalMethods.Show)
up[] up[].Visible =
)
onSongEnded = debug.(Round.StartRound)[]
songEndWatchdogTriggered =
lastActiveNoteTime =
watchdogTick =
(liveSongTime, noteList, roundContext)
songEndWatchdogTriggered
Results.()
roundContext roundContext.RoundOver
hasUnresolvedNotes =
maxTime =
n = #noteList
i = , n
note = noteList[i]
note.Hit note.Missed
hasUnresolvedNotes =
t = note.TimeMs
t t > maxTime
maxTime = t
maxTime >
lastActiveNoteTime = maxTime
hasUnresolvedNotes lastActiveNoteTime > liveSongTime >= lastActiveNoteTime +
songEndWatchdogTriggered =
.(()
onSongEnded Results.() roundContext.RoundOver
(onSongEnded)
)
()
State.() ~=
.(activeHolds)
.(handledNotes)
songEndWatchdogTriggered =
lastActiveNoteTime =
watchdogTick =
cache.noteCtx =
cache.noteCtxRound =
cache.inputHp =
cache.inputHr =
cache.inputRound =
ctx = ()
ctx ctx.conductor (ctx.conductor.GetLiveSongTimeMs) ~= ctx.noteList ctx.roundContext
ctx.roundContext.RoundOver Note.()
liveSongTime = ctx.conductor.() + ctx.timingOffset
watchdogTick = watchdogTick +
watchdogTick >=
watchdogTick =
(liveSongTime, ctx.noteList, ctx.roundContext)
Config.Autoplay
hp, hr = (ctx.roundContext)
Config.AutoHold
dir, hold (activeHolds)
liveSongTime >= hold.endTime -
hr (dir)
activeHolds[dir] =
noteList = ctx.noteList
count = #noteList
hitMode = Config.HitMode
legitJitter = Config.LegitJitter
serverRepl = Config.ServerReplication
i = , count
note = noteList[i]
note.Hit note.Missed handledNotes[note]
(note, ctx.roundContext)
jitter =
hitMode ==
note._jitter
note._jitter = .(-legitJitter, legitJitter)
jitter = note._jitter
targetHitTime = note.TimeMs + jitter
liveSongTime >= targetHitTime
handledNotes[note] =
serverRepl
note.ResolvedSongTimeMs = note.TimeMs
hp (note.Dir)
note.Hit (note.Dir)
note.HoldMs note.HoldMs >
activeHolds[note.Dir] = {
dir = note.Dir,
endTime = note.TimeMs + note.HoldMs
}
.( + .() * , ()
hr activeHolds[note.Dir]
(note.Dir)
)
count == (handledNotes) ~=
.(handledNotes)
.(connections, RunService.Heartbeat:(onHeartbeat))
WindUI = (:())()
WindUI:({
Name = ,
Accent = .(),
Background = .(),
Outline = .(),
Text = .(),
Placeholder = .(),
Button = .(),
Icon = .(),
WindowBackground = .(),
WindowShadow = .(),
WindowTopbarTitle = .(),
WindowTopbarAuthor = .(),
ElementBackground = .(),
ElementTitle = .(),
ElementIcon = .(),
Toggle = .(),
ToggleBar = .(),
})
Window = WindUI:({
Title = ,
Author = ,
Icon = ,
Theme = ,
ToggleKey = .KeyCode.RightShift,
Size = .(, ),
Resizable = ,
})
MainTab = Window:({ Title = , Icon = })
MainTab:({ Title = })
MainTab:({
Title = ,
Value = Config.ServerReplication,
Callback = (state)
Config.ServerReplication = state
,
})
MainTab:({
Title = ,
Value = Config.PreventMisses,
Callback = (state)
Config.PreventMisses = state
,
})
MainTab:({ Title = })
MainTab:({
Title = ,
Value = Config.Autoplay,
Callback = (state)
Config.Autoplay = state
,
})
MainTab:({
Title = ,
Value = (Config.HitMode == ),
Callback = (state)
Config.HitMode = state
,
})
MainTab:({
Title = ,
Value = Config.AutoHold,
Callback = (state)
Config.AutoHold = state
,
})
.FunkyDuelsCleanup = ()
_, conn (connections)
(() conn:() )
.(connections)
Note.TryHitNote = rawTryHitNote
Note.GetResults = rawGetResults
Note.ApplyGhostMiss = rawApplyGhostMiss
Note.SetNoteResolvedCallback = rawSetNoteResolvedCallback
originalMethods.Show Results.Show = originalMethods.Show
(()
debug.(showStats, , origSetCount)
debug.(Results.Show, , origSetCount)
)
.(activeHolds)
.(handledNotes)
cache.noteCtx =
cache.noteCtxRound =
cache.inputHp =
cache.inputHr =
cache.inputRound =
(()
WindUI WindUI.Unload WindUI:()
)
.FunkyDuelsCleanup =
()
()Loads code from the internet. It downloads more code when it runs (loadstring + HttpGet), which can change after it was posted. From: github.com.
"just so we're clear, this script isn't mine — full credits to Kasana, the OG creator. i only optimized it to run better fr"