Andrew19282_44

Idk

Apr 9th, 2025 (edited)
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.24 KB | None | 0 0
  1. --[[ Setup References ]]--
  2. local Players = game:GetService("Players")
  3. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  4. local player = Players.LocalPlayer
  5. local playerGui = player:WaitForChild("PlayerGui")
  6. local hotbar = playerGui:WaitForChild("Hotbar")
  7. local backpack = hotbar:WaitForChild("Backpack")
  8. local hotbarFrame = backpack:WaitForChild("Hotbar")
  9. local character = player.Character or player.CharacterAdded:Wait()
  10. local humanoid = character:WaitForChild("Humanoid")
  11. local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
  12.  
  13. --[[ Hotbar Tool Setup ]]--
  14. local function setToolName(buttonIndex, name)
  15. local button = hotbarFrame:WaitForChild(tostring(buttonIndex))
  16. local base = button:WaitForChild("Base")
  17. local toolNameLabel = base:WaitForChild("ToolName")
  18. toolNameLabel.Text = name
  19. end
  20.  
  21. setToolName(1, "Mario punch")
  22. setToolName(2, "Super beat down")
  23. setToolName(3, "Koopa kick") -- Updated to "Koopa kick"
  24. setToolName(4, "Jump-stomp")
  25.  
  26. --[[ GUI Waiter ]]--
  27. local function waitForGui()
  28. while true do
  29. local screenGui = playerGui:FindFirstChild("ScreenGui")
  30. if screenGui then
  31. local magicHealthFrame = screenGui:FindFirstChild("MagicHealth")
  32. if magicHealthFrame then
  33. local textLabel = magicHealthFrame:FindFirstChild("TextLabel")
  34. if textLabel then
  35. textLabel.Text = "??"
  36. return
  37. end
  38. end
  39. end
  40. wait(0.5) -- Faster wait
  41. end
  42. end
  43.  
  44. waitForGui()
  45.  
  46. --[[ Animation Replacements ]]--
  47. local replacementAnimations = {
  48. -- Abilities
  49. ["13376869471"] = {id = "14003607057", speed = 1.0},
  50. ["10466974800"] = {id = "14046756619", speed = 1.0},
  51. ["10471336737"] = {id = "100558589307006", speed = 1.0},
  52. ["12510170988"] = {id = "13497875049", speed = 1.0},
  53. ["15955393872"] = {id = "15943915877", speed = 1},
  54. ["12447707844"] = {id = "15507137974", speed = 1},
  55. ["10479335397"] = {id = "17838006839", speed = 1.3, stopDelay = 1.5},
  56. ["10503381238"] = {id = "14900168720", startTime = 1.3, speed = 0.7},
  57. ["10470104242"] = {id = "12447247483", speed = 6, waitTime = 0.2},
  58.  
  59. -- Punches
  60. ["10469493270"] = {id = "13491635433"},
  61. ["10469630950"] = {id = "17889461810"},
  62. ["10469639222"] = {id = "13532604085"},
  63. ["10469643643"] = {id = "13294471966"},
  64. ["17859015788"] = {id = "12684185971"},
  65. ["11365563255"] = {id = "14516273501"},
  66. }
  67.  
  68. local animationQueue = {}
  69. local isAnimating = false
  70.  
  71. local function playAnimation(animData)
  72. if not animData then return end
  73. if isAnimating then
  74. table.insert(animationQueue, animData)
  75. return
  76. end
  77.  
  78. isAnimating = true
  79.  
  80. local anim = Instance.new("Animation")
  81. anim.AnimationId = "rbxassetid://" .. animData.id
  82. local track = humanoid:LoadAnimation(anim)
  83.  
  84. if animData.waitTime then wait(animData.waitTime) end
  85.  
  86. track:Play()
  87. track:AdjustSpeed(0)
  88. track.TimePosition = animData.startTime or 0
  89. track:AdjustSpeed(animData.speed or 1)
  90.  
  91. if animData.stopDelay then
  92. delay(animData.stopDelay, function()
  93. track:Stop()
  94. end)
  95. end
  96.  
  97. track.Stopped:Connect(function()
  98. isAnimating = false
  99. if #animationQueue > 0 then
  100. local nextAnim = table.remove(animationQueue, 1)
  101. playAnimation(nextAnim)
  102. end
  103. end)
  104. end
  105.  
  106. local function onAnimationPlayed(animTrack)
  107. local animId = animTrack.Animation.AnimationId:match("%d+")
  108. local replacement = replacementAnimations[animId]
  109. if replacement then
  110. -- No delay here for faster animation replacement
  111. for _, track in pairs(humanoid:GetPlayingAnimationTracks()) do
  112. if track ~= animTrack then
  113. track:Stop()
  114. end
  115. end
  116. animTrack:Stop()
  117.  
  118. -- Play the replacement animation
  119. playAnimation(replacement)
  120. end
  121. end
  122.  
  123. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  124.  
  125. --[[ Character Reset Handling ]]--
  126. player.CharacterAdded:Connect(function(newChar)
  127. character = newChar
  128. humanoid = character:WaitForChild("Humanoid")
  129. humanoidRootPart = character:WaitForChild("HumanoidRootPart")
  130. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  131.  
  132. -- Velocity Fix
  133. character.DescendantAdded:Connect(function(d)
  134. if d:IsA("BodyVelocity") then
  135. d.Velocity = Vector3.new(d.Velocity.X, 0, d.Velocity.Z)
  136. end
  137. end)
  138.  
  139. for _, d in ipairs(character:GetDescendants()) do
  140. if d:IsA("BodyVelocity") then
  141. d.Velocity = Vector3.new(d.Velocity.X, 0, d.Velocity.Z)
  142. end
  143. end
  144. end)
Advertisement
Add Comment
Please, Sign In to add comment