Сontent continues after AD

Сontent continues after AD

Сontent continues after AD

Script – Depth Spelunking

Thank you for using our website
Your script:

				
					local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")

function addHighlight(obj, color, transparency)
  if not obj:FindFirstChild("Highlight") then
    local highlight = Instance.new("Highlight")
    highlight.Parent = obj
    highlight.OutlineColor = color
    highlight.FillColor = color
    highlight.FillTransparency = transparency
    highlight.OutlineTransparency = 0
    highlight.Adornee = obj
  end
end

function removeHighlight(obj)
  local highlight = obj:FindFirstChild("Highlight")
  if highlight then
    highlight:Destroy()
  end
end

function addPlayerHighlight(char)
  if char and char:FindFirstChild("HumanoidRootPart") then
    addHighlight(char, Color3.fromRGB(220, 220, 220), 0.5)
  end
end

function getColorName(color)
  local colorMap = {
    [Vector3.new(0, 0, 0)] = "Black",
    [Vector3.new(0, 0, 1)] = "Blue",
    [Vector3.new(0.333333, 1, 1)] = "Cyan",
    [Vector3.new(0.156863, 0.498039, 0.278431)] = "Green",
    [Vector3.new(0.835294, 0.45098, 0.239216)] = "Orange",
    [Vector3.new(1, 0.4, 0.8)] = "Pink",
    [Vector3.new(0.768627, 0.156863, 0.109804)] = "Red",
    [Vector3.new(0.419608, 0.196078, 0.486275)] = "Purple",
    [Vector3.new(0.94902, 0.952941, 0.952941)] = "White",
    [Vector3.new(0.937255, 0.721569, 0.219608)] = "Yellow"
  }
    
  local colorVec = Vector3.new(color.R, color.G, color.B)
  return colorMap[colorVec] or "Unknown"
end

local lastCode = "none"
local lastCCode = "none"

function updateCodes()
  local map = Workspace:FindFirstChild("CurrentMap")
  if map then
    local items = map:FindFirstChild("SpawnedItems")
    if items then
      local codeObj = items:FindFirstChild("Code")
      if codeObj then
        local code = codeObj.Primary.SurfaceGui.TextLabel.Text
        if code ~= lastCode then
          notify("Game", code)
          lastCode = code
        end
      end
      
      local cCodeObj = items:FindFirstChild("ColourCode")
      if cCodeObj then
        local gui = cCodeObj.Primary.SurfaceGui
        local colors = {
          gui["1"].ImageColor3,
          gui["2"].ImageColor3,
          gui["3"].ImageColor3,
          gui["4"].ImageColor3
        }
        
        local colorNames = {}
        for _, color3 in pairs(colors) do
          table.insert(colorNames, getColorName(color3))
        end
        
        local cCode = table.concat(colorNames, " ")
        if cCode ~= lastCCode then
          notify("Game", cCode)
          lastCCode = cCode
        end
      end
    end
  end
end

function onMapSwitch()
  local CurrentMap = Workspace:FindFirstChild("CurrentMap")
  if not CurrentMap then
    return
  end
  
  local tasks = CurrentMap:FindFirstChild("CurrentTasks")
  if tasks then
    tasks.ChildAdded:Connect(function(child)
      tasks:WaitForChild(child.Name)
      removeHighlight(child)
      addHighlight(child, Color3.fromRGB(255, 255, 0), 0.9)
    end)
  
    for _, task in pairs(tasks:GetChildren()) do
      tasks:WaitForChild(task.Name)
      removeHighlight(task)
      addHighlight(task, Color3.fromRGB(255, 255, 0), 0.9)
      wait(0.25)
      
      task.Completed.Changed:Connect(function()
        if task.Completed.Value == true then
          task.Highlight.FillColor = Color3.fromRGB(0, 255, 0)
          task.Highlight.OutlineColor = Color3.fromRGB(0, 255, 0)
        else
          task.Highlight.FillColor = Color3.fromRGB(255, 255, 0)
          task.Highlight.OutlineColor = Color3.fromRGB(255, 255, 0)
        end
      end)
    end
  end
  
  local upgraders = CurrentMap:FindFirstChild("CurrentUpgraders")
  if upgraders then
    upgraders.ChildAdded:Connect(function(child)
      upgraders:WaitForChild(child.Name)
      removeHighlight(child)
      addHighlight(child, Color3.fromRGB(204, 153, 255), 0.5)
    end)
  
    for _, upgrader in pairs(upgraders:GetChildren()) do
      upgraders:WaitForChild(upgrader.Name)
      removeHighlight(upgrader)
      addHighlight(upgrader, Color3.fromRGB(204, 153, 255), 0.5)
      wait(0.25)
    end
  end
  
  local keepers = CurrentMap:FindFirstChild("Keepers")
  if keepers then
    wait(1)
    local keeperStatues = keepers:GetChildren()
    local clipboards = {}
    for _, keeper in pairs(keeperStatues) do
      local clipboard = keeper:WaitForChild("InfoEnvy")
      table.insert(clipboards, clipboard)
      wait(0.2)
    end
    
    for _, obj in pairs(clipboards) do
      addHighlight(obj, Color3.fromRGB(0, 0, 255), 0.5)
      wait(0.2)
    end
  end
  
  local traps = {}
  for _, child in pairs(CurrentMap:GetChildren()) do
    if child.Name == "EnvyTrap" then
      table.insert(traps, child)
      wait(0.2)
    end
  end
  for _, trap in pairs(traps) do
    addHighlight(trap, Color3.fromRGB(255, 255, 0), 0.5)
    wait(0.2)
  end
end

function notify(title, message)
  game.StarterGui:SetCore("SendNotification", {
    Title = title,
    Text = message,
    Duration = 90
  })
end

Players.PlayerAdded:Connect(function(player)
  player.CharacterAdded:Connect(function(char)
    addPlayerHighlight(char)
  end)
end)

for _, player in ipairs(Players:GetPlayers()) do
  if player.Character then
    addPlayerHighlight(player.Character)
    wait(0.2)
  end
end

Workspace.ChildAdded:Connect(function(child)
  if child.Name == "CurrentMap" then
    repeat
      wait(2)
    until child:FindFirstChild("SpawnedItems") and child:FindFirstChild("CurrentTasks")
    if child:FindFirstChild("SpawnedItems"):GetChildren() and child:FindFirstChild("CurrentTasks"):GetChildren() then
      onMapSwitch()
    end
  end
end)

local eleFloor = Workspace:WaitForChild("MapElevator"):WaitForChild("Floor")
if eleFloor then
  addHighlight(eleFloor, Color3.fromRGB(255, 165, 0), 0.5)
end

Workspace.DescendantAdded:Connect(function(descendant)
  if descendant.Name == "MapElevator" or descendant.Name == "Floor" then
    if descendant.Name == "MapElevator" or descendant.Parent.Name == "MapElevator" then
      addHighlight(Workspace:WaitForChild("MapElevator"):WaitForChild("Floor"), Color3.fromRGB(255, 165, 0), 0.5)
    end
  end
end)

Workspace.Entities.ChildAdded:Connect(function(child)
  Workspace.Entities:WaitForChild(child.Name)
  removeHighlight(child)
  addHighlight(child, Color3.fromRGB(255, 0, 0), 0.5)
end)

while true do 
  wait(5)
  updateCodes()
end
				
			

if the script does not work, try other scripts on our website