pasteblox

Funky Friday Autoplayer by 0_Void

Funky Friday@ibaconss7PublicUpdated
loadstring(game:HttpGet("https://pasteblox.com/raw/jk3zccemh5"))()

Script

pbx pull jk3zccemh5
funky-friday-autoplayer-by-0-void.luau
-- Made by 0_Void (Master Ultra-Precision Engine - Perfect 0s Hit Offset Edition)
run_on_actor(game:GetService("Players").LocalPlayer.PlayerScripts.ClientActor, [[
    if not newlclosure then
        getgenv().newlclosure = function(func)
            local env = getfenv(func)
            local t = {F = func}
            setrawmetatable(t, {__index = env, __newindex = env})
            local closure = function(...)
                return t.F(...)
            end
            setfenv(closure, t)
            return closure
        end
    end

    local RunService = game:GetService("RunService")
    local Players = game:GetService("Players")
    local LocalPlayer = Players.LocalPlayer
    local newgame, gamehandler

    local totalNotesHit = 0

    -- Apply text specifically to the active side HUD
    local function applyBotplayText(target, text)
        if not target then return end

        if target:IsA("TextLabel") or target:IsA("TextButton") then
            if target.Text ~= text then
                target.Text = text
            end
        else
            for _, child in pairs(target:GetDescendants()) do
                if child:IsA("TextLabel") or child:IsA("TextButton") then
                    if child.Text ~= text then
                        child.Text = text
                    end
                end
            end
        end
    end

    -- Enforce text ONLY on player's active side
    local function enforceSideInfoBar(playerSide)
        local playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui")
        if not playerGui then return end

        local window = playerGui:FindFirstChild("Window")
        local gameHud = window and window:FindFirstChild("Game")
        local hud = gameHud and gameHud:FindFirstChild("HUD")

        if not hud then return end

        local displayText = "ACCURACY:Disable on BOT| MISSES : Disabled | 0_VOID: " .. tostring(totalNotesHit)

        -- Check side (1 / "Player1" / "Left" vs 2 / "Player2" / "Right")
        if playerSide == 1 or playerSide == "Player1" or playerSide == "Left" then
            local infoBarLeft = hud:FindFirstChild("InfoBar")
            if infoBarLeft then
                applyBotplayText(infoBarLeft, displayText)
            end
        else
            local hudChildren = hud:GetChildren()
            if hudChildren and hudChildren[4] then
                applyBotplayText(hudChildren[4], displayText)
            end
        end
    end

    for _, v in pairs(getgc(true)) do
        if type(v) == "table" and rawget(v, "Games") and rawget(v, "NewGame") then
            newgame = v.StartGame
            gamehandler = v
            break
        end
    end

    local function ongamestarted()
        local gameid, game = next(gamehandler.Games)
        repeat task.wait() until gamehandler.Field and gamehandler.Field.Game and gamehandler.Field.Game.TimePosition
        
        local field = gamehandler.Field
        local side = field.Team
        totalNotesHit = 0 -- Reset note counter on new game

        -- Frame-by-frame single-side enforcement loop
        local renderConnection
        renderConnection = RunService.RenderStepped:Connect(function()
            if not gamehandler.Field or not gamehandler.Field.Game then
                if renderConnection then renderConnection:Disconnect() end
                return
            end
            pcall(function()
                enforceSideInfoBar(side)
            end)
        end)

        -- =========================================================================
        -- MASTER TIMING & ENGINE CONFIGURATION (0s PERFECT TARGET)
        -- =========================================================================
        local TAP_DURATION = 0.11 -- Optimized tap press length (80ms)

        -- 9-Key Lane State Machine
        local laneState = {}
        for i = 1, 9 do
            laneState[i] = { isHolding = false, releaseAt = 0 }
        end

        -- Ignored Note Types / Names
        local ignoredNames = {
            ["mechanic"] = true,
            ["death"]    = true,
            ["poison"]   = true,
            ["pea note"] = true
        }

        -- Pre-Process & Sort Song Notes
        local processedNotes = {}
        for _, v in pairs(game.Notes) do
            if (v.Field == side or v.Field == "All") and v.Time then
                local noteData = game.NoteConfigs and game.NoteConfigs.NoteData[tostring(v.Type)]
                local noteName = noteData and (noteData.Name or noteData.Type) or tostring(v.Type or "Default")
                local noteTypeStr = noteData and tostring(noteData.Type) or tostring(v.Type or "")

                local lowerName = string.lower(tostring(noteName))
                local lowerType = string.lower(tostring(noteTypeStr))
                
                if not ignoredNames[lowerName] and not ignoredNames[lowerType] then
                    local dir = tonumber(v.Direction)
                    if dir and dir >= 1 and dir <= 9 then
                        table.insert(processedNotes, {
                            Time = v.Time,
                            Length = v.Length or 0,
                            Direction = dir
                        })
                    end
                end
            end
        end

        table.sort(processedNotes, function(a, b)
            if a.Time == b.Time then
                return a.Direction < b.Direction
            end
            return a.Time < b.Time
        end)

        print("--- [AutoPlayer] Perfect 0s Target Engine Running (" .. #processedNotes .. " Notes Loaded) ---")

        local noteIndex = 1
        local totalNotes = #processedNotes
        local activeConnection

        -- Precise Time Engine Tracking
        local lastTimePos = field.Game.TimePosition
        local lastClock = os.clock()

        activeConnection = RunService.RenderStepped:Connect(function(deltaTime)
            if not gamehandler.Field or not gamehandler.Field.Game or not field.HitLane then
                if activeConnection then activeConnection:Disconnect() end
                return
            end

            local gameObj = field.Game
            local rawTimePos = gameObj.TimePosition
            local rate = gameObj.AdjustedPlayback or gameObj.PlaybackSpeed or 1
            local wallTime = os.clock()

            -- High-precision audio timeline resynchronization
            if rawTimePos ~= lastTimePos then
                lastTimePos = rawTimePos
                lastClock = wallTime
            end

            -- Extrapolate exact time position down to sub-milliseconds
            local currentSongTime = lastTimePos + ((wallTime - lastClock) * rate)

            -- 1. Precision Release Management
            for i = 1, 9 do
                local state = laneState[i]
                if state.isHolding and wallTime >= state.releaseAt then
                    state.isHolding = false
                    field:HitLane(i, false, wallTime)
                end
            end

            -- 2. Exact 0ms Hit Evaluation Engine
            -- We anticipate notes that will cross the exact 0ms boundary within this frame
            local frameEndTime = currentSongTime + (deltaTime * rate)

            while noteIndex <= totalNotes do
                local note = processedNotes[noteIndex]
                local noteTime = note.Time

                -- Execute if note falls into current frame window OR was passed
                if currentSongTime >= noteTime or (noteTime <= frameEndTime) then
                    local direction = note.Direction
                    local state = laneState[direction]

                    -- Calculate exact wall time for 0ms timestamp target
                    local exactHitTime = wallTime + ((noteTime - currentSongTime) / rate)

                    if state.isHolding then
                        field:HitLane(direction, false, exactHitTime)
                        state.isHolding = false
                    end

                    -- Trigger hit with exact targeted timestamp
                    field:HitLane(direction, true, exactHitTime)

                    totalNotesHit = totalNotesHit + 1

                    local duration = (note.Length > 0) and (note.Length / rate) or (TAP_DURATION / rate)
                    state.isHolding = true
                    state.releaseAt = exactHitTime + duration

                    noteIndex = noteIndex + 1
                else
                    break
                end
            end
        end)
    end

    if isfunctionhooked and isfunctionhooked(newgame) then restorefunction(newgame) end
    if newgame then
        local old
        old = hookfunction(newgame, newlclosure(function(...)
            old(...)
            task.spawn(ongamestarted)
            return
        end))
    end
]])

Changelog

1 version
  1. First version

    Live

    @ibaconss7·