local Players = game:GetService("Players") local player = Players.LocalPlayer local REPLACEMENTS = { ["140290003872476"] = { id = "120744500006590", speed = 1, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = false }, ["138220673529602"] = { id = "101700386461485", speed = 1, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = false }, ["101326141514514"] = { id = "83485526719480", speed = 1, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = false }, ["115922206651248"] = { id = "111429311373372", speed = 1, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = false }, ["75389535991242"] = { id = "70512703574854", speed = 1, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = false }, ["126308682965156"] = { id = "85553169508230", speed = 1.3, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = false }, ["129666476135660"] = { id = "81551526708312", speed = 1, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = true }, ["126166008918590"] = { id = "109717660757004", speed = 1, looped = false, method = "adjustWeight", autoStopWhenOriginalStops = false }, ["138077110719561"] = { id = "83023232883627", speed = 0.6, 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 replace 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)())