loadstring([==[ local TweenService = game:GetService("TweenService") local Players = game:GetService("Players") local player = Players.LocalPlayer local gui = player:WaitForChild("PlayerGui") local old = gui:FindFirstChild("CookieClickerGui") if old then old:Destroy() end local screen = Instance.new("ScreenGui", gui) screen.Name = "CookieClickerGui" screen.ResetOnSpawn = false local cookie = 0 local upgrades = { {name="Grandma",base=100,cps=1}, {name="Farm",base=1000,cps=8}, {name="Factory",base=12000,cps=47}, {name="Mine",base=130000,cps=260}, {name="Shipment",base=1400000,cps=1400}, {name="Lab",base=20000000,cps=7800}, } local owned = {} for i=1,#upgrades do owned[i]=0 end local function cost(i) return math.floor(upgrades[i].base*(1.15^owned[i])) end local function cps() local sum=0 for i=1,#upgrades do sum+=owned[i]*upgrades[i].cps end return sum end -- Main Frame local frame = Instance.new("Frame", screen) frame.Size = UDim2.new(0,480,0,400) frame.Position = UDim2.new(0,0.1,0,0.1) frame.BackgroundColor3 = Color3.fromRGB(250,250,250) frame.Active = true frame.Draggable = true local cntLabel = Instance.new("TextLabel", frame) cntLabel.Size = UDim2.new(1,-20,0,40) cntLabel.Position = UDim2.new(0,10,0,10) cntLabel.TextColor3 = Color3.new(0,0,0) cntLabel.Font = Enum.Font.SourceSansBold cntLabel.TextSize = 26 cntLabel.BackgroundTransparency = 1 local cookieBtn = Instance.new("TextButton", frame) cookieBtn.Size = UDim2.new(0,220,0,220) cookieBtn.Position = UDim2.new(0,20,0,60) cookieBtn.BackgroundColor3 = Color3.fromRGB(210,105,30) cookieBtn.Font = Enum.Font.SourceSansBold cookieBtn.TextSize = 110 cookieBtn.AutoButtonColor = false local upgFrame = Instance.new("Frame", frame) upgFrame.Size = UDim2.new(0,220,0,320) upgFrame.Position = UDim2.new(0,240,0,60) upgFrame.BackgroundColor3 = Color3.fromRGB(245,245,245) local upgBtns = {} for i,u in ipairs(upgrades) do local b=Instance.new("TextButton", upgFrame) b.Size = UDim2.new(1,-20,0,40) b.Position = UDim2.new(0,10,0,40*i) b.Font = Enum.Font.SourceSans b.TextSize = 18 b.TextColor3 = Color3.new(0,0,0) b.MouseButton1Click:Connect(function() if cookie>=cost(i) then cookie -= cost(i) owned[i] += 1 update() end end) upgBtns[i]=b end local function animate() TweenService:Create(cookieBtn,TweenInfo.new(0.1),{Size=UDim2.new(0,180,0,180)}):Play() task.wait(0.1) TweenService:Create(cookieBtn,TweenInfo.new(0.1),{Size=UDim2.new(0,220,0,220)}):Play() end function update() cntLabel.Text = "Cookies: "..cookie cookieBtn.Text = "🍪\n+"..math.floor(cps()).." cps" for i,b in ipairs(upgBtns) do local canAfford = cookie >= cost(i) b.BackgroundColor3 = canAfford and Color3.fromRGB(144,238,144) or Color3.fromRGB(220,220,220) b.Text = upgrades[i].name.." ("..owned[i]..") Cost: "..cost(i).." CPS:"..upgrades[i].cps end end cookieBtn.MouseButton1Click:Connect(function() cookie += math.max(1,cps()) animate() update() end) task.spawn(function() while true do cookie += cps() update() task.wait(1) end end) -- Hide GUI Button local hideBtn = Instance.new("TextButton", frame) hideBtn.Size = UDim2.new(0,60,0,30) hideBtn.Position = UDim2.new(1,-70,0,10) hideBtn.Text = "Hide" hideBtn.BackgroundColor3 = Color3.fromRGB(200,200,200) hideBtn.Font = Enum.Font.SourceSans hideBtn.TextSize = 16 hideBtn.MouseButton1Click:Connect(function() frame.Visible = false end) -- Show GUI Button (separate) local showBtn = Instance.new("TextButton", screen) showBtn.Size = UDim2.new(0,80,0,35) showBtn.Position = UDim2.new(0,10,0,10) showBtn.Text = "Show GUI" showBtn.BackgroundColor3 = Color3.fromRGB(100,255,100) showBtn.Font = Enum.Font.SourceSansBold showBtn.TextSize = 18 showBtn.MouseButton1Click:Connect(function() frame.Visible = true end) update() ]==])()