slime-factory-tycoon

![Slime Factory Tycoon](/slime-factory-tycoon/assets/banner.png) # Slime Factory Tycoon **🟒 Production-ready open-source Roblox idle tycoon template** **Ship a real game in a weekend** β€” all the hard parts (saves, security, monetization, balance) are already solved. [![Release](https://img.shields.io/github/v/release/DLinacre/slime-factory-tycoon?color=78FF78&label=release)](https://github.com/DLinacre/slime-factory-tycoon/releases/latest) [![Checks](https://img.shields.io/badge/checks-verify.sh%20passing-brightgreen)](tools/verify.sh) [![Luau](https://img.shields.io/badge/Luau-23%20modules%20compiling-00A2FF?logo=roblox&logoColor=white)](https://luau-lang.org/) [![Rojo](https://img.shields.io/badge/Rojo-7.4-ff5c5c)](https://rojo.space/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Stars](https://img.shields.io/github/stars/DLinacre/slime-factory-tycoon?style=social)](https://github.com/DLinacre/slime-factory-tycoon/stargazers) [![Forks](https://img.shields.io/github/forks/DLinacre/slime-factory-tycoon?style=social)](https://github.com/DLinacre/slime-factory-tycoon/network/members) **[⬇ Download the latest `.rbxlx`](https://github.com/DLinacre/slime-factory-tycoon/releases/latest)** β€” open instantly in Roblox Studio (no toolchain required).

πŸš€ Publish in under 60 minutes β€” see the Quickstart Guide

**⭐ Star this repo** if you use it β€” it helps others discover it!

At a Glance

Β  Β 
Time to first publish < 60 minutes
Core loop Tap β†’ Upgrade β†’ Rebirth β†’ Pets β†’ Offline earnings
Content updates Edit one file (GameConfig.luau)
Security Fully server-authoritative + session locking
Balance Real Python simulator that gates CI
UI 100% code, mobile-first, accessibility built-in
License MIT β€” keep 100% of revenue

Support the project

Every star and fork helps more people find a solid foundation instead of starting from scratch.


Screenshots

Gameplay β€” Tap the vat, buy upgrades, see pets Rebirth prestige screen
Pets & hatching Global leaderboard Accessibility & settings (server-persisted)

All UI is built in code (no manual GUI objects). 44px minimum touch targets. Full Reduced Motion + colour-blind support. Mobile-first by design.


What this is

A complete, production-ready Roblox idle tycoon you can publish today.

Core loop: Tap vat β†’ earn Goo β†’ buy upgrades β†’ unlock zones β†’ rebirth for permanent multipliers β†’ hatch pets β†’ daily rewards + leaderboards.

Why idle/tycoon? Best revenue-per-hour for solo devs on Roblox. Your entire content pipeline is data in spreadsheets (one row = new zone/pet/upgrade). This is how you ship weekly and beat the algorithm.

Read STRATEGY.md first β€” it covers genre economics, competition, retention loops, and real monetization numbers.


Highlights β€” production features that actually matter

Feature Why it saves you time / money
Modular service architecture Add a full system with one file. No bootstrap edits ever.
Declarative networking All remotes + validators + rate limits in one table. Security is impossible to forget.
Fully server-authoritative Client sends intent only. Exploiters get zero value.
Session-locked DataStores Prevents the #1 duplication bug in idle games.
Idempotent purchases Save-before-confirm. Never double-charge or lose a sale.
Code-only mobile-first UI 44px targets, Reduced Motion, accessibility β€” zero GUI objects in Studio.
Real CI balance simulator Fails the build on bad progression. Caught a 33-minute rebirth during dev.
Single source of truth content Everything lives in GameConfig.luau + Content.luau. Weekly updates = 15 min.
Accessibility by default Reduced Motion, colour-blind modes, text scaling β€” persisted server-side.

Quick start

⚑ Fastest path (publish in < 60 minutes)

  1. Download the .rbxlx from Releases
  2. Open in Roblox Studio
  3. Enable Game Settings β†’ Security β†’ Studio Access to API Services
  4. Replace id = 0 with your real Gamepass/Product IDs
  5. Publish!

β†’ Full quickstart: QUICKSTART.md

git clone https://github.com/DLinacre/slime-factory-tycoon.git
cd slime-factory-tycoon
aftman install          # or rokit install
rojo serve

Install the Rojo plugin in Studio and click Connect.

Option B β€” Zero tools

Download the latest .rbxlx from the Releases page and open in Roblox Studio.


Repository layout

slime-factory-tycoon/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ shared/                    β†’ ReplicatedStorage/Modules
β”‚   β”‚   β”œβ”€β”€ GameConfig.luau        β˜… economy, zones, pets, prices
β”‚   β”‚   β”œβ”€β”€ Content.luau           β˜… achievements, cosmetics, settings, seasons
β”‚   β”‚   β”œβ”€β”€ Theme.luau             β˜… colour, type, motion, breakpoints
β”‚   β”‚   β”œβ”€β”€ Net.luau                 declarative remotes + validators + rate limits
β”‚   β”‚   β”œβ”€β”€ Validate.luau            composable argument validators
β”‚   β”‚   β”œβ”€β”€ ServiceRegistry.luau     service locator + lifecycle
β”‚   β”‚   └── Format.luau              number abbreviation (1.2K / 3.4M / 5.6aa)
β”‚   β”œβ”€β”€ server/                    β†’ ServerScriptService
β”‚   β”‚   β”œβ”€β”€ Bootstrap.server.luau    build β†’ register β†’ start. Nothing else.
β”‚   β”‚   └── Services/                auto-discovered, no manual wiring
β”‚   β”‚       β”œβ”€β”€ DataManager.luau         session-locked saves, autosave, BindToClose
β”‚   β”‚       β”œβ”€β”€ EconomyService.luau      authoritative income, clicks, anti-cheat
β”‚   β”‚       β”œβ”€β”€ MonetizationService.luau gamepasses + idempotent ProcessReceipt
β”‚   β”‚       β”œβ”€β”€ PetService.luau          server-side hatch RNG, published odds
β”‚   β”‚       β”œβ”€β”€ InventoryService.luau    generic UID-keyed containers
β”‚   β”‚       β”œβ”€β”€ AchievementService.luau  stat-driven unlocks
β”‚   β”‚       β”œβ”€β”€ CosmeticService.luau     cosmetics (no economy access by design)
β”‚   β”‚       β”œβ”€β”€ SettingsService.luau     server-persisted, cross-device
β”‚   β”‚       β”œβ”€β”€ DailyRewardService.luau  7-day streak
β”‚   β”‚       β”œβ”€β”€ LeaderboardService.luau  OrderedDataStore, throttled
β”‚   β”‚       └── CodeService.luau         promo codes
β”‚   └── client/                    β†’ StarterPlayer/StarterPlayerScripts
β”‚       β”œβ”€β”€ ClientMain.client.luau   input, prediction, batched remotes
β”‚       β”œβ”€β”€ UI.luau                  themed component library
β”‚       β”œβ”€β”€ AudioEngine.luau         pooled procedural SFX
β”‚       └── UIBuilder.luau           screen composition
β”œβ”€β”€ tools/
β”‚   β”œβ”€β”€ balance_sim.py             progression simulator (runs in CI)
β”‚   β”œβ”€β”€ sync_site.py               one-way sync to linacre.site
β”‚   └── verify.sh                  every CI gate, locally
β”œβ”€β”€ assets/                        logo Β· icon set Β· banner (PNG + WebP)
β”œβ”€β”€ game.manifest.json             machine-readable project data
└── docs β†’ STRATEGY Β· SETUP Β· SECURITY Β· OPTIMISATION Β· LAUNCH Β· BRAND

Adding content

The whole point of the architecture. Each of these is a single row in a data file, with no other code change:

To add a… Edit Result
Upgrade GameConfig.Upgrades Appears in the shop, priced, balanced
Zone GameConfig.Zones Unlocks at its threshold, applies its multiplier
Pet GameConfig.Pets Enters the hatch pool at its rarity weight
Achievement Content.Achievements Tracks its stat, grants its reward automatically
Cosmetic Content.Cosmetics Unlocks by progression, crystals, or Robux
Setting Content.Settings Renders, validates, and persists itself
Remote Net.REMOTES Created, validated, and rate-limited automatically

Adding a service is one file in src/server/Services/ β€” it’s discovered and started automatically.


The balance simulator

The part I’m most glad exists. It parses GameConfig.luau directly β€” no duplicated numbers β€” simulates a player, and reports where they’d get stuck.

$ python3 tools/balance_sim.py --hours 6
==============================================================
  BALANCE SIM  --  6.0h session, 3.0 taps/s, 1.0x mult
==============================================================
  parsed: 5 upgrades, 6 zones
  rebirths reached : 4
  lifetime goo     : 298.69M
  final zone       : Neon Labs
  longest stall    : 2.9 min

  timeline:
        1.38 min   Unlocked Goo Refinery
       11.47 min   Unlocked Toxic Caverns
       21.78 min   Rebirth #1
       56.23 min   Rebirth #2
       77.73 min   Unlocked Neon Labs
      114.52 min   Rebirth #3

  with 2x Goo gamepass:
    rebirths 4 -> 5
    first rebirth 21.8 min -> 10.8 min  (2.01x faster)
    ^ this is your gamepass sales pitch, in numbers

  balance within target ranges.

It caught a real bug during development: the original rebirth cost put the first prestige at 33 minutes, well past where most players quit. Halving it moved it to 22 minutes. That’s a retention fix found in a second, without shipping anything.

CI runs --check, which exits non-zero if you push a config change that breaks these targets:


Monetization, in brief

Full reasoning β€” including why players actually buy each item β€” is in STRATEGY.md.

Gamepasses: 2x Goo (199) Β· Auto-Clicker (149) Β· VIP (399) Β· +5 Pet Slots (299) Β· Lucky Egg (349) Β· Fast Rebirth (249)

Dev products: crystal packs (99 / 499 / 999) Β· 3x boost (79) Β· server-wide boost (199) Β· instant rebirth (149) Β· skip egg cooldown (49)

The server-wide boost is the highest-ROI item here: the buyer gets public thanks, and every other player in the server watches a purchase notification teach them that boosts exist. It’s an advertisement that players pay you to run.

Premium Payout is treated as its own lever β€” Premium members get a permanent visible 1.25Γ— and a dedicated daily chest. You’re not selling them anything; you’re buying session time that Roblox pays you for.


Security summary

Full threat model in SECURITY.md.

Deliberately not included: client-side anti-cheat, remote name obfuscation, auto-banning. They’re either trivially bypassed or they punish real players for lag. Capping rewards server-side is strictly better than banning.


Documentation

Doc What’s in it
STRATEGY.md Genre analysis, competition, retention loop, full monetization plan, compliance
SETUP.md Click-by-click Studio setup, object tree, file mapping
SECURITY.md Exploits, dupe bugs, remote hardening, DataStore protection
OPTIMISATION.md Mobile-first performance, server load, load times
LAUNCH.md Release checklist, Roblox SEO, icon/thumbnail ideas, analytics to watch
BRAND.md Palette semantics, typography, motion, accessibility, voice

Monetisation ethics

The line is drawn structurally, not by good intentions:

Accessibility

Not a backlog item. Shipped, persisted server-side, and synced across devices:

Website

The project page at linacre.site/games renders directly from game.manifest.json. tools/sync_site.py recomputes the stats from source and copies the manifest and art across, so the website can’t drift from the repository β€” and can’t display a number that isn’t derived from the code.

Where information genuinely doesn’t exist yet (screenshots, the Roblox link), the page shows β€œComing Soon” or a disabled β€œNot Yet Available” button. No placeholder imagery, no invented player counts.

Roadmap

Current state: v0.3.0 β€” fully playable and publishable.


Contributing

PRs welcome. CI runs selene, stylua --check, the balance simulator, and a Rojo build. Run every CI check locally with one command β€” no tooling required beyond Python (lint/format/build steps auto-skip if the tools aren’t installed):

./tools/verify.sh

Note on the CI badge: GitHub Actions requires Actions minutes to be enabled on the account. If the badge shows failing with zero steps executed, that’s a billing/entitlement issue on the repo owner’s account, not the code β€” ./tools/verify.sh runs the identical checks locally.


Honest expectations & results

Most first Roblox games earn very little. Success comes from shipping update #12+, not a perfect first version.

This template gives you:

Realistic timeline: 1 weekend to a playable game β†’ 2-4 weekends to a publishable game with your own assets and IDs.

The balance simulator already proved its value β€” it caught a 33-minute first rebirth during development and moved it to ~22 minutes.

Stuck? Ask an AI

Copy this prompt into any LLM for personalised setup help The repo is small and well-commented, so an LLM with this context can usually unblock you faster than an issue can. Paste the following, then describe your problem: ``` You are helping me set up an open-source Roblox game template called Slime Factory Tycoon (github.com/DLinacre/slime-factory-tycoon). ARCHITECTURE - Luau, Rojo project. src/shared -> ReplicatedStorage/Modules, src/server -> ServerScriptService, src/client -> StarterPlayerScripts. - One server Script (Bootstrap) which does: Net.build() to create remotes, Registry.registerFolder(Services) to auto-discover services, Registry.start() to run init() then start() on all of them. - Services are ModuleScripts in src/server/Services. They may implement init(), start(), onPlayerAdded(player), onPlayerRemoving(player). They resolve each other by name via ServiceRegistry.get("Name"). - Remotes are DECLARED in src/shared/Net.luau with a validator and a cooldown. Net.onServer(name, handler) applies both automatically. - All game design values live in src/shared/GameConfig.luau (economy, zones, pets, prices) and src/shared/Content.luau (achievements, cosmetics, settings, seasons). Never hardcode numbers in service code. KEY RULES - The client sends INTENT (e.g. "I tapped 5 times"), never VALUE. Any code where the client sends a currency amount is a critical bug. - CosmeticService must never touch the economy multiplier (no pay-to-win). - One loop iterating all players, never one loop per player. COMMON GOTCHAS - DataStores fail silently unless Game Settings > Security > "Enable Studio Access to API Services" is ON. This is the #1 cause of "saving is broken". - Gamepass/product IDs default to 0 and are skipped. Replace them with real IDs from the Creator Dashboard. - Session locking will kick you if the same account loads on two servers. Wait ~30s and rejoin. VERIFY - ./tools/verify.sh runs every check (config, balance sim, Luau compile, lint, format, manifest sync, Rojo build) and skips tools that aren't installed. - python3 tools/balance_sim.py --hours 6 models progression and fails if the first rebirth falls outside 8-30 minutes. My problem is: ``` This is a convenience, not official support. If the AI is confidently wrong, [open an issue](https://github.com/DLinacre/slime-factory-tycoon/issues) β€” that's a documentation bug worth fixing.

FAQ

Can I sell a game made with this? Yes. MIT licence, no attribution required, keep all revenue.

Do I need to credit you? No. Appreciated, never required.

Will this get me moderated on Roblox? Nothing here violates Roblox policy. Hatch odds are published in-game, there are no fake timers, and there’s no real-money gambling framing. You remain responsible for your own content and any changes you make.

Do I need Rojo? No. Download the .rbxlx and open it in Studio. Rojo is only for live-syncing your editor.

Why isn’t there a GitHub Actions badge? Actions has no runner minutes on this account, so hosted jobs finish without executing. Rather than display a badge that reports a failure that isn’t real, the checks run locally β€” ./tools/verify.sh runs the identical gates.

Is this actually production-ready? The architecture, security and save handling are. You still need your own art, your own asset IDs, and a play-test pass before publishing.

My DataStores aren’t saving. Game Settings β†’ Security β†’ enable Studio Access to API Services. Without it every DataStore call fails silently and the code looks broken. It isn’t.

License

MIT β€” see LICENSE. Use it commercially, keep the Robux, no attribution required.