Run it
Copy the script and paste it into your executor.
Players = :()
Lighting = :()
CHUNK_SIZE =
WALL_HEIGHT =
WALL_THICKNESS =
RENDER_DISTANCE =
generatedChunks = {}
backroomsFolder
()
debug.()
children = :()
i = , #children
obj = children[i]
obj:() obj:()
Players:(obj)
obj:()
debug.()
()
(chunkX, chunkZ, wallType)
seed = .(chunkX * + chunkZ * ) *
pseudoRandom = seed - .(seed)
wallType == pseudoRandom >
wallType == pseudoRandom >
wallType == pseudoRandom >
wallType == pseudoRandom >
(chunkX, chunkZ)
chunkKey = chunkX .. .. chunkZ
generatedChunks[chunkKey]
generatedChunks[chunkKey] =
chunkModel = .()
chunkModel.Name = .. chunkKey
chunkModel.Parent = backroomsFolder
worldX = chunkX * CHUNK_SIZE
worldZ = chunkZ * CHUNK_SIZE
floor = .()
floor.Size = .(CHUNK_SIZE, , CHUNK_SIZE)
floor.Position = .(worldX, -, worldZ)
floor.Color = .(, , )
floor.Material = .Material.Fabric
floor.Anchored =
floor.Parent = chunkModel
ceiling = .()
ceiling.Size = .(CHUNK_SIZE, , CHUNK_SIZE)
ceiling.Position = .(worldX, WALL_HEIGHT + , worldZ)
ceiling.Color = .(, , )
ceiling.Material = .Material.Concrete
ceiling.Anchored =
ceiling.Parent = chunkModel
(size, position)
wall = .()
wall.Size = size
wall.Position = position
wall.Color = .(, , )
wall.Material = .Material.SmoothPlastic
wall.Anchored =
wall.Parent = chunkModel
(chunkX, chunkZ, )
(.(CHUNK_SIZE, WALL_HEIGHT, WALL_THICKNESS), .(worldX, WALL_HEIGHT/, worldZ - CHUNK_SIZE/))
(chunkX, chunkZ, )
(.(WALL_THICKNESS, WALL_HEIGHT, CHUNK_SIZE), .(worldX - CHUNK_SIZE/, WALL_HEIGHT/, worldZ))
(chunkX, chunkZ, )
(.(CHUNK_SIZE/, WALL_HEIGHT, WALL_THICKNESS), .(worldX - CHUNK_SIZE/, WALL_HEIGHT/, worldZ))
(chunkX, chunkZ, )
(.(WALL_THICKNESS, WALL_HEIGHT, CHUNK_SIZE/), .(worldX, WALL_HEIGHT/, worldZ + CHUNK_SIZE/))
lightPart = .()
lightPart.Size = .(, , )
lightPart.Position = .(worldX, WALL_HEIGHT - , worldZ)
lightPart.Color = .(, , )
lightPart.Material = .Material.Neon
lightPart.Anchored =
lightPart.Parent = chunkModel
pointLight = .()
pointLight.Brightness =
pointLight.Range =
pointLight.Color = .(, , )
pointLight.Parent = lightPart
.() >
.(()
.(.(, ))
lightPart lightPart.Parent
pointLight.Enabled =
lightPart.Material = .Material.SmoothPlastic
.(.(, ))
pointLight.Enabled =
lightPart.Material = .Material.Neon
)
()
backroomsFolder = .()
backroomsFolder.Name =
backroomsFolder.Parent =
spawnPart = .()
spawnPart.Name =
spawnPart.Size = .(, , )
spawnPart.Position = .(, , )
spawnPart.Color = .(, , )
spawnPart.Material = .Material.Fabric
spawnPart.Anchored =
spawnPart.CanCollide =
spawnPart.Parent = backroomsFolder
x = -,
z = -,
(x, z)
Lighting.Brightness =
Lighting.Ambient = .(, , )
Lighting.OutdoorAmbient = .(, , )
Lighting.ClockTime =
Lighting.GlobalShadows =
ambientSound = .()
ambientSound.Name =
ambientSound.SoundId =
ambientSound.Volume =
ambientSound.Looped =
ambientSound.Parent =
ambientSound:()
()
(character)
rootPart = character:(, )
humanoid = character:(, )
rootPart humanoid
offsetX = .(-, )
offsetZ = .(-, )
targetPosition = .(offsetX, , offsetZ)
character:(.(targetPosition))
.(()
rootPart
rootPart.AssemblyLinearVelocity = .(, -, )
)
()
_, player (Players:())
player.Character
(player.Character)
()
(character)
.()
(character)
(player)
player.CharacterAdded:(onCharacterAdded)
Players.PlayerAdded:(onPlayerAdded)
_, player (Players:())
player.CharacterAdded:(onCharacterAdded)
.(()
.()
playersList = Players:()
i = , #playersList
player = playersList[i]
player.Character player.Character:()
hrp = player.Character.HumanoidRootPart
currentChunkX = .((hrp.Position.X + CHUNK_SIZE/) / CHUNK_SIZE)
currentChunkZ = .((hrp.Position.Z + CHUNK_SIZE/) / CHUNK_SIZE)
x = -RENDER_DISTANCE, RENDER_DISTANCE
z = -RENDER_DISTANCE, RENDER_DISTANCE
(currentChunkX + x, currentChunkZ + z)
)
()
()
()
()
()
()
()
()
()real map but cilent side version

Universal