Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/brockmartin/roblox-game-skill/llms.txt

Use this file to discover all available pages before exploring further.

Simulators are the highest-grossing genre on Roblox. The formula is deceptively simple: players collect a resource, spend it on upgrades, unlock new zones with better yields, and eventually reset their progress for a permanent multiplier — then do it all again faster. Every element of the loop is designed to be visually rewarding, with numbers going up, rare pets to chase, and a horizon of unlockable content always in view. This template gives you a production-ready implementation of every layer of that loop, from weighted pet hatching RNG to exponential upgrade cost curves.

Core Systems

Collection Mechanic

Click or tap resource nodes to collect currency. Server validates distance, rate limits, and depletion state. Client fires VFX with floating +coin text.

Pet / Companion System

Egg hatching with weighted rarity RNG, luck modifiers, pet inventory, equip slots, per-pet leveling with XP curves, and client-side LOD rendering.

Zone Progression

Five zones with sequential unlock requirements. Currency thresholds gate entry. Each zone multiplies resource yield by 5×, keeping earn rates proportional.

Upgrade System

Permanent multipliers (Click Power, Auto Collect, Luck, Pet Storage) with exponential cost scaling. Server validates all purchases.

Prestige / Rebirth

Players reset most progress in exchange for a permanent stacking multiplier. Pets persist. Requirements scale exponentially per rebirth.

Leaderboards

Global OrderedDataStore leaderboards for total rebirths, total coins earned, and rarest pet collected.

The Core Loop

COLLECT --> UPGRADE --> UNLOCK ZONES --> PRESTIGE/REBIRTH
   ^                                          |
   |__________________________________________|
        (reset with permanent multiplier)

Key Code: Pet Hatching with Weighted RNG

The pet service handles egg hatching with a full weighted random selection system. Rarity weights can be boosted by the player’s Luck upgrade level and the Lucky Egg GamePass.
-- ServerScriptService/Services/PetService.lua

function PetService._rollPet(eggDef: { Pets: { string } }, player: Player): string
    -- Build weighted pool from pets in this egg
    local pool: { { petId: string, weight: number } } = {}
    local totalWeight = 0

    for _, petId in eggDef.Pets do
        local petDef = PetDefinitions.Pets[petId]
        if petDef then
            local rarityInfo = PetDefinitions.Rarities[petDef.Rarity]
            if rarityInfo then
                local weight = rarityInfo.Weight

                -- Apply luck multiplier: boosts rare+ drop rates
                local data = DataService.getData(player)
                if data then
                    local luckLevel = data.Upgrades.Luck or 0
                    -- Luck increases rare weights, decreases common weights
                    if petDef.Rarity ~= "Common" then
                        weight = weight * (1 + luckLevel * 0.05)
                    end
                end

                -- Apply 2x luck GamePass
                if player:GetAttribute("LuckyEgg") and petDef.Rarity ~= "Common" then
                    weight = weight * 2
                end

                totalWeight += weight
                table.insert(pool, { petId = petId, weight = totalWeight })
            end
        end
    end

    -- Weighted random selection
    local roll = math.random() * totalWeight
    for _, entry in pool do
        if roll <= entry.weight then
            return entry.petId
        end
    end

    -- Fallback: return first pet
    return eggDef.Pets[1]
end

Key Code: Collection Multiplier Stack

The server calculates the final coin yield by stacking every active multiplier before awarding currency. This ensures no client-side tampering can inflate rewards.
-- ServerScriptService/Services/CollectionService.lua

function CollectionService._calculateAmount(player: Player, nodeInstance: Instance): number
    local data = DataService.getData(player)
    if not data then
        return BASE_COLLECT_AMOUNT
    end

    -- Base amount from node's zone
    local zoneMultiplier = nodeInstance:GetAttribute("ZoneMultiplier") or 1

    -- Click power upgrade multiplier
    local clickMultiplier = UpgradeService.getMultiplier(player, "ClickPower")

    -- Pet bonus (sum of equipped pet boosts)
    local petMultiplier = PetService.getEquippedBoost(player)

    -- Rebirth multiplier: 1 + 0.1 * rebirths
    local rebirthMultiplier = 1 + 0.1 * (data.Rebirths or 0)

    -- GamePass multiplier (2x coins if owned)
    local gamePassMultiplier = 1
    if player:GetAttribute("CoinMultiplier") then
        gamePassMultiplier = player:GetAttribute("CoinMultiplier")
    end

    local total = BASE_COLLECT_AMOUNT
        * zoneMultiplier
        * clickMultiplier
        * petMultiplier
        * rebirthMultiplier
        * gamePassMultiplier

    return math.floor(total)
end

Key Code: Zone Unlock Validation

Zone unlocks are validated server-side with sequential ordering enforced — players cannot skip zones by manipulating the client.
-- ServerScriptService/Services/ZoneService.lua

function ZoneService._handleUnlock(player: Player, zoneId: string)
    if typeof(zoneId) ~= "string" then return end

    local zoneDef = ZoneDefinitions.Zones[zoneId]
    if not zoneDef then return end

    local data = DataService.getData(player)
    if not data then return end

    -- Check if previous zone is unlocked (enforce sequential unlock)
    local previousUnlocked = false
    for prevId, prevDef in ZoneDefinitions.Zones do
        if prevDef.Order == zoneDef.Order - 1 then
            for _, unlockedZone in data.UnlockedZones do
                if unlockedZone == prevId then
                    previousUnlocked = true
                    break
                end
            end
            break
        end
    end

    if zoneDef.Order > 1 and not previousUnlocked then return end

    -- Check cost
    if data.Coins < zoneDef.UnlockCost then return end

    -- Deduct and unlock
    data.Coins -= zoneDef.UnlockCost
    table.insert(data.UnlockedZones, zoneId)

    ReplicatedStorage.Remotes.UnlockZone:FireClient(player, zoneId, "SUCCESS")
end

Architecture

ScriptPurpose
Main.server.luauBootstrapper — requires all services, runs init() then start() on each in dependency order
Services/CollectionService.luauResource node collection, distance checks, rate limiting, multiplier math
Services/PetService.luauEgg hatching, pet inventory, equip/unequip, XP leveling
Services/ZoneService.luauZone unlock validation and sequential gating
Services/UpgradeService.luauPermanent upgrade purchases and exponential cost calculation
Services/PrestigeService.luauRebirth validation, data reset, permanent multiplier grants
Services/DataService.luauProfileService wrapper for save/load and data migrations

Progression Tuning

ZoneUnlock CostResource MultiplierApprox. Time to Unlock
Zone 1 (Grasslands)FreeInstant
Zone 2 (Desert)10,0005–8 min
Zone 3 (Arctic)100,00025×15–25 min
Zone 4 (Volcano)1,000,000125×45–90 min
Zone 5 (Space)10,000,000625×3–6 hours

How to Use This Template

To scaffold a new simulator game with the skill, describe your concept and the skill selects and applies this template automatically:
Build me a bee simulator. Players collect honey in a meadow, hatch bee eggs
to get companion bees with different rarities, buy upgrades to collect faster,
and prestige for a permanent multiplier. Start with 3 zones.
The skill will:
1

Scaffold the game

Apply the universal game scaffold, then layer the simulator template on top.
2

Customize the theme

Rename pets to bees, resource nodes to flowers, currency to honey, zones to meadows.
3

Wire up MCP

Execute the scaffold Luau via the MCP server to build the live Studio project.
4

Iterate

Add systems, tune progression values, adjust monetization — all through natural prompts.
See the New Game workflow for the complete 8-step guided build process.

Build docs developers (and LLMs) love