-- BACKROOMS INFINITE MAZE LOADER SCRIPT (V4 - REAL FALL GRAVITY) -- Sistem pembersihan ultra pantas, pemadaman Baseplate, dan jatuhan graviti rawak supaya pemain tidak bertindih di atas kepala. local Players = game:GetService("Players") local Lighting = game:GetService("Lighting") -- KONFIGURASI BACKROOMS local CHUNK_SIZE = 40 local WALL_HEIGHT = 12 local WALL_THICKNESS = 1 local RENDER_DISTANCE = 3 local generatedChunks = {} local backroomsFolder -- 1. PEMBERSIHAN MAP LAMA & BASEPLATE local function clearMap() debug.profilebegin("FastMapClear") local children = workspace:GetChildren() for i = 1, #children do local obj = children[i] if not obj:IsA("Camera") and not obj:IsA("Terrain") then if not Players:GetPlayerFromCharacter(obj) then obj:Destroy() end end end debug.profileend() print("✓ Map lama dan Baseplate dipadamkan!") end -- Fungsi Matematik Deterministik Maze local function getDeterministicWall(chunkX, chunkZ, wallType) local seed = math.sin(chunkX * 12.9898 + chunkZ * 78.233) * 43758.5453 local pseudoRandom = seed - math.floor(seed) if wallType == "North" then return pseudoRandom > 0.45 end if wallType == "West" then return pseudoRandom > 0.45 end if wallType == "CenterH" then return pseudoRandom > 0.55 end if wallType == "CenterV" then return pseudoRandom > 0.55 end return false end -- 2. PENJANAAN CHUNK local function generateChunk(chunkX, chunkZ) local chunkKey = chunkX .. "," .. chunkZ if generatedChunks[chunkKey] then return end generatedChunks[chunkKey] = true local chunkModel = Instance.new("Model") chunkModel.Name = "Chunk_" .. chunkKey chunkModel.Parent = backroomsFolder local worldX = chunkX * CHUNK_SIZE local worldZ = chunkZ * CHUNK_SIZE -- Lantai Karpet Kuning Lembap local floor = Instance.new("Part") floor.Size = Vector3.new(CHUNK_SIZE, 1, CHUNK_SIZE) floor.Position = Vector3.new(worldX, -0.5, worldZ) floor.Color = Color3.fromRGB(185, 170, 115) floor.Material = Enum.Material.Fabric floor.Anchored = true floor.Parent = chunkModel -- Siling Beton local ceiling = Instance.new("Part") ceiling.Size = Vector3.new(CHUNK_SIZE, 1, CHUNK_SIZE) ceiling.Position = Vector3.new(worldX, WALL_HEIGHT + 0.5, worldZ) ceiling.Color = Color3.fromRGB(200, 195, 180) ceiling.Material = Enum.Material.Concrete ceiling.Anchored = true ceiling.Parent = chunkModel -- Fungsi Dinding local function createWall(size, position) local wall = Instance.new("Part") wall.Size = size wall.Position = position wall.Color = Color3.fromRGB(215, 200, 130) wall.Material = Enum.Material.SmoothPlastic wall.Anchored = true wall.Parent = chunkModel end if getDeterministicWall(chunkX, chunkZ, "North") then createWall(Vector3.new(CHUNK_SIZE, WALL_HEIGHT, WALL_THICKNESS), Vector3.new(worldX, WALL_HEIGHT/2, worldZ - CHUNK_SIZE/2)) end if getDeterministicWall(chunkX, chunkZ, "West") then createWall(Vector3.new(WALL_THICKNESS, WALL_HEIGHT, CHUNK_SIZE), Vector3.new(worldX - CHUNK_SIZE/2, WALL_HEIGHT/2, worldZ)) end if getDeterministicWall(chunkX, chunkZ, "CenterH") then createWall(Vector3.new(CHUNK_SIZE/2, WALL_HEIGHT, WALL_THICKNESS), Vector3.new(worldX - CHUNK_SIZE/4, WALL_HEIGHT/2, worldZ)) end if getDeterministicWall(chunkX, chunkZ, "CenterV") then createWall(Vector3.new(WALL_THICKNESS, WALL_HEIGHT, CHUNK_SIZE/2), Vector3.new(worldX, WALL_HEIGHT/2, worldZ + CHUNK_SIZE/4)) end -- Lampu Neon local lightPart = Instance.new("Part") lightPart.Size = Vector3.new(4, 0.2, 2) lightPart.Position = Vector3.new(worldX, WALL_HEIGHT - 0.1, worldZ) lightPart.Color = Color3.fromRGB(255, 255, 230) lightPart.Material = Enum.Material.Neon lightPart.Anchored = true lightPart.Parent = chunkModel local pointLight = Instance.new("PointLight") pointLight.Brightness = 2 pointLight.Range = 30 pointLight.Color = Color3.fromRGB(255, 255, 200) pointLight.Parent = lightPart if math.random() > 0.7 then task.spawn(function() while task.wait(math.random(3, 10)) do if not lightPart or not lightPart.Parent then break end pointLight.Enabled = false lightPart.Material = Enum.Material.SmoothPlastic task.wait(math.random(0.1, 0.4)) pointLight.Enabled = true lightPart.Material = Enum.Material.Neon end end) end end -- 3. LOAD MAP BACKROOM UTAMA local function createBackroomsMap() backroomsFolder = Instance.new("Model") backroomsFolder.Name = "Backrooms_Infinite" backroomsFolder.Parent = workspace local spawnPart = Instance.new("SpawnLocation") spawnPart.Name = "MainSpawn" spawnPart.Size = Vector3.new(15, 1, 15) spawnPart.Position = Vector3.new(0, 0.5, 0) spawnPart.Color = Color3.fromRGB(150, 140, 100) spawnPart.Material = Enum.Material.Fabric spawnPart.Anchored = true spawnPart.CanCollide = true spawnPart.Parent = backroomsFolder for x = -2, 2 do for z = -2, 2 do generateChunk(x, z) end end Lighting.Brightness = 0.8 Lighting.Ambient = Color3.fromRGB(80, 75, 60) Lighting.OutdoorAmbient = Color3.fromRGB(50, 50, 50) Lighting.ClockTime = 12 Lighting.GlobalShadows = true local ambientSound = Instance.new("Sound") ambientSound.Name = "FluorescentHum" ambientSound.SoundId = "rbxassetid://9069509268" ambientSound.Volume = 0.4 ambientSound.Looped = true ambientSound.Parent = workspace ambientSound:Play() print("✓ Backrooms Map Yuklendi!") end -- 4. TELEPORTASI DAN JATUH DENGAN GRAVITI REALISTIK (Anti-Bertindih) local function teleportPlayerWithGravity(character) local rootPart = character:WaitForChild("HumanoidRootPart", 5) local humanoid = character:WaitForChild("Humanoid", 5) if rootPart and humanoid then -- MENGALIS RENTIK: Membuat kedudukan X dan Z rawak (jejari 4 stud) di kawasan spawn -- Ketinggian (Y = 10.5) ditetapkan ngam di bawah siling supaya mereka jatuh bebas secara realistik local offsetX = math.random(-4, 4) local offsetZ = math.random(-4, 4) local targetPosition = Vector3.new(offsetX, 10.5, offsetZ) -- Pindahkan watak dengan PivotTo ke udara character:PivotTo(CFrame.new(targetPosition)) -- Memaksa fizik Roblox mengemas kini jatuhan momentum dengan serta-merta task.defer(function() if rootPart then rootPart.AssemblyLinearVelocity = Vector3.new(0, -25, 0) -- Momentum awal jatuhan laju ke bawah karpet end end) end end -- Teleport untuk semua pemain sedia ada local function respawnPlayers() for _, player in pairs(Players:GetPlayers()) do if player.Character then teleportPlayerWithGravity(player.Character) end end end -- 5. RESPON KEMATIAN DENGAN GRAVITI RAWAK local function setupDeathRespawn() local function onCharacterAdded(character) task.wait(0.1) -- Tunggu watak dimuatkan sepenuhnya oleh enjin game teleportPlayerWithGravity(character) end local function onPlayerAdded(player) player.CharacterAdded:Connect(onCharacterAdded) end Players.PlayerAdded:Connect(onPlayerAdded) for _, player in pairs(Players:GetPlayers()) do player.CharacterAdded:Connect(onCharacterAdded) end end -- 6. SISTEM AUTO-GENERATE PANTAS (Semasa Berjalan) task.spawn(function() while task.wait(0.5) do local playersList = Players:GetPlayers() for i = 1, #playersList do local player = playersList[i] if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then local hrp = player.Character.HumanoidRootPart local currentChunkX = math.floor((hrp.Position.X + CHUNK_SIZE/2) / CHUNK_SIZE) local currentChunkZ = math.floor((hrp.Position.Z + CHUNK_SIZE/2) / CHUNK_SIZE) for x = -RENDER_DISTANCE, RENDER_DISTANCE do for z = -RENDER_DISTANCE, RENDER_DISTANCE do generateChunk(currentChunkX + x, currentChunkZ + z) end end end end end end) -- EKSEKUSI UTAMA print("==========================================") -- Memulakan sistem muat turun Backrooms print("==========================================") clearMap() createBackroomsMap() respawnPlayers() setupDeathRespawn() print("==========================================") print("SISTEM REAL GRAVITY JATUH AKTIF!") print("==========================================")