Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local TweenService = game:GetService("TweenService")
- local player = game:GetService("Players").LocalPlayer
- local playerGui = player.PlayerGui
- local inGameUI = playerGui:WaitForChild("InGameUI")
- local bottom = inGameUI:WaitForChild("Bottom")
- local abilities = bottom:WaitForChild("Abilities")
- local ability2 = abilities:WaitForChild("2")
- local ability1 = abilities:WaitForChild("1")
- local customAbility = ability1:Clone()
- customAbility.Name = "Custom"
- customAbility.Timer.Text = "Machine Dribble"
- ability1:Destroy()
- customAbility.Parent = abilities
- local sound = Instance.new("Sound")
- sound.SoundId = "rbxassetid://10066968815"
- sound.Parent = customAbility
- local isOnCooldown = false
- customAbility.MouseButton1Click:Connect(function()
- sound:Play()
- if isOnCooldown then
- print("Ability is on cooldown!")
- return
- end
- isOnCooldown = true
- customAbility.Cooldown.UIGradient.Offset = Vector2.new(0, 0)
- local tween = TweenService:Create(customAbility.Cooldown.UIGradient, TweenInfo.new(30), {Offset = Vector2.new(0, 1)})
- tween:Play()
- local player = game.Players.LocalPlayer
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local character = player.Character or player.CharacterAdded:Wait()
- local originalEffects = ReplicatedStorage.Assets.Auras.Puzzle.Particles.Head:FindFirstChild("Aura")
- -- Check if originalEffects is valid
- if not originalEffects then
- error("The original effects object was not found in ReplicatedStorage.")
- end
- local toros = character:FindFirstChild("Toros")
- local head = character:FindFirstChild("Head")
- local lefta = character:FindFirstChild("Left Arm")
- local righta = character:FindFirstChild("Right Arm")
- local leftl = character:FindFirstChild("Left Leg")
- local rightl = character:FindFirstChild("Right Leg")
- local function applyEffect(part)
- if part then -- Check if the part exists
- local effects = originalEffects:Clone() -- Clone the effects for each part
- -- Set the color using ColorSequence
- effects.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 224)), -- Light yellow at the start
- ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 255, 224)) -- Light yellow at the end
- })
- effects.Parent = part -- Set the parent to the specified part
- else
- warn("Part not found!") -- Warn if the part is nil
- end
- end
- -- Apply the effect to each part
- applyEffect(toros)
- applyEffect(head)
- applyEffect(righta)
- applyEffect(lefta)
- applyEffect(leftl)
- applyEffect(rightl)
- wait(0.05)
- applyEffect(toros)
- applyEffect(head)
- applyEffect(righta)
- applyEffect(lefta)
- applyEffect(leftl)
- applyEffect(rightl)
- wait(0.05)
- applyEffect(toros)
- applyEffect(head)
- applyEffect(righta)
- applyEffect(lefta)
- applyEffect(leftl)
- applyEffect(rightl)
- wait(0.05)
- applyEffect(toros)
- applyEffect(head)
- applyEffect(righta)
- applyEffect(lefta)
- applyEffect(leftl)
- applyEffect(rightl)
- wait(0.05)
- applyEffect(toros)
- applyEffect(head)
- applyEffect(righta)
- applyEffect(lefta)
- applyEffect(leftl)
- applyEffect(rightl)
- wait(0.05)
- applyEffect(toros)
- applyEffect(head)
- applyEffect(righta)
- applyEffect(lefta)
- applyEffect(leftl)
- applyEffect(rightl)
- local TweenService = game:GetService("TweenService")
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
- local animationId = "rbxassetid://74760828875758"
- local soundId = "rbxassetid://91616529441627"
- local animation = Instance.new("Animation")
- animation.AnimationId = animationId
- local humanoid = character:WaitForChild("Humanoid")
- local animationTrack = humanoid:LoadAnimation(animation)
- local function tweenToNortheastPosition()
- local currentPosition = humanoidRootPart.Position
- local offset = (humanoidRootPart.CFrame.LookVector + humanoidRootPart.CFrame.RightVector).unit * 35
- local targetPosition = currentPosition + offset
- local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
- local goal = {CFrame = CFrame.new(targetPosition)}
- local tween = TweenService:Create(humanoidRootPart, tweenInfo, goal)
- animationTrack:Play()
- local sound = Instance.new("Sound")
- sound.SoundId = soundId
- sound.Parent = humanoidRootPart
- sound:Play()
- tween:Play()
- tween.Completed:Wait()
- end
- tweenToNortheastPosition()
- local TweenService = game:GetService("TweenService")
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
- local animationId = "rbxassetid://104460260153279"
- local soundId = "rbxassetid://91616529441627"
- local animation = Instance.new("Animation")
- animation.AnimationId = animationId
- local humanoid = character:WaitForChild("Humanoid")
- local animationTrack = humanoid:LoadAnimation(animation)
- local function tweenToClosePosition()
- local currentPosition = humanoidRootPart.Position
- local offset = humanoidRootPart.CFrame.LookVector * 20
- local targetPosition = currentPosition + offset
- local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
- local goal = {CFrame = CFrame.new(targetPosition)}
- local tween = TweenService:Create(humanoidRootPart, tweenInfo, goal)
- animationTrack:Play()
- local sound = Instance.new("Sound")
- sound.SoundId = soundId
- sound.Parent = humanoidRootPart
- sound:Play()
- tween:Play()
- tween.Completed:Wait()
- -- Keep animation and sound playing
- end
- tweenToClosePosition()
- tween.Completed:Wait()
- isOnCooldown = false
- print("Cooldown completed for Custom ability!")
- end)
- print("Custom ability created and set up to play sound with cooldown and run scripts!")
Advertisement
Add Comment
Please, Sign In to add comment