for i, v in ipairs(game:GetService('Workspace'):GetDescendants()) do if v.ClassName == 'ProximityPrompt' then v.HoldDuration = 0 end end local function createHighlight(model, fillColor, outlineColor, fillTransparency) if model:FindFirstChild('LeverHighlight') then return model:FindFirstChild('LeverHighlight') end local highlight = Instance.new('Highlight') highlight.Name = 'LeverHighlight' highlight.Adornee = model highlight.FillColor = fillColor highlight.OutlineColor = outlineColor highlight.FillTransparency = fillTransparency or 0.5 highlight.OutlineTransparency = 0 highlight.Parent = model return highlight end local function checkLeverState(lever) local mainLever = lever:FindFirstChild('MainLever') if not mainLever then return false end local glowingPart = mainLever:FindFirstChild('GlowingPart2') if not glowingPart then return false end local targetColor = Color3.fromRGB(0, 255, 72) local currentColor = glowingPart.Color local tolerance = 0.01 return math.abs(currentColor.R - targetColor.R) < tolerance and math.abs(currentColor.G - targetColor.G) < tolerance and math.abs(currentColor.B - targetColor.B) < tolerance end local function updateHighlight(lever, highlight) if checkLeverState(lever) then highlight.FillColor = Color3.fromRGB(0, 255, 72) highlight.OutlineColor = Color3.fromRGB(0, 200, 50) else highlight.FillColor = Color3.fromRGB(255, 0, 0) highlight.OutlineColor = Color3.fromRGB(200, 0, 0) end end local function setupLever(lever) local highlight = createHighlight( lever, Color3.fromRGB(255, 0, 0), Color3.fromRGB(200, 0, 0), 0.5 ) updateHighlight(lever, highlight) local mainLever = lever:FindFirstChild('MainLever') if mainLever then local glowingPart = mainLever:FindFirstChild('GlowingPart2') if glowingPart then glowingPart:GetPropertyChangedSignal('Color'):Connect(function() updateHighlight(lever, highlight) end) end end end local function findAllLevers() local currentMap = workspace:WaitForChild('CurrentMap') local function searchDescendants(parent) for _, child in ipairs(parent:GetDescendants()) do if child.Name:match('^Lever_%d+$') and child:IsA('Model') then setupLever(child) end end end searchDescendants(currentMap) currentMap.DescendantAdded:Connect(function(descendant) if descendant.Name:match('^Lever_%d+$') and descendant:IsA('Model') then task.wait(0.1) setupLever(descendant) end end) end local function setupAIContainer() local aiContainer = workspace:FindFirstChild('AIContainer') if not aiContainer then return end for _, child in ipairs(aiContainer:GetChildren()) do if child:IsA('Model') or child:IsA('BasePart') then createHighlight( child, Color3.fromRGB(255, 0, 0), Color3.fromRGB(255, 0, 0), 1 ) end end aiContainer.ChildAdded:Connect(function(child) if child:IsA('Model') or child:IsA('BasePart') then task.wait(0.1) createHighlight( child, Color3.fromRGB(255, 0, 0), Color3.fromRGB(255, 0, 0), 1 ) end end) end local function setupMasterLever() local currentMap = workspace:WaitForChild('CurrentMap') local masterLever = currentMap:FindFirstChild('MasterLever') if masterLever then createHighlight( masterLever, Color3.fromRGB(255, 215, 0), Color3.fromRGB(200, 170, 0), 0.5 ) end end findAllLevers() setupAIContainer() setupMasterLever()