Skip to content
TheChatArchiveThe Chat Archive
o3-2025-04-16· OpenAIHugging Face LMArena Human Preference 140K

write the code for me making a roblox clicker game and tell me what to do and where to…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-opus-4-20250514’s answer.
  1. 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.

  2. 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.


    1. Create a New Place

    • Open Roblox Studio → “New Project” → choose Baseplate.
    • Save it as “Cookie Clicker”.


    1. Add the Clickable Cookie (GUI)

    1. In the Explorer window, right-click StarterGui → ScreenGui → rename it ClickerGui.
    2. Right-click ClickerGui → ImageButton → rename it CookieButton.
    3. 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!


    1. Create RemoteEvent (client → server)

    1. Right-click ReplicatedStorage → RemoteEvent → rename it AddClick.

    1. Leaderstats Script (shows clicks & rebirths)

    1. Right-click ServerScriptService → Script → rename it Leaderstats.
    2. 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)
    

    1. Server Script that Adds Clicks & Handles Rebirths

    1. Right-click ServerScriptService → Script → name it ClickLogic.
    2. 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)
    

    1. Client Script in the Cookie Button

    1. Select CookieButton in Explorer.
    2. In Properties, click + → LocalScript (it becomes a child of the button).
    3. 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)
    

    1. Rebirth Button GUI (optional but nice)

    1. In ClickerGui, right-click → TextButton → rename RebirthButton.
    2. Set Size to {0, 150}, {0, 50} and Position to {0, 25}, {0, 25} (top-left).
    3. Change Text property to “Rebirth”.
    4. 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)
    
    1. BACK IN ReplicatedStorage → create another RemoteEvent named AddRebirth (because the scripts refer to it).

    1. (Optional) Display Multiplier on Screen

    Add a TextLabel in the ClickerGui and hook up a simple LocalScript that updates it from player.Multiplier.Value. Similar to step 7.


    1. 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!).


    1. 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!

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.