GHOSTOFTCF

dh

Aug 12th, 2025 (edited)
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.05 KB | None | 0 0
  1.  
  2. local Players = game:GetService("Players")
  3. local UserInputService = game:GetService("UserInputService")
  4. local RunService = game:GetService("RunService")
  5. local LocalPlayer = Players.LocalPlayer
  6. local Camera = workspace.CurrentCamera
  7. local StarterGui = game:GetService("StarterGui")
  8.  
  9. -- Settings and state
  10. local Settings = {
  11. Aimlock = false,
  12. Fly = false,
  13. Noclip = false,
  14. ESP = false,
  15. FlySpeed = 50,
  16. }
  17.  
  18. -- Colors
  19. local NeonPurple = Color3.fromRGB(170, 0, 255)
  20. local NeonRed = Color3.fromRGB(255, 0, 0)
  21. local BGColor = Color3.fromRGB(20, 0, 30)
  22. local TextColor = Color3.fromRGB(230, 230, 255)
  23.  
  24. -- GUI references
  25. local ScreenGui, aimlockToggle, flyToggle, noclipToggle, espToggle, flySliderButton, flySliderLabel
  26.  
  27. -- Fly variables
  28. local plr = LocalPlayer
  29. local flying = false
  30. local ctrl = {f = 0, b = 0, l = 0, r = 0, u = 0, d = 0}
  31. local maxspeed = Settings.FlySpeed
  32. local speed = 0
  33. local bg, bv
  34.  
  35. -- ESP Containers
  36. local ESPContainers = {}
  37.  
  38. -- Locked Target for Aimlock
  39. local lockedTarget = nil
  40.  
  41. -- Notification Label
  42. local notifLabel = Instance.new("TextLabel")
  43. notifLabel.Size = UDim2.new(0, 300, 0, 40)
  44. notifLabel.Position = UDim2.new(0.5, -150, 0, 10)
  45. notifLabel.BackgroundColor3 = BGColor
  46. notifLabel.BorderColor3 = NeonRed
  47. notifLabel.BorderSizePixel = 3
  48. notifLabel.TextColor3 = NeonRed
  49. notifLabel.Font = Enum.Font.GothamBold
  50. notifLabel.TextSize = 24
  51. notifLabel.TextStrokeTransparency = 0.2
  52. notifLabel.Text = ""
  53. notifLabel.Visible = false
  54.  
  55. -- Build GUI
  56. local function BuildGui()
  57. local oldGui = LocalPlayer.PlayerGui:FindFirstChild("GhostXploitGui")
  58. if oldGui then oldGui:Destroy() end
  59.  
  60. ScreenGui = Instance.new("ScreenGui")
  61. ScreenGui.Name = "GhostXploitGui"
  62. ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
  63.  
  64. local MainFrame = Instance.new("Frame", ScreenGui)
  65. MainFrame.Size = UDim2.new(0, 400, 0, 600)
  66. MainFrame.Position = UDim2.new(0, 20, 0, 50)
  67. MainFrame.BackgroundColor3 = BGColor
  68. MainFrame.BorderColor3 = NeonPurple
  69. MainFrame.BorderSizePixel = 3
  70. MainFrame.Active = true
  71. MainFrame.Draggable = true
  72.  
  73. local Title = Instance.new("TextLabel", MainFrame)
  74. Title.Size = UDim2.new(1, 0, 0, 35)
  75. Title.BackgroundTransparency = 1
  76. Title.Text = "GhostXploit-HOOD-GUI"
  77. Title.Font = Enum.Font.GothamBold
  78. Title.TextSize = 28
  79. Title.TextColor3 = NeonPurple
  80. Title.TextStrokeTransparency = 0.3
  81.  
  82. local function CreateToggle(text, yPos, key)
  83. local Frame = Instance.new("Frame", MainFrame)
  84. Frame.Size = UDim2.new(1, -20, 0, 30)
  85. Frame.Position = UDim2.new(0, 10, 0, yPos)
  86. Frame.BackgroundColor3 = BGColor
  87. Frame.BackgroundTransparency = 0.5
  88.  
  89. local Label = Instance.new("TextLabel", Frame)
  90. Label.Size = UDim2.new(0.7, 0, 1, 0)
  91. Label.Position = UDim2.new(0, 5, 0, 0)
  92. Label.BackgroundTransparency = 1
  93. Label.Text = text
  94. Label.TextColor3 = TextColor
  95. Label.Font = Enum.Font.Gotham
  96. Label.TextSize = 18
  97. Label.TextXAlignment = Enum.TextXAlignment.Left
  98.  
  99. local Button = Instance.new("TextButton", Frame)
  100. Button.Size = UDim2.new(0.25, 0, 0.8, 0)
  101. Button.Position = UDim2.new(0.75, 0, 0.1, 0)
  102. Button.BackgroundColor3 = Settings[key] and NeonRed or NeonPurple
  103. Button.Text = Settings[key] and "ON" or "OFF"
  104. Button.TextColor3 = TextColor
  105. Button.Font = Enum.Font.GothamBold
  106. Button.TextSize = 16
  107.  
  108. Button.MouseButton1Click:Connect(function()
  109. Settings[key] = not Settings[key]
  110. Button.BackgroundColor3 = Settings[key] and NeonRed or NeonPurple
  111. Button.Text = Settings[key] and "ON" or "OFF"
  112. StarterGui:SetCore("SendNotification", {Title=text .. (Settings[key] and " Activated" or " Deactivated"), Text="GHOST-GUI", Duration=2})
  113. if key == "Fly" then
  114. if Settings.Fly then FlyStart() else FlyStop() end
  115. elseif key == "Noclip" then
  116. if Settings.Noclip then NoclipOn() else NoclipOff() end
  117. end
  118. end)
  119. return Button
  120. end
  121.  
  122. aimlockToggle = CreateToggle("Aimlock (Q)", 50, "Aimlock")
  123. flyToggle = CreateToggle("Fly (Z)", 90, "Fly")
  124. noclipToggle = CreateToggle("Noclip (N)", 130, "Noclip")
  125. espToggle = CreateToggle("ESP (T)", 170, "ESP")
  126.  
  127. -- Fly Speed Slider
  128. local SliderFrame = Instance.new("Frame", MainFrame)
  129. SliderFrame.Size = UDim2.new(1, -20, 0, 40)
  130. SliderFrame.Position = UDim2.new(0, 10, 0, 210)
  131. SliderFrame.BackgroundColor3 = BGColor
  132. SliderFrame.BackgroundTransparency = 0.5
  133.  
  134. flySliderLabel = Instance.new("TextLabel", SliderFrame)
  135. flySliderLabel.Size = UDim2.new(0.5, 0, 1, 0)
  136. flySliderLabel.Position = UDim2.new(0, 5, 0, 0)
  137. flySliderLabel.BackgroundTransparency = 1
  138. flySliderLabel.Text = "Fly Speed: "..Settings.FlySpeed
  139. flySliderLabel.TextColor3 = TextColor
  140. flySliderLabel.Font = Enum.Font.Gotham
  141. flySliderLabel.TextSize = 18
  142. flySliderLabel.TextXAlignment = Enum.TextXAlignment.Left
  143.  
  144. local sliderBar = Instance.new("Frame", SliderFrame)
  145. sliderBar.Size = UDim2.new(0.45, 0, 0.4, 0)
  146. sliderBar.Position = UDim2.new(0.5, 0, 0.3, 0)
  147. sliderBar.BackgroundColor3 = NeonPurple
  148.  
  149. flySliderButton = Instance.new("TextButton", sliderBar)
  150. flySliderButton.Size = UDim2.new((Settings.FlySpeed-10)/90, 0, 1, 0)
  151. flySliderButton.Position = UDim2.new(0, 0, 0, 0)
  152. flySliderButton.BackgroundColor3 = NeonRed
  153. flySliderButton.Text = ""
  154. flySliderButton.AutoButtonColor = false
  155.  
  156. local draggingSlider = false
  157. flySliderButton.InputBegan:Connect(function(input)
  158. if input.UserInputType == Enum.UserInputType.MouseButton1 then draggingSlider = true end
  159. end)
  160. flySliderButton.InputEnded:Connect(function(input)
  161. if input.UserInputType == Enum.UserInputType.MouseButton1 then draggingSlider = false end
  162. end)
  163. UserInputService.InputChanged:Connect(function(input)
  164. if draggingSlider and input.UserInputType == Enum.UserInputType.MouseMovement then
  165. local relativeX = math.clamp(input.Position.X - sliderBar.AbsolutePosition.X, 0, sliderBar.AbsoluteSize.X)
  166. local percent = relativeX / sliderBar.AbsoluteSize.X
  167. local newSpeed = math.floor(10 + percent * 90)
  168. Settings.FlySpeed = newSpeed
  169. flySliderLabel.Text = "Fly Speed: "..newSpeed
  170. flySliderButton.Size = UDim2.new(percent, 0, 1, 0)
  171. end
  172. end)
  173.  
  174. -- Bottom Label
  175. local bottomLabel = Instance.new("TextLabel", MainFrame)
  176. bottomLabel.Size = UDim2.new(1, -20, 0, 25)
  177. bottomLabel.Position = UDim2.new(0, 10, 1, -30)
  178. bottomLabel.BackgroundTransparency = 1
  179. bottomLabel.Text = "More features coming soon!"
  180. bottomLabel.TextColor3 = NeonPurple
  181. bottomLabel.Font = Enum.Font.GothamBold
  182. bottomLabel.TextSize = 18
  183. bottomLabel.TextStrokeTransparency = 0.2
  184. end
  185.  
  186. BuildGui()
  187. LocalPlayer.CharacterAdded:Connect(function() wait(1) BuildGui() end)
  188.  
  189. -- Fly System
  190. local function FlyLoop()
  191. if not plr.Character then return end
  192. local torso = plr.Character:FindFirstChild("Torso") or plr.Character:FindFirstChild("HumanoidRootPart")
  193. if not torso then return end
  194.  
  195. bg = Instance.new("BodyGyro", torso)
  196. bg.P = 9e4
  197. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  198. bg.cframe = torso.CFrame
  199. bv = Instance.new("BodyVelocity", torso)
  200. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  201. bv.velocity = Vector3.new(0,0,0)
  202.  
  203. repeat
  204. RunService.Heartbeat:Wait()
  205. if not flying then break end
  206. plr.Character.Humanoid.PlatformStand = true
  207. 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)
  208. bv.velocity = move * Settings.FlySpeed
  209. bg.cframe = Camera.CFrame
  210. until not flying
  211. plr.Character.Humanoid.PlatformStand = false
  212. if bg then bg:Destroy() end
  213. if bv then bv:Destroy() end
  214. end
  215.  
  216. function FlyStart() if flying then return end flying=true coroutine.wrap(FlyLoop)() end
  217. function FlyStop() flying=false end
  218.  
  219. -- Controls
  220. UserInputService.InputBegan:Connect(function(input, gp)
  221. if gp then return end
  222. if Settings.Fly then
  223. if input.KeyCode==Enum.KeyCode.W then ctrl.f=1 elseif input.KeyCode==Enum.KeyCode.S then ctrl.b=-1
  224. elseif input.KeyCode==Enum.KeyCode.A then ctrl.l=-1 elseif input.KeyCode==Enum.KeyCode.D then ctrl.r=1
  225. elseif input.KeyCode==Enum.KeyCode.Space then ctrl.u=1 elseif input.KeyCode==Enum.KeyCode.LeftControl then ctrl.d=-1 end
  226. end
  227. end)
  228. UserInputService.InputEnded:Connect(function(input, gp)
  229. if gp then return end
  230. if Settings.Fly then
  231. if input.KeyCode==Enum.KeyCode.W then ctrl.f=0 elseif input.KeyCode==Enum.KeyCode.S then ctrl.b=0
  232. elseif input.KeyCode==Enum.KeyCode.A then ctrl.l=0 elseif input.KeyCode==Enum.KeyCode.D then ctrl.r=0
  233. elseif input.KeyCode==Enum.KeyCode.Space then ctrl.u=0 elseif input.KeyCode==Enum.KeyCode.LeftControl then ctrl.d=0 end
  234. end
  235. end)
  236.  
  237. -- True Noclip
  238. local noclipConnection
  239. function NoclipOn()
  240. local char = LocalPlayer.Character
  241. if not char then return end
  242. if noclipConnection then noclipConnection:Disconnect() end
  243. noclipConnection = RunService.Stepped:Connect(function()
  244. if char then
  245. for _, part in pairs(char:GetChildren()) do
  246. if part:IsA("BasePart") then
  247. part.CanCollide = false
  248. part.Anchored = false
  249. end
  250. end
  251. end
  252. end)
  253. end
  254. function NoclipOff()
  255. if noclipConnection then
  256. noclipConnection:Disconnect()
  257. noclipConnection = nil
  258. end
  259. local char = LocalPlayer.Character
  260. if not char then return end
  261. for _, part in pairs(char:GetChildren()) do
  262. if part:IsA("BasePart") then
  263. part.CanCollide = true
  264. end
  265. end
  266. end
  267.  
  268. -- ESP
  269. function CreateESP(plr)
  270. if ESPContainers[plr] then return end
  271. if plr == LocalPlayer then return end
  272. if not plr.Character or not plr.Character:FindFirstChild("HumanoidRootPart") then return end
  273.  
  274. local hrp = plr.Character.HumanoidRootPart
  275.  
  276. local billboard = Instance.new("BillboardGui", hrp)
  277. billboard.Name = "GhostXploitESP"
  278. billboard.Size = UDim2.new(4,0,1.5,0)
  279. billboard.StudsOffset = Vector3.new(0, 3, 0)
  280. billboard.AlwaysOnTop = true
  281.  
  282. local frame = Instance.new("Frame", billboard)
  283. frame.Size = UDim2.new(1,0,1,0)
  284. frame.BackgroundTransparency = 0.6
  285. frame.BackgroundColor3 = BGColor
  286. frame.BorderColor3 = NeonPurple
  287. frame.BorderSizePixel = 2
  288.  
  289. local nameLabel = Instance.new("TextLabel", frame)
  290. nameLabel.Size = UDim2.new(1,0,0.5,0)
  291. nameLabel.BackgroundTransparency = 1
  292. nameLabel.TextColor3 = TextColor
  293. nameLabel.TextStrokeColor3 = Color3.new(0,0,0)
  294. nameLabel.TextStrokeTransparency = 0.4
  295. nameLabel.Font = Enum.Font.GothamBold
  296. nameLabel.TextSize = 20
  297. nameLabel.Text = plr.Name
  298.  
  299. local healthLabel = Instance.new("TextLabel", frame)
  300. healthLabel.Size = UDim2.new(1,0,0.5,0)
  301. healthLabel.Position = UDim2.new(0,0,0.5,0)
  302. healthLabel.BackgroundTransparency = 1
  303. healthLabel.TextColor3 = NeonRed
  304. healthLabel.TextStrokeColor3 = Color3.new(0,0,0)
  305. healthLabel.TextStrokeTransparency = 0.4
  306. healthLabel.Font = Enum.Font.GothamBold
  307. healthLabel.TextSize = 18
  308. healthLabel.Text = "Health: 100"
  309.  
  310. ESPContainers[plr] = {
  311. Billboard = billboard,
  312. HealthLabel = healthLabel
  313. }
  314. end
  315. function RemoveESP(plr)
  316. if ESPContainers[plr] then
  317. ESPContainers[plr].Billboard:Destroy()
  318. ESPContainers[plr] = nil
  319. end
  320. end
  321.  
  322. -- Update ESP
  323. RunService.Heartbeat:Connect(function()
  324. if Settings.ESP then
  325. for plr, esp in pairs(ESPContainers) do
  326. if plr.Character and plr.Character:FindFirstChild("Humanoid") then
  327. esp.HealthLabel.Text = "Health: "..math.floor(plr.Character.Humanoid.Health)
  328. else
  329. RemoveESP(plr)
  330. end
  331. end
  332. for _, plr in pairs(Players:GetPlayers()) do
  333. if plr ~= LocalPlayer and plr.Character and plr.Character:FindFirstChild("Humanoid") then
  334. CreateESP(plr)
  335. end
  336. end
  337. else
  338. for plr, _ in pairs(ESPContainers) do
  339. RemoveESP(plr)
  340. end
  341. end
  342. end)
  343.  
  344. -- Aimlock
  345. function GetClosestTarget()
  346. local center = Vector2.new(Camera.ViewportSize.X/2, Camera.ViewportSize.Y/2)
  347. local closest
  348. local shortestDist = 200
  349. for _, plr in pairs(Players:GetPlayers()) do
  350. if plr ~= LocalPlayer and plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") and plr.Character:FindFirstChild("Humanoid") then
  351. local hum = plr.Character.Humanoid
  352. if hum.Health > 0 then
  353. local pos, onScreen = Camera:WorldToViewportPoint(plr.Character.HumanoidRootPart.Position)
  354. if onScreen then
  355. local dist = (Vector2.new(pos.X,pos.Y) - center).Magnitude
  356. if dist < shortestDist then
  357. shortestDist = dist
  358. closest = plr
  359. end
  360. end
  361. end
  362. end
  363. end
  364. return closest
  365. end
  366.  
  367. function UpdateAimlockNotification()
  368. if lockedTarget and lockedTarget.Character and lockedTarget.Character:FindFirstChild("Humanoid") then
  369. local hum = lockedTarget.Character.Humanoid
  370. if hum.Health > 0 then
  371. notifLabel.Text = "Aimlocked: "..lockedTarget.Name.." ["..math.floor(hum.Health).."]"
  372. notifLabel.Visible = true
  373. else
  374. notifLabel.Visible = false
  375. lockedTarget = nil
  376. end
  377. else
  378. notifLabel.Visible = false
  379. lockedTarget = nil
  380. end
  381. end
  382.  
  383. notifLabel.Parent = ScreenGui
  384.  
  385. -- Aimlock Update (Whole Body Aim)
  386. RunService.Heartbeat:Connect(function()
  387. if Settings.Aimlock then
  388. if not lockedTarget or not lockedTarget.Character or lockedTarget.Character.Humanoid.Health <= 0 then
  389. lockedTarget = GetClosestTarget()
  390. end
  391. UpdateAimlockNotification()
  392. if lockedTarget and lockedTarget.Character and lockedTarget.Character:FindFirstChild("HumanoidRootPart") then
  393. local targetPart = lockedTarget.Character:FindFirstChild("HumanoidRootPart") or lockedTarget.Character:FindFirstChild("Torso") or lockedTarget.Character:FindFirstChild("Head")
  394. if targetPart then
  395. Camera.CFrame = CFrame.new(Camera.CFrame.Position, targetPart.Position)
  396. end
  397. end
  398. else
  399. notifLabel.Visible = false
  400. lockedTarget = nil
  401. end
  402. end)
  403.  
  404. -- Keybinds
  405. UserInputService.InputBegan:Connect(function(input, gp)
  406. if gp then return end
  407. if input.UserInputType == Enum.UserInputType.Keyboard then
  408. if input.KeyCode == Enum.KeyCode.Q then
  409. Settings.Aimlock = not Settings.Aimlock
  410. aimlockToggle.BackgroundColor3 = Settings.Aimlock and NeonRed or NeonPurple
  411. aimlockToggle.Text = Settings.Aimlock and "ON" or "OFF"
  412. elseif input.KeyCode == Enum.KeyCode.Z then
  413. Settings.Fly = not Settings.Fly
  414. flyToggle.BackgroundColor3 = Settings.Fly and NeonRed or NeonPurple
  415. flyToggle.Text = Settings.Fly and "ON" or "OFF"
  416. if Settings.Fly then FlyStart() else FlyStop() end
  417. elseif input.KeyCode == Enum.KeyCode.N then
  418. Settings.Noclip = not Settings.Noclip
  419. noclipToggle.BackgroundColor3 = Settings.Noclip and NeonRed or NeonPurple
  420. noclipToggle.Text = Settings.Noclip and "ON" or "OFF"
  421. if Settings.Noclip then NoclipOn() else NoclipOff() end
  422. elseif input.KeyCode == Enum.KeyCode.T then
  423. Settings.ESP = not Settings.ESP
  424. espToggle.BackgroundColor3 = Settings.ESP and NeonRed or NeonPurple
  425. espToggle.Text = Settings.ESP and "ON" or "OFF"
  426. end
  427. end
  428. end)
  429.  
Add Comment
Please, Sign In to add comment