Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tool = Instance.new("Tool")
- tool.Name = "20-20-20 Dropkick"
- tool.RequiresHandle = true
- tool.CanBeDropped = true
- local handle = Instance.new("Part")
- handle.Name = "Handle"
- handle.Size = Vector3.new(1, 1, 1)
- handle.Anchored = false
- handle.CanCollide = false
- handle.Transparency = 1
- handle.Parent = tool
- tool.Parent = game.Players.LocalPlayer.Backpack
- tool.Equipped:Connect(function()
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:FindFirstChildOfClass("Humanoid")
- local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
- if humanoid and humanoidRootPart then
- local animation = Instance.new("Animation")
- animation.AnimationId = "rbxassetid://17354976067"
- local animTrack = humanoid:LoadAnimation(animation)
- -- Reproducir los sonidos al iniciar la animación
- local sound1 = Instance.new("Sound")
- sound1.SoundId = "rbxassetid://17356346310"
- sound1.Volume = 1
- sound1.Parent = character
- sound1:Play()
- local sound2 = Instance.new("Sound")
- sound2.SoundId = "rbxassetid://17429233290"
- sound2.Volume = 1
- sound2.Parent = character
- sound2:Play()
- animTrack:Play()
- wait(2)
- -- Crear y aplicar un BodyVelocity para forzar el movimiento
- local bodyVelocity = Instance.new("BodyVelocity")
- bodyVelocity.Velocity = Vector3.new(0, 0, 0)
- bodyVelocity.P = 2500
- bodyVelocity.MaxForce = Vector3.new(10000, 10000, 10000)
- bodyVelocity.Parent = humanoidRootPart
- local startTime = tick()
- local walkDuration = 4
- while tick() - startTime < walkDuration do
- -- Obtener la dirección de la cámara
- local camera = workspace.CurrentCamera
- local direction = camera.CFrame.LookVector
- local cameraCFrame = camera.CFrame
- -- Actualizar la velocidad en la dirección que está mirando la cámara
- bodyVelocity.Velocity = direction * 1000
- -- Hacer que el personaje mire hacia donde está mirando la cámara
- humanoidRootPart.CFrame = CFrame.new(humanoidRootPart.Position, humanoidRootPart.Position + direction)
- wait(0.1)
- end
- -- Limpiar el BodyVelocity después del tiempo especificado
- bodyVelocity:Destroy()
- else
- warn("Humanoide o HumanoidRootPart no encontrado")
- end
- end)
- tool.Unequipped:Connect(function()
- local player = game.Players.LocalPlayer
- local character = player.Character
- local humanoid = character and character:FindFirstChildOfClass("Humanoid")
- if humanoid then
- humanoid.WalkSpeed = 16
- end
- end)
Add Comment
Please, Sign In to add comment