local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local player = Players.LocalPlayer local char = player.Character or player.CharacterAdded:Wait() local hrp = char:WaitForChild("HumanoidRootPart") local function startDrag(item) pcall(function() ReplicatedStorage.RemoteEvents.RequestStartDraggingItem:FireServer(item) end) end local function stopDrag(item) pcall(function() ReplicatedStorage.RemoteEvents.StopDraggingItem:FireServer(item) end) end local function bringItem(item) if item.Name:find("Chest") then return end local targetPart for _, child in ipairs(item:GetDescendants()) do if child:IsA("MeshPart") or child:IsA("Part") then targetPart = child break end end if targetPart then pcall(function() local dropPos = hrp.Position + Vector3.new(0, 2, 0) if item:IsA("Model") and item.PrimaryPart then item:SetPrimaryPartCFrame(CFrame.new(dropPos)) else targetPart.Position = dropPos end end) end end local function handleChest(chest) if chest and chest:FindFirstChild("Main") then local proxAtt = chest.Main:FindFirstChild("ProximityAttachment") if proxAtt then for _, obj in ipairs(proxAtt:GetChildren()) do if obj:IsA("ProximityPrompt") or obj.Name == "ProximityInteraction" then fireproximityprompt(obj) task.wait(0.5) -- chờ loot spawn local lootToHandle = {} for _, loot in ipairs(workspace.Items:GetChildren()) do if not loot.Name:find("Chest") then table.insert(lootToHandle, loot) bringItem(loot) end end task.wait(0.01) local startTime = tick() for _, loot in ipairs(lootToHandle) do startDrag(loot) end local elapsed = tick() - startTime if elapsed < 0.1 then task.wait(0.1 - elapsed) end for _, loot in ipairs(lootToHandle) do stopDrag(loot) end end end end end end local ScreenGui = Instance.new("ScreenGui", game:GetService("CoreGui")) ScreenGui.ResetOnSpawn = false local Frame = Instance.new("Frame", ScreenGui) Frame.Size = UDim2.new(0, 200, 0, 50) Frame.Position = UDim2.new(0.05, 0, 0.25, 0) Frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25) Frame.Active = true Frame.Draggable = true local UICorner = Instance.new("UICorner", Frame) UICorner.CornerRadius = UDim.new(0, 8) local Button = Instance.new("TextButton", Frame) Button.Size = UDim2.new(1, -10, 0, 40) Button.Position = UDim2.new(0, 5, 0, 5) Button.BackgroundColor3 = Color3.fromRGB(40, 150, 80) Button.Text = "Auto Loot Chest" Button.TextColor3 = Color3.fromRGB(255, 255, 255) Button.Font = Enum.Font.SourceSansBold Button.TextSize = 16 Button.MouseButton1Click:Connect(function() for _, item in ipairs(workspace.Items:GetChildren()) do if string.find(item.Name, "Chest") then handleChest(item) end end end)