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 f7074f5cd7 - Show all commits

View File

@ -377,14 +377,35 @@ end)`,
// ═══════════════════════════════════════════════════════════════ // ═══════════════════════════════════════════════════════════════
'maze': { 'maze': {
g5_main: `-- === ИГРА «ЛАБИРИНТ» — главный скрипт (Lua) === g5_main: `-- === ИГРА «ЛАБИРИНТ» — главный скрипт (Lua) ===
print("Найди выход из лабиринта!")`, ${SNIPPET_BROADCAST}
g5_finish: `-- === Финиш лабиринта (Lua) ===
__rbxl_show_text("Найди выход из лабиринта!", 3)
local winSound = Instance.new("Sound", workspace)
winSound.SoundId = "win"; winSound.Volume = 1
local winEvent = getEvent("WinReached")
winEvent.Event:Connect(function()
__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)`,
g5_finish: `-- === Скрипт финиша лабиринта (Lua) ===
-- Висит на невидимой зоне над зелёным ковриком.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local part = script.Parent local part = script.Parent
local fired = false
part.Touched:Connect(function(hit) part.Touched:Connect(function(hit)
if fired then return end
local h = hit.Parent and hit.Parent:FindFirstChild("Humanoid") local h = hit.Parent and hit.Parent:FindFirstChild("Humanoid")
if not h then return end if not h then return end
print("ПОБЕДА! Ты нашёл выход!") fired = true
h.WalkSpeed = 0 local ev = ReplicatedStorage:FindFirstChild("WinReached")
if ev then ev:Fire() end
end)`, end)`,
}, },