Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local TS = game:GetService("TweenService")
- local RunService = game:GetService("RunService")
- local Player = Players.LocalPlayer
- local Character = Player.Character or Player.CharacterAdded:Wait()
- local HRP = Character:WaitForChild("HumanoidRootPart")
- local PINK = Color3.fromRGB(255,200,210)
- local DARK_PINK = Color3.fromRGB(220,130,150)
- local CAKE_CLR = Color3.fromRGB(180,100,120)
- local DAN_CLR = Color3.fromRGB(120,160,90)
- local TEXT_DIM = Color3.fromRGB(150,100,110)
- local WHITE = Color3.new(1,1,1)
- local function New(class, props)
- local inst = Instance.new(class)
- for k, v in pairs(props) do
- if k ~= "Parent" then inst[k] = v end
- end
- inst.Parent = props.Parent
- return inst
- end
- local function RoundCorner(parent, r)
- New("UICorner", {CornerRadius=UDim.new(0, r or 8), Parent=parent})
- end
- local function ProgressBar(parent)
- local bar = New("Frame", {Size=UDim2.new(1,0,0,3), Position=UDim2.new(0,0,1,-3),
- BackgroundColor3=WHITE, BorderSizePixel=0, AnchorPoint=Vector2.new(0,1), Visible=false, Parent=parent})
- RoundCorner(bar, 2)
- return bar
- end
- local SG = New("ScreenGui", {Name="CakeCollector", ResetOnSpawn=false, Parent=Player.PlayerGui})
- local MF = New("Frame", {Size=UDim2.new(0,250,0,210), Position=UDim2.new(0.5,-125,0.5,-105),
- BackgroundColor3=PINK, BorderSizePixel=0, ClipsDescendants=true, Active=true, Draggable=true, Parent=SG})
- RoundCorner(MF, 10)
- local title = New("TextLabel", {Size=UDim2.new(1,0,0,35), BackgroundColor3=DARK_PINK,
- Text="đ Cake Collector", TextColor3=WHITE, TextSize=16, Font=Enum.Font.GothamBold, Parent=MF})
- RoundCorner(title, 10)
- local CakeStatus = New("TextLabel", {Size=UDim2.new(1,-20,0,25), Position=UDim2.new(0,10,0,40),
- BackgroundTransparency=1, Text="Cakes: 0", TextColor3=Color3.fromRGB(100,50,60),
- TextSize=18, Font=Enum.Font.GothamBold, Parent=MF})
- local CakeWait = New("TextLabel", {Size=UDim2.new(1,-20,0,15), Position=UDim2.new(0,10,0,62),
- BackgroundTransparency=1, Text="-waiting for event refresh-", TextColor3=TEXT_DIM,
- TextSize=11, Font=Enum.Font.Gotham, Visible=false, Parent=MF})
- local CakeBtn = New("TextButton", {Size=UDim2.new(1,-20,0,30), Position=UDim2.new(0,10,0,82),
- BackgroundColor3=CAKE_CLR, Text="đ¤ Auto Collect All", TextColor3=WHITE,
- TextSize=13, Font=Enum.Font.GothamBold, Parent=MF})
- RoundCorner(CakeBtn)
- local CakeBar = ProgressBar(CakeBtn)
- local DanBtn = New("TextButton", {Size=UDim2.new(1,-20,0,30), Position=UDim2.new(0,10,0,120),
- BackgroundColor3=DAN_CLR, Text="đŧ Auto Collect Dandelions", TextColor3=WHITE,
- TextSize=13, Font=Enum.Font.GothamBold, Parent=MF})
- RoundCorner(DanBtn)
- local DanBar = ProgressBar(DanBtn)
- New("TextLabel", {Size=UDim2.new(1,-20,0,40), Position=UDim2.new(0,10,0,158),
- BackgroundTransparency=1, Text="You must collect dandelions everytime the event refreshes in order to spawn the cakes. Enjoy my script! :D",
- TextColor3=TEXT_DIM, TextSize=12, Font=Enum.Font.GothamBold, TextWrapped=true, Parent=MF})
- local Credits = New("Frame", {Size=UDim2.new(0,120,0,25), BackgroundColor3=PINK, BorderSizePixel=0, Parent=SG})
- RoundCorner(Credits)
- New("TextLabel", {Size=UDim2.new(1,0,1,0), BackgroundTransparency=1, Text="made by: arc_scripts",
- TextColor3=TEXT_DIM, TextSize=11, Font=Enum.Font.GothamBold, Parent=Credits})
- RunService.RenderStepped:Connect(function()
- Credits.Position = UDim2.new(0, MF.AbsolutePosition.X + 65, 0, MF.AbsolutePosition.Y + MF.AbsoluteSize.Y + 5)
- end)
- local CloseBtn = New("TextButton", {Size=UDim2.new(0,25,0,25), Position=UDim2.new(1,-30,0,5),
- BackgroundColor3=Color3.fromRGB(180,80,100), Text="X", TextColor3=WHITE,
- TextSize=12, Font=Enum.Font.GothamBold, Parent=MF})
- RoundCorner(CloseBtn, 13)
- local cakes, origPos, cakeFolder = {}, nil, nil
- local connections = {}
- local cakeCollecting, danCollecting = false, false
- local cakeCollected, danCollected = 0, 0
- local cakeDoneActive, danDoneActive = false, false
- local function RefreshChar()
- Character = Player.Character
- HRP = Character and Character:FindFirstChild("HumanoidRootPart")
- end
- local function IsCollectible(obj)
- return obj:IsA("Model") or obj:IsA("Part") or obj:IsA("MeshPart")
- end
- local function GetPos(obj)
- if obj:IsA("Model") then
- local pp = obj.PrimaryPart or obj:FindFirstChildWhichIsA("BasePart")
- return pp and pp.Position or obj:GetBoundingBox().Position
- end
- return obj.Position
- end
- local function TeleportTo(obj)
- RefreshChar()
- if not HRP or not obj or not obj.Parent then return end
- HRP.CFrame = CFrame.new(GetPos(obj) + Vector3.new(0,3,0))
- end
- local function ShowMsg(bar, btn, defaultText, text, collectingFlag, doneFlag)
- doneFlag = true
- collectingFlag = false
- btn.Text = text
- bar.Visible = true
- bar.Size = UDim2.new(1,0,0,3)
- TS:Create(bar, TweenInfo.new(2, Enum.EasingStyle.Linear), {Size=UDim2.new(0,0,0,3)}):Play()
- return collectingFlag, doneFlag
- end
- local function HideMsg(bar, btn, defaultText)
- btn.Text = defaultText
- bar.Visible = false
- bar.Size = UDim2.new(1,0,0,3)
- end
- local function UpdateCakeStatus()
- CakeStatus.Text = "Cakes: " .. #cakes
- CakeWait.Visible = #cakes == 0
- end
- local function HideCakeMessage()
- cakeDoneActive = false
- HideMsg(CakeBar, CakeBtn, "đ¤ Auto Collect All")
- end
- local function ShowCakeMessage(text)
- cakeCollecting, cakeDoneActive = ShowMsg(CakeBar, CakeBtn, "đ¤ Auto Collect All", text, cakeCollecting, cakeDoneActive)
- task.delay(2, function() if cakeDoneActive then HideCakeMessage() end end)
- end
- local function HideDanMessage()
- danDoneActive = false
- HideMsg(DanBar, DanBtn, "đŧ Auto Collect Dandelions")
- end
- local function ShowDanMessage(text)
- danCollecting, danDoneActive = ShowMsg(DanBar, DanBtn, "đŧ Auto Collect Dandelions", text, danCollecting, danDoneActive)
- task.delay(2, function() if danDoneActive then HideDanMessage() end end)
- end
- local function ScanCakes()
- RefreshChar()
- if HRP then origPos = HRP.CFrame end
- print("[Cake Collector] Scanning Birthday2026Cakes...")
- cakes = {}
- cakeFolder = workspace:FindFirstChild("Birthday2026Cakes")
- if cakeFolder then
- for _, obj in pairs(cakeFolder:GetChildren()) do
- if IsCollectible(obj) then table.insert(cakes, obj) end
- end
- end
- UpdateCakeStatus()
- print("[Cake Collector] Found " .. #cakes .. " cakes!")
- end
- local function Cleanup()
- for _, c in pairs(connections) do c:Disconnect() end
- connections = {}
- end
- local function SetupCakeListeners()
- if not cakeFolder then return end
- table.insert(connections, cakeFolder.ChildAdded:Connect(function(obj)
- if IsCollectible(obj) then table.insert(cakes, obj); UpdateCakeStatus() end
- end))
- table.insert(connections, cakeFolder.ChildRemoved:Connect(function(obj)
- local i = table.find(cakes, obj)
- if i then table.remove(cakes, i) end
- UpdateCakeStatus()
- end))
- table.insert(connections, cakeFolder.AncestryChanged:Connect(function()
- if not cakeFolder.Parent then cakes = {}; UpdateCakeStatus() end
- end))
- end
- local function StartCakeCollect()
- if #cakes == 0 then ShowCakeMessage("Wait for event refresh!") return end
- RefreshChar()
- if not HRP then return end
- if danCollecting then danCollecting = false; task.wait(0.1); HideDanMessage() end
- cakeCollecting, cakeCollected = true, 0
- CakeBtn.Text = "âšī¸ Stop Collecting"
- task.spawn(function()
- for i = #cakes, 1, -1 do
- if not cakeCollecting then break end
- local c = cakes[i]
- if c and c.Parent then
- TeleportTo(c)
- cakeCollected = cakeCollected + 1
- end
- table.remove(cakes, i)
- UpdateCakeStatus()
- task.wait(0.6)
- end
- if cakeCollecting and origPos then
- task.wait(0.5)
- HRP.CFrame = origPos
- end
- if cakeCollecting then ShowCakeMessage("Done! " .. cakeCollected .. " collected!") end
- end)
- end
- local function StartDanCollect()
- RefreshChar()
- if not HRP then return end
- if cakeCollecting then cakeCollecting = false; task.wait(0.1); HideCakeMessage() end
- danCollecting, danCollected = true, 0
- DanBtn.Text = "âšī¸ Stop Collecting"
- print("[Cake Collector] Scanning DandelionTops...")
- local path = workspace:FindFirstChild("Interiors")
- and workspace.Interiors:FindFirstChild("MainMap!Default")
- and workspace.Interiors["MainMap!Default"]:FindFirstChild("Event")
- and workspace.Interiors["MainMap!Default"].Event:FindFirstChild("Birthday2026")
- and workspace.Interiors["MainMap!Default"].Event.Birthday2026:FindFirstChild("BirthdayButterfly2026")
- and workspace.Interiors["MainMap!Default"].Event.Birthday2026.BirthdayButterfly2026:FindFirstChild("DandelionTops")
- local dands = {}
- if path then
- for _, obj in pairs(path:GetChildren()) do
- if IsCollectible(obj) then table.insert(dands, obj) end
- end
- end
- print("[Cake Collector] Found " .. #dands .. " dandelions!")
- if #dands == 0 then ShowDanMessage("No dandelions found!") return end
- task.spawn(function()
- for i = #dands, 1, -1 do
- if not danCollecting then break end
- local d = dands[i]
- if d and d.Parent then
- TeleportTo(d)
- danCollected = danCollected + 1
- end
- task.wait(0.1)
- end
- if danCollecting and origPos then
- task.wait(0.5)
- HRP.CFrame = origPos
- end
- if danCollecting then ShowDanMessage("Done! " .. danCollected .. " collected!") end
- end)
- end
- CakeBtn.MouseButton1Click:Connect(function()
- if cakeDoneActive then HideCakeMessage(); return end
- if cakeCollecting then ShowCakeMessage("Done! " .. cakeCollected .. " collected!")
- else StartCakeCollect() end
- end)
- DanBtn.MouseButton1Click:Connect(function()
- if danDoneActive then HideDanMessage(); return end
- if danCollecting then ShowDanMessage("Done! " .. danCollected .. " collected!")
- else StartDanCollect() end
- end)
- CloseBtn.MouseButton1Click:Connect(function()
- cakeCollecting = false
- danCollecting = false
- Cleanup()
- SG:Destroy()
- end)
- ScanCakes()
- SetupCakeListeners()
- print("[Cake Collector] Loaded! Will scan Birthday2026Cakes automatically!")
Advertisement