KJ animation overhaul
Key Required

KJ animation overhaul

KJ Battlegroundsimdisplayimdisplay 1.9K views 209 executesUpdated Feb 6, 2026
Unrated
00
Lua Script•96 lines (4063 chars)
local Players = game:GetService("Players")
local player = Players.LocalPlayer

local REPLACEMENTS = {
    ["119102480756352"] = { id = "137397247849088", speed = 1, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = false },
    ["106608961865827"] = { id = "92005932540787", speed = 1, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = false },
    ["87123834097610"] = { id = "82314433429874", speed = 1, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = false },
    ["70432012102538"] = { id = "124320470694393", speed = 1, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = false },
    ["116102651952484"] = { id = "82565280556544", speed = 0.9, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = false },
    ["97808790386190"] = { id = "73331279050775", speed = 1, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = true },
    ["127007788252180"] = { id = "80727527341153", speed = 1, looped = false, method = "stop", autoStopWhenOriginalStops = false },
    ["125052838468389"] = { id = "127773001984630", speed = 3, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = false },
}
local function normalizeId(raw)
    if not raw then return nil end
    raw = tostring(raw)
    local digits = raw:match("(%d+)")
    return digits
end

local function makeRbAssetId(id)
    id = tostring(id)
    if id:match("^rbxassetid://") then return id end
    return "rbxassetid://" .. id
end

local currentConn

local function onCharacter(character)
    if currentConn then
        currentConn:Disconnect()
        currentConn = nil
    end

    local humanoid = character:WaitForChild("Humanoid", 5)
    if not humanoid then return end

    currentConn = humanoid.AnimationPlayed:Connect(function(animTrack)
        local ok, err = pcall(function()
            local origAnimId = normalizeId(animTrack.Animation and animTrack.Animation.AnimationId)
            if not origAnimId then return end

            local opts = REPLACEMENTS[origAnimId]
            if not opts then return end

            local newAnim = Instance.new("Animation")
            newAnim.AnimationId = makeRbAssetId(opts.id)
            local newTrack
            local success, loadErr = pcall(function()
                newTrack = humanoid:LoadAnimation(newAnim)
            end)
            if not success or not newTrack then
                warn("Failed to load replacement animation:", opts.id, loadErr)
                return
            end

            local method = opts.method or "adjustWeight"
            if method == "adjustWeight" and animTrack.AdjustWeight then
                pcall(function() animTrack:AdjustWeight(-999) end)
            else
                pcall(function() animTrack:Stop() end)
            end

            newTrack:Play()
            if opts.speed then
                pcall(function() newTrack:AdjustSpeed(tonumber(opts.speed) or 1) end)
            end
            if opts.looped ~= nil then
                pcall(function() newTrack.Looped = opts.looped end)
            end
            if opts.timePosition then
                pcall(function() newTrack.TimePosition = tonumber(opts.timePosition) or 0 end)
            end

            if opts.autoStopWhenOriginalStops == nil then opts.autoStopWhenOriginalStops = true end
            if opts.autoStopWhenOriginalStops then
                spawn(function()
                    local success2, _ = pcall(function() animTrack.Stopped:Wait() end)
                    if success2 and newTrack and newTrack.IsPlaying then
                        pcall(function() newTrack:Stop() end)
                    end
                end)
            end
        end)
        if not ok then
            warn("Animation replacer error:", err)
        end
    end)
end

if player.Character then
    onCharacter(player.Character)
end
player.CharacterAdded:Connect(onCharacter)

print("loaded replacement:", (function() local c=0; for _ in pairs(REPLACEMENTS) do c=c+1 end; return c end)())

Features & Information

changes your animations like backdash, m1s, etc, i forgot (i decided to release this to the public after not using this for weeks)

Community Comments (0)

No comments yet for this script.

More Scripts for KJ Battlegrounds