skybox
Key RequiredUniversal

skybox

Universal Scriptpun_pun405060pun_pun405060 1.1K views 52 executesUpdated Jan 4, 2026
1.7/ 5(3 votes)
1233% Positive
Lua Script•198 lines (4890 chars)
local Players = game:GetService("Players")
local Lighting = game:GetService("Lighting")
local SoundService = game:GetService("SoundService")
local RunService = game:GetService("RunService")

local SKY_ASSET       = "rbxassetid://109266385905091"
local EFFECT_ASSET    = "rbxassetid://109266385905091"
local JUMPSCARE_SOUND = "rbxassetid://9125713501"
local BG_SOUND        = "rbxassetid://1843523756"

local TILE_SIZE = 70
local BASE_WIDTH = 8
local WALL_HEIGHT = 45
local SAFE_Y = 10

local safeFolder = Instance.new("Folder")
safeFolder.Name = "SAFE_BASE_INFINITE"
safeFolder.Parent = workspace

for _, v in ipairs(Lighting:GetChildren()) do
	if v:IsA("Sky") then v:Destroy() end
end

local sky = Instance.new("Sky")
sky.SkyboxBk = SKY_ASSET
sky.SkyboxDn = SKY_ASSET
sky.SkyboxFt = SKY_ASSET
sky.SkyboxLf = SKY_ASSET
sky.SkyboxRt = SKY_ASSET
sky.SkyboxUp = SKY_ASSET
sky.Parent = Lighting

Lighting.ClockTime = 23
Lighting.Brightness = 1.2
Lighting.ExposureCompensation = -0.4
Lighting.Ambient = Color3.fromRGB(120,0,0)
Lighting.OutdoorAmbient = Color3.fromRGB(90,0,0)

local cc = Instance.new("ColorCorrectionEffect")
cc.TintColor = Color3.fromRGB(160,40,40)
cc.Contrast = 0.3
cc.Saturation = -0.1
cc.Parent = Lighting

local atm = Instance.new("Atmosphere")
atm.Density = 0.45
atm.Color = Color3.fromRGB(120,20,20)
atm.Decay = Color3.fromRGB(40,0,0)
atm.Haze = 2
atm.Parent = Lighting

local jump = Instance.new("Sound")
jump.SoundId = JUMPSCARE_SOUND
jump.Volume = 8
jump.Parent = SoundService
jump:Play()

local bg = Instance.new("Sound")
bg.Name = "SCARY_BACKGROUND"
bg.SoundId = BG_SOUND
bg.Volume = 2.8
bg.Looped = true
bg.Parent = SoundService
bg:Play()

local function createSafePart(size, pos, color)
	local p = Instance.new("Part")
	p.Size = size
	p.Position = pos
	p.Anchored = true
	p.Material = Enum.Material.Metal
	p.Color = color
	p.TopSurface = Enum.SurfaceType.Smooth
	p.BottomSurface = Enum.SurfaceType.Smooth
	p.Parent = safeFolder
	return p
end

local generated = {}

local function generateTile(index)
	if generated[index] then return end
	generated[index] = true
	local x = index * TILE_SIZE

	for w = 1, BASE_WIDTH do
		createSafePart(
			Vector3.new(TILE_SIZE, 4, TILE_SIZE),
			Vector3.new(x, SAFE_Y, (w-1)*TILE_SIZE),
			Color3.fromRGB(30,30,30)
		)

		if math.random() > 0.35 then
			createSafePart(
				Vector3.new(6, WALL_HEIGHT, TILE_SIZE),
				Vector3.new(x + math.random(-20,20), SAFE_Y + WALL_HEIGHT/2, (w-1)*TILE_SIZE),
				Color3.fromRGB(60,60,60)
			)
		end

		if math.random() > 0.45 then
			createSafePart(
				Vector3.new(TILE_SIZE, WALL_HEIGHT, 6),
				Vector3.new(x, SAFE_Y + WALL_HEIGHT/2, (w-1)*TILE_SIZE + math.random(-20,20)),
				Color3.fromRGB(70,70,70)
			)
		end
	end
end

local function setupCharacter(character)
	task.wait(0.2)
	local hrp = character:WaitForChild("HumanoidRootPart")
	hrp.CFrame = CFrame.new(0, SAFE_Y + 15, 0)

	for _, part in ipairs(character:GetChildren()) do
		if part:IsA("BasePart") then
			part.Color = Color3.new(0,0,0)
			if not part:FindFirstChild("Fire") then
				local fire = Instance.new("Fire")
				fire.Size = 10
				fire.Heat = 20
				fire.Color = Color3.fromRGB(200,40,40)
				fire.SecondaryColor = Color3.fromRGB(120,0,0)
				fire.Parent = part
			end
		end
	end
end

for _, plr in ipairs(Players:GetPlayers()) do
	if plr.Character then setupCharacter(plr.Character) end
	plr.CharacterAdded:Connect(setupCharacter)
end

Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(setupCharacter)
end)

local floatingParts = {}

for _, obj in ipairs(workspace:GetDescendants()) do
	if obj:IsA("BasePart")
		and not obj:IsDescendantOf(safeFolder)
		and not obj:IsDescendantOf(Players) then

		obj:BreakJoints()
		obj.Anchored = false

		local fire = Instance.new("Fire")
		fire.Size = 8
		fire.Heat = 15
		fire.Color = Color3.fromRGB(200,50,50)
		fire.SecondaryColor = Color3.fromRGB(100,0,0)
		fire.Parent = obj

		local particle = Instance.new("ParticleEmitter")
		particle.Texture = EFFECT_ASSET
		particle.Rate = 15
		particle.Lifetime = NumberRange.new(1,2.5)
		particle.Speed = NumberRange.new(4,8)
		particle.SpreadAngle = Vector2.new(360,360)
		particle.Parent = obj

		table.insert(floatingParts, obj)
	end
end

RunService.Heartbeat:Connect(function()
	for _, p in ipairs(floatingParts) do
		if p and p.Parent then
			p.AssemblyLinearVelocity = Vector3.new(
				math.random(-15,15),
				math.random(10,22),
				math.random(-15,15)
			)
			p.AssemblyAngularVelocity = Vector3.new(
				math.random(-3,3),
				math.random(-3,3),
				math.random(-3,3)
			)
		end
	end

	for _, plr in ipairs(Players:GetPlayers()) do
		local char = plr.Character
		if char and char:FindFirstChild("HumanoidRootPart") then
			local idx = math.floor(char.HumanoidRootPart.Position.X / TILE_SIZE)
			for i = idx - 2, idx + 6 do
				generateTile(i)
			end
		end
	end
end)

for i = -2, 6 do
	generateTile(i)
end

Features & Information

- scary
#PunPun

Community Comments (1)

lags the * out of your game, don't do it

More Scripts for Universal Scripts