Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- local RunService = game:GetService("RunService")
- local TRANSFER_DISTANCE = 20 -- Distancia doble del rango normal (ajústalo según sea necesario)
- local function TransferBomb()
- local Character = LocalPlayer.Character
- if not Character then return end
- local Bomb = Character:FindFirstChild("Bomb") or Character:FindFirstChildWhichIsA("Tool")
- if not Bomb then return end
- local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
- if not HumanoidRootPart then return end
- for _, player in ipairs(Players:GetPlayers()) do
- if player == LocalPlayer then continue end
- local TargetCharacter = player.Character
- if not TargetCharacter then continue end
- local TargetRootPart = TargetCharacter:FindFirstChild("HumanoidRootPart")
- if not TargetRootPart then continue end
- -- Verificar distancia
- local Distance = (HumanoidRootPart.Position - TargetRootPart.Position).Magnitude
- if Distance <= TRANSFER_DISTANCE then
- -- Transferir bomba al jugador objetivo
- Bomb.Parent = TargetCharacter
- print("Bomba transferida a:", player.Name)
- -- Opcional: Notificación al jugador
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "¡Bomba Transferida!";
- Text = "La bomba fue pasada a " .. player.Name;
- Duration = 3;
- })
- break
- end
- end
- end
- RunService.Heartbeat:Connect(TransferBomb)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement