Advertisement
Cldprama4

Mastery saitama

Oct 28th, 2024
62
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.34 KB | None | 1 0
  1. local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
  2. local Window = Library.CreateLib("mastery saitama v1", "DarkTheme")
  3.  
  4. local Tab = Window:NewTab("yoo welcome")
  5. local Section = Tab:NewSection("subs to cldprama4")
  6.  
  7. Section:NewLabel("credit to cldprama4")
  8.  
  9.  
  10. Section:NewButton("mastery saitama", "click it", function()
  11. -- saitama
  12.  
  13. local player = game.Players.LocalPlayer
  14.  
  15. local playerGui = player.PlayerGui
  16.  
  17. local hotbar = playerGui:FindFirstChild("Hotbar")
  18.  
  19. local backpack = hotbar:FindFirstChild("Backpack")
  20.  
  21. local hotbarFrame = backpack:FindFirstChild("Hotbar")
  22.  
  23. local baseButton = hotbarFrame:FindFirstChild("1").Base
  24.  
  25. local ToolName = baseButton.ToolName
  26.  
  27.  
  28. ToolName.Text = "the normal of punch" -- put the name of the base move 1
  29.  
  30.  
  31. local player = game.Players.LocalPlayer
  32.  
  33. local playerGui = player.PlayerGui
  34.  
  35. local hotbar = playerGui:FindFirstChild("Hotbar")
  36.  
  37. local backpack = hotbar:FindFirstChild("Backpack")
  38.  
  39. local hotbarFrame = backpack:FindFirstChild("Hotbar")
  40.  
  41. local baseButton = hotbarFrame:FindFirstChild("2").Base
  42.  
  43. local ToolName = baseButton.ToolName
  44.  
  45.  
  46. ToolName.Text = "consecutive kick" -- put the name of the base move 2
  47.  
  48.  
  49. local player = game.Players.LocalPlayer
  50.  
  51. local playerGui = player.PlayerGui
  52.  
  53. local hotbar = playerGui:FindFirstChild("Hotbar")
  54.  
  55. local backpack = hotbar:FindFirstChild("Backpack")
  56.  
  57. local hotbarFrame = backpack:FindFirstChild("Hotbar")
  58.  
  59. local baseButton = hotbarFrame:FindFirstChild("3").Base
  60.  
  61. local ToolName = baseButton.ToolName
  62.  
  63.  
  64. ToolName.Text = "normal hand" -- put the name of the base move 3
  65.  
  66.  
  67. local player = game.Players.LocalPlayer
  68.  
  69. local playerGui = player.PlayerGui
  70.  
  71. local hotbar = playerGui:FindFirstChild("Hotbar")
  72.  
  73. local backpack = hotbar:FindFirstChild("Backpack")
  74.  
  75. local hotbarFrame = backpack:FindFirstChild("Hotbar")
  76.  
  77. local baseButton = hotbarFrame:FindFirstChild("4").Base
  78.  
  79. local ToolName = baseButton.ToolName
  80.  
  81.  
  82. ToolName.Text = "go uppurcut" -- put the name of the base move 4
  83.  
  84.  
  85. local Players = game:GetService("Players")
  86.  
  87. local player = Players.LocalPlayer
  88.  
  89. local playerGui = player:WaitForChild("PlayerGui")
  90.  
  91.  
  92. local function findGuiAndSetText()
  93.  
  94. local screenGui = playerGui:FindFirstChild("ScreenGui")
  95.  
  96. if screenGui then
  97.  
  98. local magicHealthFrame = screenGui:FindFirstChild("MagicHealth")
  99.  
  100. if magicHealthFrame then
  101.  
  102. local textLabel = magicHealthFrame:FindFirstChild("TextLabel")
  103.  
  104. if textLabel then
  105.  
  106. textLabel.Text = "serious series" -- put the name of the ult name ultimate text
  107.  
  108. end
  109.  
  110. end
  111.  
  112. end
  113.  
  114. end
  115.  
  116. -- move 1
  117.  
  118. playerGui.DescendantAdded:Connect(findGuiAndSetText)
  119.  
  120. findGuiAndSetText()
  121.  
  122.  
  123. local animationId = 10468665991 -- the anim that will get track
  124.  
  125.  
  126. local player = game.Players.LocalPlayer
  127.  
  128. local character = player.Character or player.CharacterAdded:Wait()
  129.  
  130. local humanoid = character:WaitForChild("Humanoid")
  131.  
  132.  
  133. local function onAnimationPlayed(animationTrack)
  134.  
  135. if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
  136.  
  137.  
  138. local p = game.Players.LocalPlayer
  139.  
  140. local Humanoid = p.Character:WaitForChild("Humanoid")
  141.  
  142.  
  143. for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
  144.  
  145. animTrack:Stop()
  146.  
  147. end
  148.  
  149.  
  150. local AnimAnim = Instance.new("Animation")
  151.  
  152. AnimAnim.AnimationId = "rbxassetid://18896127525" -- the specific anim
  153.  
  154. local Anim = Humanoid:LoadAnimation(AnimAnim)
  155.  
  156.  
  157. local startTime = 0.2 -- speed for specific
  158.  
  159.  
  160. Anim:Play()
  161.  
  162. Anim:AdjustSpeed(0)
  163.  
  164. Anim.TimePosition = startTime
  165.  
  166. Anim:AdjustSpeed(1)
  167.  
  168.  
  169. end
  170.  
  171. end
  172.  
  173. -- end of move 1
  174.  
  175. -- move 2
  176. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  177.  
  178.  
  179. local animationId = 10466974800 -- the move that it will track
  180.  
  181.  
  182. local player = game.Players.LocalPlayer
  183.  
  184. local character = player.Character or player.CharacterAdded:Wait()
  185.  
  186. local humanoid = character:WaitForChild("Humanoid")
  187.  
  188.  
  189. local function onAnimationPlayed(animationTrack)
  190.  
  191. if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
  192.  
  193.  
  194. local p = game.Players.LocalPlayer
  195.  
  196. local Humanoid = p.Character:WaitForChild("Humanoid")
  197.  
  198.  
  199. for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
  200.  
  201. animTrack:Stop()
  202.  
  203. end
  204.  
  205.  
  206. local AnimAnim = Instance.new("Animation")
  207.  
  208. AnimAnim.AnimationId = "rbxassetid://18896229321" -- the specific move ur gonna replace
  209.  
  210. local Anim = Humanoid:LoadAnimation(AnimAnim)
  211.  
  212.  
  213. local startTime = 0.2 -- speed for the specific anim
  214.  
  215.  
  216. Anim:Play()
  217.  
  218. Anim:AdjustSpeed(0)
  219.  
  220. Anim.TimePosition = startTime
  221.  
  222. Anim:AdjustSpeed(1.3)
  223.  
  224.  
  225. end
  226.  
  227. end
  228.  
  229. -- end of move 2
  230.  
  231. -- move 3
  232.  
  233. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  234.  
  235.  
  236. local animationId = 10471336737 -- the anim that will track
  237.  
  238.  
  239. local player = game.Players.LocalPlayer
  240.  
  241. local character = player.Character or player.CharacterAdded:Wait()
  242.  
  243. local humanoid = character:WaitForChild("Humanoid")
  244.  
  245.  
  246. local function onAnimationPlayed(animationTrack)
  247.  
  248. if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
  249.  
  250.  
  251. local p = game.Players.LocalPlayer
  252.  
  253. local Humanoid = p.Character:WaitForChild("Humanoid")
  254.  
  255.  
  256. for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
  257.  
  258. animTrack:Stop()
  259.  
  260. end
  261.  
  262.  
  263. local AnimAnim = Instance.new("Animation")
  264.  
  265. AnimAnim.AnimationId = "rbxassetid://18716667710" -- the specific anim
  266.  
  267. local Anim = Humanoid:LoadAnimation(AnimAnim)
  268.  
  269.  
  270. local startTime = 0.2 -- speed for specific anim
  271.  
  272.  
  273. Anim:Play()
  274.  
  275. Anim:AdjustSpeed(0)
  276.  
  277. Anim.TimePosition = startTime
  278.  
  279. Anim:AdjustSpeed(1)
  280.  
  281.  
  282. delay(1.8, function()
  283.  
  284. Anim:Stop()
  285.  
  286. end)
  287.  
  288.  
  289. end
  290.  
  291. end
  292.  
  293. -- end of move 3
  294.  
  295. -- move 4
  296.  
  297. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  298.  
  299.  
  300. local animationId = 12510170988 -- the specific anim that will get track
  301.  
  302.  
  303. local player = game.Players.LocalPlayer
  304.  
  305. local character = player.Character or player.CharacterAdded:Wait()
  306.  
  307. local humanoid = character:WaitForChild("Humanoid")
  308.  
  309.  
  310. local function onAnimationPlayed(animationTrack)
  311.  
  312. if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
  313.  
  314. local p = game.Players.LocalPlayer
  315.  
  316. local Humanoid = p.Character:WaitForChild("Humanoid")
  317.  
  318.  
  319. for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
  320.  
  321. animTrack:Stop()
  322.  
  323. end
  324.  
  325.  
  326. local AnimAnim = Instance.new("Animation")
  327.  
  328. AnimAnim.AnimationId = "rbxassetid://18179181663" -- the specific anim
  329.  
  330. local Anim = Humanoid:LoadAnimation(AnimAnim)
  331.  
  332.  
  333. local startTime = 0.2 -- the speed for the specific anim
  334.  
  335.  
  336. Anim:Play()
  337.  
  338. Anim:AdjustSpeed(0)
  339.  
  340. Anim.TimePosition = startTime
  341.  
  342. Anim:AdjustSpeed(1)
  343.  
  344.  
  345. end
  346.  
  347. end
  348.  
  349. -- end of move 4
  350.  
  351. -- ult move 1
  352. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  353.  
  354. local animationId = 11343318134 -- the anim will get track
  355.  
  356.  
  357. local player = game.Players.LocalPlayer
  358.  
  359. local character = player.Character or player.CharacterAdded:Wait()
  360.  
  361. local humanoid = character:WaitForChild("Humanoid")
  362.  
  363.  
  364. local function onAnimationPlayed(animationTrack)
  365.  
  366. if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
  367.  
  368. local p = game.Players.LocalPlayer
  369.  
  370. local Humanoid = p.Character:WaitForChild("Humanoid")
  371.  
  372.  
  373. for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
  374.  
  375. animTrack:Stop()
  376.  
  377. end
  378.  
  379.  
  380. local AnimAnim = Instance.new("Animation")
  381.  
  382. AnimAnim.AnimationId = "rbxassetid://12983333733" -- the specific anim
  383.  
  384. local Anim = Humanoid:LoadAnimation(AnimAnim)
  385.  
  386.  
  387. local startTime = 2 -- speed for specific anim
  388.  
  389. Anim:Play()
  390.  
  391. Anim:AdjustSpeed(0)
  392.  
  393. Anim.TimePosition = startTime
  394.  
  395. Anim:AdjustSpeed(0.5)
  396.  
  397.  
  398. end
  399.  
  400. end
  401.  
  402. -- end of ult move 1
  403.  
  404. -- wall combo
  405.  
  406. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  407.  
  408. local animationId = 15955393872 -- the anim that will get track
  409.  
  410.  
  411. local player = game.Players.LocalPlayer
  412.  
  413. local character = player.Character or player.CharacterAdded:Wait()
  414.  
  415. local humanoid = character:WaitForChild("Humanoid")
  416.  
  417.  
  418. local function onAnimationPlayed(animationTrack)
  419.  
  420. if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
  421.  
  422. local p = game.Players.LocalPlayer
  423.  
  424. local Humanoid = p.Character:WaitForChild("Humanoid")
  425.  
  426.  
  427. for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
  428.  
  429. animTrack:Stop()
  430.  
  431. end
  432.  
  433.  
  434. local AnimAnim = Instance.new("Animation")
  435.  
  436. AnimAnim.AnimationId = "rbxassetid://15943915877" -- the specific anim
  437.  
  438. local Anim = Humanoid:LoadAnimation(AnimAnim)
  439.  
  440.  
  441. local startTime = 0.05 -- speed for the specific anim
  442.  
  443.  
  444. Anim:Play()
  445.  
  446. Anim:AdjustSpeed(0)
  447.  
  448. Anim.TimePosition = startTime
  449.  
  450. Anim:AdjustSpeed(1)
  451.  
  452.  
  453. end
  454.  
  455. end
  456.  
  457. -- end of wall combo
  458.  
  459. -- serious punch
  460.  
  461. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  462.  
  463. local animationId = 12983333733 -- the anim will get track
  464.  
  465.  
  466. local player = game.Players.LocalPlayer
  467.  
  468. local character = player.Character or player.CharacterAdded:Wait()
  469.  
  470. local humanoid = character:WaitForChild("Humanoid")
  471.  
  472.  
  473. local function onAnimationPlayed(animationTrack)
  474.  
  475. if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
  476.  
  477. local p = game.Players.LocalPlayer
  478.  
  479. local Humanoid = p.Character:WaitForChild("Humanoid")
  480.  
  481.  
  482. for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
  483.  
  484. animTrack:Stop()
  485.  
  486. end
  487.  
  488.  
  489. local AnimAnim = Instance.new("Animation")
  490.  
  491. AnimAnim.AnimationId = "rbxassetid://13073745835" -- the specific anim
  492.  
  493. local Anim = Humanoid:LoadAnimation(AnimAnim)
  494.  
  495.  
  496. local startTime = 0 -- speed of specific anim
  497.  
  498.  
  499. Anim:Play()
  500.  
  501. Anim:AdjustSpeed(0)
  502.  
  503. Anim.TimePosition = startTime
  504.  
  505. Anim:AdjustSpeed(0.2)
  506.  
  507.  
  508. end
  509.  
  510. end
  511.  
  512. -- end of serious punch
  513.  
  514. -- ult anim
  515.  
  516. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  517.  
  518.  
  519. local animationId = 12447707844 -- the anim will get track
  520.  
  521.  
  522. local player = game.Players.LocalPlayer
  523.  
  524. local character = player.Character or player.CharacterAdded:Wait()
  525.  
  526. local humanoid = character:WaitForChild("Humanoid")
  527.  
  528.  
  529. local function onAnimationPlayed(animationTrack)
  530.  
  531. if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
  532.  
  533. local p = game.Players.LocalPlayer
  534.  
  535. local Humanoid = p.Character:WaitForChild("Humanoid")
  536.  
  537.  
  538. for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
  539.  
  540. animTrack:Stop()
  541.  
  542. end
  543.  
  544.  
  545. local AnimAnim = Instance.new("Animation")
  546.  
  547. AnimAnim.AnimationId = "rbxassetid://18435303746" -- the specific anim
  548.  
  549. local Anim = Humanoid:LoadAnimation(AnimAnim)
  550.  
  551.  
  552. local startTime = 0 -- the specific anim
  553.  
  554.  
  555. Anim:Play()
  556.  
  557. Anim:AdjustSpeed(0)
  558.  
  559. Anim.TimePosition = startTime
  560.  
  561. Anim:AdjustSpeed(1)
  562.  
  563. end
  564.  
  565. end
  566.  
  567. -- the end of ult anim
  568.  
  569. -- front dash
  570.  
  571. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  572.  
  573.  
  574. local animationId = 10479335397 -- the anim will get track
  575.  
  576.  
  577. local player = game.Players.LocalPlayer
  578.  
  579. local character = player.Character or player.CharacterAdded:Wait()
  580.  
  581. local humanoid = character:WaitForChild("Humanoid")
  582.  
  583.  
  584. local function onAnimationPlayed(animationTrack)
  585.  
  586. if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
  587.  
  588. local p = game.Players.LocalPlayer
  589.  
  590. local Humanoid = p.Character:WaitForChild("Humanoid")
  591.  
  592.  
  593. for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
  594.  
  595. animTrack:Stop()
  596.  
  597. end
  598.  
  599.  
  600. local AnimAnim = Instance.new("Animation")
  601.  
  602. AnimAnim.AnimationId = "rbxassetid://14046756619" -- the specific anim
  603.  
  604. local Anim = Humanoid:LoadAnimation(AnimAnim)
  605.  
  606.  
  607. local startTime = 0 -- the specific anim
  608.  
  609.  
  610. Anim:Play()
  611.  
  612. Anim:AdjustSpeed(0)
  613.  
  614. Anim.TimePosition = startTime
  615.  
  616. Anim:AdjustSpeed(0.7)
  617.  
  618.  
  619. delay(1.2, function()
  620.  
  621. Anim:Stop()
  622.  
  623. end)
  624.  
  625.  
  626. end
  627.  
  628. end
  629.  
  630. -- end of front dash
  631.  
  632. -- mini uppercut
  633.  
  634. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  635.  
  636.  
  637. local animationId = 10503381238 -- the anim will get track
  638.  
  639.  
  640. local player = game.Players.LocalPlayer
  641.  
  642. local character = player.Character or player.CharacterAdded:Wait()
  643.  
  644. local humanoid = character:WaitForChild("Humanoid")
  645.  
  646.  
  647. local function onAnimationPlayed(animationTrack)
  648.  
  649. if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
  650.  
  651. local p = game.Players.LocalPlayer
  652.  
  653. local Humanoid = p.Character:WaitForChild("Humanoid")
  654.  
  655.  
  656. for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
  657.  
  658. animTrack:Stop()
  659.  
  660. end
  661.  
  662.  
  663. local AnimAnim = Instance.new("Animation")
  664.  
  665. AnimAnim.AnimationId = "rbxassetid://14900168720" -- the specific anim
  666.  
  667. local Anim = Humanoid:LoadAnimation(AnimAnim)
  668.  
  669.  
  670. local startTime = 1.3 -- the speed for specific anim
  671.  
  672.  
  673. Anim:Play()
  674.  
  675. Anim:AdjustSpeed(0)
  676.  
  677. Anim.TimePosition = startTime
  678.  
  679. Anim:AdjustSpeed(1)
  680.  
  681.  
  682. end
  683.  
  684. end
  685.  
  686. -- end of mini upper cut
  687.  
  688. -- downslam
  689.  
  690. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  691.  
  692.  
  693. local animationId = 10470104242 -- the anim that will get track
  694.  
  695.  
  696. local player = game.Players.LocalPlayer
  697.  
  698. local character = player.Character or player.CharacterAdded:Wait()
  699.  
  700. local humanoid = character:WaitForChild("Humanoid")
  701.  
  702.  
  703. local function onAnimationPlayed(animationTrack)
  704.  
  705. if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
  706.  
  707. local p = game.Players.LocalPlayer
  708.  
  709. local Humanoid = p.Character:WaitForChild("Humanoid")
  710.  
  711.  
  712. for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
  713.  
  714. animTrack:Stop()
  715.  
  716. end
  717.  
  718.  
  719. local AnimAnim = Instance.new("Animation")
  720.  
  721. AnimAnim.AnimationId = "rbxassetid://12684185971" -- the specific anim
  722.  
  723. local Anim = Humanoid:LoadAnimation(AnimAnim)
  724.  
  725.  
  726. local startTime = 0 -- the speed for specific anim
  727.  
  728.  
  729. wait(0.2)
  730.  
  731. Anim:Play()
  732.  
  733. Anim:AdjustSpeed(0)
  734.  
  735. Anim.TimePosition = startTime
  736.  
  737. Anim:AdjustSpeed(1)
  738.  
  739.  
  740. end
  741.  
  742. end
  743.  
  744. -- end of downslam
  745.  
  746. -- m1's
  747.  
  748. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  749.  
  750.  
  751. local Players = game:GetService("Players")
  752.  
  753. local player = Players.LocalPlayer
  754.  
  755. local character = player.Character or player.CharacterAdded:Wait()
  756.  
  757. local humanoid = character:WaitForChild("Humanoid")
  758.  
  759. -- the anim that will get track
  760.  
  761. local animationIdsToStop = {
  762.  
  763. [10469493270] = true,
  764.  
  765. [10469630950] = true,
  766.  
  767. [10469639222] = true,
  768.  
  769. [10469643643] = true,
  770.  
  771. }
  772.  
  773. -- the specific anim
  774.  
  775. local replacementAnimations = {
  776.  
  777. ["10469643643"] = "rbxassetid://17889290569", -- 4th m1's dont change the [12345678910] change the rbxassetid://123..
  778.  
  779. ["10469639222"] = "rbxassetid://17889471098", -- 3rd m1's dont change the [12345678910] change the rbxassetid://123..
  780.  
  781. ["10469630950"] = "rbxassetid://17889461810", -- 2nd m1's dont change the [12345678910] change the rbxassetid://123..
  782.  
  783. ["10469493270"] = "rbxassetid://17889458563", -- 1st m1's dont change the [12345678910] change the rbxassetid://123..
  784.  
  785. }
  786.  
  787.  
  788. local queue = {}
  789.  
  790. local isAnimating = false
  791.  
  792.  
  793. local function playReplacementAnimation(animationId)
  794.  
  795. if isAnimating then
  796.  
  797. table.insert(queue, animationId)
  798.  
  799. return
  800.  
  801. end
  802.  
  803. -- end of m1s
  804.  
  805. -- ignore
  806.  
  807.  
  808.  
  809. isAnimating = true
  810.  
  811. local replacementAnimationId = replacementAnimations[tostring(animationId)]
  812.  
  813. if replacementAnimationId then
  814.  
  815. local AnimAnim = Instance.new("Animation")
  816.  
  817. AnimAnim.AnimationId = replacementAnimationId
  818.  
  819. local Anim = humanoid:LoadAnimation(AnimAnim)
  820.  
  821. Anim:Play()
  822.  
  823.  
  824.  
  825. Anim.Stopped:Connect(function()
  826.  
  827. isAnimating = false
  828.  
  829. if #queue > 0 then
  830.  
  831. local nextAnimationId = table.remove(queue, 1)
  832.  
  833. playReplacementAnimation(nextAnimationId)
  834.  
  835. end
  836.  
  837. end)
  838.  
  839. else
  840.  
  841. isAnimating = false
  842.  
  843. end
  844.  
  845. end
  846.  
  847.  
  848. local function stopSpecificAnimations()
  849.  
  850. for _, track in ipairs(humanoid:GetPlayingAnimationTracks()) do
  851.  
  852. local animationId = tonumber(track.Animation.AnimationId:match("%d+"))
  853.  
  854. if animationIdsToStop[animationId] then
  855.  
  856. track:Stop()
  857.  
  858. end
  859.  
  860. end
  861.  
  862. end
  863.  
  864.  
  865. local function onAnimationPlayed(animationTrack)
  866.  
  867. local animationId = tonumber(animationTrack.Animation.AnimationId:match("%d+"))
  868.  
  869. if animationIdsToStop[animationId] then
  870.  
  871. stopSpecificAnimations()
  872.  
  873. animationTrack:Stop()
  874.  
  875.  
  876.  
  877. local replacementAnimationId = replacementAnimations[tostring(animationId)]
  878.  
  879. if replacementAnimationId then
  880.  
  881. playReplacementAnimation(animationId)
  882.  
  883. end
  884.  
  885. end
  886.  
  887. end
  888.  
  889.  
  890. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  891.  
  892.  
  893. local player = game.Players.LocalPlayer
  894.  
  895. local character = player.Character or player.CharacterAdded:Wait()
  896.  
  897. local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
  898.  
  899.  
  900. local function onBodyVelocityAdded(bodyVelocity)
  901.  
  902. if bodyVelocity:IsA("BodyVelocity") then
  903.  
  904. bodyVelocity.Velocity = Vector3.new(bodyVelocity.Velocity.X, 0, bodyVelocity.Velocity.Z)
  905.  
  906. end
  907.  
  908. end
  909.  
  910.  
  911. character.DescendantAdded:Connect(onBodyVelocityAdded)
  912.  
  913.  
  914. for _, descendant in pairs(character:GetDescendants()) do
  915.  
  916. onBodyVelocityAdded(descendant)
  917.  
  918. end
  919.  
  920.  
  921. player.CharacterAdded:Connect(function(newCharacter)
  922.  
  923. character = newCharacter
  924.  
  925. humanoidRootPart = character:WaitForChild("HumanoidRootPart")
  926.  
  927. character.DescendantAdded:Connect(onBodyVelocityAdded)
  928.  
  929.  
  930.  
  931. for _, descendant in pairs(character:GetDescendants()) do
  932.  
  933. onBodyVelocityAdded(descendant)
  934.  
  935. end
  936.  
  937. end)
  938. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement