el4cteo/roblox-skills

roblox-game-systems

Recipes for common systems built on server authority - currency service and leaderstats, XP/levels, round loops with intermission and teams, validated melee/ranged combat, inventory and tools, soft-currency shops, obby checkpoints, daily rewards, pets.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/el4cteo/roblox-skills --skill roblox-game-systems

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Game systems recipes

Every recipe follows the same contract:

  1. State lives on the server in a service module; persistent parts go through the data layer

(roblox-data-stores).

  1. Clients send intents through validated, rate-limited remotes (roblox-security,

roblox-networking) and render state they receive (attributes, snapshots/deltas).

  1. Config is data: tunables in a shared/server config module (or live ConfigService configs).
  2. Lifecycle-safe: handles late joiners, respawns, leaving mid-action, and server shutdown.
SystemReference
Leaderstats, currency service, XP/levels, daily rewards, obby checkpointsreferences/progression.md
Round loop (intermission → match → results), teams, spawningreferences/round-system.md
Melee and ranged combat with server validation, cooldowns, damage attributionreferences/combat.md
Inventory, equipping tools, shop purchases (soft currency), pets that followreferences/inventory-shop.md

Currency service (the pattern every economy uses)

luau
--!strict
-- ServerScriptService/Server/Services/CurrencyService.luau
local Players = game:GetService("Players")

type Balances = { [Player]: number }

local MAX_BALANCE = 1e12

local CurrencyService = {}
local balances: Balances = {}

local function publish(player: Player)
	player:SetAttribute("Coins", balances[player]) -- replicated to every client; UI listens
end

function CurrencyService.load(player: Player, saved: number?)
	balances[player] = math.clamp(saved or 0, 0, MAX_BALANCE)
	publish(player)
end

function CurrencyService.get(player: Player): number
	return balances[player] or 0
end

-- Positive amount only; returns the new balance.
function CurrencyService.add(player: Player, amount: number, _source: string): number?
	local balance = balances[player]
	if balance == nil or not math.isfinite(amount) or amount <= 0 then
		return nil
	end
	balances[player] = math.min(balance + math.floor(amount), MAX_BALANCE)
	publish(player)
	return balances[player]
end

-- Atomic check-and-spend; false if insufficient.
function CurrencyService.spend(player: Player, amount: number, _sink: string): boolean
	local balance = balances[player]
	if balance == nil or not math.isfinite(amount) or amount <= 0 or balance < amount then
		return false
	end
	balances[player] = balance - math.floor(amount)
	publish(player)
	return true
end

Players.PlayerRemoving:Connect(function(player)
	balances[player] = nil -- after the data layer has saved it
end)

return CurrencyService
  • One module owns each resource; nothing else writes it. Log sources/sinks to analytics

(roblox-analytics-liveops).

  • The in-memory balance is saved by the data layer (ProfileStore profile.Data.coins) — or make the

profile table the balance store directly.

  • For display, clients read player:GetAttribute("Coins") and GetAttributeChangedSignal("Coins").

leaderstats (a Folder with IntValues under the player) shows values in the player list.

Design checklist for any new system

  • [ ] Where does authoritative state live, and how is it persisted?
  • [ ] What can the client request, and how is each request validated and rate-limited?
  • [ ] What happens on join mid-session, respawn, leave, teleport, and server shutdown?
  • [ ] How is it tuned (config) and measured (analytics)?
  • [ ] How does it behave with 1 player, full servers, and high latency?
  • [ ] Is it streaming-safe on the client?

Related skills

roblox-architecture, roblox-security, roblox-data-stores, roblox-networking, roblox-characters-animation, roblox-monetization, roblox-ui.

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
el4cteo
커뮤니티

roblox-data-stores

Persistence and cross-server data - DataStoreService (UpdateAsync, retries, budgets, limits), session locking with ProfileStore, schema migrations, OrderedDataStore leaderboards, MemoryStore queues/sorted maps/hash maps, MessagingService, right-to-be-forgotten. Use when saving player data, building leaderboards or queues, or fixing data loss, duplication, or throttling.

1시간 설치 수
3
GitHub Stars
77
업데이트
11월 3일
el4cteo
커뮤니티

roblox-luau

Modern, type-safe Luau for Roblox, covering --!strict and the new type solver, generics, string interpolation, if-expressions, task library, require-by-string, module/OOP patterns, error handling with retries, buffer/vector, and legacy APIs to avoid. Use when writing, refactoring, or explaining any Roblox script, fixing type errors, or modernizing old Lua code.

1시간 설치 수
3
GitHub Stars
77
업데이트
11월 3일
el4cteo
커뮤니티

roblox-physics

Physics and spatial queries - Raycast/Blockcast/Spherecast, overlap queries, collision groups, Touched pitfalls, collision summaries (impact point/normal/speed), assemblies and welds, mover constraints replacing BodyMovers, mechanical constraints, network ownership, CFrame math, vehicles/projectiles, and server authority (BindToSimulation, prediction, rollback). Use when moving parts, detecting hits, building vehicles or projectiles, or fixing jitter, flinging, or ownership bugs.

1시간 설치 수
3
GitHub Stars
77
업데이트
11월 3일
el4cteo
커뮤니티

roblox-analytics-liveops

Analytics and live ops - AnalyticsService economy/funnel/onboarding/progression/custom events, player segments, experience configs via ConfigService, A/B experiments, badges, experience notifications, timed events, daily rewards, season passes. Use when instrumenting a game, tuning economy or onboarding, running A/B tests or feature flags, or planning live events and re-engagement.

1시간 설치 수
2
GitHub Stars
66
업데이트
10월 17일