Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local playerGui = player.PlayerGui
- local hotbar = playerGui:FindFirstChild("Hotbar")
- local backpack = hotbar:FindFirstChild("Backpack")
- local hotbarFrame = backpack:FindFirstChild("Hotbar")
- local baseButton = hotbarFrame:FindFirstChild("1").Base
- local ToolName = baseButton.ToolName
- ToolName.Text = "SUPER PUNCH"
- local player = game.Players.LocalPlayer
- local playerGui = player.PlayerGui
- local hotbar = playerGui:FindFirstChild("Hotbar")
- local backpack = hotbar:FindFirstChild("Backpack")
- local hotbarFrame = backpack:FindFirstChild("Hotbar")
- local baseButton = hotbarFrame:FindFirstChild("2").Base
- local ToolName = baseButton.ToolName
- ToolName.Text = "SPEEDY PUNCHS"
- local player = game.Players.LocalPlayer
- local playerGui = player.PlayerGui
- local hotbar = playerGui:FindFirstChild("Hotbar")
- local backpack = hotbar:FindFirstChild("Backpack")
- local hotbarFrame = backpack:FindFirstChild("Hotbar")
- local baseButton = hotbarFrame:FindFirstChild("3").Base
- local ToolName = baseButton.ToolName
- ToolName.Text = "SLA"
- local player = game.Players.LocalPlayer
- local playerGui = player.PlayerGui
- local hotbar = playerGui:FindFirstChild("Hotbar")
- local backpack = hotbar:FindFirstChild("Backpack")
- local hotbarFrame = backpack:FindFirstChild("Hotbar")
- local baseButton = hotbarFrame:FindFirstChild("4").Base
- local ToolName = baseButton.ToolName
- ToolName.Text = "UPPERCUT MAXIMO"
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- local function findGuiAndSetText()
- local screenGui = playerGui:FindFirstChild("ScreenGui")
- if screenGui then
- local magicHealthFrame = screenGui:FindFirstChild("MagicHealth")
- if magicHealthFrame then
- local textLabel = magicHealthFrame:FindFirstChild("TextLabel")
- if textLabel then
- textLabel.Text = "Super Saiyan"
- end
- end
- end
- end
- playerGui.DescendantAdded:Connect(findGuiAndSetText)
- findGuiAndSetText()
- local animationId = 10468665991
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- -- First move
- local AnimAnim = Instance.new("Animation")
- AnimAnim.AnimationId = "rbxassetid://18715994424"
- local Anim = Humanoid:LoadAnimation(AnimAnim)
- local startTime = 0.2
- Anim:Play()
- Anim:AdjustSpeed(0)
- Anim.TimePosition = startTime
- Anim:AdjustSpeed(1)
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local animationId = 10466974800
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- -- second move
- local AnimAnim = Instance.new("Animation")
- AnimAnim.AnimationId = "rbxassetid://13560306510"
- local Anim = Humanoid:LoadAnimation(AnimAnim)
- local startTime = 0.2
- Anim:Play()
- Anim:AdjustSpeed(0)
- Anim.TimePosition = startTime
- Anim:AdjustSpeed(0.9)
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local animationId = 10471336737
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- -- third move
- local AnimAnim = Instance.new("Animation")
- AnimAnim.AnimationId = "rbxassetid://18462088986"
- local Anim = Humanoid:LoadAnimation(AnimAnim)
- local startTime = 5.3
- Anim:Play()
- Anim:AdjustSpeed(0)
- Anim.TimePosition = startTime
- Anim:AdjustSpeed(2.9)
- delay(1.8, function()
- Anim:Stop()
- end)
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local animationId = 12510170988
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- -- fourth move (last move)
- local AnimAnim = Instance.new("Animation")
- AnimAnim.AnimationId = "rbxassetid://17325522388"
- local Anim = Humanoid:LoadAnimation(AnimAnim)
- local startTime = 0.1
- Anim:Play()
- Anim:AdjustSpeed(0)
- Anim.TimePosition = startTime
- Anim:AdjustSpeed(1)
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local animationId = 11343318134
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- -- serious punch
- local AnimAnim = Instance.new("Animation")
- AnimAnim.AnimationId = "rbxassetid://18435535291"
- local Anim = Humanoid:LoadAnimation(AnimAnim)
- local startTime = 2
- Anim:Play()
- Anim:AdjustSpeed(0)
- Anim.TimePosition = startTime
- Anim:AdjustSpeed(0.5)
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local animationId = 15955393872
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- -- Wallcombo
- local AnimAnim = Instance.new("Animation")
- AnimAnim.AnimationId = "rbxassetid://18447913645"
- local Anim = Humanoid:LoadAnimation(AnimAnim)
- local startTime = 0.2
- Anim:Play()
- Anim:AdjustSpeed(0)
- Anim.TimePosition = startTime
- Anim:AdjustSpeed(1)
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local animationId = 12983333733
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- -- death counter
- local AnimAnim = Instance.new("Animation")
- AnimAnim.AnimationId = "rbxassetid://17325254223"
- local Anim = Humanoid:LoadAnimation(AnimAnim)
- local startTime = 0.3
- Anim:Play()
- Anim:AdjustSpeed(0)
- Anim.TimePosition = startTime
- Anim:AdjustSpeed(0.2)
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local animationId = 12447707844
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- -- ult anim
- local AnimAnim = Instance.new("Animation")
- AnimAnim.AnimationId = "rbxassetid://17140902079"
- local Anim = Humanoid:LoadAnimation(AnimAnim)
- local startTime = 0
- Anim:Play()
- Anim:AdjustSpeed(0)
- Anim.TimePosition = startTime
- Anim:AdjustSpeed(1)
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local animationId = 10479335397
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- -- Dash anim
- local AnimAnim = Instance.new("Animation")
- AnimAnim.AnimationId = "rbxassetid://17838006839"
- local Anim = Humanoid:LoadAnimation(AnimAnim)
- local startTime = 0.120
- Anim:Play()
- Anim:AdjustSpeed(0)
- Anim.TimePosition = startTime
- Anim:AdjustSpeed(0.7)
- delay(1.2, function()
- Anim:Stop()
- end)
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local animationId = 10503381238
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- -- Uppercut anim
- local AnimAnim = Instance.new("Animation")
- AnimAnim.AnimationId = "rbxassetid://18169291044"
- local Anim = Humanoid:LoadAnimation(AnimAnim)
- local startTime = 0.2
- Anim:Play()
- Anim:AdjustSpeed(0)
- Anim.TimePosition = startTime
- Anim:AdjustSpeed(1)
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local animationId = 10470104242
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. animationId then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- -- Downslam anim
- local AnimAnim = Instance.new("Animation")
- AnimAnim.AnimationId = "rbxassetid://17858878027"
- local Anim = Humanoid:LoadAnimation(AnimAnim)
- local startTime = 0.1120
- wait(0.2)
- Anim:Play()
- Anim:AdjustSpeed(0.10)
- Anim.TimePosition = startTime
- Anim:AdjustSpeed(1)
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- -- Saitama m1s
- local animationIdsToStop = {
- [10469493270] = true,
- [10469630950] = true,
- [10469639222] = true,
- [10469643643] = true,
- }
- -- rechange m1s
- local replacementAnimations = {
- ["10469643643"] = "rbxassetid://13491635433 ",
- ["10469639222"] = "rbxassetid://13295919399",
- ["10469630950"] = "rbxassetid://17889461810",
- ["10469493270"] = "rbxassetid://17889458563",
- }
- local queue = {}
- local isAnimating = false
- local function playReplacementAnimation(animationId)
- if isAnimating then
- table.insert(queue, animationId)
- return
- end
- isAnimating = true
- local replacementAnimationId = replacementAnimations[tostring(animationId)]
- if replacementAnimationId then
- local AnimAnim = Instance.new("Animation")
- AnimAnim.AnimationId = replacementAnimationId
- local Anim = humanoid:LoadAnimation(AnimAnim)
- Anim:Play()
- Anim.Stopped:Connect(function()
- isAnimating = false
- if #queue > 0 then
- local nextAnimationId = table.remove(queue, 1)
- playReplacementAnimation(nextAnimationId)
- end
- end)
- else
- isAnimating = false
- end
- end
- local function stopSpecificAnimations()
- for _, track in ipairs(humanoid:GetPlayingAnimationTracks()) do
- local animationId = tonumber(track.Animation.AnimationId:match("%d+"))
- if animationIdsToStop[animationId] then
- track:Stop()
- end
- end
- end
- local function onAnimationPlayed(animationTrack)
- local animationId = tonumber(animationTrack.Animation.AnimationId:match("%d+"))
- if animationIdsToStop[animationId] then
- stopSpecificAnimations()
- animationTrack:Stop()
- local replacementAnimationId = replacementAnimations[tostring(animationId)]
- if replacementAnimationId then
- playReplacementAnimation(animationId)
- end
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
- local function onBodyVelocityAdded(bodyVelocity)
- if bodyVelocity:IsA("BodyVelocity") then
- bodyVelocity.Velocity = Vector3.new(bodyVelocity.Velocity.X, 0, bodyVelocity.Velocity.Z)
- end
- end
- character.DescendantAdded:Connect(onBodyVelocityAdded)
- for _, descendant in pairs(character:GetDescendants()) do
- onBodyVelocityAdded(descendant)
- end
- player.CharacterAdded:Connect(function(newCharacter)
- character = newCharacter
- humanoidRootPart = character:WaitForChild("HumanoidRootPart")
- character.DescendantAdded:Connect(onBodyVelocityAdded)
- for _, descendant in pairs(character:GetDescendants()) do
- onBodyVelocityAdded(descendant)
- end
- end)
- -- Tp tooooooooooooooolll
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- while not LocalPlayer do
- wait()
- LocalPlayer = Players.LocalPlayer
- end
- local function createTool(name)
- local newTool = Instance.new("Tool")
- newTool.Name = name
- newTool.RequiresHandle = false
- newTool.CanBeDropped = false
- newTool.Parent = LocalPlayer.Backpack
- return newTool
- end
- local function bindTeleportLogic(tool)
- tool.Activated:Connect(function()
- teleportToClosestPlayer(tool)
- end)
- end
- local tool = createTool("Instant Transmission")
- bindTeleportLogic(tool)
- local teleportSound = Instance.new("Sound")
- teleportSound.SoundId = "rbxassetid://5066021887"
- teleportSound.Volume = 2
- teleportSound.Looped = false
- teleportSound.PlayOnRemove = false
- teleportSound.Parent = LocalPlayer
- local teleportAnimation = Instance.new("Animation")
- teleportAnimation.AnimationId = "rbxassetid://15957361339"
- local teleportDistance = 50
- local cooldownTime = 5
- local isOnCooldown = false
- local originalToolName = tool.Name
- local function findClosestPlayer()
- local player = LocalPlayer
- local character = player.Character
- if not character then return nil end
- local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
- if not humanoidRootPart then return nil end
- local closestPlayer = nil
- local shortestDistance = math.huge
- for _, otherPlayer in pairs(Players:GetPlayers()) do
- if otherPlayer ~= player and otherPlayer.Character and otherPlayer.Character:FindFirstChild("HumanoidRootPart") then
- local otherHumanoidRootPart = otherPlayer.Character.HumanoidRootPart
- local distance = (humanoidRootPart.Position - otherHumanoidRootPart.Position).magnitude
- if (not teleportDistance or distance <= teleportDistance) and distance < shortestDistance then
- shortestDistance = distance
- closestPlayer = otherPlayer
- end
- end
- end
- return closestPlayer, shortestDistance
- end
- function teleportToClosestPlayer(tool)
- if isOnCooldown then
- warn("LOW ON ENERGY WAIT 5 SECONDS!")
- return
- end
- local player = LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local closestPlayer, distance = findClosestPlayer()
- if closestPlayer and closestPlayer.Character then
- local closestHumanoidRootPart = closestPlayer.Character:FindFirstChild("HumanoidRootPart")
- if closestHumanoidRootPart then
- local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
- if not teleportDistance or distance <= teleportDistance then
- isOnCooldown = true
- teleportSound:Play()
- local animationTrack = humanoid:LoadAnimation(teleportAnimation)
- animationTrack:Play()
- humanoidRootPart.CFrame = closestHumanoidRootPart.CFrame * CFrame.new(0, 0, 1)
- animationTrack.Stopped:Connect(function()
- animationTrack:Stop()
- end)
- if tool and tool.Parent then
- tool:Destroy()
- end
- tool = createTool("Low On Energy!")
- wait(cooldownTime)
- if tool and tool.Parent then
- tool:Destroy()
- end
- tool = createTool(originalToolName)
- bindTeleportLogic(tool)
- isOnCooldown = false
- print("Energy is back on!")
- else
- warn("No energy is detected")
- end
- end
- end
- end
- -- Credits
- local gui = Instance.new("ScreenGui")
- gui.Name = "CreditsGui"
- gui.ResetOnSpawn = false
- gui.Parent = game.CoreGui
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 500, 0, 250)
- frame.Position = UDim2.new(0.5, -250, 0.5, -100)
- frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- frame.BorderSizePixel = 0
- frame.Parent = gui
- local frameGradient = Instance.new("UIGradient")
- frameGradient.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0, Color3.fromRGB(180, 180, 180)),
- ColorSequenceKeypoint.new(0.5, Color3.fromRGB(100, 100, 100)),
- ColorSequenceKeypoint.new(1, Color3.fromRGB(180, 180, 180))
- })
- frameGradient.Rotation = 90
- frameGradient.Parent = frame
- local frameUICorner = Instance.new("UICorner")
- frameUICorner.CornerRadius = UDim.new(0, 12)
- frameUICorner.Parent = frame
- local topHighlight = Instance.new("Frame")
- topHighlight.Size = UDim2.new(1, 0, 0.1, 0)
- topHighlight.BackgroundTransparency = 0.5
- topHighlight.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- topHighlight.Parent = frame
- local highlightGradient = Instance.new("UIGradient")
- highlightGradient.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)),
- ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 255, 255), 0)
- })
- highlightGradient.Rotation = 90
- highlightGradient.Parent = topHighlight
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 240, 0, 50)
- button.Position = UDim2.new(0.5, -120, 1, -60)
- button.BackgroundColor3 = Color3.fromRGB(130, 130, 130)
- button.Text = ".gg/GigaHub | Moveset"
- button.Font = Enum.Font.GothamBold
- button.TextSize = 24
- button.TextColor3 = Color3.fromRGB(255, 255, 255)
- button.Parent = frame
- local buttonUICorner = Instance.new("UICorner")
- buttonUICorner.CornerRadius = UDim.new(0, 12)
- buttonUICorner.Parent = button
- local buttonGradient = Instance.new("UIGradient")
- buttonGradient.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0, Color3.fromRGB(200, 200, 200)),
- ColorSequenceKeypoint.new(1, Color3.fromRGB(100, 100, 100))
- })
- buttonGradient.Rotation = 90 -- Vertical gradient
- buttonGradient.Parent = button
- button.MouseButton1Click:Connect(function()
- setclipboard("https://discord.gg/Ssy9TTNGHW")
- button.Text = "Copied!"
- wait(1)
- gui:Destroy()
- end)
- -- cool credits
- local screenGui = Instance.new("ScreenGui")
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local textLabel = Instance.new("TextLabel")
- textLabel.Parent = screenGui
- textLabel.Text = "MADE BY HENZO | MOVESET"
- textLabel.Size = UDim2.new(0, 150, 0, 100)
- textLabel.Position = UDim2.new(0.5, -150, 0, 10)
- textLabel.AnchorPoint = Vector2.new(0.5, 0)
- textLabel.BackgroundTransparency = 1
- textLabel.TextColor3 = Color3.new(1, 1, 1)
- textLabel.TextStrokeTransparency = 0.5
- textLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
- textLabel.Font = Enum.Font.Cartoon
- textLabel.TextScaled = true
- textLabel.TextTransparency = 1
- local stroke = Instance.new("UIStroke")
- stroke.Parent = textLabel
- stroke.Thickness = 3 -- Thicker outline
- stroke.Color = Color3.fromRGB(0, 0, 0)
- stroke.Transparency = 0.2
- local tweenService = game:GetService("TweenService")
- local fadeInTween = tweenService:Create(textLabel, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {TextTransparency = 0})
- fadeInTween:Play()
- -- Useless running
- local userInputService = game:GetService("UserInputService")
- local runService = game:GetService("RunService")
- local tweenService = game:GetService("TweenService") -- Added TweenService for sound fading
- local players = game:GetService("Players")
- local player = players.LocalPlayer
- local isPC = userInputService.KeyboardEnabled
- local isActive = false
- local runSoundId = "rbxassetid://0"
- local runAnimationId = "rbxassetid://18897115785"
- local stopAnimationId = "rbxassetid://13876406148"
- local sound = Instance.new("Sound")
- sound.SoundId = runSoundId
- sound.Looped = true
- sound.Volume = 1 -- Default volume set to 1
- sound.Parent = player:WaitForChild("PlayerGui")
- local tool = Instance.new("Tool")
- tool.Name = "Run"
- tool.RequiresHandle = false
- tool.Parent = player.Backpack
- local animationTrack
- local stopAnimationTrack
- local moveConnection
- local moveSpeed = 250
- local initialSpeed = 0.5
- local speed = initialSpeed
- local elapsedTime = 0
- local changeTime = 2.3
- local fadeDuration = 1
- local trail
- local function createTrail(rootPart)
- trail = Instance.new("Trail")
- trail.Attachment0 = Instance.new("Attachment", rootPart)
- trail.Attachment1 = Instance.new("Attachment", rootPart)
- trail.Attachment1.Position = Vector3.new(0, -2, 0)
- trail.Lifetime = 0.5 -- Adjust as needed
- trail.Color = ColorSequence.new(Color3.new(1, 1, 1))
- trail.Transparency = NumberSequence.new({
- NumberSequenceKeypoint.new(0, 0),
- NumberSequenceKeypoint.new(1, 1)
- })
- trail.Enabled = false
- trail.Parent = rootPart
- end
- local function startMoving(rootPart)
- trail.Enabled = true
- moveConnection = runService.RenderStepped:Connect(function(deltaTime)
- elapsedTime = elapsedTime + deltaTime
- if elapsedTime >= changeTime then
- moveSpeed = 350
- end
- local lookVector = rootPart.CFrame.LookVector
- local newVelocity = lookVector * moveSpeed * speed
- rootPart.Velocity = newVelocity
- end)
- end
- local function stopMoving(rootPart)
- if moveConnection then
- moveConnection:Disconnect()
- moveConnection = nil
- speed = initialSpeed
- elapsedTime = 0 -- Reset elapsed time
- rootPart.Velocity = Vector3.new(0, 0, 0)
- trail.Enabled = false
- end
- end
- local function playStopAnimation(humanoid)
- local stopAnimation = Instance.new("Animation")
- stopAnimation.AnimationId = stopAnimationId
- stopAnimationTrack = humanoid:LoadAnimation(stopAnimation)
- stopAnimationTrack:Play()
- end
- local function fadeOutSound()
- local tweenInfo = TweenInfo.new(fadeDuration)
- local goal = { Volume = 0 }
- local tween = tweenService:Create(sound, tweenInfo, goal)
- tween:Play()
- tween.Completed:Connect(function()
- sound:Stop()
- sound.Volume = 1
- end)
- end
- local function activate()
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local rootPart = character:WaitForChild("HumanoidRootPart")
- rootPart.Anchored = false
- if not trail then
- createTrail(rootPart)
- end
- local runAnimation = Instance.new("Animation")
- runAnimation.AnimationId = runAnimationId
- animationTrack = humanoid:LoadAnimation(runAnimation)
- animationTrack:Play()
- animationTrack:AdjustSpeed(1)
- sound:Play()
- startMoving(rootPart)
- end
- local function deactivate()
- local character = player.Character
- local humanoid = character:WaitForChild("Humanoid")
- local rootPart = character:WaitForChild("HumanoidRootPart")
- if animationTrack then
- animationTrack:Stop()
- end
- fadeOutSound()
- stopMoving(rootPart)
- playStopAnimation(humanoid)
- end
- local function toggleAbility()
- if not isActive then
- activate()
- else
- deactivate()
- end
- isActive = not isActive
- end
- local function onKeyPress(input)
- if input.KeyCode == Enum.KeyCode.K then
- toggleAbility()
- end
- end
- local function onToolActivated()
- toggleAbility()
- end
- if isPC then
- userInputService.InputBegan:Connect(onKeyPress)
- else
- tool.Activated:Connect(onToolActivated)
- end
- local Players = game:GetService("Players")
- local TweenService = game:GetService("TweenService")
- local player = Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- local function updateBarColor()
- local screenGui = playerGui:FindFirstChild("ScreenGui")
- if not screenGui then return end
- local magicHealthFrame = screenGui:FindFirstChild("MagicHealth")
- if not magicHealthFrame then return end
- local healthFrame = magicHealthFrame:FindFirstChild("Health")
- if not healthFrame then return end
- local barFrame = healthFrame:FindFirstChild("Bar")
- if not barFrame then return end
- local imageLabel = barFrame:FindFirstChild("Bar")
- if not imageLabel or not imageLabel:IsA("ImageLabel") then return end
- imageLabel.ImageColor3 = Color3.fromRGB(255, 255, 0)
- end
- local function onCharacterAdded(character)
- updateBarColor()
- end
- local function onPlayerAdded()
- local character = player.Character or player.CharacterAdded:Wait()
- onCharacterAdded(character)
- player.CharacterAdded:Connect(onCharacterAdded)
- end
- Players.PlayerAdded:Connect(onPlayerAdded)
- if player then
- onPlayerAdded()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement