Lim lun an cut
Key RequiredUniversal

Lim lun an cut

Universal ScriptVietnamseHubVietnamseHub 687 views 576 executesUpdated Feb 28, 2026
Unrated
00
Lua Script•380 lines (12727 chars)
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")

local player = Players.LocalPlayer
local collectRemote = ReplicatedStorage:WaitForChild("events"):WaitForChild("collect")

-- ===================== LẤY IDS =====================
local function getAllArtIDs()
    local ids = {}
    local plotsFolder = workspace:FindFirstChild("Plots")
    if not plotsFolder then return ids end
    for _, plotFolder in ipairs(plotsFolder:GetChildren()) do
        local buildsFolder = plotFolder:FindFirstChild("Builds")
        if buildsFolder then
            for _, model in ipairs(buildsFolder:GetChildren()) do
                if model.Name and model.Name ~= "" then
                    table.insert(ids, model.Name)
                end
            end
        end
    end
    return ids
end

-- ===================== GUI =====================
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "AutoCollectGui"
screenGui.ResetOnSpawn = false
screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
screenGui.Parent = player.PlayerGui

-- Main Frame
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 250, 0, 215)
frame.Position = UDim2.new(0, 20, 0, 100)
frame.BackgroundColor3 = Color3.fromRGB(15, 15, 20)
frame.BorderSizePixel = 0
frame.Active = true
frame.ClipsDescendants = true
frame.Parent = screenGui

local mainCorner = Instance.new("UICorner")
mainCorner.CornerRadius = UDim.new(0, 12)
mainCorner.Parent = frame

-- Stroke
local stroke = Instance.new("UIStroke")
stroke.Color = Color3.fromRGB(60, 60, 80)
stroke.Thickness = 1.5
stroke.Parent = frame

-- Title Bar
local titleBar = Instance.new("Frame")
titleBar.Size = UDim2.new(1, 0, 0, 36)
titleBar.BackgroundColor3 = Color3.fromRGB(30, 30, 45)
titleBar.BorderSizePixel = 0
titleBar.Parent = frame
Instance.new("UICorner", titleBar).CornerRadius = UDim.new(0, 12)

local titleLabel = Instance.new("TextLabel")
titleLabel.Size = UDim2.new(1, -80, 1, 0)
titleLabel.Position = UDim2.new(0, 12, 0, 0)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = "⚡ Auto Collect"
titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextSize = 14
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.Parent = titleBar

-- Minimize Button
local minBtn = Instance.new("TextButton")
minBtn.Size = UDim2.new(0, 26, 0, 20)
minBtn.Position = UDim2.new(1, -58, 0.5, -10)
minBtn.BackgroundColor3 = Color3.fromRGB(255, 180, 0)
minBtn.Text = "—"
minBtn.TextColor3 = Color3.fromRGB(20, 20, 20)
minBtn.Font = Enum.Font.GothamBold
minBtn.TextSize = 12
minBtn.BorderSizePixel = 0
minBtn.Parent = titleBar
Instance.new("UICorner", minBtn).CornerRadius = UDim.new(0, 6)

-- Close Button
local closeBtn = Instance.new("TextButton")
closeBtn.Size = UDim2.new(0, 26, 0, 20)
closeBtn.Position = UDim2.new(1, -28, 0.5, -10)
closeBtn.BackgroundColor3 = Color3.fromRGB(220, 60, 60)
closeBtn.Text = "✕"
closeBtn.TextColor3 = Color3.new(1,1,1)
closeBtn.Font = Enum.Font.GothamBold
closeBtn.TextSize = 12
closeBtn.BorderSizePixel = 0
closeBtn.Parent = titleBar
Instance.new("UICorner", closeBtn).CornerRadius = UDim.new(0, 6)

-- Content Frame (để ẩn/hiện khi minimize)
local content = Instance.new("Frame")
content.Size = UDim2.new(1, 0, 1, -36)
content.Position = UDim2.new(0, 0, 0, 36)
content.BackgroundTransparency = 1
content.Parent = frame

-- Status
local statusLabel = Instance.new("TextLabel")
statusLabel.Size = UDim2.new(1, -16, 0, 22)
statusLabel.Position = UDim2.new(0, 8, 0, 8)
statusLabel.BackgroundTransparency = 1
statusLabel.Text = "Status: Chờ..."
statusLabel.TextColor3 = Color3.fromRGB(160, 160, 180)
statusLabel.Font = Enum.Font.Gotham
statusLabel.TextSize = 12
statusLabel.TextXAlignment = Enum.TextXAlignment.Left
statusLabel.Parent = content

-- IDs found
local idsLabel = Instance.new("TextLabel")
idsLabel.Size = UDim2.new(1, -16, 0, 20)
idsLabel.Position = UDim2.new(0, 8, 0, 32)
idsLabel.BackgroundTransparency = 1
idsLabel.Text = "IDs: 0"
idsLabel.TextColor3 = Color3.fromRGB(80, 200, 255)
idsLabel.Font = Enum.Font.Gotham
idsLabel.TextSize = 12
idsLabel.TextXAlignment = Enum.TextXAlignment.Left
idsLabel.Parent = content

-- Collected
local collectedLabel = Instance.new("TextLabel")
collectedLabel.Size = UDim2.new(1, -16, 0, 20)
collectedLabel.Position = UDim2.new(0, 8, 0, 54)
collectedLabel.BackgroundTransparency = 1
collectedLabel.Text = "Đã collect: 0"
collectedLabel.TextColor3 = Color3.fromRGB(80, 255, 140)
collectedLabel.Font = Enum.Font.Gotham
collectedLabel.TextSize = 12
collectedLabel.TextXAlignment = Enum.TextXAlignment.Left
collectedLabel.Parent = content

-- Speed label
local speedLabel = Instance.new("TextLabel")
speedLabel.Size = UDim2.new(1, -16, 0, 20)
speedLabel.Position = UDim2.new(0, 8, 0, 76)
speedLabel.BackgroundTransparency = 1
speedLabel.Text = "CPS: --"
speedLabel.TextColor3 = Color3.fromRGB(255, 200, 80)
speedLabel.Font = Enum.Font.Gotham
speedLabel.TextSize = 12
speedLabel.TextXAlignment = Enum.TextXAlignment.Left
speedLabel.Parent = content

-- Divider
local divider = Instance.new("Frame")
divider.Size = UDim2.new(0.9, 0, 0, 1)
divider.Position = UDim2.new(0.05, 0, 0, 102)
divider.BackgroundColor3 = Color3.fromRGB(50, 50, 65)
divider.BorderSizePixel = 0
divider.Parent = content

-- Scan button
local scanBtn = Instance.new("TextButton")
scanBtn.Size = UDim2.new(0.44, 0, 0, 30)
scanBtn.Position = UDim2.new(0.04, 0, 0, 110)
scanBtn.BackgroundColor3 = Color3.fromRGB(30, 100, 200)
scanBtn.Text = "🔍 Scan"
scanBtn.TextColor3 = Color3.new(1,1,1)
scanBtn.Font = Enum.Font.GothamBold
scanBtn.TextSize = 13
scanBtn.BorderSizePixel = 0
scanBtn.Parent = content
Instance.new("UICorner", scanBtn).CornerRadius = UDim.new(0, 8)

-- Toggle button
local toggleBtn = Instance.new("TextButton")
toggleBtn.Size = UDim2.new(0.44, 0, 0, 30)
toggleBtn.Position = UDim2.new(0.52, 0, 0, 110)
toggleBtn.BackgroundColor3 = Color3.fromRGB(0, 180, 80)
toggleBtn.Text = "▶ Start"
toggleBtn.TextColor3 = Color3.new(1,1,1)
toggleBtn.Font = Enum.Font.GothamBold
toggleBtn.TextSize = 13
toggleBtn.BorderSizePixel = 0
toggleBtn.Parent = content
Instance.new("UICorner", toggleBtn).CornerRadius = UDim.new(0, 8)

-- Thread label
local threadLabel = Instance.new("TextLabel")
threadLabel.Size = UDim2.new(1, -16, 0, 20)
threadLabel.Position = UDim2.new(0, 8, 0, 148)
threadLabel.BackgroundTransparency = 1
threadLabel.Text = "Threads: 10"
threadLabel.TextColor3 = Color3.fromRGB(200, 150, 255)
threadLabel.Font = Enum.Font.Gotham
threadLabel.TextSize = 12
threadLabel.TextXAlignment = Enum.TextXAlignment.Left
threadLabel.Parent = content

-- Thread slider
local tSliderBg = Instance.new("Frame")
tSliderBg.Size = UDim2.new(0.88, 0, 0, 7)
tSliderBg.Position = UDim2.new(0.06, 0, 0, 172)
tSliderBg.BackgroundColor3 = Color3.fromRGB(60, 60, 75)
tSliderBg.BorderSizePixel = 0
tSliderBg.Parent = content
Instance.new("UICorner", tSliderBg).CornerRadius = UDim.new(1, 0)

local tSliderFill = Instance.new("Frame")
tSliderFill.Size = UDim2.new(0.45, 0, 1, 0)
tSliderFill.BackgroundColor3 = Color3.fromRGB(180, 100, 255)
tSliderFill.BorderSizePixel = 0
tSliderFill.Parent = tSliderBg
Instance.new("UICorner", tSliderFill).CornerRadius = UDim.new(1, 0)

local tSliderKnob = Instance.new("Frame")
tSliderKnob.Size = UDim2.new(0, 15, 0, 15)
tSliderKnob.Position = UDim2.new(0.45, -7, 0.5, -7)
tSliderKnob.BackgroundColor3 = Color3.new(1,1,1)
tSliderKnob.BorderSizePixel = 0
tSliderKnob.Parent = tSliderBg
Instance.new("UICorner", tSliderKnob).CornerRadius = UDim.new(1, 0)

-- ===================== STATE =====================
local running = false
local threads = {}
local artIDs = {}
local totalCollected = 0
local threadCount = 10
local cpsCounter = 0
local minimized = false
local fullHeight = 215
local miniHeight = 36

-- ===================== LOGIC =====================
local function scanIDs()
    artIDs = getAllArtIDs()
    idsLabel.Text = "IDs: " .. #artIDs
    statusLabel.Text = "Scan xong! " .. #artIDs .. " IDs"
    statusLabel.TextColor3 = Color3.fromRGB(80, 255, 140)
end

local function stopAll()
    running = false
    for _, t in ipairs(threads) do
        task.cancel(t)
    end
    threads = {}
    toggleBtn.Text = "▶ Start"
    toggleBtn.BackgroundColor3 = Color3.fromRGB(0, 180, 80)
    statusLabel.Text = "Đã dừng."
    statusLabel.TextColor3 = Color3.fromRGB(160, 160, 180)
end

local function startCollect()
    if #artIDs == 0 then scanIDs() end
    if #artIDs == 0 then
        statusLabel.Text = "Không có IDs!"
        statusLabel.TextColor3 = Color3.fromRGB(255, 80, 80)
        return
    end

    running = true
    toggleBtn.Text = "⏹ Stop"
    toggleBtn.BackgroundColor3 = Color3.fromRGB(210, 50, 50)
    statusLabel.Text = "⚡ Đang chạy..."
    statusLabel.TextColor3 = Color3.fromRGB(255, 220, 50)

    -- Chia IDs cho từng thread
    local function threadWorker(startIdx, step)
        local idx = startIdx
        while running do
            if idx > #artIDs then
                artIDs = getAllArtIDs()
                idsLabel.Text = "IDs: " .. #artIDs
                idx = startIdx
                task.wait(0.05)
            end
            if artIDs[idx] then
                pcall(function()
                    collectRemote:FireServer(artIDs[idx])
                    cpsCounter += 1
                    totalCollected += 1
                    collectedLabel.Text = "Đã collect: " .. totalCollected
                end)
            end
            idx += step
            task.wait() -- yield 1 frame = nhanh nhất có thể
        end
    end

    for i = 1, threadCount do
        local t = task.spawn(threadWorker, i, threadCount)
        table.insert(threads, t)
    end

    -- CPS counter
    task.spawn(function()
        while running do
            task.wait(1)
            speedLabel.Text = "CPS: " .. cpsCounter
            cpsCounter = 0
        end
        speedLabel.Text = "CPS: --"
    end)
end

-- ===================== BUTTONS =====================
scanBtn.MouseButton1Click:Connect(scanIDs)

toggleBtn.MouseButton1Click:Connect(function()
    if running then stopAll() else startCollect() end
end)

closeBtn.MouseButton1Click:Connect(function()
    stopAll()
    screenGui:Destroy()
end)

-- Minimize / Expand
minBtn.MouseButton1Click:Connect(function()
    minimized = not minimized
    if minimized then
        content.Visible = false
        frame:TweenSize(UDim2.new(0, 250, 0, miniHeight), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true)
        minBtn.Text = "+"
        minBtn.BackgroundColor3 = Color3.fromRGB(0, 200, 100)
    else
        content.Visible = true
        frame:TweenSize(UDim2.new(0, 250, 0, fullHeight), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true)
        minBtn.Text = "—"
        minBtn.BackgroundColor3 = Color3.fromRGB(255, 180, 0)
    end
end)

-- ===================== THREAD SLIDER =====================
local draggingThread = false

tSliderBg.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then draggingThread = true end
end)
UserInputService.InputEnded:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then draggingThread = false end
end)
UserInputService.InputChanged:Connect(function(input)
    if draggingThread and input.UserInputType == Enum.UserInputType.MouseMovement then
        local alpha = math.clamp((input.Position.X - tSliderBg.AbsolutePosition.X) / tSliderBg.AbsoluteSize.X, 0, 1)
        tSliderFill.Size = UDim2.new(alpha, 0, 1, 0)
        tSliderKnob.Position = UDim2.new(alpha, -7, 0.5, -7)
        threadCount = math.clamp(math.round(1 + alpha * 49), 1, 50)
        threadLabel.Text = "Threads: " .. threadCount
    end
end)

-- ===================== KÉO GUI =====================
local dragging = false
local dragStart, startPos

titleBar.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragging = true
        dragStart = input.Position
        startPos = frame.Position
    end
end)
UserInputService.InputEnded:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end
end)
UserInputService.InputChanged:Connect(function(input)
    if dragging and input.UserInputType == Enum.UserInputType.MouseMovement 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)

-- Auto scan lúc load
scanIDs()

Features & Information

Hii
#*gaybeovai

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts