local Players = game:GetService("Players")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local character = player.Character or player.CharacterAdded:Wait()
local root = character:WaitForChild("HumanoidRootPart")
-- FOLDERS
local nightmaresFolder = workspace.Game.Nightmares
local batteryFolder = workspace.Game.Battery.SpawnBattery
---------------------------------------------------
-- NIGHTMARE LIST
---------------------------------------------------
local nightmareTargets = {
"NightmareFoxy",
"Plushtrap",
"NightmareBonnie",
"NightmareFreddy",
"Freddles1",
"Freddles2",
"Freddles3",
"NightmareChica",
"NightmareFredBear",
}
---------------------------------------------------
-- COLORS
---------------------------------------------------
local nightmareColors = {
NightmareFoxy = Color3.fromRGB(255, 60, 60),
Plushtrap = Color3.fromRGB(0, 255, 0),
NightmareBonnie = Color3.fromRGB(140, 0, 255),
NightmareFreddy = Color3.fromRGB(120, 70, 15),
Freddles1 = Color3.fromRGB(80, 80, 80),
Freddles2 = Color3.fromRGB(80, 80, 80),
Freddles3 = Color3.fromRGB(80, 80, 80),
NightmareChica = Color3.fromRGB(255, 220, 0),
NightmareFredBear = Color3.fromRGB(200, 120, 255),
}
---------------------------------------------------
-- STATES
---------------------------------------------------
local nightmareEnabled = false
local batteryEnabled = false
local nightmareHighlights = {}
local batteryESP = {}
---------------------------------------------------
-- NIGHTMARE ESP
---------------------------------------------------
local function applyNightmare(model)
if not nightmareEnabled then return end
if not model or not model:IsA("Model") then return end
if not table.find(nightmareTargets, model.Name) then return end
if model:FindFirstChild("ESPHighlight") then return end
local h = Instance.new("Highlight")
h.Name = "ESPHighlight"
h.FillColor = nightmareColors[model.Name] or Color3.fromRGB(255,0,0)
h.OutlineColor = Color3.fromRGB(255,255,255)
h.FillTransparency = 0.45
h.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
h.Adornee = model
h.Parent = model
table.insert(nightmareHighlights, h)
end
-- AUTO SPAWN ESP
nightmaresFolder.ChildAdded:Connect(function(child)
task.wait(0.15)
applyNightmare(child)
end)
local function applyAllNightmares()
for _, obj in ipairs(nightmaresFolder:GetChildren()) do
applyNightmare(obj)
end
end
local function clearNightmares()
for _, v in pairs(nightmareHighlights) do
if v then v:Destroy() end
end
nightmareHighlights = {}
end
---------------------------------------------------
-- BATTERY ESP
---------------------------------------------------
local function applyBattery()
if not batteryEnabled then return end
for _, model in ipairs(batteryFolder:GetDescendants()) do
if model.Name == "BatteryModel" then
local touch = model:FindFirstChild("Touch")
if touch and touch:IsA("BasePart") then
local dist = (root.Position - touch.Position).Magnitude
if dist <= 200 and not touch:FindFirstChild("BatteryESP") then
local gui = Instance.new("BillboardGui")
gui.Name = "BatteryESP"
gui.Size = UDim2.new(0, 120, 0, 40)
gui.AlwaysOnTop = true
gui.StudsOffset = Vector3.new(0, 2, 0)
gui.Parent = touch
local txt = Instance.new("TextLabel")
txt.Size = UDim2.new(1,0,1,0)
txt.BackgroundTransparency = 1
txt.Text = "BATTERY"
txt.TextColor3 = Color3.fromRGB(0,255,0)
txt.TextStrokeTransparency = 0
txt.Font = Enum.Font.GothamBold
txt.TextSize = 18
txt.Parent = gui
table.insert(batteryESP, gui)
end
end
end
end
end
local function clearBattery()
for _, v in pairs(batteryESP) do
if v then v:Destroy() end
end
batteryESP = {}
end
---------------------------------------------------
-- GUI
---------------------------------------------------
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "Fnaf Doom 4 (ESP)"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 250, 0, 180)
frame.Position = UDim2.new(0.5, -125, 0.5, -90)
frame.BackgroundColor3 = Color3.fromRGB(25,25,25)
frame.BorderSizePixel = 0
frame.Active = true
frame.Draggable = true
frame.Parent = screenGui
Instance.new("UICorner", frame).CornerRadius = UDim.new(0,8)
-- TITLE (NOW FIXED)
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, 0, 0, 35)
title.BackgroundTransparency = 1
title.Text = "Fnaf Doom 4 (ESP)"
title.TextColor3 = Color3.fromRGB(255,255,255)
title.Font = Enum.Font.GothamBold
title.TextSize = 20
title.Parent = frame
---------------------------------------------------
-- NIGHTMARE BUTTON
---------------------------------------------------
local nightmareButton = Instance.new("TextButton")
nightmareButton.Size = UDim2.new(0,200,0,45)
nightmareButton.Position = UDim2.new(0.5,-100,0,50)
nightmareButton.Text = "Nightmare ESP OFF"
nightmareButton.BackgroundColor3 = Color3.fromRGB(170,0,0)
nightmareButton.TextColor3 = Color3.fromRGB(255,255,255)
nightmareButton.Font = Enum.Font.GothamBold
nightmareButton.TextSize = 17
nightmareButton.Parent = frame
Instance.new("UICorner", nightmareButton).CornerRadius = UDim.new(0,6)
---------------------------------------------------
-- BATTERY BUTTON
---------------------------------------------------
local batteryButton = Instance.new("TextButton")
batteryButton.Size = UDim2.new(0,200,0,45)
batteryButton.Position = UDim2.new(0.5,-100,0,110)
batteryButton.Text = "Battery ESP OFF"
batteryButton.BackgroundColor3 = Color3.fromRGB(170,0,0)
batteryButton.TextColor3 = Color3.fromRGB(255,255,255)
batteryButton.Font = Enum.Font.GothamBold
batteryButton.TextSize = 17
batteryButton.Parent = frame
Instance.new("UICorner", batteryButton).CornerRadius = UDim.new(0,6)
---------------------------------------------------
-- TOGGLES
---------------------------------------------------
nightmareButton.MouseButton1Click:Connect(function()
nightmareEnabled = not nightmareEnabled
if nightmareEnabled then
nightmareButton.Text = "Nightmare ESP ON"
nightmareButton.BackgroundColor3 = Color3.fromRGB(0,170,0)
applyAllNightmares()
else
nightmareButton.Text = "Nightmare ESP OFF"
nightmareButton.BackgroundColor3 = Color3.fromRGB(170,0,0)
clearNightmares()
end
end)
batteryButton.MouseButton1Click:Connect(function()
batteryEnabled = not batteryEnabled
if batteryEnabled then
batteryButton.Text = "Battery ESP ON"
batteryButton.BackgroundColor3 = Color3.fromRGB(0,170,0)
applyBattery()
else
batteryButton.Text = "Battery ESP OFF"
batteryButton.BackgroundColor3 = Color3.fromRGB(170,0,0)
clearBattery()
end
end)
Comments
No comments yet
Be the first to share your thoughts!