Advertisement
Freshbloodb

Untitled

Nov 26th, 2024
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local RunService = game:GetService("RunService")
  3. local LocalPlayer = Players.LocalPlayer
  4.  
  5. local function ExtendBombRange()
  6. local Character = LocalPlayer.Character
  7. if not Character then return end
  8.  
  9. local Bomb = Character:FindFirstChild("Bomb") or Character:FindFirstChildWhichIsA("Tool") -- Ajusta el nombre según el juego
  10. if not Bomb then return end
  11.  
  12. local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
  13. if not HumanoidRootPart then return end
  14.  
  15. for _, player in pairs(Players:GetPlayers()) do
  16. if player == LocalPlayer then continue end
  17.  
  18. local TargetCharacter = player.Character
  19. if not TargetCharacter then continue end
  20.  
  21. local TargetRootPart = TargetCharacter:FindFirstChild("HumanoidRootPart")
  22. if not TargetRootPart then continue end
  23.  
  24. -- Calcular distancia
  25. local Distance = (HumanoidRootPart.Position - TargetRootPart.Position).Magnitude
  26. if Distance <= 20 then -- El rango original es 10, lo duplicamos a 20
  27. -- Transfiere la bomba al jugador objetivo
  28. Bomb.Parent = TargetCharacter
  29. print("Bomba transferida a:", player.Name)
  30. break
  31. end
  32. end
  33. end
  34.  
  35. RunService.Heartbeat:Connect(ExtendBombRange)
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement