-- [[ Rscripts Risk Notice ]] -- This script is not verified by rscripts.net. Deal with caution. -- -- Stay safe: -- • Never log in on unofficial Roblox sites or lookalike domains. -- • Real Roblox links use roblox.com (check the .com ending). -- • Treat fake Roblox login / "claim reward" pages as phishing. -- [[ End Rscripts Risk Notice ]] -- ============================================ -- Candy2026 自動撿取 v20 -- 過濾掉動畫糖果, 只 TP 真糖果 -- ============================================ local AlanUI = loadstring(game:HttpGet("https://raw.githubusercontent.com/alanbeikers9/AlanUI/main/AlanUI.lua"))() local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local Stats = game:GetService("Stats") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local rootPart = character:WaitForChild("HumanoidRootPart") -- ========== 設定 ========== local TP_OFFSET = Vector3.new(0, 0.5, 0) local TP_STAND_DELAY = 0.15 local RETURN_DELAY = 0.2 local POST_RETURN_COOLDOWN = 0.4 local SCAN_INTERVAL = 0.25 local RETURN_ENABLED = true local RIDE_HEIGHT = 3 local ESP_ENABLED = true local ESP_COLOR = Color3.fromRGB(255, 100, 200) local ESP_FILL_ALPHA = 0.4 local ESP_TEXT = "🍬" -- 🆕 過濾設定 local MIN_CANDY_SIZE = 2 -- 糖果最小尺寸 (動畫小糖果通常 < 1) local REQUIRE_MULTI_PART = true -- 是否要求必須有多個 BasePart (真糖果有 Body+Stem) local MIN_PARTS_COUNT = 2 -- 至少要幾個 BasePart -- ========== 狀態 ========== local running = false local collectCount = 0 local processedObjects = {} local lastScan = 0 local startTime = nil local elapsed = 0 local fpsFrameCount = 0 local fpsLastTime = tick() local currentFPS = 0 local currentPing = 0 local ridingTarget = nil local currentWeld = nil local isTeleporting = false local returnToken = 0 local lastReturnTime = 0 local espCache = {} local selectedPlayer = nil -- ========== Remote ========== local candy = ReplicatedStorage:FindFirstChild("Candy2026") local remote = candy and candy:FindFirstChild("Remote") if not remote then warn("[AutoPick] ❌ 找不到 Remote"); return end -- ============================================ -- 工具函式 -- ============================================ local function getCandyFolder() return workspace:FindFirstChild("LocalCandy2026") end local candyFolder = getCandyFolder() local function getPrecisePos(obj) if obj:IsA("BasePart") then return obj.Position end if not obj:IsA("Model") then return nil end if obj.PrimaryPart then return obj.PrimaryPart.Position end local sum, count = Vector3.zero, 0 for _, part in ipairs(obj:GetChildren()) do if part:IsA("BasePart") then sum = sum + part.Position count += 1 end end if count > 0 then return sum / count end return nil end local function getRoot() if not character or not character.Parent then character = player.Character if not character then return nil end end local rp = character:FindFirstChild("HumanoidRootPart") if rp then rootPart = rp end return rootPart end local function formatTime(sec) sec = math.floor(sec) local h = math.floor(sec / 3600) local m = math.floor((sec % 3600) / 60) local s = sec % 60 return string.format("%02d:%02d:%02d", h, m, s) end -- ============================================ -- 🆕 判斷是否為「真糖果」 -- ============================================ local function isRealCandy(obj) if not obj or not obj.Parent then return false end if not obj:IsA("Model") then return false end -- 條件 1: 至少要有 N 個 BasePart (真糖果有 Body + Stem) if REQUIRE_MULTI_PART then local partCount = 0 local biggestSize = 0 for _, child in ipairs(obj:GetChildren()) do if child:IsA("BasePart") then partCount += 1 local sz = child.Size local maxDim = math.max(sz.X, sz.Y, sz.Z) if maxDim > biggestSize then biggestSize = maxDim end end end if partCount < MIN_PARTS_COUNT then return false end if biggestSize < MIN_CANDY_SIZE then return false end end -- 條件 2: 名字過濾 (排除明顯是特效的) local name = obj.Name:lower() if name:find("particle") or name:find("effect") or name:find("fx") or name:find("sparkle") or name:find("glow") or name:find("trail") or name:find("debris") or name:find("fragment") or name:find("coin") then return false end return true end -- ============================================ -- 糖果透視 -- ============================================ local function clearESP(obj) local data = espCache[obj] if not data then return end if data.highlight then data.highlight:Destroy() end if data.billboard then data.billboard:Destroy() end espCache[obj] = nil end local function clearAllESP() for obj, _ in pairs(espCache) do clearESP(obj) end espCache = {} end local function createESP(obj) if not obj or not obj.Parent then return end if espCache[obj] then return end local targetPart = obj.PrimaryPart or obj:FindFirstChildWhichIsA("BasePart") if not targetPart then return end local highlight = Instance.new("Highlight") highlight.Name = "AutoPickESP" highlight.Adornee = obj highlight.FillColor = ESP_COLOR highlight.OutlineColor = ESP_COLOR highlight.FillTransparency = 1 - ESP_FILL_ALPHA highlight.OutlineTransparency = 0 highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop highlight.Parent = obj local billboard = Instance.new("BillboardGui") billboard.Name = "AutoPickBillboard" billboard.Adornee = targetPart billboard.Size = UDim2.new(0, 80, 0, 30) billboard.StudsOffset = Vector3.new(0, 2.5, 0) billboard.AlwaysOnTop = true billboard.MaxDistance = 300 billboard.Parent = obj local textLabel = Instance.new("TextLabel") textLabel.Size = UDim2.new(1, 0, 0.6, 0) textLabel.BackgroundTransparency = 1 textLabel.Text = ESP_TEXT textLabel.TextColor3 = ESP_COLOR textLabel.TextStrokeTransparency = 0 textLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0) textLabel.Font = Enum.Font.GothamBold textLabel.TextScaled = true textLabel.Parent = billboard local distLabel = Instance.new("TextLabel") distLabel.Size = UDim2.new(1, 0, 0.4, 0) distLabel.Position = UDim2.new(0, 0, 0.6, 0) distLabel.BackgroundTransparency = 1 distLabel.Text = "0m" distLabel.TextColor3 = Color3.fromRGB(255, 255, 255) distLabel.TextStrokeTransparency = 0 distLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0) distLabel.Font = Enum.Font.Gotham distLabel.TextScaled = true distLabel.Parent = billboard espCache[obj] = { highlight = highlight, billboard = billboard, distLabel = distLabel, } end local function updateESP() if not ESP_ENABLED then clearAllESP() return end local folder = candyFolder if not folder or not folder.Parent then folder = getCandyFolder() candyFolder = folder end if not folder then return end local seen = {} for _, obj in ipairs(folder:GetChildren()) do -- 🆕 只對真糖果加 ESP if isRealCandy(obj) then seen[obj] = true if not espCache[obj] then createESP(obj) end end end for obj, _ in pairs(espCache) do if not seen[obj] or not obj.Parent then clearESP(obj) end end end local function updateESPDistance() if not ESP_ENABLED then return end local rp = getRoot() if not rp then return end local myPos = rp.Position for obj, data in pairs(espCache) do if obj.Parent and data.distLabel then local targetPart = obj.PrimaryPart or obj:FindFirstChildWhichIsA("BasePart") if targetPart then local d = (targetPart.Position - myPos).Magnitude data.distLabel.Text = string.format("%.0fm", d) end end end end -- ============================================ -- 嚴格兩次 TP -- ============================================ local function strictTeleport(obj, pos) if isTeleporting then return false end local now = os.clock() if now - lastReturnTime < POST_RETURN_COOLDOWN then return false end local rp = getRoot() if not rp then return false end isTeleporting = true returnToken += 1 local myToken = returnToken local originalCF = rp.CFrame local targetPos = pos + TP_OFFSET local dist = (targetPos - originalCF.Position).Magnitude local shouldReturn = RETURN_ENABLED and dist <= 1000 -- TP #1: 過去 rp.CFrame = CFrame.new(targetPos) rp.AssemblyLinearVelocity = Vector3.zero rp.AssemblyAngularVelocity = Vector3.zero task.spawn(function() task.wait(TP_STAND_DELAY) local checkStart = tick() while tick() - checkStart < RETURN_DELAY do if not obj or not obj.Parent then break end task.wait(0.02) end task.wait(0.05) -- TP #2: 回原位 if shouldReturn and myToken == returnToken and running and not ridingTarget then local rp2 = getRoot() if rp2 then rp2.CFrame = originalCF rp2.AssemblyLinearVelocity = Vector3.zero rp2.AssemblyAngularVelocity = Vector3.zero end end lastReturnTime = os.clock() if myToken == returnToken then isTeleporting = false end end) return true end -- ============================================ -- 騎乘功能 -- ============================================ local function stopRiding() if currentWeld then pcall(function() currentWeld:Destroy() end) currentWeld = nil end if character then local hum = character:FindFirstChildOfClass("Humanoid") if hum then hum.PlatformStand = false end end ridingTarget = nil if _G.__updateRideStatus then _G.__updateRideStatus(nil) end end local function startRiding(targetPlayer) if currentWeld then pcall(function() currentWeld:Destroy() end) currentWeld = nil end ridingTarget = nil if not targetPlayer or targetPlayer == player then return end local myChar = player.Character local myRoot = myChar and myChar:FindFirstChild("HumanoidRootPart") if not myRoot then return end local targetChar = targetPlayer.Character local targetHead = targetChar and targetChar:FindFirstChild("Head") if not targetHead then return end myRoot.CFrame = CFrame.new(targetHead.Position + Vector3.new(0, RIDE_HEIGHT, 0)) myRoot.AssemblyLinearVelocity = Vector3.zero myRoot.AssemblyAngularVelocity = Vector3.zero task.wait(0.1) if not targetHead.Parent then return end local weld = Instance.new("WeldConstraint") weld.Part0 = myRoot weld.Part1 = targetHead weld.Parent = myRoot currentWeld = weld ridingTarget = targetPlayer if _G.__updateRideStatus then _G.__updateRideStatus(targetPlayer.Name) end end -- ============================================ -- 主循環 -- ============================================ RunService.Heartbeat:Connect(function() fpsFrameCount += 1 local now = tick() if now - fpsLastTime >= 1 then currentFPS = fpsFrameCount fpsFrameCount = 0 fpsLastTime = now end pcall(function() local ps = Stats:FindFirstChild("PerformanceStats") if ps and ps:FindFirstChild("Ping") then currentPing = math.floor(tonumber(ps.Ping:GetValue()) or 0) end end) if ridingTarget then if not ridingTarget.Parent then stopRiding() elseif not currentWeld or not currentWeld.Parent then local myChar = player.Character local myRoot = myChar and myChar:FindFirstChild("HumanoidRootPart") local targetChar = ridingTarget.Character local targetHead = targetChar and targetChar:FindFirstChild("Head") if myRoot and targetHead then local weld = Instance.new("WeldConstraint") weld.Part0 = myRoot weld.Part1 = targetHead weld.Parent = myRoot currentWeld = weld end end end updateESP() if not _G.__lastESPDist or tick() - _G.__lastESPDist > 0.2 then _G.__lastESPDist = tick() updateESPDistance() end if not running then return end now = os.clock() if startTime then elapsed = now - startTime end if ridingTarget then return end if isTeleporting then return end if now - lastReturnTime < POST_RETURN_COOLDOWN then return end if now - lastScan < SCAN_INTERVAL then return end lastScan = now local rp = getRoot() if not rp then return end if not candyFolder or not candyFolder.Parent then candyFolder = getCandyFolder() if not candyFolder then return end end local myPos = rp.Position local closest, closestDist, closestObj = nil, math.huge, nil for _, obj in ipairs(candyFolder:GetChildren()) do -- 🆕 只考慮真糖果, 且沒被處理過 if isRealCandy(obj) and not processedObjects[obj] then local pos = getPrecisePos(obj) if pos then local d = (pos - myPos).Magnitude if d < closestDist then closest, closestDist, closestObj = pos, d, obj end end end end if closest then processedObjects[closestObj] = true if strictTeleport(closestObj, closest) then collectCount += 1 if _G.__updateCount then _G.__updateCount(collectCount) end print(string.format("[AutoPick] 🚀 #%d → %s (%.1f studs)", collectCount, closestObj.Name, closestDist)) end end end) task.spawn(function() while true do task.wait(3) for obj, _ in pairs(processedObjects) do if not obj.Parent then processedObjects[obj] = nil end end end end) remote.OnClientEvent:Connect(function(...) local args = {...} if args[1] == "Add" then processedObjects = {} end end) -- ============================================ -- AlanUI -- ============================================ local Ventana = AlanUI:CrearVentana({ Titulo = "🍬 Candy2026 自動撿取", Subtitulo = "v20 · 過濾動畫糖果", TamanoX = 500, TamanoY = 460, TeclaToggle = Enum.KeyCode.RightControl, Buscador = true, AutoGuardar = true, NombreConfig = "Candy2026_AutoPick_v20", }) local TabMain = Ventana:CrearTab("主控台", "🏠") local TabRide = Ventana:CrearTab("騎乘", "🎯") local TabFilter = Ventana:CrearTab("過濾", "🔍") local SecStatus = TabMain:CrearSeccion("📊 狀態") local SecControl = TabMain:CrearSeccion("🎮 控制") local SecESP = TabMain:CrearSeccion("👁 糖果透視") local SecReturn = TabMain:CrearSeccion("🔙 撿完回原位") local SecRide = TabRide:CrearSeccion("🎯 坐在玩家頭上") local SecFilter = TabFilter:CrearSeccion("🔍 糖果過濾 (防止 TP 動畫糖果)") -- 狀態 SecStatus:Label({ Texto = "運行狀態", Flag = "status_run", Valor = "⛔ 已停止" }) SecStatus:Label({ Texto = "運行時間", Flag = "status_timer", Valor = "00:00:00" }) SecStatus:Label({ Texto = "已傳送", Flag = "status_count", Valor = "0" }) SecStatus:Label({ Texto = "FPS", Flag = "status_fps", Valor = "60", Cada = 0.5, Actualizar = function() return tostring(currentFPS) end, }) SecStatus:Label({ Texto = "Ping", Flag = "status_ping", Valor = "0 ms", Cada = 1, Actualizar = function() return tostring(currentPing) .. " ms" end, }) -- 控制 SecControl:Toggle({ Texto = "▶ 啟動自動撿取", Flag = "auto_start", Defecto = false, Callback = function(on) running = on if on then collectCount = 0 processedObjects = {} startTime = os.clock() isTeleporting = false lastReturnTime = 0 returnToken += 1 AlanUI:ActualizarLabel("status_run", "✅ 運行中") AlanUI:ActualizarLabel("status_count", "0") AlanUI:Notificar({ Titulo = "已啟動", Texto = "只 TP 真糖果, 跳過動畫糖果", Tipo = "Success", Duracion = 3, }) else returnToken += 1 isTeleporting = false AlanUI:ActualizarLabel("status_run", "⛔ 已停止") AlanUI:Notificar({ Titulo = "已停止", Texto = string.format("本次運行 %s", formatTime(elapsed)), Tipo = "Info", Duracion = 3, }) end end, }) -- 透視 SecESP:Toggle({ Texto = "👁 啟用糖果透視", Flag = "esp_enabled", Defecto = true, Callback = function(on) ESP_ENABLED = on if not on then clearAllESP() end end, }) SecESP:Slider({ Texto = "透視距離", Flag = "esp_max_distance", Min = 50, Max = 1000, Incremento = 50, Defecto = 300, Sufijo = " studs", Callback = function(v) for _, data in pairs(espCache) do if data.billboard then data.billboard.MaxDistance = v end end end, }) -- 🆕 過濾設定 SecFilter:Label({ Texto = "💡 動畫糖果通常很小或只有 1 個部分", Flag = "filter_hint", Valor = "", }) SecFilter:Toggle({ Texto = "🔍 只認多部件 (真糖果)", Flag = "filter_multi_part", Defecto = true, Callback = function(on) REQUIRE_MULTI_PART = on end, }) SecFilter:Slider({ Texto = "糖果最小尺寸 (studs)", Flag = "filter_min_size", Min = 0.5, Max = 10, Incremento = 0.5, Defecto = 2, Sufijo = " studs", Callback = function(v) MIN_CANDY_SIZE = v end, }) SecFilter:Slider({ Texto = "最少部件數", Flag = "filter_min_parts", Min = 1, Max = 5, Incremento = 1, Defecto = 2, Sufijo = " 個", Callback = function(v) MIN_PARTS_COUNT = v end, }) -- 回原位 SecReturn:Toggle({ Texto = "🔙 撿完回原位", Flag = "return_enabled", Defecto = true, Callback = function(on) RETURN_ENABLED = on if not on then returnToken += 1 end end, }) SecReturn:Slider({ Texto = "傳送後站著等 (秒)", Flag = "tp_stand", Min = 0.05, Max = 0.5, Incremento = 0.05, Defecto = 0.15, Sufijo = " 秒", Callback = function(v) TP_STAND_DELAY = v end, }) SecReturn:Slider({ Texto = "等糖果消失 (秒)", Flag = "return_delay", Min = 0.1, Max = 1, Incremento = 0.05, Defecto = 0.2, Sufijo = " 秒", Callback = function(v) RETURN_DELAY = v end, }) SecReturn:Slider({ Texto = "回原位後冷卻 (秒)", Flag = "post_return_cd", Min = 0.1, Max = 2, Incremento = 0.1, Defecto = 0.4, Sufijo = " 秒", Callback = function(v) POST_RETURN_COOLDOWN = v end, }) -- 騎乘 local rideDropdown = SecRide:Dropdown({ Texto = "選擇目標玩家", Flag = "ride_target", Opciones = {"(無)"}, Defecto = "(無)", Callback = function(v) if v == "(無)" then selectedPlayer = nil; return end for _, p in ipairs(Players:GetPlayers()) do if p.Name == v then selectedPlayer = p; break end end end, }) local function refreshPlayerDropdown() local list = {"(無)"} for _, p in ipairs(Players:GetPlayers()) do if p ~= player then table.insert(list, p.Name) end end rideDropdown.ActualizarOpciones(list) end refreshPlayerDropdown() Players.PlayerAdded:Connect(function() task.wait(0.5) refreshPlayerDropdown() end) Players.PlayerRemoving:Connect(function() task.wait(0.5) refreshPlayerDropdown() end) SecRide:Toggle({ Texto = "🎯 啟動騎乘", Flag = "ride_enabled", Defecto = false, Callback = function(on) if on then if not selectedPlayer then AlanUI:Notificar({ Titulo = "⚠ 未選擇玩家", Texto = "請先選擇目標", Tipo = "Warning", Duracion = 3 }) return end if not selectedPlayer.Parent then AlanUI:Notificar({ Titulo = "⚠ 玩家離線", Texto = "請重新選擇", Tipo = "Warning", Duracion = 3 }) selectedPlayer = nil return end startRiding(selectedPlayer) if ridingTarget then AlanUI:ActualizarLabel("ride_status", "🎯 騎乘中: " .. ridingTarget.Name) end else stopRiding() AlanUI:ActualizarLabel("ride_status", "目前無目標") end end, }) SecRide:Label({ Texto = "目前狀態", Flag = "ride_status", Valor = "目前無目標" }) SecRide:Slider({ Texto = "騎乘高度", Flag = "ride_height", Min = 1, Max = 10, Incremento = 0.5, Defecto = 3, Sufijo = " studs", Callback = function(v) RIDE_HEIGHT = v end, }) -- 更新函式 _G.__updateCount = function(n) AlanUI:ActualizarLabel("status_count", tostring(n)) end _G.__updateRideStatus = function(name) if name then AlanUI:ActualizarLabel("ride_status", "🎯 騎乘中: " .. name) else AlanUI:ActualizarLabel("ride_status", "目前無目標") end end task.spawn(function() while true do task.wait(0.5) if running and startTime then AlanUI:ActualizarLabel("status_timer", formatTime(elapsed)) end end end) player.CharacterAdded:Connect(function(c) character = c rootPart = c:WaitForChild("HumanoidRootPart", 10) if ridingTarget then task.wait(0.5) startRiding(ridingTarget) end end) AlanUI:Notificar({ Titulo = "🍬 Candy2026 已載入", Texto = "v20 · 過濾動畫糖果", Tipo = "Success", Duracion = 5, }) print("[AutoPick] v20 已載入 ✅ (過濾動畫糖果)")