local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local AnimationVariants = { ["116498843394845"] = { "12293730655", "12293734586" }, ["111339408625943"] = { "12293732440", "12293732440" }, ["107228204868149"] = { "126006131569700", "95868918340329", "115008536065094" } } local VariantSpeeds = { ["126006131569700"] = 0.9, ["95868918340329"] = 0.8, ["115008536065094"] = 1.0 } local AnimationReplacements = { ["116498843394845"] = { ReplacementId = "12293730655", PlaybackSpeed = 1, ShouldLoop = false, ReplacementMethod = "stop", StopWhenOriginalStops = false }, ["111339408625943"] = { ReplacementId = "12293732440", PlaybackSpeed = 1, ShouldLoop = false, ReplacementMethod = "stop", StopWhenOriginalStops = false }, ["90219434571836"] = { ReplacementId = "90168824907211", PlaybackSpeed = 1, ShouldLoop = false, ReplacementMethod = "stop", StopWhenOriginalStops = false }, ["107228204868149"] = { ReplacementId = "95868918340329", PlaybackSpeed = 0.7, ShouldLoop = false, ReplacementMethod = "stop", StopWhenOriginalStops = false }, ["135561529005035"] = { ReplacementId = "132319252347038", PlaybackSpeed = 1.2, ShouldLoop = false, ReplacementMethod = "adjustWeight", StopWhenOriginalStops = true }, ["93161014379846"] = { ReplacementId = "80359184682156", PlaybackSpeed = 1.8, ShouldLoop = false, ReplacementMethod = "adjustWeight", StopWhenOriginalStops = false }, ["110557902383887"] = { ReplacementId = "93168839593759", PlaybackSpeed = 1.7, ShouldLoop = false, ReplacementMethod = "adjustWeight", StopWhenOriginalStops = true }, } local function ExtractAnimationId(rawString) if not rawString then return nil end rawString = tostring(rawString) local numericId = rawString:match("(%d+)") return numericId end local function FormatAssetId(animationId) animationId = tostring(animationId) if animationId:match("^rbxassetid://") then return animationId end return "rbxassetid://" .. animationId end local AnimationWatcherConnection local function SetupCharacterAnimations(character) if AnimationWatcherConnection then AnimationWatcherConnection:Disconnect() AnimationWatcherConnection = nil end local humanoid = character:WaitForChild("Humanoid", 5) if not humanoid then return end AnimationWatcherConnection = humanoid.AnimationPlayed:Connect(function(animationTrack) local success, errorMessage = pcall(function() local originalAnimationId = ExtractAnimationId(animationTrack.Animation and animationTrack.Animation.AnimationId) if not originalAnimationId then return end local replacementSettings = AnimationReplacements[originalAnimationId] if not replacementSettings then return end local variantAnimations = AnimationVariants[originalAnimationId] local selectedAnimationId = replacementSettings.ReplacementId local selectedPlaybackSpeed = replacementSettings.PlaybackSpeed if variantAnimations then local randomIndex = math.random(1, #variantAnimations) selectedAnimationId = variantAnimations[randomIndex] selectedPlaybackSpeed = VariantSpeeds[selectedAnimationId] or replacementSettings.PlaybackSpeed elseif selectedAnimationId == "95868918340329" and originalAnimationId ~= "107228204868149" then selectedAnimationId = "115008536065094" end local newAnimation = Instance.new("Animation") newAnimation.AnimationId = FormatAssetId(selectedAnimationId) local replacementTrack local loadedSuccessfully, loadError = pcall(function() replacementTrack = humanoid:LoadAnimation(newAnimation) end) if not loadedSuccessfully or not replacementTrack then warn("Could not load replacement animation:", selectedAnimationId, loadError) return end local replacementMethod = replacementSettings.ReplacementMethod or "adjustWeight" if replacementMethod == "adjustWeight" and animationTrack.AdjustWeight then pcall(function() animationTrack:AdjustWeight(-999) end) else pcall(function() animationTrack:Stop() end) end replacementTrack:Play() if selectedPlaybackSpeed then pcall(function() replacementTrack:AdjustSpeed(tonumber(selectedPlaybackSpeed) or 1) end) end if replacementSettings.ShouldLoop ~= nil then pcall(function() replacementTrack.Looped = replacementSettings.ShouldLoop end) end if replacementSettings.TimePosition then pcall(function() replacementTrack.TimePosition = tonumber(replacementSettings.TimePosition) or 0 end) end local shouldAutoStop = replacementSettings.StopWhenOriginalStops if shouldAutoStop == nil then shouldAutoStop = true end if shouldAutoStop then local originalHasStopped = false local heartbeatMonitor local function StopReplacementAnimation() if replacementTrack and replacementTrack.IsPlaying then pcall(function() replacementTrack:Stop() end) end if heartbeatMonitor then heartbeatMonitor:Disconnect() heartbeatMonitor = nil end end local function OnOriginalAnimationStopped() originalHasStopped = true StopReplacementAnimation() end local function OnReplacementAnimationStopped() if not originalHasStopped and animationTrack.IsPlaying then pcall(function() animationTrack:Stop() end) end if heartbeatMonitor then heartbeatMonitor:Disconnect() heartbeatMonitor = nil end end animationTrack.Stopped:Connect(OnOriginalAnimationStopped) replacementTrack.Stopped:Connect(OnReplacementAnimationStopped) if replacementSettings.ShouldLoop then heartbeatMonitor = game:GetService("RunService").Heartbeat:Connect(function() if not animationTrack.IsPlaying then OnOriginalAnimationStopped() end end) end end end) if not success then warn("hi something happened:", errorMessage) end end) end if LocalPlayer.Character then SetupCharacterAnimations(LocalPlayer.Character) end LocalPlayer.CharacterAdded:Connect(SetupCharacterAnimations) local function CountAnimationReplacements() local replacementCount = 0 for _ in pairs(AnimationReplacements) do replacementCount = replacementCount + 1 end return replacementCount end print("hi the script is loaded, also it's tracking " .. CountAnimationReplacements() .. " animations.")