Untitled
-- Function to handle animation detection and replacement local function handleAnimationDetection(animIdsToStop, replacementAnimId, animSpeed) local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local function onAnimPlayed(animationTrack) local animId = tonumber(string.match(animationTrack.Animation.AnimationId, "%d+")) for _, stopId in ipairs(animIdsToStop) do if animId == stopId then animationTrack:Stop() local replacementAnimation = Instance.new("Animation") replacementAnimation.AnimationId = "rbxassetid://" .. replacementAnimId local replacementTrack = humanoid:LoadAnimation(replacementAnimation) replacementTrack:Play() replacementTrack:AdjustSpeed(animSpeed) -- Adjust the speed of the replacement animation break end end end humanoid.AnimationPlayed:Connect(onAnimPlayed) end -- First set of animations local firstAnimIdsToStop = {12534735382} local firstReplacementAnimId = 18181589384 local firstAnimspeed = 1 handleAnimationDetection(firstAnimIdsToStop, firstReplacementAnimId, firstAnimspeed) -- Second set of animations local secondAnimIdsToStop = {12509505723} local secondReplacementAnimId = 13497875049 local secondAnimspeed = 1.4 handleAnimationDetection(secondAnimIdsToStop, secondReplacementAnimId, secondAnimspeed) -- Third set of animations local thirdAnimIdsToStop = {12618271998} local thirdReplacementAnimId = 13499771836 local thirdAnimspeed = 0.7 handleAnimationDetection(thirdAnimIdsToStop, thirdReplacementAnimId, thirdAnimspeed) -- Fourth set of animations local fourthAnimIdsToStop = {12684390285} local fourthReplacementAnimId = 17857788598 local fourthAnimspeed = 1 handleAnimationDetection(fourthAnimIdsToStop, fourthReplacementAnimId, fourthAnimspeed) local player = game.Players.LocalPlayer local playerGui = player.PlayerGui local hotbar = playerGui:FindFirstChild("Hotbar") local backpack = hotbar:FindFirstChild("Backpack") local hotbarFrame = backpack:FindFirstChild("Hotbar") local baseButton = hotbarFrame:FindFirstChild("1").Base local ToolName = baseButton.ToolName ToolName.Text = "Flaming kicks" local player = game.Players.LocalPlayer local playerGui = player.PlayerGui local hotbar = playerGui:FindFirstChild("Hotbar") local backpack = hotbar:FindFirstChild("Backpack") local hotbarFrame = backpack:FindFirstChild("Hotbar") local baseButton = hotbarFrame:FindFirstChild("2").Base local ToolName = baseButton.ToolName ToolName.Text = "Fire Fist" local player = game.Players.LocalPlayer local playerGui = player.PlayerGui local hotbar = playerGui:FindFirstChild("Hotbar") local backpack = hotbar:FindFirstChild("Backpack") local hotbarFrame = backpack:FindFirstChild("Hotbar") local baseButton = hotbarFrame:FindFirstChild("3").Base local ToolName = baseButton.ToolName ToolName.Text = "Flame Blitz" local player = game.Players.LocalPlayer local playerGui = player.PlayerGui local hotbar = playerGui:FindFirstChild("Hotbar") local backpack = hotbar:FindFirstChild("Backpack") local hotbarFrame = backpack:FindFirstChild("Hotbar") local baseButton = hotbarFrame:FindFirstChild("4").Base local ToolName = baseButton.ToolName ToolName.Text = "Spectre"
Leave a Comment