--[[ █░█ ▄▀█ █▄░█ █▀▄   p u n c h e r █▀█ █▀█ █░▀█ █▄▀   p u n c h e r ]] ------------------- SETTINGS ---------------------------- local KEY_MOVESET1 = Enum.KeyCode.Z local KEY_MOVESET2 = Enum.KeyCode.X local BUTTON1_IMAGE = "rbxassetid://72003920813541" local BUTTON2_IMAGE = "rbxassetid://81473005801088" local IdleAnimId = "rbxassetid://105947156749343" local WalkAnimId = "rbxassetid://117819103741451" local Move1AnimId = "rbxassetid://81295406467909" local Move2AnimId = "rbxassetid://80057445812313" local Move1Cooldown = 3.5 local Move2Cooldown = 5 ------------------------------------------------------------ local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local player = Players.LocalPlayer ------------------------------------------------------------ -- FUNCTION THAT RUNS YOUR ORIGINAL SCRIPT ------------------------------------------------------------ local function Setup(char) local humanoid = char:WaitForChild("Humanoid") ------------------------------------------------------------ -- DISABLE DEFAULT ROBLOX ANIMATE SCRIPT ------------------------------------------------------------ task.wait(0.2) local animate = char:FindFirstChild("Animate") if animate then animate.Disabled = true end ------------------------------------------------------------ -- LOAD BASE ANIMATIONS (Idle / Walk) ------------------------------------------------------------ local idle = Instance.new("Animation") idle.AnimationId = IdleAnimId local idleTrack = humanoid:LoadAnimation(idle) idleTrack.Looped = true local walk = Instance.new("Animation") walk.AnimationId = WalkAnimId local walkTrack = humanoid:LoadAnimation(walk) walkTrack.Looped = true idleTrack:Play() humanoid.Running:Connect(function(speed) if humanoid:GetAttribute("UsingMove") then return end if speed > 1 then if not walkTrack.IsPlaying then idleTrack:Stop() walkTrack:Play() end else if not idleTrack.IsPlaying then walkTrack:Stop() idleTrack:Play() end end end) ------------------------------------------------------------ -- MOVESET (ABILITY) ANIMATIONS ------------------------------------------------------------ local move1 = Instance.new("Animation") move1.AnimationId = Move1AnimId local move1Track = humanoid:LoadAnimation(move1) move1Track.Looped = false local move2 = Instance.new("Animation") move2.AnimationId = Move2AnimId local move2Track = humanoid:LoadAnimation(move2) move2Track.Looped = false local isUsingMove = false local move1Ready = true local move2Ready = true local function StartAbility(animationTrack, cooldown) if isUsingMove then return end if animationTrack == move1Track and not move1Ready then return end if animationTrack == move2Track and not move2Ready then return end isUsingMove = true humanoid:SetAttribute("UsingMove", true) idleTrack:Stop() walkTrack:Stop() animationTrack:Play() if animationTrack == move1Track then move1Ready = false task.delay(cooldown, function() move1Ready = true end) end if animationTrack == move2Track then move2Ready = false task.delay(cooldown, function() move2Ready = true end) end animationTrack.Stopped:Wait() isUsingMove = false humanoid:SetAttribute("UsingMove", false) if humanoid.MoveDirection.Magnitude > 0 then walkTrack:Play() else idleTrack:Play() end end PlayMove1 = function() StartAbility(move1Track, Move1Cooldown) end PlayMove2 = function() StartAbility(move2Track, Move2Cooldown) end ------------------------------------------------------------ -- PC KEYBOARD INPUT ------------------------------------------------------------ UIS.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == KEY_MOVESET1 then PlayMove1() elseif input.KeyCode == KEY_MOVESET2 then PlayMove2() end end) end ------------------------------------------------------------ -- MOBILE BUTTONS (YOUR ORIGINAL CODE) ------------------------------------------------------------ local function CreateButton(imageId, position, callback) local gui = player.PlayerGui:FindFirstChild("ScreenGui") if not gui then gui = Instance.new("ScreenGui", player.PlayerGui) gui.ResetOnSpawn = false end local button = Instance.new("ImageButton") button.Size = UDim2.new(0, 90, 0, 90) button.Position = position button.Image = imageId button.BackgroundTransparency = 1 button.Parent = gui button.MouseButton1Click:Connect(callback) return button end CreateButton(BUTTON1_IMAGE, UDim2.new(0.05, 0, 0.75, 0), function() if PlayMove1 then PlayMove1() end end) CreateButton(BUTTON2_IMAGE, UDim2.new(0.17, 0, 0.75, 0), function() if PlayMove2 then PlayMove2() end end) ------------------------------------------------------------ -- RUN SCRIPT ON CURRENT CHARACTER + FUTURE RESPAWNS ------------------------------------------------------------ player.CharacterAdded:Connect(Setup) if player.Character then Setup(player.Character) end --========================== END ==========================--