iOSdeveloper

Untitled

Feb 8th, 2025
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.91 KB | None | 0 0
  1. local TweenService = game:GetService("TweenService")
  2. local player = game:GetService("Players").LocalPlayer
  3. local playerGui = player.PlayerGui
  4. local inGameUI = playerGui:WaitForChild("InGameUI")
  5. local bottom = inGameUI:WaitForChild("Bottom")
  6. local abilities = bottom:WaitForChild("Abilities")
  7.  
  8. local ability2 = abilities:WaitForChild("2")
  9. local ability1 = abilities:WaitForChild("1")
  10.  
  11. local customAbility = ability1:Clone()
  12. customAbility.Name = "Custom"
  13. customAbility.Timer.Text = "Machine Dribble"
  14. ability1:Destroy()
  15.  
  16. customAbility.Parent = abilities
  17.  
  18. local sound = Instance.new("Sound")
  19. sound.SoundId = "rbxassetid://10066968815"
  20. sound.Parent = customAbility
  21.  
  22. local isOnCooldown = false
  23.  
  24. customAbility.MouseButton1Click:Connect(function()
  25. sound:Play()
  26.  
  27. if isOnCooldown then
  28. print("Ability is on cooldown!")
  29. return
  30. end
  31.  
  32. isOnCooldown = true
  33. customAbility.Cooldown.UIGradient.Offset = Vector2.new(0, 0)
  34.  
  35. local tween = TweenService:Create(customAbility.Cooldown.UIGradient, TweenInfo.new(30), {Offset = Vector2.new(0, 1)})
  36. tween:Play()
  37.  
  38. local player = game.Players.LocalPlayer
  39. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  40.  
  41. local character = player.Character or player.CharacterAdded:Wait()
  42. local originalEffects = ReplicatedStorage.Assets.Auras.Puzzle.Particles.Head:FindFirstChild("Aura")
  43.  
  44. -- Check if originalEffects is valid
  45. if not originalEffects then
  46. error("The original effects object was not found in ReplicatedStorage.")
  47. end
  48.  
  49. local toros = character:FindFirstChild("Toros")
  50. local head = character:FindFirstChild("Head")
  51. local lefta = character:FindFirstChild("Left Arm")
  52. local righta = character:FindFirstChild("Right Arm")
  53. local leftl = character:FindFirstChild("Left Leg")
  54. local rightl = character:FindFirstChild("Right Leg")
  55.  
  56. local function applyEffect(part)
  57. if part then -- Check if the part exists
  58. local effects = originalEffects:Clone() -- Clone the effects for each part
  59.  
  60. -- Set the color using ColorSequence
  61. effects.Color = ColorSequence.new({
  62. ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 224)), -- Light yellow at the start
  63. ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 255, 224)) -- Light yellow at the end
  64. })
  65.  
  66. effects.Parent = part -- Set the parent to the specified part
  67. else
  68. warn("Part not found!") -- Warn if the part is nil
  69. end
  70. end
  71.  
  72. -- Apply the effect to each part
  73. applyEffect(toros)
  74. applyEffect(head)
  75. applyEffect(righta)
  76. applyEffect(lefta)
  77. applyEffect(leftl)
  78. applyEffect(rightl)
  79.  
  80. wait(0.05)
  81.  
  82. applyEffect(toros)
  83. applyEffect(head)
  84. applyEffect(righta)
  85. applyEffect(lefta)
  86. applyEffect(leftl)
  87. applyEffect(rightl)
  88.  
  89. wait(0.05)
  90.  
  91. applyEffect(toros)
  92. applyEffect(head)
  93. applyEffect(righta)
  94. applyEffect(lefta)
  95. applyEffect(leftl)
  96. applyEffect(rightl)
  97.  
  98. wait(0.05)
  99.  
  100. applyEffect(toros)
  101. applyEffect(head)
  102. applyEffect(righta)
  103. applyEffect(lefta)
  104. applyEffect(leftl)
  105. applyEffect(rightl)
  106.  
  107. wait(0.05)
  108.  
  109. applyEffect(toros)
  110. applyEffect(head)
  111. applyEffect(righta)
  112. applyEffect(lefta)
  113. applyEffect(leftl)
  114. applyEffect(rightl)
  115.  
  116. wait(0.05)
  117.  
  118. applyEffect(toros)
  119. applyEffect(head)
  120. applyEffect(righta)
  121. applyEffect(lefta)
  122. applyEffect(leftl)
  123. applyEffect(rightl)
  124.  
  125. local TweenService = game:GetService("TweenService")
  126. local player = game.Players.LocalPlayer
  127. local character = player.Character or player.CharacterAdded:Wait()
  128. local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
  129. local animationId = "rbxassetid://74760828875758"
  130. local soundId = "rbxassetid://91616529441627"
  131.  
  132. local animation = Instance.new("Animation")
  133. animation.AnimationId = animationId
  134. local humanoid = character:WaitForChild("Humanoid")
  135. local animationTrack = humanoid:LoadAnimation(animation)
  136.  
  137. local function tweenToNortheastPosition()
  138. local currentPosition = humanoidRootPart.Position
  139. local offset = (humanoidRootPart.CFrame.LookVector + humanoidRootPart.CFrame.RightVector).unit * 35
  140. local targetPosition = currentPosition + offset
  141.  
  142. local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  143. local goal = {CFrame = CFrame.new(targetPosition)}
  144.  
  145. local tween = TweenService:Create(humanoidRootPart, tweenInfo, goal)
  146.  
  147. animationTrack:Play()
  148.  
  149. local sound = Instance.new("Sound")
  150. sound.SoundId = soundId
  151. sound.Parent = humanoidRootPart
  152. sound:Play()
  153.  
  154. tween:Play()
  155. tween.Completed:Wait()
  156. end
  157.  
  158. tweenToNortheastPosition()
  159.  
  160. local TweenService = game:GetService("TweenService")
  161. local player = game.Players.LocalPlayer
  162. local character = player.Character or player.CharacterAdded:Wait()
  163. local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
  164. local animationId = "rbxassetid://104460260153279"
  165. local soundId = "rbxassetid://91616529441627"
  166.  
  167. local animation = Instance.new("Animation")
  168. animation.AnimationId = animationId
  169. local humanoid = character:WaitForChild("Humanoid")
  170. local animationTrack = humanoid:LoadAnimation(animation)
  171.  
  172. local function tweenToClosePosition()
  173. local currentPosition = humanoidRootPart.Position
  174. local offset = humanoidRootPart.CFrame.LookVector * 20
  175. local targetPosition = currentPosition + offset
  176.  
  177. local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  178. local goal = {CFrame = CFrame.new(targetPosition)}
  179.  
  180. local tween = TweenService:Create(humanoidRootPart, tweenInfo, goal)
  181.  
  182. animationTrack:Play()
  183.  
  184. local sound = Instance.new("Sound")
  185. sound.SoundId = soundId
  186. sound.Parent = humanoidRootPart
  187. sound:Play()
  188.  
  189. tween:Play()
  190. tween.Completed:Wait()
  191.  
  192. -- Keep animation and sound playing
  193. end
  194.  
  195. tweenToClosePosition()
  196.  
  197. tween.Completed:Wait()
  198.  
  199. isOnCooldown = false
  200. print("Cooldown completed for Custom ability!")
  201. end)
  202.  
  203. print("Custom ability created and set up to play sound with cooldown and run scripts!")
Advertisement
Add Comment
Please, Sign In to add comment