Advertisement
Cldprama4

Templete

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