§ How to · with Picoo
How to make a clicker game in Roblox
By Sametcan Tasgiran, Founder & Developer·Published ·Updated
A clicker game is one remote fired thousands of times, which makes it the purest test of whether your server actually validates anything.
The three problems are always the same: click rate, number size, and an upgrade curve that stops meaning anything by upgrade twenty.
Rate-limited clicks
The server caps clicks per second, so an auto-clicker earns no more than a fast human.
Server-held balance
Clicks send intent; the server owns the value of a click and the resulting total.
Suffix formatting
K, M, B, T and beyond, so the UI stays readable when the numbers do not.
Upgrade curve
Cost and power growth as data you can retune without touching the click path.
Idle income
Offline or passive earnings computed from elapsed time on rejoin.
Click feedback
Local particle, number pop and sound so clicking feels good at any rate.
Files Picoo ships for this prompt
2 files · 185 lines · ~30s · 1 credit
ClickService
Rate limiting, click value, upgrade purchases, persistence.
115 lines
ClickClient
Input, local feedback, formatted display.
70 lines
Sample output: ServerScriptService.ClickService
-- The whole genre is one remote fired constantly, so rate limiting IS the game's
-- security. Without it an auto-clicker firing 500/s outearns everyone instantly.
local MAX_CPS = 20 -- above any human; below any macro
local budget: { [Player]: number } = {}
local lastRefill: { [Player]: number } = {}
local function allowClick(plr: Player): boolean
local now = os.clock()
local elapsed = now - (lastRefill[plr] or now)
lastRefill[plr] = now
budget[plr] = math.min(MAX_CPS, (budget[plr] or MAX_CPS) + elapsed * MAX_CPS)
if budget[plr] < 1 then return false end
budget[plr] -= 1
return true
end
clickRemote.OnServerEvent:Connect(function(plr)
if not allowClick(plr) then return end -- silent: do not teach the macro
local data = Store.get(plr)
data.coins += clickValue(data) -- server owns the value, always
end)
-- Numbers pass 1e15 fast in this genre, where floats stop showing exact integers.
-- Format for display and keep the mechanics in whole steps you control.
local SUFFIX = { "", "K", "M", "B", "T", "Qa", "Qi", "Sx", "Sp", "Oc" }
local function abbreviate(n: number): string
local tier = n > 0 and math.floor(math.log(n, 1000)) or 0
tier = math.clamp(tier, 0, #SUFFIX - 1)
if tier == 0 then return tostring(math.floor(n)) end
return string.format("%.2f%s", n / 1000 ^ tier, SUFFIX[tier + 1])
endBuilding a clicker game in Roblox
Clicker games look like the simplest thing you can build and are unusually easy to get wrong, because the entire game is one remote fired thousands of times.
That remote is the security model. If the server adds currency every time the client says "I clicked", then an auto-clicker firing five hundred times a second earns twenty-five times what an honest player does, and the leaderboard is meaningless within an hour. Rate limiting is not a hardening step you add later — it is the mechanic. A token budget that refills at a fixed rate and is spent per click puts everyone under the same ceiling. Set the ceiling above human speed and below macro speed, and drop excess clicks silently, because an error message is just feedback for tuning the macro.
Numbers are the second problem, and they are specific to this genre. Roblox numbers are doubles: exact for integers up to around nine quadrillion, approximate after that. Most games never approach it; a clicker with a working upgrade curve gets there in an afternoon. Format for display with suffixes so the UI stays readable, and keep the mechanics in steps you control rather than relying on exactness you no longer have.
The upgrade curve is the third, and it is what makes the game a game. The genre convention is geometric costs — around fifteen percent more per level — with click power growing more slowly. The effect is that the time between purchases stays roughly constant while the numbers grow enormous, which is the exact rhythm players stay for. A linear cost curve makes upgrades trivial by level ten; an aggressive one stalls the player out and they leave.
Everything else is feel. Play the particle, the number pop and the sound locally on click, so the game responds instantly even while the server is still confirming what that click was worth.
See more on the Luau generator, the game builder, or browse the full blog.
Frequently asked
How do I stop auto-clickers?+
Rate limit on the server. A token budget that refills at a fixed clicks-per-second and is spent per click caps everyone at the same ceiling — set it above what a human can do and below what a macro does, and the auto-clicker gains nothing. Do not tell the player you rejected the click; a silent drop gives the macro author nothing to tune against.
Why do my numbers stop being exact?+
Roblox numbers are doubles, so integers stay exact up to about 9 quadrillion and drift after that. In a clicker that is reachable. Format large values for display and keep progression in steps you control — or move to a mantissa-and-exponent representation if your game genuinely goes past it.
How should upgrade costs scale?+
Geometrically — cost multiplied by roughly 1.15 per level is the genre standard — with click power growing more slowly. That keeps every purchase feel-able while the time between purchases stays roughly constant, which is the actual rhythm players are responding to.
Should each click be its own remote call?+
It is the simplest version and it works, given rate limiting. If you are worried about traffic, batch on the client — send a count every tenth of a second instead of once per click — but then the server must validate the batch against elapsed time, or you have just moved the exploit up a layer.
How do I do offline earnings?+
Store the leave timestamp, and on rejoin award elapsed time multiplied by passive rate, capped at a few hours. The cap matters: uncapped offline income makes not playing the optimal strategy, which is the opposite of what the mechanic is for.
Related Picoo prompts
Roblox simulator
8 files · 240 lines · 58 seconds · 1 credit. Tap, earn, rebirth, repeat.
rebirth system in Roblox
The design is one table — what resets, what persists, what multiplies — and the failure is always a save that happens in the wrong order.
Roblox shop system
5 files · 180 lines · 47 seconds · 1 credit. Robux + in-game currency, both server-validated.