--========================================================== -- CONFIG --========================================================== _G.StartMainMenu = false local KEY_REQUIRED = "99HCGKEy" local KEY_LINK = "https://discord.gg/MFwf9JFmb" --========================================================== -- SERVICES --========================================================== local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local Camera = workspace.CurrentCamera --========================================================== -- MAIN MENU FUNCTION (раньше было loadMainMenu) --========================================================== function LoadMainMenu() ---------------------------------------------------------- -- GUI основного меню ---------------------------------------------------------- local DamageEvent = ReplicatedStorage:WaitForChild("RemoteEvents"):WaitForChild("DamagePlayer") local godModeActive = false local nightVisionActive = false local infJumpActive = false local heatSensorActive = false local heatSensorParts = {} -- ScreenGui local screenGui = Instance.new("ScreenGui") screenGui.Name = "99 Nights Panel" screenGui.ResetOnSpawn = false screenGui.Parent = playerGui -- Toggle button local toggleSquare = Instance.new("TextButton") toggleSquare.Size = UDim2.new(0,50,0,50) toggleSquare.Position = UDim2.new(0,20,0,20) toggleSquare.BackgroundColor3 = Color3.fromRGB(35,35,35) toggleSquare.Text = "99" toggleSquare.TextColor3 = Color3.new(1,1,1) toggleSquare.Font = Enum.Font.SourceSansBold toggleSquare.TextScaled = true toggleSquare.Parent = screenGui -- Main frame local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0,250,0,440) mainFrame.Position = UDim2.new(0,20,0,80) mainFrame.BackgroundColor3 = Color3.fromRGB(25,25,25) mainFrame.Visible = true mainFrame.Parent = screenGui local title = Instance.new("TextLabel") title.Size = UDim2.new(1,0,0,28) title.BackgroundTransparency = 1 title.Text = "99 Nights Panel" title.Font = Enum.Font.SourceSansBold title.TextSize = 20 title.TextColor3 = Color3.new(1,1,1) title.Parent = mainFrame -- Helper local function createButton(name, y) local btn = Instance.new("TextButton") btn.Size = UDim2.new(0,200,0,40) btn.Position = UDim2.new(0,25,0,y) btn.BackgroundColor3 = Color3.fromRGB(50,50,50) btn.TextColor3 = Color3.new(1,1,1) btn.Font = Enum.Font.SourceSansBold btn.TextSize = 17 btn.Text = name btn.Parent = mainFrame return btn end ---------------------------------------------------------- -- BUTTONS ---------------------------------------------------------- local godBtn = createButton("God Mode", 40) local nightVisionBtn = createButton("The Night Vision", 90) local infJumpBtn = createButton("Infinite Jump", 140) local heatSensorBtn = createButton("Heat Sensor", 190) ---------------------------------------------------------- -- Godmode ---------------------------------------------------------- godBtn.MouseButton1Click:Connect(function() godModeActive = not godModeActive godBtn.Text = godModeActive and "God Mode: ON" or "God Mode: OFF" if godModeActive then spawn(function() while godModeActive do pcall(function() DamageEvent:FireServer(-math.huge) end) task.wait(1) end end) end end) ---------------------------------------------------------- -- Night Vision ---------------------------------------------------------- local cc = Instance.new("ColorCorrectionEffect") cc.Brightness = 0.3 cc.Contrast = 0.1 cc.Saturation = 0 cc.TintColor = Color3.fromRGB(0,255,0) cc.Parent = Camera cc.Enabled = false nightVisionBtn.MouseButton1Click:Connect(function() nightVisionActive = not nightVisionActive cc.Enabled = nightVisionActive nightVisionBtn.Text = nightVisionActive and "The Night Vision: ON" or "The Night Vision: OFF" end) ---------------------------------------------------------- -- Infinite Jump ---------------------------------------------------------- infJumpBtn.MouseButton1Click:Connect(function() infJumpActive = not infJumpActive infJumpBtn.Text = infJumpActive and "Infinite Jump: ON" or "Infinite Jump: OFF" end) UserInputService.JumpRequest:Connect(function() if infJumpActive then local character = player.Character if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end end end end) ---------------------------------------------------------- -- Heat Sensor ---------------------------------------------------------- heatSensorBtn.MouseButton1Click:Connect(function() heatSensorActive = not heatSensorActive heatSensorBtn.Text = heatSensorActive and "Heat Sensor: ON" or "Heat Sensor: OFF" if heatSensorActive then for _, obj in pairs(workspace:GetDescendants()) do if obj:IsA("Model") and obj ~= player.Character then local root = obj:FindFirstChild("HumanoidRootPart") or obj:FindFirstChildWhichIsA("BasePart") if root then local highlight = Instance.new("Highlight") highlight.Adornee = obj highlight.FillColor = Color3.fromRGB(255,165,0) highlight.OutlineColor = Color3.fromRGB(255,140,0) highlight.FillTransparency = 0.6 highlight.Parent = obj table.insert(heatSensorParts, highlight) end end end else for _, h in ipairs(heatSensorParts) do if h then h:Destroy() end end heatSensorParts = {} end end) end --========================================================== -- KEY SYSTEM UI --========================================================== local gui = Instance.new("ScreenGui", playerGui) gui.Name = "KeySystemUI" gui.ResetOnSpawn = false local frame = Instance.new("Frame", gui) frame.Size = UDim2.new(0, 300, 0, 200) frame.Position = UDim2.new(0.5, -150, 0.5, -100) frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40) frame.BorderSizePixel = 0 local title = Instance.new("TextLabel", frame) title.Size = UDim2.new(1, 0, 0, 40) title.Text = "Enter Key" title.TextScaled = true title.BackgroundTransparency = 1 title.TextColor3 = Color3.new(1,1,1) local keyBox = Instance.new("TextBox", frame) keyBox.Size = UDim2.new(1, -20, 0, 40) keyBox.Position = UDim2.new(0, 10, 0, 50) keyBox.PlaceholderText = "Enter key..." keyBox.Text = "" keyBox.TextScaled = true keyBox.BackgroundColor3 = Color3.fromRGB(70, 70, 70) keyBox.TextColor3 = Color3.new(1,1,1) local checkBtn = Instance.new("TextButton", frame) checkBtn.Size = UDim2.new(0, 130, 0, 40) checkBtn.Position = UDim2.new(0, 10, 0, 110) checkBtn.Text = "Check Key" checkBtn.TextScaled = true checkBtn.BackgroundColor3 = Color3.fromRGB(0, 200, 0) local getBtn = Instance.new("TextButton", frame) getBtn.Size = UDim2.new(0, 130, 0, 40) getBtn.Position = UDim2.new(0, 160, 0, 110) getBtn.Text = "Get Key" getBtn.TextScaled = true getBtn.BackgroundColor3 = Color3.fromRGB(0, 120, 255) local status = Instance.new("TextLabel", frame) status.Size = UDim2.new(1, 0, 0, 30) status.Position = UDim2.new(0, 0, 1, -30) status.BackgroundTransparency = 1 status.TextColor3 = Color3.new(1, 0, 0) status.TextScaled = true status.Text = "" -- Copy Key getBtn.MouseButton1Click:Connect(function() if setclipboard then setclipboard(KEY_LINK) status.Text = "Copied!" status.TextColor3 = Color3.new(0,1,0) else status.Text = "Clipboard unsupported" status.TextColor3 = Color3.new(1,0,0) end end) -- Check Key checkBtn.MouseButton1Click:Connect(function() if keyBox.Text == KEY_REQUIRED then status.Text = "Correct key!" status.TextColor3 = Color3.new(0,1,0) task.wait(0.3) gui:Destroy() _G.StartMainMenu = true LoadMainMenu() else status.Text = "Wrong key!" status.TextColor3 = Color3.new(1,0,0) end end)