ILovePotato

Untitled

Jan 17th, 2025
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. local tool = Instance.new("Tool")
  2. tool.Name = "20-20-20 Dropkick"
  3. tool.RequiresHandle = true
  4. tool.CanBeDropped = true
  5.  
  6. local handle = Instance.new("Part")
  7. handle.Name = "Handle"
  8. handle.Size = Vector3.new(1, 1, 1)
  9. handle.Anchored = false
  10. handle.CanCollide = false
  11. handle.Transparency = 1
  12. handle.Parent = tool
  13.  
  14. tool.Parent = game.Players.LocalPlayer.Backpack
  15.  
  16. tool.Equipped:Connect(function()
  17. local player = game.Players.LocalPlayer
  18. local character = player.Character or player.CharacterAdded:Wait()
  19. local humanoid = character:FindFirstChildOfClass("Humanoid")
  20. local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
  21.  
  22. if humanoid and humanoidRootPart then
  23. local animation = Instance.new("Animation")
  24. animation.AnimationId = "rbxassetid://17354976067"
  25. local animTrack = humanoid:LoadAnimation(animation)
  26.  
  27. -- Reproducir los sonidos al iniciar la animación
  28. local sound1 = Instance.new("Sound")
  29. sound1.SoundId = "rbxassetid://17356346310"
  30. sound1.Volume = 1
  31. sound1.Parent = character
  32. sound1:Play()
  33.  
  34. local sound2 = Instance.new("Sound")
  35. sound2.SoundId = "rbxassetid://17429233290"
  36. sound2.Volume = 1
  37. sound2.Parent = character
  38. sound2:Play()
  39.  
  40. animTrack:Play()
  41.  
  42. wait(2)
  43.  
  44. -- Crear y aplicar un BodyVelocity para forzar el movimiento
  45. local bodyVelocity = Instance.new("BodyVelocity")
  46. bodyVelocity.Velocity = Vector3.new(0, 0, 0)
  47. bodyVelocity.P = 2500
  48. bodyVelocity.MaxForce = Vector3.new(10000, 10000, 10000)
  49. bodyVelocity.Parent = humanoidRootPart
  50.  
  51. local startTime = tick()
  52. local walkDuration = 4
  53.  
  54. while tick() - startTime < walkDuration do
  55. -- Obtener la dirección de la cámara
  56. local camera = workspace.CurrentCamera
  57. local direction = camera.CFrame.LookVector
  58. local cameraCFrame = camera.CFrame
  59.  
  60. -- Actualizar la velocidad en la dirección que está mirando la cámara
  61. bodyVelocity.Velocity = direction * 1000
  62.  
  63. -- Hacer que el personaje mire hacia donde está mirando la cámara
  64. humanoidRootPart.CFrame = CFrame.new(humanoidRootPart.Position, humanoidRootPart.Position + direction)
  65.  
  66. wait(0.1)
  67. end
  68.  
  69. -- Limpiar el BodyVelocity después del tiempo especificado
  70. bodyVelocity:Destroy()
  71. else
  72. warn("Humanoide o HumanoidRootPart no encontrado")
  73. end
  74. end)
  75.  
  76. tool.Unequipped:Connect(function()
  77. local player = game.Players.LocalPlayer
  78. local character = player.Character
  79. local humanoid = character and character:FindFirstChildOfClass("Humanoid")
  80.  
  81. if humanoid then
  82. humanoid.WalkSpeed = 16
  83. end
  84. end)
  85.  
Add Comment
Please, Sign In to add comment