local ContextActionService = game:GetService("ContextActionService") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local Players = game:GetService("Players") local player = Players.LocalPlayer local IDLE_ANIM = 75602578104627 local WALK_ANIM = 107806791584829 local RUN_ANIM = 107806791584829 local PUNCH_ANIM = 83509299779732 local JUMP_ANIM = 121075390792786 local TAUNT_ANIM = 79878714311433 local WALK_SPEED = 11 local SPRINT_SPEED = 29 local punchTrack, idleTrack, walkTrack, runTrack, jumpTrack, tauntTrack local debouncePunch = false local sprintEnabled = false local flingActive = false local flingCoroutine local tauntDebounce = false local function setSpeed(character, speed) local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.WalkSpeed = speed end end local function playIdle() if walkTrack and walkTrack.IsPlaying then walkTrack:Stop() end if runTrack and runTrack.IsPlaying then runTrack:Stop() end if idleTrack and not idleTrack.IsPlaying then idleTrack:Play() end end local function stopFling() flingActive = false flingCoroutine = nil end local function resetToInitialState() debouncePunch = false sprintEnabled = false stopFling() if idleTrack then idleTrack:Stop() end if walkTrack then walkTrack:Stop() end if runTrack then runTrack:Stop() end if punchTrack then punchTrack:Stop() end if jumpTrack then jumpTrack:Stop() end if tauntTrack then tauntTrack:Stop() end if player.Character then setSpeed(player.Character, WALK_SPEED) if idleTrack then idleTrack:Play() end end end local function startFling() local lp = Players.LocalPlayer local oscillation = 1e6 -- small oscillation to maintain fling effect local direction = 1 while flingActive do RunService.Heartbeat:Wait() local char = lp.Character local hrp = char and char:FindFirstChild("HumanoidRootPart") if hrp then local vel = hrp.Velocity -- Apply huge velocity (~10 million scale) with oscillation on Y axis local baseVel = Vector3.new(vel.X * 1e7, 1e7, vel.Z * 1e7) hrp.Velocity = baseVel + Vector3.new(0, oscillation * direction, 0) direction = -direction end end -- Clear velocity after fling finishes local char = lp.Character if char then local hrp = char:FindFirstChild("HumanoidRootPart") if hrp then hrp.Velocity = Vector3.new(0, 0, 0) end end end local function loadAnimations(character) local humanoid = character:WaitForChild("Humanoid") if idleTrack then idleTrack:Stop() end if walkTrack then walkTrack:Stop() end if runTrack then runTrack:Stop() end if punchTrack then punchTrack:Stop() end if jumpTrack then jumpTrack:Stop() end if tauntTrack then tauntTrack:Stop() end idleTrack, walkTrack, runTrack, punchTrack, jumpTrack, tauntTrack = nil, nil, nil, nil, nil, nil local idleAnim = Instance.new("Animation") idleAnim.AnimationId = "rbxassetid://" .. IDLE_ANIM idleTrack = humanoid:LoadAnimation(idleAnim) idleTrack.Priority = Enum.AnimationPriority.Idle idleTrack.Looped = true idleTrack:Play() local walkAnim = Instance.new("Animation") walkAnim.AnimationId = "rbxassetid://" .. WALK_ANIM walkTrack = humanoid:LoadAnimation(walkAnim) walkTrack.Priority = Enum.AnimationPriority.Movement walkTrack.Looped = true local runAnim = Instance.new("Animation") runAnim.AnimationId = "rbxassetid://" .. RUN_ANIM runTrack = humanoid:LoadAnimation(runAnim) runTrack.Priority = Enum.AnimationPriority.Movement runTrack.Looped = true local punchAnim = Instance.new("Animation") punchAnim.AnimationId = "rbxassetid://" .. PUNCH_ANIM punchTrack = humanoid:LoadAnimation(punchAnim) punchTrack.Priority = Enum.AnimationPriority.Action punchTrack.Looped = false punchTrack.Stopped:Connect(function() debouncePunch = false stopFling() playIdle() end) local jumpAnim = Instance.new("Animation") jumpAnim.AnimationId = "rbxassetid://" .. JUMP_ANIM jumpTrack = humanoid:LoadAnimation(jumpAnim) jumpTrack.Priority = Enum.AnimationPriority.Action jumpTrack.Looped = false humanoid.StateChanged:Connect(function(_, state) if state == Enum.HumanoidStateType.Jumping then if jumpTrack then if jumpTrack.IsPlaying then jumpTrack:Stop() end jumpTrack:Play() end end end) local tauntAnim = Instance.new("Animation") tauntAnim.AnimationId = "rbxassetid://" .. TAUNT_ANIM tauntTrack = humanoid:LoadAnimation(tauntAnim) tauntTrack.Priority = Enum.AnimationPriority.Action tauntTrack.Looped = false tauntTrack.Stopped:Connect(function() tauntDebounce = false playIdle() end) humanoid.Running:Connect(function(speed) if speed > 2 then if debouncePunch and punchTrack and punchTrack.IsPlaying then punchTrack:Stop() debouncePunch = false stopFling() end if sprintEnabled then if not runTrack.IsPlaying then walkTrack:Stop() runTrack:Play() end else if not walkTrack.IsPlaying then runTrack:Stop() walkTrack:Play() end end if idleTrack.IsPlaying then idleTrack:Stop() end else playIdle() end end) humanoid.Died:Connect(resetToInitialState) end player.CharacterAdded:Connect(function(character) sprintEnabled = false debouncePunch = false setSpeed(character, WALK_SPEED) loadAnimations(character) end) if player.Character then sprintEnabled = false debouncePunch = false setSpeed(player.Character, WALK_SPEED) loadAnimations(player.Character) end UserInputService.InputBegan:Connect(function(input, gameProcessed) if not gameProcessed and input.KeyCode == Enum.KeyCode.LeftShift then sprintEnabled = not sprintEnabled if player.Character then setSpeed(player.Character, sprintEnabled and SPRINT_SPEED or WALK_SPEED) end end end) local function punchAction(_, state, _) if state == Enum.UserInputState.Begin and punchTrack and not debouncePunch then debouncePunch = true flingActive = true if runTrack and runTrack.IsPlaying then runTrack:Stop() end if walkTrack and walkTrack.IsPlaying then walkTrack:Stop() end if idleTrack and idleTrack.IsPlaying then idleTrack:Stop() end punchTrack:Play() if not flingCoroutine or coroutine.status(flingCoroutine) == "dead" then flingCoroutine = coroutine.create(startFling) coroutine.resume(flingCoroutine) end end end ContextActionService:BindAction( "ClassicFlingerPunch", punchAction, true, Enum.KeyCode.F ) ContextActionService:SetTitle("ClassicFlingerPunch", "Punch") local function sprintToggleAction(_, state, _) if state == Enum.UserInputState.Begin then sprintEnabled = not sprintEnabled if player.Character then setSpeed(player.Character, sprintEnabled and SPRINT_SPEED or WALK_SPEED) end end end ContextActionService:BindAction( "ClassicFlingerSprintToggle", sprintToggleAction, true, Enum.KeyCode.LeftShift ) ContextActionService:SetTitle("ClassicFlingerSprintToggle", "Sprint") local function tauntAction(_, state, _) if state == Enum.UserInputState.Begin and tauntTrack and not tauntDebounce then tauntDebounce = true if walkTrack and walkTrack.IsPlaying then walkTrack:Stop() end if runTrack and runTrack.IsPlaying then runTrack:Stop() end if idleTrack and idleTrack.IsPlaying then idleTrack:Stop() end tauntTrack:Play() end end ContextActionService:BindAction( "ClassicFlingerTaunt", tauntAction, true, Enum.KeyCode.T ) ContextActionService:SetTitle("ClassicFlingerTaunt", "Taunt") print("Classic Flinger - Fling, Punch, Jump, Sprint, and Taunt loaded with custom animation IDs and ContextActionService.")