-- SETTINGS
local MAP_SIZE = 400
local WALL_HEIGHT = 22
local GRID_SIZE = 20
local WALL_THICKNESS = 4
local SPAWN_HEIGHT = 80
local SPAWN_PLATFORM_SIZE = 75
 
local POWERUP_COUNT_TOTAL = 40
local GHOST_COUNT = 5
local SHREK_COUNT = 3
local GHOST_DAMAGE = 20
local GHOST_SPEED = 15
local SHREK_SPEED = 24
local HIDDEN_BUTTON_COUNT = 4
 
-- Fester Zielpunkt für alle Teleporter
local TELEPORT_TARGET = Vector3.new(0, 5, 0) -- Zentrum des Labyrinths
 
-- 1. SICHERHEITS-CLEANUP
local function cleanupWorld()
for _, obj in pairs(game.Workspace:GetDescendants()) do
if obj:IsA("SpawnLocation") then
obj:Destroy()
end
end
end
 
-- 2. BODEN & DOPPELTE AUSSENMAUER
local function createBase()
local grass = Instance.new("Part", game.Workspace)
grass.Name = "LabyrinthFloor"
grass.Size = Vector3.new(MAP_SIZE + 40, 1, MAP_SIZE + 40)
grass.Position = Vector3.new(0, -0.5, 0)
grass.Anchored = true
grass.BrickColor = BrickColor.new("Dark green")
grass.Material = Enum.Material.Grass
 
local function buildOuterWall(size, pos, color)
local w = Instance.new("Part", game.Workspace)
w.Size = size
w.Position = pos + Vector3.new(0, WALL_HEIGHT/2, 0)
w.Anchored = true
w.BrickColor = BrickColor.new(color)
w.Material = Enum.Material.Concrete
end
-- Innere Mauer
buildOuterWall(Vector3.new(MAP_SIZE, WALL_HEIGHT, 6), Vector3.new(0, 0, MAP_SIZE/2), "Really black")
buildOuterWall(Vector3.new(MAP_SIZE, WALL_HEIGHT, 6), Vector3.new(0, 0, -MAP_SIZE/2), "Really black")
buildOuterWall(Vector3.new(6, WALL_HEIGHT, MAP_SIZE), Vector3.new(MAP_SIZE/2, 0, 0), "Really black")
buildOuterWall(Vector3.new(6, WALL_HEIGHT, MAP_SIZE), Vector3.new(-MAP_SIZE/2, 0, 0), "Really black")
-- Äußere Schicht (die "Wand neben der Wand")
local offset = 8
buildOuterWall(Vector3.new(MAP_SIZE + 20, WALL_HEIGHT + 5, 4), Vector3.new(0, 0, MAP_SIZE/2 + offset), "Dark stone grey")
buildOuterWall(Vector3.new(MAP_SIZE + 20, WALL_HEIGHT + 5, 4), Vector3.new(0, 0, -MAP_SIZE/2 - offset), "Dark stone grey")
buildOuterWall(Vector3.new(4, WALL_HEIGHT + 5, MAP_SIZE + 20), Vector3.new(MAP_SIZE/2 + offset, 0, 0), "Dark stone grey")
buildOuterWall(Vector3.new(4, WALL_HEIGHT + 5, MAP_SIZE + 20), Vector3.new(-MAP_SIZE/2 - offset, 0, 0), "Dark stone grey")
end
 
-- 3. DAS LABYRINTH, KNÖPFE & PFEILE
local function createLabyrinth()
local wallFolder = Instance.new("Folder", game.Workspace)
wallFolder.Name = "LabyrinthWalls"
local possibleWalls = {}
 
for x = -MAP_SIZE/2 + GRID_SIZE, MAP_SIZE/2 - GRID_SIZE, GRID_SIZE do
for z = -MAP_SIZE/2 + GRID_SIZE, MAP_SIZE/2 - GRID_SIZE, GRID_SIZE do
if math.abs(x) < 55 and math.abs(z) < 55 then continue end
if math.random(1, 10) > 3 then
local wall = Instance.new("Part", wallFolder)
local horizontal = math.random(1, 2) == 1
wall.Size = horizontal and Vector3.new(GRID_SIZE + 5, WALL_HEIGHT, WALL_THICKNESS) or Vector3.new(WALL_THICKNESS, WALL_HEIGHT, GRID_SIZE + 5)
wall.Position = Vector3.new(x, WALL_HEIGHT/2, z)
wall.Anchored = true
wall.BrickColor = BrickColor.new("Stone grey")
table.insert(possibleWalls, wall)
end
end
end
 
-- 4 VERSTECKTE KNÖPFE MIT PFEILEN
for i = 1, HIDDEN_BUTTON_COUNT do
if #possibleWalls > 0 then
local randomWall = possibleWalls[math.random(1, #possibleWalls)]
local btn = Instance.new("Part", randomWall)
btn.Name = "TeleportButton"
btn.Size = Vector3.new(1.2, 1.2, 0.4)
btn.BrickColor = BrickColor.new("Really black")
btn.Material = Enum.Material.Neon
btn.Anchored = true
btn.CFrame = randomWall.CFrame * CFrame.new(0, -2, randomWall.Size.Z/2 + 0.1)
 
-- Der Pfeil auf dem Boden
local arrow = Instance.new("Part", game.Workspace)
arrow.Size = Vector3.new(4, 0.2, 8)
arrow.Anchored = true
arrow.CanCollide = false
arrow.BrickColor = BrickColor.new("Deep blue")
arrow.Material = Enum.Material.Neon
arrow.Transparency = 0.4
-- Positioniere Pfeil ein paar Meter vor dem Knopf
arrow.Position = btn.Position - (btn.CFrame.LookVector * 10)
arrow.Position = Vector3.new(arrow.Position.X, 0.1, arrow.Position.Z)
arrow.CFrame = CFrame.lookAt(arrow.Position, btn.Position)
 
local click = Instance.new("ClickDetector", btn)
click.MouseClick:Connect(function(player)
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
-- Alle laden am gleichen Punkt
player.Character.HumanoidRootPart.CFrame = CFrame.new(TELEPORT_TARGET)
end
end)
end
end
end
 
-- 4. GESPENSTER (RUND, LAUFEN)
local function createGhosts()
local ghostFolder = Instance.new("Folder", game.Workspace)
ghostFolder.Name = "Gespenster"
for i = 1, GHOST_COUNT do
local ghost = Instance.new("Part", ghostFolder)
ghost.Shape = Enum.PartType.Ball
ghost.Size = Vector3.new(8, 8, 8)
ghost.Position = Vector3.new(math.random(-150, 150), 4, math.random(-150, 150))
ghost.Anchored = false
ghost.CanCollide = true
ghost.BrickColor = BrickColor.new("Institutional white")
ghost.Material = Enum.Material.Neon
ghost.Transparency = 0.3
local bv = Instance.new("BodyVelocity", ghost)
bv.MaxForce = Vector3.new(1, 0, 1) * 500000
ghost.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then hum:TakeDamage(GHOST_DAMAGE) end
end)
task.spawn(function()
while ghost.Parent do
local target = nil
for _, p in pairs(game.Players:GetPlayers()) do
if p.Character and p.Character.HumanoidRootPart.Position.Y < 55 then
target = p.Character.HumanoidRootPart
break
end
end
if target then
local direction = (target.Position - ghost.Position).Unit
bv.Velocity = Vector3.new(direction.X, 0, direction.Z) * GHOST_SPEED
else
bv.Velocity = Vector3.new(0, 0, 0)
end
task.wait(0.2)
end
end)
end
end
 
-- 5. SHREK EVENT
local function startShrekEvent()
while true do
task.wait(30)
local shreks = {}
for i = 1, SHREK_COUNT do
local s = Instance.new("Part", game.Workspace)
s.Size = Vector3.new(12, 12, 12)
s.Position = Vector3.new(math.random(-180, 180), 6, math.random(-180, 180))
s.BrickColor = BrickColor.new("Slime green")
s.Material = Enum.Material.Neon
s.Anchored = false
s.CanCollide = true
local bv = Instance.new("BodyVelocity", s)
bv.MaxForce = Vector3.new(1, 0, 1) * 800000
s.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then hum.Health = 0 end
end)
table.insert(shreks, s)
task.spawn(function()
while s.Parent do
local target = nil
for _, p in pairs(game.Players:GetPlayers()) do
if p.Character and p.Character.HumanoidRootPart.Position.Y < 55 then
target = p.Character.HumanoidRootPart
break
end
end
if target then
local dir = (target.Position - s.Position).Unit
bv.Velocity = Vector3.new(dir.X, 0, dir.Z) * SHREK_SPEED
end
task.wait(0.2)
end
end)
end
task.wait(10)
for _, s in pairs(shreks) do s:Destroy() end
end
end
 
-- 6. POWER-UPS & SPAWN
local function spawnPowerUp(color, name, property, value)
local p = Instance.new("Part", game.Workspace)
p.Shape = Enum.PartType.Ball
p.Size = Vector3.new(5, 5, 5)
p.Position = Vector3.new(math.random(-180, 180), 3, math.random(-180, 180))
p.Anchored = true
p.BrickColor = BrickColor.new(color)
p.Material = Enum.Material.Neon
p.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum and not hit.Parent:FindFirstChild(name.."_Active") then
local tag = Instance.new("BoolValue", hit.Parent)
tag.Name = name.."_Active"
p.Transparency = 1
local old = hum[property]
hum[property] = value
task.wait(12)
if hum then hum[property] = old end
tag:Destroy()
task.wait(10)
p.Transparency = 0
end
end)
end
 
local function createSkySpawn()
local base = Instance.new("Part", game.Workspace)
base.Size = Vector3.new(SPAWN_PLATFORM_SIZE, 2, SPAWN_PLATFORM_SIZE)
base.Position = Vector3.new(0, SPAWN_HEIGHT, 0)
base.Anchored = true
base.BrickColor = BrickColor.new("Really black")
base.Material = Enum.Material.Neon
local spawn = Instance.new("SpawnLocation", base)
spawn.Size = Vector3.new(50, 1, 50)
spawn.Position = base.Position + Vector3.new(0, 1, 0)
spawn.Anchored = true
spawn.Transparency = 0.5
end
 
-- AUSFÜHREN
cleanupWorld()
createBase()
createLabyrinth()
createSkySpawn()
createGhosts()
for i = 1, 20 do
spawnPowerUp("Electric blue", "Speed", "WalkSpeed", 55)
spawnPowerUp("New Yeller", "Jump", "JumpHeight", 50)
end
task.spawn(startShrekEvent)