if game.PlaceId ~= 16871291625 then return end if not game:IsLoaded() then game.Loaded:Wait() end local UIS = game:GetService("UserInputService") local Players = game:GetService("Players") local Player = Players.LocalPlayer while not Player do task.wait(0.5) Player = Players.LocalPlayer end local PlayerGui = Player:WaitForChild("PlayerGui") if PlayerGui:FindFirstChild("AutoBoxesGUI") then PlayerGui.AutoBoxesGUI:Destroy() end local autoBoxes = false local autoOpen = false local collected = 0 local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "AutoBoxesGUI" ScreenGui.ResetOnSpawn = false ScreenGui.Parent = PlayerGui local Frame = Instance.new("Frame", ScreenGui) Frame.Size = UDim2.new(0, 180, 0, 165) Frame.Position = UDim2.new(0.5, -90, 0.15, 0) Frame.BackgroundColor3 = Color3.fromRGB(15, 15, 15) Frame.BackgroundTransparency = 0.7 Frame.BorderSizePixel = 0 Frame.Active = true Instance.new("UICorner", Frame).CornerRadius = UDim.new(0, 10) local UIStroke = Instance.new("UIStroke", Frame) UIStroke.Color = Color3.fromRGB(150, 100, 255) UIStroke.Thickness = 1.5 local Title = Instance.new("TextLabel", Frame) Title.Size = UDim2.new(1, 0, 0, 25) Title.Position = UDim2.new(0, 0, 0, 10) Title.BackgroundTransparency = 1 Title.Text = "Auto Crate" Title.TextColor3 = Color3.fromRGB(255, 255, 255) Title.Font = Enum.Font.GothamBold Title.TextSize = 14 local Status = Instance.new("TextLabel", Frame) Status.Size = UDim2.new(1, 0, 0, 20) Status.Position = UDim2.new(0, 0, 0, 35) Status.BackgroundTransparency = 1 Status.Text = "Coletadas: 0" Status.TextColor3 = Color3.fromRGB(180, 180, 180) Status.Font = Enum.Font.Gotham Status.TextSize = 12 local ColorInactive = Color3.fromRGB(50, 50, 60) local ColorActive = Color3.fromRGB(80, 200, 120) local function createToggle(text, yPos, stateVar, callback) local btn = Instance.new("TextButton", Frame) btn.Size = UDim2.new(0.85, 0, 0, 30) btn.Position = UDim2.new(0.075, 0, 0, yPos) btn.Font = Enum.Font.GothamBold btn.TextSize = 12 btn.AutoButtonColor = true Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6) local function update(state) btn.Text = text .. ": " .. (state and "ON" or "OFF") btn.BackgroundColor3 = state and ColorActive or ColorInactive btn.TextColor3 = state and Color3.fromRGB(0, 50, 0) or Color3.fromRGB(200, 200, 200) end btn.MouseButton1Click:Connect(function() callback() end) update(stateVar) return update end local updateBoxesUI updateBoxesUI = createToggle("AUTO BOXES", 60, autoBoxes, function() autoBoxes = not autoBoxes updateBoxesUI(autoBoxes) end) local updateOpenUI updateOpenUI = createToggle("AUTO OPEN", 95, autoOpen, function() autoOpen = not autoOpen updateOpenUI(autoOpen) end) local Footer = Instance.new("TextLabel", Frame) Footer.Size = UDim2.new(1, -8, 0, 15) Footer.Position = UDim2.new(0, 0, 1, -18) Footer.BackgroundTransparency = 1 Footer.Text = "by eocalvo" Footer.TextColor3 = Color3.fromRGB(150, 100, 255) Footer.TextTransparency = 0.5 Footer.Font = Enum.Font.Gotham Footer.TextSize = 10 Footer.TextXAlignment = Enum.TextXAlignment.Right local dragging, dragInput, dragStart, startPos Frame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = Frame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) Frame.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then dragInput = input end end) UIS.InputChanged:Connect(function(input) if input == dragInput and dragging then local delta = input.Position - dragStart Frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) local boxKeywords = {"crate_p", "star_p", "mythical_p", "mystical_p", "mythic_p", "boss_p", "saint_p", "grass_p", "scroll_p", "ying_p"} local openKeywords = {"crate", "star", "mythical", "mystical", "mythic", "boss", "saint", "grass", "scroll", "ying"} -- Contagem agora acontece APENAS quando o auto boxes coleta uma caixa do mapa task.spawn(function() while task.wait(0.10) do if autoBoxes then local char = Player.Character local root = char and char:FindFirstChild("HumanoidRootPart") if root then local searchTargets = {} for _, v in ipairs(workspace:GetChildren()) do table.insert(searchTargets, v) end local chestsFolder = workspace:FindFirstChild("Chests") or workspace:FindFirstChild("chests") if chestsFolder then for _, v in ipairs(chestsFolder:GetDescendants()) do table.insert(searchTargets, v) end end for _, item in ipairs(searchTargets) do if not autoBoxes then break end local isTarget = false local itemNameLower = string.lower(item.Name) for _, keyword in ipairs(boxKeywords) do if string.find(itemNameLower, keyword) then isTarget = true break end end if isTarget then local part = item:IsA("BasePart") and item or item:FindFirstChildWhichIsA("BasePart", true) if part then pcall(function() root.CFrame = part.CFrame end) task.wait(0.10) local prompt = item:FindFirstChildWhichIsA("ProximityPrompt", true) if prompt then pcall(function() prompt.RequiresLineOfSight = false if fireproximityprompt then fireproximityprompt(prompt) else prompt:InputHoldBegin() task.wait(prompt.HoldDuration + 0.05) prompt:InputHoldEnd() end end) -- Conta a caixa coletada do mapa collected = collected + 1 Status.Text = "Coletadas: " .. collected end if firetouchinterest then pcall(function() firetouchinterest(root, part, 0) firetouchinterest(root, part, 1) end) end end end end end end end end) task.spawn(function() while task.wait(0.10) do if autoOpen then local char = Player.Character local hum = char and char:FindFirstChildOfClass("Humanoid") local backpack = Player:FindFirstChild("Backpack") if hum and backpack then for _, item in ipairs(backpack:GetChildren()) do if not autoOpen then break end if item:IsA("Tool") then local isBox = false local itemNameLower = string.lower(item.Name) for _, keyword in ipairs(openKeywords) do if string.find(itemNameLower, keyword) then isBox = true break end end if isBox then pcall(function() hum:EquipTool(item) task.wait(0.10) item:Activate() end) end end end end end end end)