ADVERTISEMENTREMOVE ADS
Dead script
12,406 views
Script Preview
Description
https://github.com/SEBB-THEBEGINNER/FREE-SC-SCRIPTS/blob/main/test
ADVERTISEMENTREMOVE ADS
81 Lines • 6.72 KiB
-- Services local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local Cam = workspace.CurrentCamera local Player = game:GetService("Players").LocalPlayer local StarterGui = game:GetService("StarterGui") local Lighting = game:GetService("Lighting")
-- Settings local fov = 136 local isAiming = false local isHitboxExpanded = false local isFullBright = false local npcLockEnabled = false local validNPCs = {} local hitboxVisuals = {}
local raycastParams = RaycastParams.new() raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
-- GUI Setup local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "CustomUI" ScreenGui.ResetOnSpawn = false ScreenGui.Parent = Player:FindFirstChild("PlayerGui") or game:GetService("CoreGui")
local Frame = Instance.new("Frame") Frame.Size = UDim2.new(0, 140, 0, 200) Frame.Position = UDim2.new(0, 10, 0, 10) Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) Frame.BackgroundTransparency = 0.3 Frame.BorderSizePixel = 0 Frame.Active = true Frame.Draggable = true Frame.Parent = ScreenGui
local function createButton(name, text, yPos) local button = Instance.new("TextButton") button.Name = name button.Size = UDim2.new(0, 120, 0, 30) button.Position = UDim2.new(0, 10, 0, yPos) button.Text = text button.BackgroundColor3 = Color3.fromRGB(30, 30, 30) button.TextColor3 = Color3.fromRGB(255, 50, 50) button.Font = Enum.Font.GothamBold button.TextSize = 14 button.Parent = Frame return button end
local ToggleButton = createButton("AimbotToggle", "AIMBOT: OFF", 10) local HitboxButton = createButton("HitboxToggle", "HITBOX: OFF", 50) local NpcLockButton = createButton("NPCLock", "NPC LOCK: OFF", 90) local FullBrightButton = createButton("FullBright", "FULL BRIGHT: OFF", 130)
local ToggleFrameButton = Instance.new("TextButton") ToggleFrameButton.Size = UDim2.new(0, 30, 0, 30) ToggleFrameButton.Position = UDim2.new(0, 150, 0, 10) ToggleFrameButton.Text = "X" ToggleFrameButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0) ToggleFrameButton.TextColor3 = Color3.fromRGB(255, 255, 255) ToggleFrameButton.Font = Enum.Font.GothamBold ToggleFrameButton.TextSize = 14 ToggleFrameButton.Parent = ScreenGui
-- Helper Functions local function isNPC(obj) return obj:IsA("Model") and obj:FindFirstChild("Humanoid") and obj.Humanoid.Health > 0 and obj:FindFirstChild("Head") and obj:FindFirstChild("HumanoidRootPart") and not game:GetService("Players"):GetPlayerFromCharacter(obj) end
local function updateNPCs() validNPCs = {} for _, obj in ipairs(workspace:GetDescendants()) do if isNPC(obj) then table.insert(validNPCs, obj) end end end
local function createHitboxVisualizer(npc) local head = npc:FindFirstChild("Head") if head and not hitboxVisuals[npc] then local part = Instance.new("Part") part.Size = Vector3.new(10, 10, 10) part.Color = Color3.fromRGB(150, 150, 150) part.Transparency = 0.5 part.Anchored = true part.CanCollide = false part.Parent = npc hitboxVisuals[npc] = part
local humanoid = npc:FindFirstChild("Humanoid")
if humanoid then
humanoid.Died:Connect(function()
if hitboxVisuals[npc] then
hitboxVisuals[npc]:Destroy()
hitboxVisuals[npc] = nil
end
end)
end
end
end
local function toggleHitbox() isHitboxExpanded = not isHitboxExpanded for _, npc in ipairs(validNPCs) do local head = npc:FindFirstChild("Head") if head then if isHitboxExpanded then head.Size = Vector3.new(10, 10, 10) createHitboxVisualizer(npc) else head.Size = Vector3.new(1, 1, 1) if hitboxVisuals[npc] then hitboxVisuals[npc]:Destroy() hitboxVisuals[npc] = nil end end end end HitboxButton.Text = isHitboxExpanded and "HITBOX: ON" or "HITBOX: OFF" HitboxButton.TextColor3 = isHitboxExpanded and Color3.fromRGB(50, 255, 50) or Color3.fromRGB(255, 50, 50) end
local function predictPos(target) local rootPart = target:FindFirstChild("HumanoidRootPart") local head = target:FindFirstChild("Head") if not rootPart or not head then return end
local velocity = rootPart.Velocity
local predictionTime = 0.02
return rootPart.Position + velocity * predictionTime + (head.Position - rootPart.Position)
end
local function getTarget() local nearest = nil local minDistance = math.huge local viewportCenter = Cam.ViewportSize / 2 raycastParams.FilterDescendantsInstances = {Player.Character}
for _, npc in ipairs(validNPCs) do
local predictedPos = predictPos(npc)
if predictedPos then
local screenPos, visible = Cam:WorldToViewportPoint(predictedPos)
if visible and screenPos.Z > 0 then
local distance = (Vector2.new(screenPos.X, screenPos.Y) - viewportCenter).Magnitude
if distance < minDistance and distance < fov then
minDistance = distance
nearest = npc
end
end
end
end
return nearest
end
local function aim(target) if not target then return end local currentCF = Cam.CFrame local targetDirection = (target - currentCF.Position).Unit Cam.CFrame = CFrame.new(currentCF.Position, currentCF.Position + targetDirection) end
-- Button Listeners ToggleButton.MouseButton1Click:Connect(function() isAiming = not isAiming ToggleButton.Text = isAiming and "AIMBOT: ON" or "AIMBOT: OFF" ToggleButton.TextColor3 = isAiming and Color3.fromRGB(50, 255, 50) or Color3.fromRGB(255, 50, 50) end)
HitboxButton.MouseButton1Click:Connect(toggleHitbox)
NpcLockButton.MouseButton1Click:Connect(function() npcLockEnabled = not npcLockEnabled NpcLockButton.Text = npcLockEnabled and "NPC LOCK: ON" or "NPC LOCK: OFF" NpcLockButton.TextColor3 = npcLockEnabled and Color3.fromRGB(50, 255, 50) or Color3.fromRGB(255, 50, 50) end)
FullBrightButton.MouseButton1Click:Connect(function() isFullBright = not isFullBright FullBrightButton.Text = isFullBright and "FULL BRIGHT: ON" or "FULL BRIGHT: OFF" FullBrightButton.TextColor3 = isFullBright and Color3.fromRGB(50, 255, 50) or Color3.fromRGB(255, 50, 50) if isFullBright then Lighting.Brightness = 2 Lighting.ClockTime = 12 Lighting.FogEnd = 100000 Lighting.GlobalShadows = false else Lighting:ClearAllChildren() end end)
ToggleFrameButton.MouseButton1Click:Connect(function() Frame.Visible = not Frame.Visible ToggleFrameButton.Text = Frame.Visible and "X" or "O" end)
-- Main Loop RunService.Heartbeat:Connect(function(dt) updateNPCs() if isAiming then local target = getTarget() if target then aim(predictPos(target)) end end local character = Player.Character if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid and humanoid.Health < 100 then humanoid.Health = 100 end end end)
-- Notification pcall(function() StarterGui:SetCore("SendNotification", { Title = "Script Loaded", Text = "Enhanced UI by Norbel.", Duration = 5, Button1 = "Yes", Button2 = "No" }) end)
ADVERTISEMENTREMOVE ADS
ADVERTISEMENTREMOVE ADS




Comments