arc_scripts

Arc's Cake Collector

Aug 10th, 2026
104
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.51 KB | Gaming | 0 0
  1. local Players = game:GetService("Players")
  2. local TS = game:GetService("TweenService")
  3. local RunService = game:GetService("RunService")
  4. local Player = Players.LocalPlayer
  5. local Character = Player.Character or Player.CharacterAdded:Wait()
  6. local HRP = Character:WaitForChild("HumanoidRootPart")
  7.  
  8. local PINK = Color3.fromRGB(255,200,210)
  9. local DARK_PINK = Color3.fromRGB(220,130,150)
  10. local CAKE_CLR = Color3.fromRGB(180,100,120)
  11. local DAN_CLR = Color3.fromRGB(120,160,90)
  12. local TEXT_DIM = Color3.fromRGB(150,100,110)
  13. local WHITE = Color3.new(1,1,1)
  14.  
  15. local function New(class, props)
  16.     local inst = Instance.new(class)
  17.     for k, v in pairs(props) do
  18.         if k ~= "Parent" then inst[k] = v end
  19.     end
  20.     inst.Parent = props.Parent
  21.     return inst
  22. end
  23.  
  24. local function RoundCorner(parent, r)
  25.     New("UICorner", {CornerRadius=UDim.new(0, r or 8), Parent=parent})
  26. end
  27.  
  28. local function ProgressBar(parent)
  29.     local bar = New("Frame", {Size=UDim2.new(1,0,0,3), Position=UDim2.new(0,0,1,-3),
  30.         BackgroundColor3=WHITE, BorderSizePixel=0, AnchorPoint=Vector2.new(0,1), Visible=false, Parent=parent})
  31.     RoundCorner(bar, 2)
  32.     return bar
  33. end
  34.  
  35. local SG = New("ScreenGui", {Name="CakeCollector", ResetOnSpawn=false, Parent=Player.PlayerGui})
  36. local MF = New("Frame", {Size=UDim2.new(0,250,0,210), Position=UDim2.new(0.5,-125,0.5,-105),
  37.     BackgroundColor3=PINK, BorderSizePixel=0, ClipsDescendants=true, Active=true, Draggable=true, Parent=SG})
  38. RoundCorner(MF, 10)
  39.  
  40. local title = New("TextLabel", {Size=UDim2.new(1,0,0,35), BackgroundColor3=DARK_PINK,
  41.     Text="🎂 Cake Collector", TextColor3=WHITE, TextSize=16, Font=Enum.Font.GothamBold, Parent=MF})
  42. RoundCorner(title, 10)
  43.  
  44. local CakeStatus = New("TextLabel", {Size=UDim2.new(1,-20,0,25), Position=UDim2.new(0,10,0,40),
  45.     BackgroundTransparency=1, Text="Cakes: 0", TextColor3=Color3.fromRGB(100,50,60),
  46.     TextSize=18, Font=Enum.Font.GothamBold, Parent=MF})
  47.  
  48. local CakeWait = New("TextLabel", {Size=UDim2.new(1,-20,0,15), Position=UDim2.new(0,10,0,62),
  49.     BackgroundTransparency=1, Text="-waiting for event refresh-", TextColor3=TEXT_DIM,
  50.     TextSize=11, Font=Enum.Font.Gotham, Visible=false, Parent=MF})
  51.  
  52. local CakeBtn = New("TextButton", {Size=UDim2.new(1,-20,0,30), Position=UDim2.new(0,10,0,82),
  53.     BackgroundColor3=CAKE_CLR, Text="🤖 Auto Collect All", TextColor3=WHITE,
  54.     TextSize=13, Font=Enum.Font.GothamBold, Parent=MF})
  55. RoundCorner(CakeBtn)
  56. local CakeBar = ProgressBar(CakeBtn)
  57.  
  58. local DanBtn = New("TextButton", {Size=UDim2.new(1,-20,0,30), Position=UDim2.new(0,10,0,120),
  59.     BackgroundColor3=DAN_CLR, Text="đŸŒŧ Auto Collect Dandelions", TextColor3=WHITE,
  60.     TextSize=13, Font=Enum.Font.GothamBold, Parent=MF})
  61. RoundCorner(DanBtn)
  62. local DanBar = ProgressBar(DanBtn)
  63.  
  64. New("TextLabel", {Size=UDim2.new(1,-20,0,40), Position=UDim2.new(0,10,0,158),
  65.     BackgroundTransparency=1, Text="You must collect dandelions everytime the event refreshes in order to spawn the cakes. Enjoy my script! :D",
  66.     TextColor3=TEXT_DIM, TextSize=12, Font=Enum.Font.GothamBold, TextWrapped=true, Parent=MF})
  67.  
  68. local Credits = New("Frame", {Size=UDim2.new(0,120,0,25), BackgroundColor3=PINK, BorderSizePixel=0, Parent=SG})
  69. RoundCorner(Credits)
  70. New("TextLabel", {Size=UDim2.new(1,0,1,0), BackgroundTransparency=1, Text="made by: arc_scripts",
  71.     TextColor3=TEXT_DIM, TextSize=11, Font=Enum.Font.GothamBold, Parent=Credits})
  72.  
  73. RunService.RenderStepped:Connect(function()
  74.     Credits.Position = UDim2.new(0, MF.AbsolutePosition.X + 65, 0, MF.AbsolutePosition.Y + MF.AbsoluteSize.Y + 5)
  75. end)
  76.  
  77. local CloseBtn = New("TextButton", {Size=UDim2.new(0,25,0,25), Position=UDim2.new(1,-30,0,5),
  78.     BackgroundColor3=Color3.fromRGB(180,80,100), Text="X", TextColor3=WHITE,
  79.     TextSize=12, Font=Enum.Font.GothamBold, Parent=MF})
  80. RoundCorner(CloseBtn, 13)
  81.  
  82. local cakes, origPos, cakeFolder = {}, nil, nil
  83. local connections = {}
  84. local cakeCollecting, danCollecting = false, false
  85. local cakeCollected, danCollected = 0, 0
  86. local cakeDoneActive, danDoneActive = false, false
  87.  
  88. local function RefreshChar()
  89.     Character = Player.Character
  90.     HRP = Character and Character:FindFirstChild("HumanoidRootPart")
  91. end
  92.  
  93. local function IsCollectible(obj)
  94.     return obj:IsA("Model") or obj:IsA("Part") or obj:IsA("MeshPart")
  95. end
  96.  
  97. local function GetPos(obj)
  98.     if obj:IsA("Model") then
  99.         local pp = obj.PrimaryPart or obj:FindFirstChildWhichIsA("BasePart")
  100.         return pp and pp.Position or obj:GetBoundingBox().Position
  101.     end
  102.     return obj.Position
  103. end
  104.  
  105. local function TeleportTo(obj)
  106.     RefreshChar()
  107.     if not HRP or not obj or not obj.Parent then return end
  108.     HRP.CFrame = CFrame.new(GetPos(obj) + Vector3.new(0,3,0))
  109. end
  110.  
  111. local function ShowMsg(bar, btn, defaultText, text, collectingFlag, doneFlag)
  112.     doneFlag = true
  113.     collectingFlag = false
  114.     btn.Text = text
  115.     bar.Visible = true
  116.     bar.Size = UDim2.new(1,0,0,3)
  117.     TS:Create(bar, TweenInfo.new(2, Enum.EasingStyle.Linear), {Size=UDim2.new(0,0,0,3)}):Play()
  118.     return collectingFlag, doneFlag
  119. end
  120.  
  121. local function HideMsg(bar, btn, defaultText)
  122.     btn.Text = defaultText
  123.     bar.Visible = false
  124.     bar.Size = UDim2.new(1,0,0,3)
  125. end
  126.  
  127. local function UpdateCakeStatus()
  128.     CakeStatus.Text = "Cakes: " .. #cakes
  129.     CakeWait.Visible = #cakes == 0
  130. end
  131.  
  132. local function HideCakeMessage()
  133.     cakeDoneActive = false
  134.     HideMsg(CakeBar, CakeBtn, "🤖 Auto Collect All")
  135. end
  136.  
  137. local function ShowCakeMessage(text)
  138.     cakeCollecting, cakeDoneActive = ShowMsg(CakeBar, CakeBtn, "🤖 Auto Collect All", text, cakeCollecting, cakeDoneActive)
  139.     task.delay(2, function() if cakeDoneActive then HideCakeMessage() end end)
  140. end
  141.  
  142. local function HideDanMessage()
  143.     danDoneActive = false
  144.     HideMsg(DanBar, DanBtn, "đŸŒŧ Auto Collect Dandelions")
  145. end
  146.  
  147. local function ShowDanMessage(text)
  148.     danCollecting, danDoneActive = ShowMsg(DanBar, DanBtn, "đŸŒŧ Auto Collect Dandelions", text, danCollecting, danDoneActive)
  149.     task.delay(2, function() if danDoneActive then HideDanMessage() end end)
  150. end
  151.  
  152. local function ScanCakes()
  153.     RefreshChar()
  154.     if HRP then origPos = HRP.CFrame end
  155.     print("[Cake Collector] Scanning Birthday2026Cakes...")
  156.     cakes = {}
  157.     cakeFolder = workspace:FindFirstChild("Birthday2026Cakes")
  158.     if cakeFolder then
  159.         for _, obj in pairs(cakeFolder:GetChildren()) do
  160.             if IsCollectible(obj) then table.insert(cakes, obj) end
  161.         end
  162.     end
  163.     UpdateCakeStatus()
  164.     print("[Cake Collector] Found " .. #cakes .. " cakes!")
  165. end
  166.  
  167. local function Cleanup()
  168.     for _, c in pairs(connections) do c:Disconnect() end
  169.     connections = {}
  170. end
  171.  
  172. local function SetupCakeListeners()
  173.     if not cakeFolder then return end
  174.     table.insert(connections, cakeFolder.ChildAdded:Connect(function(obj)
  175.         if IsCollectible(obj) then table.insert(cakes, obj); UpdateCakeStatus() end
  176.     end))
  177.     table.insert(connections, cakeFolder.ChildRemoved:Connect(function(obj)
  178.         local i = table.find(cakes, obj)
  179.         if i then table.remove(cakes, i) end
  180.         UpdateCakeStatus()
  181.     end))
  182.     table.insert(connections, cakeFolder.AncestryChanged:Connect(function()
  183.         if not cakeFolder.Parent then cakes = {}; UpdateCakeStatus() end
  184.     end))
  185. end
  186.  
  187. local function StartCakeCollect()
  188.     if #cakes == 0 then ShowCakeMessage("Wait for event refresh!") return end
  189.     RefreshChar()
  190.     if not HRP then return end
  191.     if danCollecting then danCollecting = false; task.wait(0.1); HideDanMessage() end
  192.     cakeCollecting, cakeCollected = true, 0
  193.     CakeBtn.Text = "âšī¸ Stop Collecting"
  194.  
  195.     task.spawn(function()
  196.         for i = #cakes, 1, -1 do
  197.             if not cakeCollecting then break end
  198.             local c = cakes[i]
  199.             if c and c.Parent then
  200.                 TeleportTo(c)
  201.                 cakeCollected = cakeCollected + 1
  202.             end
  203.             table.remove(cakes, i)
  204.             UpdateCakeStatus()
  205.             task.wait(0.6)
  206.         end
  207.         if cakeCollecting and origPos then
  208.             task.wait(0.5)
  209.             HRP.CFrame = origPos
  210.         end
  211.         if cakeCollecting then ShowCakeMessage("Done! " .. cakeCollected .. " collected!") end
  212.     end)
  213. end
  214.  
  215. local function StartDanCollect()
  216.     RefreshChar()
  217.     if not HRP then return end
  218.     if cakeCollecting then cakeCollecting = false; task.wait(0.1); HideCakeMessage() end
  219.     danCollecting, danCollected = true, 0
  220.     DanBtn.Text = "âšī¸ Stop Collecting"
  221.  
  222.     print("[Cake Collector] Scanning DandelionTops...")
  223.     local path = workspace:FindFirstChild("Interiors")
  224.         and workspace.Interiors:FindFirstChild("MainMap!Default")
  225.         and workspace.Interiors["MainMap!Default"]:FindFirstChild("Event")
  226.         and workspace.Interiors["MainMap!Default"].Event:FindFirstChild("Birthday2026")
  227.         and workspace.Interiors["MainMap!Default"].Event.Birthday2026:FindFirstChild("BirthdayButterfly2026")
  228.         and workspace.Interiors["MainMap!Default"].Event.Birthday2026.BirthdayButterfly2026:FindFirstChild("DandelionTops")
  229.  
  230.     local dands = {}
  231.     if path then
  232.         for _, obj in pairs(path:GetChildren()) do
  233.             if IsCollectible(obj) then table.insert(dands, obj) end
  234.         end
  235.     end
  236.     print("[Cake Collector] Found " .. #dands .. " dandelions!")
  237.     if #dands == 0 then ShowDanMessage("No dandelions found!") return end
  238.  
  239.     task.spawn(function()
  240.         for i = #dands, 1, -1 do
  241.             if not danCollecting then break end
  242.             local d = dands[i]
  243.             if d and d.Parent then
  244.                 TeleportTo(d)
  245.                 danCollected = danCollected + 1
  246.             end
  247.             task.wait(0.1)
  248.         end
  249.         if danCollecting and origPos then
  250.             task.wait(0.5)
  251.             HRP.CFrame = origPos
  252.         end
  253.         if danCollecting then ShowDanMessage("Done! " .. danCollected .. " collected!") end
  254.     end)
  255. end
  256.  
  257. CakeBtn.MouseButton1Click:Connect(function()
  258.     if cakeDoneActive then HideCakeMessage(); return end
  259.     if cakeCollecting then ShowCakeMessage("Done! " .. cakeCollected .. " collected!")
  260.     else StartCakeCollect() end
  261. end)
  262.  
  263. DanBtn.MouseButton1Click:Connect(function()
  264.     if danDoneActive then HideDanMessage(); return end
  265.     if danCollecting then ShowDanMessage("Done! " .. danCollected .. " collected!")
  266.     else StartDanCollect() end
  267. end)
  268.  
  269. CloseBtn.MouseButton1Click:Connect(function()
  270.     cakeCollecting = false
  271.     danCollecting = false
  272.     Cleanup()
  273.     SG:Destroy()
  274. end)
  275.  
  276. ScanCakes()
  277. SetupCakeListeners()
  278. print("[Cake Collector] Loaded! Will scan Birthday2026Cakes automatically!")
Advertisement
Comments
Add Comment
Please, Sign In to add comment