Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local UserInputService = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- local LocalPlayer = Players.LocalPlayer
- local Camera = workspace.CurrentCamera
- local StarterGui = game:GetService("StarterGui")
- -- Settings and state
- local Settings = {
- Aimlock = false,
- Fly = false,
- Noclip = false,
- ESP = false,
- FlySpeed = 50,
- }
- -- Colors
- local NeonPurple = Color3.fromRGB(170, 0, 255)
- local NeonRed = Color3.fromRGB(255, 0, 0)
- local BGColor = Color3.fromRGB(20, 0, 30)
- local TextColor = Color3.fromRGB(230, 230, 255)
- -- GUI references
- local ScreenGui, aimlockToggle, flyToggle, noclipToggle, espToggle, flySliderButton, flySliderLabel
- -- Fly variables
- local plr = LocalPlayer
- local flying = false
- local ctrl = {f = 0, b = 0, l = 0, r = 0, u = 0, d = 0}
- local maxspeed = Settings.FlySpeed
- local speed = 0
- local bg, bv
- -- ESP Containers
- local ESPContainers = {}
- -- Locked Target for Aimlock
- local lockedTarget = nil
- -- Notification Label
- local notifLabel = Instance.new("TextLabel")
- notifLabel.Size = UDim2.new(0, 300, 0, 40)
- notifLabel.Position = UDim2.new(0.5, -150, 0, 10)
- notifLabel.BackgroundColor3 = BGColor
- notifLabel.BorderColor3 = NeonRed
- notifLabel.BorderSizePixel = 3
- notifLabel.TextColor3 = NeonRed
- notifLabel.Font = Enum.Font.GothamBold
- notifLabel.TextSize = 24
- notifLabel.TextStrokeTransparency = 0.2
- notifLabel.Text = ""
- notifLabel.Visible = false
- -- Build GUI
- local function BuildGui()
- local oldGui = LocalPlayer.PlayerGui:FindFirstChild("GhostXploitGui")
- if oldGui then oldGui:Destroy() end
- ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Name = "GhostXploitGui"
- ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
- local MainFrame = Instance.new("Frame", ScreenGui)
- MainFrame.Size = UDim2.new(0, 400, 0, 600)
- MainFrame.Position = UDim2.new(0, 20, 0, 50)
- MainFrame.BackgroundColor3 = BGColor
- MainFrame.BorderColor3 = NeonPurple
- MainFrame.BorderSizePixel = 3
- MainFrame.Active = true
- MainFrame.Draggable = true
- local Title = Instance.new("TextLabel", MainFrame)
- Title.Size = UDim2.new(1, 0, 0, 35)
- Title.BackgroundTransparency = 1
- Title.Text = "GhostXploit-HOOD-GUI"
- Title.Font = Enum.Font.GothamBold
- Title.TextSize = 28
- Title.TextColor3 = NeonPurple
- Title.TextStrokeTransparency = 0.3
- local function CreateToggle(text, yPos, key)
- local Frame = Instance.new("Frame", MainFrame)
- Frame.Size = UDim2.new(1, -20, 0, 30)
- Frame.Position = UDim2.new(0, 10, 0, yPos)
- Frame.BackgroundColor3 = BGColor
- Frame.BackgroundTransparency = 0.5
- local Label = Instance.new("TextLabel", Frame)
- Label.Size = UDim2.new(0.7, 0, 1, 0)
- Label.Position = UDim2.new(0, 5, 0, 0)
- Label.BackgroundTransparency = 1
- Label.Text = text
- Label.TextColor3 = TextColor
- Label.Font = Enum.Font.Gotham
- Label.TextSize = 18
- Label.TextXAlignment = Enum.TextXAlignment.Left
- local Button = Instance.new("TextButton", Frame)
- Button.Size = UDim2.new(0.25, 0, 0.8, 0)
- Button.Position = UDim2.new(0.75, 0, 0.1, 0)
- Button.BackgroundColor3 = Settings[key] and NeonRed or NeonPurple
- Button.Text = Settings[key] and "ON" or "OFF"
- Button.TextColor3 = TextColor
- Button.Font = Enum.Font.GothamBold
- Button.TextSize = 16
- Button.MouseButton1Click:Connect(function()
- Settings[key] = not Settings[key]
- Button.BackgroundColor3 = Settings[key] and NeonRed or NeonPurple
- Button.Text = Settings[key] and "ON" or "OFF"
- StarterGui:SetCore("SendNotification", {Title=text .. (Settings[key] and " Activated" or " Deactivated"), Text="GHOST-GUI", Duration=2})
- if key == "Fly" then
- if Settings.Fly then FlyStart() else FlyStop() end
- elseif key == "Noclip" then
- if Settings.Noclip then NoclipOn() else NoclipOff() end
- end
- end)
- return Button
- end
- aimlockToggle = CreateToggle("Aimlock (Q)", 50, "Aimlock")
- flyToggle = CreateToggle("Fly (Z)", 90, "Fly")
- noclipToggle = CreateToggle("Noclip (N)", 130, "Noclip")
- espToggle = CreateToggle("ESP (T)", 170, "ESP")
- -- Fly Speed Slider
- local SliderFrame = Instance.new("Frame", MainFrame)
- SliderFrame.Size = UDim2.new(1, -20, 0, 40)
- SliderFrame.Position = UDim2.new(0, 10, 0, 210)
- SliderFrame.BackgroundColor3 = BGColor
- SliderFrame.BackgroundTransparency = 0.5
- flySliderLabel = Instance.new("TextLabel", SliderFrame)
- flySliderLabel.Size = UDim2.new(0.5, 0, 1, 0)
- flySliderLabel.Position = UDim2.new(0, 5, 0, 0)
- flySliderLabel.BackgroundTransparency = 1
- flySliderLabel.Text = "Fly Speed: "..Settings.FlySpeed
- flySliderLabel.TextColor3 = TextColor
- flySliderLabel.Font = Enum.Font.Gotham
- flySliderLabel.TextSize = 18
- flySliderLabel.TextXAlignment = Enum.TextXAlignment.Left
- local sliderBar = Instance.new("Frame", SliderFrame)
- sliderBar.Size = UDim2.new(0.45, 0, 0.4, 0)
- sliderBar.Position = UDim2.new(0.5, 0, 0.3, 0)
- sliderBar.BackgroundColor3 = NeonPurple
- flySliderButton = Instance.new("TextButton", sliderBar)
- flySliderButton.Size = UDim2.new((Settings.FlySpeed-10)/90, 0, 1, 0)
- flySliderButton.Position = UDim2.new(0, 0, 0, 0)
- flySliderButton.BackgroundColor3 = NeonRed
- flySliderButton.Text = ""
- flySliderButton.AutoButtonColor = false
- local draggingSlider = false
- flySliderButton.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then draggingSlider = true end
- end)
- flySliderButton.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then draggingSlider = false end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if draggingSlider and input.UserInputType == Enum.UserInputType.MouseMovement then
- local relativeX = math.clamp(input.Position.X - sliderBar.AbsolutePosition.X, 0, sliderBar.AbsoluteSize.X)
- local percent = relativeX / sliderBar.AbsoluteSize.X
- local newSpeed = math.floor(10 + percent * 90)
- Settings.FlySpeed = newSpeed
- flySliderLabel.Text = "Fly Speed: "..newSpeed
- flySliderButton.Size = UDim2.new(percent, 0, 1, 0)
- end
- end)
- -- Bottom Label
- local bottomLabel = Instance.new("TextLabel", MainFrame)
- bottomLabel.Size = UDim2.new(1, -20, 0, 25)
- bottomLabel.Position = UDim2.new(0, 10, 1, -30)
- bottomLabel.BackgroundTransparency = 1
- bottomLabel.Text = "More features coming soon!"
- bottomLabel.TextColor3 = NeonPurple
- bottomLabel.Font = Enum.Font.GothamBold
- bottomLabel.TextSize = 18
- bottomLabel.TextStrokeTransparency = 0.2
- end
- BuildGui()
- LocalPlayer.CharacterAdded:Connect(function() wait(1) BuildGui() end)
- -- Fly System
- local function FlyLoop()
- if not plr.Character then return end
- local torso = plr.Character:FindFirstChild("Torso") or plr.Character:FindFirstChild("HumanoidRootPart")
- if not torso then return end
- bg = Instance.new("BodyGyro", torso)
- bg.P = 9e4
- bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
- bg.cframe = torso.CFrame
- bv = Instance.new("BodyVelocity", torso)
- bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
- bv.velocity = Vector3.new(0,0,0)
- repeat
- RunService.Heartbeat:Wait()
- if not flying then break end
- plr.Character.Humanoid.PlatformStand = true
- local move = (Camera.CFrame.LookVector*(ctrl.f+ctrl.b)) + ((Camera.CFrame * CFrame.new(ctrl.l+ctrl.r, ctrl.u+ctrl.d,0).p) - Camera.CFrame.p)
- bv.velocity = move * Settings.FlySpeed
- bg.cframe = Camera.CFrame
- until not flying
- plr.Character.Humanoid.PlatformStand = false
- if bg then bg:Destroy() end
- if bv then bv:Destroy() end
- end
- function FlyStart() if flying then return end flying=true coroutine.wrap(FlyLoop)() end
- function FlyStop() flying=false end
- -- Controls
- UserInputService.InputBegan:Connect(function(input, gp)
- if gp then return end
- if Settings.Fly then
- if input.KeyCode==Enum.KeyCode.W then ctrl.f=1 elseif input.KeyCode==Enum.KeyCode.S then ctrl.b=-1
- elseif input.KeyCode==Enum.KeyCode.A then ctrl.l=-1 elseif input.KeyCode==Enum.KeyCode.D then ctrl.r=1
- elseif input.KeyCode==Enum.KeyCode.Space then ctrl.u=1 elseif input.KeyCode==Enum.KeyCode.LeftControl then ctrl.d=-1 end
- end
- end)
- UserInputService.InputEnded:Connect(function(input, gp)
- if gp then return end
- if Settings.Fly then
- if input.KeyCode==Enum.KeyCode.W then ctrl.f=0 elseif input.KeyCode==Enum.KeyCode.S then ctrl.b=0
- elseif input.KeyCode==Enum.KeyCode.A then ctrl.l=0 elseif input.KeyCode==Enum.KeyCode.D then ctrl.r=0
- elseif input.KeyCode==Enum.KeyCode.Space then ctrl.u=0 elseif input.KeyCode==Enum.KeyCode.LeftControl then ctrl.d=0 end
- end
- end)
- -- True Noclip
- local noclipConnection
- function NoclipOn()
- local char = LocalPlayer.Character
- if not char then return end
- if noclipConnection then noclipConnection:Disconnect() end
- noclipConnection = RunService.Stepped:Connect(function()
- if char then
- for _, part in pairs(char:GetChildren()) do
- if part:IsA("BasePart") then
- part.CanCollide = false
- part.Anchored = false
- end
- end
- end
- end)
- end
- function NoclipOff()
- if noclipConnection then
- noclipConnection:Disconnect()
- noclipConnection = nil
- end
- local char = LocalPlayer.Character
- if not char then return end
- for _, part in pairs(char:GetChildren()) do
- if part:IsA("BasePart") then
- part.CanCollide = true
- end
- end
- end
- -- ESP
- function CreateESP(plr)
- if ESPContainers[plr] then return end
- if plr == LocalPlayer then return end
- if not plr.Character or not plr.Character:FindFirstChild("HumanoidRootPart") then return end
- local hrp = plr.Character.HumanoidRootPart
- local billboard = Instance.new("BillboardGui", hrp)
- billboard.Name = "GhostXploitESP"
- billboard.Size = UDim2.new(4,0,1.5,0)
- billboard.StudsOffset = Vector3.new(0, 3, 0)
- billboard.AlwaysOnTop = true
- local frame = Instance.new("Frame", billboard)
- frame.Size = UDim2.new(1,0,1,0)
- frame.BackgroundTransparency = 0.6
- frame.BackgroundColor3 = BGColor
- frame.BorderColor3 = NeonPurple
- frame.BorderSizePixel = 2
- local nameLabel = Instance.new("TextLabel", frame)
- nameLabel.Size = UDim2.new(1,0,0.5,0)
- nameLabel.BackgroundTransparency = 1
- nameLabel.TextColor3 = TextColor
- nameLabel.TextStrokeColor3 = Color3.new(0,0,0)
- nameLabel.TextStrokeTransparency = 0.4
- nameLabel.Font = Enum.Font.GothamBold
- nameLabel.TextSize = 20
- nameLabel.Text = plr.Name
- local healthLabel = Instance.new("TextLabel", frame)
- healthLabel.Size = UDim2.new(1,0,0.5,0)
- healthLabel.Position = UDim2.new(0,0,0.5,0)
- healthLabel.BackgroundTransparency = 1
- healthLabel.TextColor3 = NeonRed
- healthLabel.TextStrokeColor3 = Color3.new(0,0,0)
- healthLabel.TextStrokeTransparency = 0.4
- healthLabel.Font = Enum.Font.GothamBold
- healthLabel.TextSize = 18
- healthLabel.Text = "Health: 100"
- ESPContainers[plr] = {
- Billboard = billboard,
- HealthLabel = healthLabel
- }
- end
- function RemoveESP(plr)
- if ESPContainers[plr] then
- ESPContainers[plr].Billboard:Destroy()
- ESPContainers[plr] = nil
- end
- end
- -- Update ESP
- RunService.Heartbeat:Connect(function()
- if Settings.ESP then
- for plr, esp in pairs(ESPContainers) do
- if plr.Character and plr.Character:FindFirstChild("Humanoid") then
- esp.HealthLabel.Text = "Health: "..math.floor(plr.Character.Humanoid.Health)
- else
- RemoveESP(plr)
- end
- end
- for _, plr in pairs(Players:GetPlayers()) do
- if plr ~= LocalPlayer and plr.Character and plr.Character:FindFirstChild("Humanoid") then
- CreateESP(plr)
- end
- end
- else
- for plr, _ in pairs(ESPContainers) do
- RemoveESP(plr)
- end
- end
- end)
- -- Aimlock
- function GetClosestTarget()
- local center = Vector2.new(Camera.ViewportSize.X/2, Camera.ViewportSize.Y/2)
- local closest
- local shortestDist = 200
- for _, plr in pairs(Players:GetPlayers()) do
- if plr ~= LocalPlayer and plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") and plr.Character:FindFirstChild("Humanoid") then
- local hum = plr.Character.Humanoid
- if hum.Health > 0 then
- local pos, onScreen = Camera:WorldToViewportPoint(plr.Character.HumanoidRootPart.Position)
- if onScreen then
- local dist = (Vector2.new(pos.X,pos.Y) - center).Magnitude
- if dist < shortestDist then
- shortestDist = dist
- closest = plr
- end
- end
- end
- end
- end
- return closest
- end
- function UpdateAimlockNotification()
- if lockedTarget and lockedTarget.Character and lockedTarget.Character:FindFirstChild("Humanoid") then
- local hum = lockedTarget.Character.Humanoid
- if hum.Health > 0 then
- notifLabel.Text = "Aimlocked: "..lockedTarget.Name.." ["..math.floor(hum.Health).."]"
- notifLabel.Visible = true
- else
- notifLabel.Visible = false
- lockedTarget = nil
- end
- else
- notifLabel.Visible = false
- lockedTarget = nil
- end
- end
- notifLabel.Parent = ScreenGui
- -- Aimlock Update (Whole Body Aim)
- RunService.Heartbeat:Connect(function()
- if Settings.Aimlock then
- if not lockedTarget or not lockedTarget.Character or lockedTarget.Character.Humanoid.Health <= 0 then
- lockedTarget = GetClosestTarget()
- end
- UpdateAimlockNotification()
- if lockedTarget and lockedTarget.Character and lockedTarget.Character:FindFirstChild("HumanoidRootPart") then
- local targetPart = lockedTarget.Character:FindFirstChild("HumanoidRootPart") or lockedTarget.Character:FindFirstChild("Torso") or lockedTarget.Character:FindFirstChild("Head")
- if targetPart then
- Camera.CFrame = CFrame.new(Camera.CFrame.Position, targetPart.Position)
- end
- end
- else
- notifLabel.Visible = false
- lockedTarget = nil
- end
- end)
- -- Keybinds
- UserInputService.InputBegan:Connect(function(input, gp)
- if gp then return end
- if input.UserInputType == Enum.UserInputType.Keyboard then
- if input.KeyCode == Enum.KeyCode.Q then
- Settings.Aimlock = not Settings.Aimlock
- aimlockToggle.BackgroundColor3 = Settings.Aimlock and NeonRed or NeonPurple
- aimlockToggle.Text = Settings.Aimlock and "ON" or "OFF"
- elseif input.KeyCode == Enum.KeyCode.Z then
- Settings.Fly = not Settings.Fly
- flyToggle.BackgroundColor3 = Settings.Fly and NeonRed or NeonPurple
- flyToggle.Text = Settings.Fly and "ON" or "OFF"
- if Settings.Fly then FlyStart() else FlyStop() end
- elseif input.KeyCode == Enum.KeyCode.N then
- Settings.Noclip = not Settings.Noclip
- noclipToggle.BackgroundColor3 = Settings.Noclip and NeonRed or NeonPurple
- noclipToggle.Text = Settings.Noclip and "ON" or "OFF"
- if Settings.Noclip then NoclipOn() else NoclipOff() end
- elseif input.KeyCode == Enum.KeyCode.T then
- Settings.ESP = not Settings.ESP
- espToggle.BackgroundColor3 = Settings.ESP and NeonRed or NeonPurple
- espToggle.Text = Settings.ESP and "ON" or "OFF"
- end
- end
- end)
Add Comment
Please, Sign In to add comment