Advertisement
webhook_forbladeball

guest forsaken script

Apr 16th, 2025
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.26 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local character = player.Character or player.CharacterAdded:Wait()
  3. local humanoid = character:WaitForChild("Humanoid")
  4.  
  5. local function stopAllAnimations()
  6.     local animator = humanoid:FindFirstChildOfClass("Animator")
  7.     if animator then
  8.         for _, track in pairs(animator:GetPlayingAnimationTracks()) do
  9.             track:Stop()
  10.         end
  11.     end
  12. end
  13. stopAllAnimations()
  14.  
  15. local idleAnimId = "rbxassetid://96173779255396"
  16. local walkAnimId = "rbxassetid://99159420513149"
  17. local runAnimId = "rbxassetid://96194626828153"
  18. local m1AnimId = "rbxassetid://123569615350667"
  19. local blockedAnimId = "rbxassetid://80277760801310"
  20.  
  21. local idleAnim = Instance.new("Animation")
  22. idleAnim.AnimationId = idleAnimId
  23. local walkAnim = Instance.new("Animation")
  24. walkAnim.AnimationId = walkAnimId
  25. local runAnim = Instance.new("Animation")
  26. runAnim.AnimationId = runAnimId
  27. local m1Anim = Instance.new("Animation")
  28. m1Anim.AnimationId = m1AnimId
  29.  
  30. local idleTrack = humanoid:LoadAnimation(idleAnim)
  31. local walkTrack = humanoid:LoadAnimation(walkAnim)
  32. local runTrack = humanoid:LoadAnimation(runAnim)
  33. local m1Track = humanoid:LoadAnimation(m1Anim)
  34.  
  35. local isMoving = false
  36. local isRunning = false
  37. local canAttack = true
  38. local cooldown = 2
  39.  
  40. local function blockUnwantedAnimations(animator)
  41.     animator.AnimationPlayed:Connect(function(animationTrack)
  42.         if animationTrack.Animation.AnimationId == blockedAnimId then
  43.             animationTrack:Stop()
  44.         end
  45.     end)
  46. end
  47.  
  48. local animator = humanoid:FindFirstChildOfClass("Animator")
  49. if animator then
  50.     blockUnwantedAnimations(animator)
  51. else
  52.     humanoid.ChildAdded:Connect(function(child)
  53.         if child:IsA("Animator") then
  54.             blockUnwantedAnimations(child)
  55.         end
  56.     end)
  57. end
  58.  
  59. local function updateAnimations()
  60.     if isMoving then
  61.         if isRunning then
  62.             if not runTrack.IsPlaying then
  63.                 idleTrack:Stop()
  64.                 walkTrack:Stop()
  65.                 runTrack:Play()
  66.             end
  67.         else
  68.             if not walkTrack.IsPlaying then
  69.                 idleTrack:Stop()
  70.                 runTrack:Stop()
  71.                 walkTrack:Play()
  72.             end
  73.         end
  74.     else
  75.         if not idleTrack.IsPlaying then
  76.             walkTrack:Stop()
  77.             runTrack:Stop()
  78.             idleTrack:Play()
  79.         end
  80.     end
  81. end
  82.  
  83. local function onM1Click()
  84.     if canAttack then
  85.         canAttack = false
  86.         m1Track:Play()
  87.         idleTrack:Stop()
  88.         walkTrack:Stop()
  89.         runTrack:Stop()
  90.         task.wait(cooldown)
  91.         canAttack = true
  92.     end
  93. end
  94.  
  95. game:GetService("RunService").Heartbeat:Connect(function()
  96.     isMoving = humanoid.MoveDirection.Magnitude > 0
  97.     isRunning = humanoid.WalkSpeed > 16
  98.     updateAnimations()
  99. end)
  100.  
  101. game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
  102.     if not gameProcessed and input.UserInputType == Enum.UserInputType.MouseButton1 then
  103.         onM1Click()
  104.     end
  105. end)
  106.  
  107. humanoid.WalkSpeed = 16
  108. updateAnimations()
  109.  
  110. local Sprinting = game:GetService("ReplicatedStorage").Systems.Character.Game.Sprinting
  111. local m = require(Sprinting)
  112. m.MaxStamina = 400
  113. m.StaminaGain = 30
  114. m.StaminaLoss = 20
  115. m.SprintSpeed = 29
Tags: Guest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement