local player = game.Players.LocalPlayer local ReplicatedStorage = game:GetService("ReplicatedStorage") local Events = ReplicatedStorage:WaitForChild("Events") _G.StoredBringButtonPos = _G.StoredBringButtonPos or UDim2.new(0.5, -25, 0.5, -25) local function crearBoton() local gui = player:WaitForChild("PlayerGui"):FindFirstChild("BringGui") if not gui then gui = Instance.new("ScreenGui") gui.Name = "BringGui" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") end if gui:FindFirstChild("BringButton") then return end local button = Instance.new("TextButton") button.Name = "BringButton" button.Size = UDim2.new(0, 50, 0, 50) button.Position = _G.StoredBringButtonPos button.Text = "Grab 2" button.Parent = gui button.Draggable = true button.BackgroundColor3 = Color3.fromRGB(0,0,0) button.TextColor3 = Color3.fromRGB(255,255,255) button:GetPropertyChangedSignal("Position"):Connect(function() _G.StoredBringButtonPos = button.Position end) local function getNearestPlayer() local nearestPlayer = nil local shortestDistance = math.huge local char = player.Character if not char or not char:FindFirstChild("Torso") then return nil end local myPos = char.Torso.Position for _,v in pairs(game.Players:GetPlayers()) do if v ~= player and v.Character and v.Character:FindFirstChild("Torso") then local dist = (v.Character.Torso.Position - myPos).Magnitude if dist < shortestDistance then shortestDistance = dist nearestPlayer = v end end end return nearestPlayer end button.MouseButton1Click:Connect(function() local target = getNearestPlayer() if target and target.Character and target.Character:FindFirstChild("Torso") then local char = player.Character local oldpos = char.Torso.Position task.defer(function() for i=1,0 do char:MoveTo(target.Character.Torso.Position) task.wait(0.0) end end) task.wait(0.1) local args = { [1] = target.Character.Head, [2] = "Grab", [3] = Vector3.new(-532, 82, 502), [4] = CFrame.new(-529.826904, 81.9734344, 495.294464, -0.448879391, -4.82714491e-08, -0.893592358, 1.72521251e-08, 1, -6.26858281e-08, 0.893592358, -4.3554742e-08, -0.448879391) } Events:WaitForChild("Grab"):FireServer(unpack(args)) task.wait(0.3) char:MoveTo(char.Torso.Position) else print("No") end end) end crearBoton() player.CharacterAdded:Connect(function() task.wait(1) crearBoton() end)