feat: 50 игр на Lua + импорт Roblox для всех + поддержка Lua в плеере #39

Merged
min merged 215 commits from feat/lua-50-games-bundle into main 2026-06-09 21:59:25 +00:00
Showing only changes of commit 095a79cab4 - Show all commits

View File

@ -2347,14 +2347,66 @@ end)`,
// ═══════════════════════════════════════════════════════════════
// ИГРА 28 — «Призрачные стены»
// ═══════════════════════════════════════════════════════════════
'ghost-walls': {
g28_main: `-- === ИГРА «ПРИЗРАЧНЫЕ СТЕНЫ» (Lua) ===
print("Некоторые стены — призрачные. Найди проход!")`,
g28_ghost: `-- === Скрипт призрачной стены (Lua) ===
'ghost-walls': (function() {
const WALL_IDS = [1, 2, 3, 4];
const overrides = {
g28_main: `-- === ИГРА «ПРИЗРАЧНЫЕ СТЕНЫ» — главный скрипт (Lua) ===
${SNIPPET_BROADCAST}
local won = false
__rbxl_show_text("Кликай по фиолетовым стенам — пройди сквозь!", 4)
local winSound = Instance.new("Sound", workspace)
winSound.SoundId = "win"; winSound.Volume = 1
-- Финиш сообщает о победе
local winEvent = getEvent("WinReached")
winEvent.Event:Connect(function()
if won then return end
won = true
__rbxl_show_text("Победа! Ты прошёл сквозь все стены!", 5)
winSound:Play()
local px = __rbxl_player_x()
local py = __rbxl_player_y()
local pz = __rbxl_player_z()
__rbxl_spawn_particles("confetti", px, py + 3, pz, 3, 3)
end)`,
g28_finish: `-- === Скрипт финиш-зоны (Lua) ===
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local part = script.Parent
part.CanCollide = false
part.Transparency = 0.5`,
},
local fired = false
part.Touched:Connect(function(hit)
if fired then return end
local h = hit.Parent and hit.Parent:FindFirstChild("Humanoid")
if not h then return end
fired = true
local ev = ReplicatedStorage:FindFirstChild("WinReached")
if ev then ev:Fire() end
end)`,
};
// 4 фиолетовые стены — клик делает стену проходимой и полупрозрачной
const wallScript = `-- === Скрипт призрачной стены (Lua) ===
local part = script.Parent
local ghost = false
local clickSound = Instance.new("Sound", part)
clickSound.SoundId = "click"; clickSound.Volume = 0.7
part.Clicked:Connect(function()
if ghost then return end
ghost = true
part.CanCollide = false
part.Transparency = 0.75
clickSound:Play()
__rbxl_show_text("Стена стала призрачной!", 1.5)
end)`;
for (const wid of WALL_IDS) {
overrides['g28_wall_' + wid] = wallScript;
}
return overrides;
})(),
// ═══════════════════════════════════════════════════════════════
// ИГРА 29 — «Магазин»