write the code for me making a roblox clicker game and tell me what to do and where to…
- User
write the code for me making a roblox clicker game and tell me what to do and where to put all the code making to easy even a baby could do it. i want the game where you have to click on lets say a cookie or a image of your choice. and everytime you click it you can gain clicks that displays in your leaderboard stats . and once you reach a certain amount of clicks you can rebirth giving your character a multiplier for your clicks.
- Assistant
🍪 SUPER-SIMPLE ROBLOX COOKIE CLICKER 🍪
(“So easy a baby could do it!”)Below is a complete, copy-and-paste-ready mini-project.
Just follow the numbered steps exactly and you’ll have a fully working clicker game with rebirths and multipliers.
- Create a New Place
• Open Roblox Studio → “New Project” → choose Baseplate.
• Save it as “Cookie Clicker”.
- Add the Clickable Cookie (GUI)
- In the Explorer window, right-click StarterGui → ScreenGui → rename it
ClickerGui. - Right-click
ClickerGui→ ImageButton → rename itCookieButton. - In the Properties panel for
CookieButton:
• Size → set to {0, 200}, {0, 200} (big & square).
• Position → {0.5, -100}, {0.5, -100} (centerish).
• Image → pick any cookie picture (or upload your own).
• ScaleType → Fit.
You now have a giant cookie that can be clicked!
- Create RemoteEvent (client → server)
- Right-click ReplicatedStorage → RemoteEvent → rename it
AddClick.
- Leaderstats Script (shows clicks & rebirths)
- Right-click ServerScriptService → Script → rename it
Leaderstats. - Delete anything inside the script and paste the code below:
-- Leaderstats.lua (ServerScriptService) local REBIRTH_BASE_COST = 100 -- first rebirth price local REBIRTH_COST_MULTIPLIER = 2 -- cost doubles every time game.Players.PlayerAdded:Connect(function(player) -- Create leaderstats folder local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player -- Clicks local clicks = Instance.new("IntValue") clicks.Name = "Clicks" clicks.Value = 0 clicks.Parent = leaderstats -- Rebirths local rebirths = Instance.new("IntValue") rebirths.Name = "Rebirths" rebirths.Value = 0 rebirths.Parent = leaderstats -- Multiplier (not shown on board but stored) local multiplier = Instance.new("IntValue") multiplier.Name = "Multiplier" multiplier.Value = 1 multiplier.Parent = player -- Rebirth cost (updates per player) local cost = Instance.new("IntValue") cost.Name = "NextRebirthCost" cost.Value = REBIRTH_BASE_COST cost.Parent = player end)
- Server Script that Adds Clicks & Handles Rebirths
- Right-click ServerScriptService → Script → name it
ClickLogic. - Paste:
-- ClickLogic.lua (ServerScriptService) local addClickEvent = game.ReplicatedStorage:WaitForChild("AddClick") addClickEvent.OnServerEvent:Connect(function(player) -- safety check if not player or not player:FindFirstChild("leaderstats") then return end local clicks = player.leaderstats.Clicks local multi = player:FindFirstChild("Multiplier").Value clicks.Value += 1 * multi end) -- Rebirth function exposed to clients game.ReplicatedStorage:WaitForChild("AddRebirth").OnServerEvent:Connect(function(player) local clicks = player.leaderstats.Clicks local rebirths = player.leaderstats.Rebirths local costValue = player:FindFirstChild("NextRebirthCost") if clicks.Value >= costValue.Value then -- take the clicks clicks.Value -= costValue.Value -- give rebirth & multiplier rebirths.Value += 1 local newMulti = player.Multiplier.Value * 2 player.Multiplier.Value = newMulti -- make next cost more expensive costValue.Value *= 2 print(player.Name .. " REBIRTHED! New multiplier: x"..newMulti) end end)
- Client Script in the Cookie Button
- Select
CookieButtonin Explorer. - In Properties, click + → LocalScript (it becomes a child of the button).
- Delete whatever’s there and paste:
-- CookieButton LocalScript local button = script.Parent local addClickRemote = game.ReplicatedStorage:WaitForChild("AddClick") button.MouseButton1Click:Connect(function() addClickRemote:FireServer() -- tell server "player clicked cookie" end)
- Rebirth Button GUI (optional but nice)
- In
ClickerGui, right-click → TextButton → renameRebirthButton. - Set Size to {0, 150}, {0, 50} and Position to {0, 25}, {0, 25} (top-left).
- Change Text property to “Rebirth”.
- Add a LocalScript inside that button:
-- RebirthButton LocalScript local btn = script.Parent local player = game.Players.LocalPlayer local rebirthEvent = game.ReplicatedStorage:WaitForChild("AddRebirth") -- update button text every second to show price while true do local cost = player:WaitForChild("NextRebirthCost").Value btn.Text = "Rebirth ("..cost..")" task.wait(1) end btn.MouseButton1Click:Connect(function() rebirthEvent:FireServer() -- try to rebirth end)- BACK IN ReplicatedStorage → create another RemoteEvent named
AddRebirth(because the scripts refer to it).
- (Optional) Display Multiplier on Screen
Add a
TextLabelin theClickerGuiand hook up a simple LocalScript that updates it fromplayer.Multiplier.Value. Similar to step 7.
- Test Your Game
• Click the big “Play” button in Studio.
• Smash the cookie → Clicks go up in the leaderboard (top-right corner).
• When you hit the cost amount, click “Rebirth” → Clicks reset, rebirth count +1, and your multiplier doubles (so each future click gives more!).
- Publish & Enjoy
File → Publish to Roblox. Give it an icon of a cookie 🍪, invite friends, watch the numbers grow!
That’s it! Copy, paste, done. If a step doesn’t work, re-check the names of objects and make sure the scripts are in the right services. Happy clicking!
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.