Advertisement
ZV0K

Domain Streamable

Sep 11th, 2023
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.02 KB | None | 0 0
  1. getgenv().Domain = {
  2. ["Intro"] = true,
  3. ["Silent Aim"] = {
  4. ["Enabled"] = true,
  5. ["Keybind Enabled"] = false,
  6. ["Keybind"] = "M",
  7. ["Target Part"] = "UpperTorso",
  8. ["Target Part Offset"] = 0,
  9. ["Nearest Part To Cursor"] = true,
  10. },
  11. ["Cam Lock"] = {
  12. ["Enabled"] = true,
  13. ["Key"] = "Q",
  14. ["Notify"] = true,
  15. ["Target Part"] = "Head",
  16. ["Target Part Offset"] = 0,
  17. ["Nearest Part To Cursor"] = true,
  18. ["Smoothness"] = {
  19. ["Enabled"] = true,
  20. ["Value"] = 1,
  21. },
  22. ["Flags"] = {
  23. ["Unlock On KO"] = false,
  24. ["Unlock Outside FOV"] = false,
  25. ["Unlock Behind Wall"] = false,
  26. }
  27. },
  28. ["Global"] = {
  29. ["Prediction"] = 0.129,
  30. ["Auto Prediction"] = true,
  31. ["Anti Ground Shots"] = true,
  32. },
  33. ["Checks"] = {
  34. ["Visible Check"] = true,
  35. ["K.O Check"] = false,
  36. ["Crew Check"] = true,
  37. },
  38. ["Resolver"] = {
  39. ["Enabled"] = true,
  40. ["Method"] = "MoveDirection", -- // MoveDirection, No Prediction, Underground
  41. },
  42. ["FOV"] = {
  43. ["Visible"] = true,
  44. ["Filled"] = false,
  45. ["Size"] = 850,
  46. ["Thickness"] = 1,
  47. ["Transparency"] = 1,
  48. ["Color"] = Color3.fromRGB(255,255,255)
  49. },
  50. ["Airshot"] = {
  51. ["Enabled"] = true,
  52. ["Target Part"] = "LowerTorso",
  53. },
  54. ["Macro"] = {
  55. ["Enabled"] = true,
  56. ["Bind"] = "X",
  57. ["Abuse"] = true,
  58. ["Speed"] = 1,
  59. },
  60. }
  61.  
  62. function notify(text)
  63. game:GetService("StarterGui"):SetCore("SendNotification",{
  64. Title = "Domain",
  65. Text = text,
  66. Duration = 5,
  67. })
  68. end
  69.  
  70. if Domain.Intro then
  71. local cam = workspace.CurrentCamera
  72. local x = cam.ViewportSize.X
  73. local y = cam.ViewportSize.Y
  74. local newx = math.floor(x * 0.5)
  75. local newy = math.floor(y * 0.5)
  76.  
  77. local SpashScreen = Instance.new("ScreenGui")
  78. local Image = Instance.new("ImageLabel")
  79. SpashScreen.Name = "SpashScreen"
  80. SpashScreen.Parent = game.CoreGui
  81. SpashScreen.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  82. Image.Name = "Image"
  83. Image.Parent = SpashScreen
  84. Image.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  85. Image.BackgroundTransparency = 1
  86. Image.Position = UDim2.new(0, newx, 0, newy)
  87. Image.Size = UDim2.new(0, 625, 0, 177)
  88. Image.Image = "rbxassetid://14330453635"
  89. Image.ImageTransparency = 1
  90. Image.AnchorPoint = Vector2.new(0.5,0.5)
  91.  
  92. local Blur = Instance.new("BlurEffect")
  93. Blur.Parent = game.Lighting
  94. Blur.Size = 0
  95. Blur.Name = math.random(1,123123)
  96.  
  97. local function gui(last, sex, t, s, inorout)
  98. local TI = TweenInfo.new(t or 1, s or Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
  99. local Tweening = game:GetService("TweenService"):Create(last, TI, sex)
  100. Tweening:Play()
  101. end
  102.  
  103. gui(Image, {ImageTransparency = 0},0.3)
  104. gui(Blur, {Size = 20},0.3)
  105. wait(3)
  106. gui(Image, {ImageTransparency = 1},0.3)
  107. gui(Blur, {Size = 0},0.3)
  108. wait(0.3)
  109. end
  110.  
  111.  
  112.  
  113. if not LPH_OBFUSCATED and not LPH_JIT_ULTRA then
  114. LPH_NO_VIRTUALIZE = function(f) return f end
  115. end
  116.  
  117.  
  118. local Players = game:GetService("Players")
  119. local RunService = game:GetService("RunService")
  120. local Workspace = game:GetService("Workspace")
  121. local Gui = game:GetService("GuiService")
  122.  
  123. local SilentTarget = nil
  124. local CamlockTarget = nil
  125. local PredictionValue = 0.133
  126. local LocalPlayer = Players.LocalPlayer
  127. local Mouse = LocalPlayer:GetMouse()
  128. local CurrentCamera = Workspace.CurrentCamera
  129. local v3 = Vector3
  130. local CF = CFrame
  131. local v2 = Vector2
  132.  
  133. local Circle = Drawing.new("Circle")
  134. Circle.Transparency = Domain.FOV.Transparency
  135. Circle.Radius = Domain.FOV.Size
  136. Circle.Visible = Domain.FOV.Visible
  137. Circle.Color = Domain.FOV.Color
  138. Circle.Thickness = Domain.FOV.Thickness
  139. Circle.Filled = Domain.FOV.Filled
  140.  
  141.  
  142. local Vis1 = Drawing.new("Circle")
  143. Vis1.Filled = true
  144. Vis1.Thickness = 1
  145. Vis1.Transparency = 1
  146. Vis1.Radius = 5
  147. Vis1.Color = Color3.new(1,1,1)
  148.  
  149. local Vis2 = Drawing.new("Line")
  150. Vis2.Visible = false
  151. Vis2.From = Vector2.new(0, 0)
  152. Vis2.To = Vector2.new(200, 200)
  153. Vis2.Color = Color3.new(1,1,1)
  154. Vis2.Thickness = 1
  155. Vis2.Transparency = 1
  156.  
  157. OnScreen = function(Object)
  158. local _, screen = CurrentCamera:WorldToScreenPoint(Object.Position)
  159. return screen
  160. end
  161.  
  162.  
  163. RayCastCheck = function(Part, PartDescendant)
  164. local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded.Wait(LocalPlayer.CharacterAdded)
  165. local Origin = CurrentCamera.CFrame.Position
  166.  
  167. local RayCastParams = RaycastParams.new()
  168. RayCastParams.FilterType = Enum.RaycastFilterType.Blacklist
  169. RayCastParams.FilterDescendantsInstances = {Character, CurrentCamera}
  170.  
  171. local Result = Workspace.Raycast(Workspace, Origin, Part.Position - Origin, RayCastParams)
  172.  
  173. if (Result) then
  174. local PartHit = Result.Instance
  175. local Visible = (not PartHit or Instance.new("Part").IsDescendantOf(PartHit, PartDescendant))
  176.  
  177. return Visible
  178. end
  179. return false
  180. end
  181.  
  182. Alive = function(Plr)
  183. if Plr and Plr.Character and Plr.Character:FindFirstChild("HumanoidRootPart") ~= nil and Plr.Character:FindFirstChild("Humanoid") ~= nil and Plr.Character:FindFirstChild("Head") ~= nil then
  184. return true
  185. end
  186. return false
  187. end
  188.  
  189.  
  190. GetMagnitudeFromMouse = function(Part)
  191. local PartPos, OnScreen = CurrentCamera:WorldToScreenPoint(Part.Position)
  192. if OnScreen then
  193. local Magnitude = (Vector2.new(PartPos.X, PartPos.Y) - Vector2.new(Mouse.X, Mouse.Y)).Magnitude
  194. return Magnitude
  195. end
  196. return math.huge
  197. end
  198.  
  199. GetPrediction = function()
  200. if Domain["Global"]["Auto Prediction"] then
  201.  
  202. local PingStats = game:GetService("Stats").Network.ServerStatsItem["Data Ping"]:GetValueString()
  203. local Value = tostring(PingStats)
  204. local PingValue = Value:split(" ")
  205. local PingNumber = tonumber(PingValue[1])
  206.  
  207. if PingNumber < 130 then
  208. return tonumber(PingNumber / 1000 + 0.037)
  209. else
  210. return tonumber(PingNumber / 1000 + 0.033)
  211. end
  212. else
  213. return tonumber(Domain["Global"].Prediction)
  214. end
  215. end
  216.  
  217. FindCrew = function(Player)
  218. if Player:FindFirstChild("DataFolder") and Player.DataFolder:FindFirstChild("Information") and Player.DataFolder.Information:FindFirstChild("Crew") and LocalPlayer:FindFirstChild("DataFolder") and LocalPlayer.DataFolder:FindFirstChild("Information") and LocalPlayer.DataFolder.Information:FindFirstChild("Crew") then
  219. if LocalPlayer.DataFolder.Information:FindFirstChild("Crew").Value ~= nil and Player.DataFolder.Information:FindFirstChild("Crew").Value ~= nil and Player.DataFolder.Information:FindFirstChild("Crew").Value ~= "" and LocalPlayer.DataFolder.Information:FindFirstChild("Crew").Value ~= "" then
  220. return true
  221. end
  222. end
  223. return false
  224. end
  225.  
  226. GetGunName = function(Name)
  227. local split = string.split(string.split(Name, "[")[2], "]")[1]
  228. return split
  229. end
  230.  
  231. GetCurrentWeaponName = function()
  232. if LocalPlayer.Character and LocalPlayer.Character:FindFirstChildWhichIsA("Tool") then
  233. local Tool = LocalPlayer.Character:FindFirstChildWhichIsA("Tool")
  234. if string.find(Tool.Name, "%[") and string.find(Tool.Name, "%]") and not string.find(Tool.Name, "Wallet") and not string.find(Tool.Name, "Phone") then
  235. return GetGunName(Tool.Name)
  236. end
  237. end
  238. return nil
  239. end
  240.  
  241. WTS = function(Object)
  242. local ObjectVector = CurrentCamera:WorldToScreenPoint(Object.Position)
  243. return Vector2.new(ObjectVector.X, ObjectVector.Y)
  244. end
  245.  
  246. Filter = function(obj)
  247. if (obj:IsA('BasePart')) then
  248. return true
  249. end
  250. end
  251.  
  252. mousePosVector2 = function()
  253. return Vector2.new(mouse.X, mouse.Y)
  254. end
  255.  
  256. IsOnScreen2 = function(Object)
  257. local IsOnScreen = CurrentCamera:WorldToScreenPoint(Object.Position)
  258. return IsOnScreen
  259. end
  260.  
  261. FilterObjs = function(Object)
  262. if string.find(Object.Name, "Gun") then
  263. return
  264. end
  265. if table.find({"Part", "MeshPart", "BasePart"}, Object.ClassName) then
  266. return true
  267. end
  268. end
  269.  
  270. local closestsilentbodypart = "Head"
  271. local closestcamlockpart = "Head"
  272.  
  273. GetClosestBodyPart = function()
  274. local character = SilentTarget.Character
  275. local ClosestDistance = 1 / 0
  276. local BodyPart = nil
  277. if (character and character:GetChildren()) then
  278. for _, x in next, character:GetChildren() do
  279. if FilterObjs(x) and IsOnScreen2(x) then
  280. local Distance = (WTS(x) - v2.new(mouse.X, mouse.Y)).Magnitude
  281. if (Distance < ClosestDistance) then
  282. ClosestDistance = Distance
  283. BodyPart = x
  284. end
  285. end
  286. end
  287. end
  288. if Domain["Silent Aim"]["Nearest Part To Cursor"] then
  289. closestsilentbodypart = tostring(BodyPart)
  290. else
  291. closestsilentbodypart = Domain["Silent Aim"]["Target Part"]
  292. end
  293.  
  294. end
  295.  
  296. GetClosestBodyPart2 = function()
  297. local character = CamlockTarget.Character
  298. local ClosestDistance = 1 / 0
  299. local BodyPart = nil
  300. if (character and character:GetChildren()) then
  301. for _, x in next, character:GetChildren() do
  302. if FilterObjs(x) and IsOnScreen2(x) then
  303. local Distance = (WTS(x) - v2.new(mouse.X, mouse.Y)).Magnitude
  304. if (Distance < ClosestDistance) then
  305. ClosestDistance = Distance
  306. BodyPart = x
  307. end
  308. end
  309. end
  310. end
  311. if Domain["Cam Lock"]["Nearest Part To Cursor"] then
  312. closestcamlockpart = tostring(BodyPart)
  313. else
  314. closestcamlockpart = Domain["Cam Lock"]["Target Part"]
  315. end
  316. end
  317.  
  318. UpdateFOV = function()
  319. Circle.Transparency = Domain.FOV.Transparency
  320. Circle.Radius = Domain.FOV.Size
  321. Circle.Visible = Domain.FOV.Visible
  322. Circle.Color = Domain.FOV.Color
  323. Circle.Thickness = Domain.FOV.Thickness
  324. Circle.Filled = Domain.FOV.Filled
  325. Circle.Position = Vector2.new(Mouse.X, Mouse.Y + Gui:GetGuiInset().Y)
  326. end
  327.  
  328. GetClosestPlayer = function()
  329. local Target = nil
  330. local Closest = math.huge
  331.  
  332. for _, v in pairs(Players:GetPlayers()) do
  333. if v.Character and v ~= LocalPlayer and v.Character:FindFirstChild("HumanoidRootPart") then
  334. if not OnScreen(v.Character.HumanoidRootPart) then
  335. continue
  336. end
  337. if Domain.Checks["Visible Check"] and not RayCastCheck(v.Character.HumanoidRootPart, v.Character) then
  338. continue
  339. end
  340. if Domain.Checks["K.O Check"] and v.Character:FindFirstChild("BodyEffects") then
  341. local KoCheck
  342. if game.PlaceId == 7242996350 or game.PlaceId == 12884917481 then
  343. KoCheck = v.Character.BodyEffects:FindFirstChild("KO").Value
  344. else
  345. KoCheck = v.Character.BodyEffects:FindFirstChild("K.O").Value
  346. end
  347. local Grabbed = v.Character:FindFirstChild("GRABBING_CONSTRAINT") ~= nil
  348. if KoCheck or Grabbed then
  349. continue
  350. end
  351. end
  352. if Domain.Checks["Crew Check"] and FindCrew(v) and v.DataFolder.Information:FindFirstChild("Crew").Value == LocalPlayer.DataFolder.Information:FindFirstChild("Crew").Value then
  353. continue
  354. end
  355.  
  356. local Distance = GetMagnitudeFromMouse(v.Character.HumanoidRootPart)
  357.  
  358. if (Distance < Closest and Circle.Radius + 10 > Distance) then
  359. Closest = Distance
  360. Target = v
  361. end
  362. end
  363. end
  364.  
  365. SilentTarget = Target
  366. end
  367.  
  368. GetClosestPlayer2 = function()
  369. local Target = nil
  370. local Closest = math.huge
  371.  
  372. for _, v in pairs(Players:GetPlayers()) do
  373. if v.Character and v ~= LocalPlayer and v.Character:FindFirstChild("HumanoidRootPart") then
  374. if not OnScreen(v.Character.HumanoidRootPart) then
  375. continue
  376. end
  377. if Domain.Checks["Visible Check"] and not RayCastCheck(v.Character.HumanoidRootPart, v.Character) then
  378. continue
  379. end
  380. if Domain.Checks["K.O Check"] and v.Character:FindFirstChild("BodyEffects") then
  381. local KoCheck
  382. if game.PlaceId == 7242996350 or game.PlaceId == 12884917481 then
  383. KoCheck = v.Character.BodyEffects:FindFirstChild("KO").Value
  384. else
  385. KoCheck = v.Character.BodyEffects:FindFirstChild("K.O").Value
  386. end
  387. local Grabbed = v.Character:FindFirstChild("GRABBING_CONSTRAINT") ~= nil
  388. if KoCheck or Grabbed then
  389. continue
  390. end
  391. end
  392. if Domain.Checks["Crew Check"] and FindCrew(v) and v.DataFolder.Information:FindFirstChild("Crew").Value == LocalPlayer.DataFolder.Information:FindFirstChild("Crew").Value then
  393. continue
  394. end
  395.  
  396. local Distance = GetMagnitudeFromMouse(v.Character.HumanoidRootPart)
  397.  
  398. if (Distance < Closest and Circle.Radius + 10 > Distance) then
  399. Closest = Distance
  400. Target = v
  401. end
  402. end
  403. end
  404.  
  405. CamlockTarget = Target
  406. end
  407.  
  408.  
  409. RunService.Heartbeat:Connect(function()
  410. UpdateFOV()
  411. PredictionValue = GetPrediction()
  412. if Domain["Silent Aim"].Enabled then
  413. GetClosestPlayer()
  414. if Domain["Silent Aim"]["Nearest Part To Cursor"] then
  415. GetClosestBodyPart()
  416. end
  417. end
  418. if Domain["Cam Lock"].Enabled then
  419. GetClosestPlayer()
  420. if Domain["Cam Lock"]["Nearest Part To Cursor"] then
  421. GetClosestBodyPart2()
  422. end
  423. end
  424.  
  425. end)
  426.  
  427.  
  428. local speeding = false
  429. Mouse.KeyDown:Connect(function(Key)
  430. if Key == (string.lower(Domain.Macro.Bind)) and Domain.Macro.Abuse == false then
  431. if Domain.Macro.Enabled then
  432. speeding = not speeding
  433. if speeding == true then
  434. repeat task.wait(Domain.Macro.Speed / 100)
  435. game:GetService("VirtualInputManager"):SendKeyEvent(true, "I", false, game)
  436. task.wait(Domain.Macro.Speed / 100)
  437. game:GetService("VirtualInputManager"):SendKeyEvent(true, "O", false, game)
  438. task.wait(Domain.Macro.Speed / 100)
  439. game:GetService("VirtualInputManager"):SendKeyEvent(true, "I", false, game)
  440. task.wait(Domain.Macro.Speed / 100)
  441. game:GetService("VirtualInputManager"):SendKeyEvent(true, "O", false, game)
  442. task.wait(Domain.Macro.Speed / 100)
  443. until speeding == false
  444. end
  445. end
  446. end
  447. end)
  448.  
  449.  
  450. Mouse.KeyDown:Connect(function(Key)
  451. if Key == (string.lower(Domain.Macro.Bind)) and Domain.Macro.Abuse == true then
  452. if Domain.Macro.Enabled then
  453. SpeedGlitch = not SpeedGlitch
  454. if SpeedGlitch == true then
  455. repeat task.wait(Domain.Macro.Speed / 100)
  456. game:GetService("VirtualInputManager"):SendMouseWheelEvent("0", "0", true, game)
  457. task.wait(Domain.Macro.Speed / 100)
  458. game:GetService("VirtualInputManager"):SendMouseWheelEvent("0", "0", false, game)
  459. task.wait(Domain.Macro.Speed / 100)
  460. game:GetService("VirtualInputManager"):SendMouseWheelEvent("0", "0", true, game)
  461. task.wait(Domain.Macro.Speed / 100)
  462. game:GetService("VirtualInputManager"):SendMouseWheelEvent("0", "0", false, game)
  463. task.wait(Domain.Macro.Speed / 100)
  464. until SpeedGlitch == false
  465. end
  466. end
  467. end
  468. end)
  469.  
  470. Mouse.KeyDown:Connect(function(Key)
  471. local Keybind = Domain["Silent Aim"].Keybind:lower()
  472. if (Key == Keybind) then
  473. if Domain["Silent Aim"]["Keybind Enabled"] then
  474. if Domain["Silent Aim"].Enabled == true then
  475. Domain["Silent Aim"].Enabled = false
  476. notify("Silent aim disabled.")
  477. else
  478. Domain["Silent Aim"].Enabled = true
  479. notify("Silent aim enabled.")
  480. end
  481. end
  482. end
  483. end)
  484.  
  485.  
  486.  
  487. game.Players.LocalPlayer.Character.ChildAdded:Connect(LPH_NO_VIRTUALIZE(function(tool)
  488. if tool:IsA("Tool") then
  489. tool.Activated:Connect(function()
  490. if Domain["Silent Aim"].Enabled then
  491. if SilentTarget ~= nil then
  492. local targetbone
  493. if Domain.Airshot.Enabled then
  494. if SilentTarget.Character.Humanoid.Jump == true then
  495. targetbone = SilentTarget.Character[Domain.Airshot["Target Part"]]
  496. else
  497. targetbone = SilentTarget.Character[Domain["Silent Aim"]["Target Part"]]
  498. end
  499. else
  500. targetbone = SilentTarget.Character[Domain["Silent Aim"]["Target Part"]]
  501. end
  502. if Domain["Silent Aim"]["Nearest Part To Cursor"] then
  503. targetbone = SilentTarget.Character[closestsilentbodypart]
  504. end
  505. local Prediction
  506. if not Domain.Resolver.Enabled then
  507. Prediction = targetbone.Position + v3.new(0,Domain["Silent Aim"]["Target Part Offset"],0) + targetbone.Velocity * PredictionValue
  508. else
  509. if Domain.Resolver.Method == "MoveDirection" then
  510. Prediction = targetbone.Position + v3.new(0,Domain["Silent Aim"]["Target Part Offset"],0) + SilentTarget.Character.Humanoid.MoveDirection * PredictionValue * 16
  511. elseif Domain.Resolver.Method == "No Prediction" then
  512. Prediction = targetbone.Position + v3.new(0,Domain["Silent Aim"]["Target Part Offset"],0)
  513. elseif Domain.Resolver.Method == "Underground" then
  514. targetbone.Velocity = Vector3.new(targetbone.Velocity.X, 0, targetbone.Velocity.Z)
  515. targetbone.AssemblyLinearVelocity = Vector3.new(targetbone.Velocity.X, 0, targetbone.Velocity.Z)
  516. Prediction = targetbone.Position + v3.new(0,Domain["Silent Aim"]["Target Part Offset"],0) + targetbone.Velocity * PredictionValue
  517. end
  518. end
  519. game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Prediction)
  520. end
  521. end
  522. end)
  523. end
  524. end))
  525.  
  526. game.Players.LocalPlayer.CharacterAdded:Connect(LPH_NO_VIRTUALIZE(function(Character)
  527. Character.ChildAdded:Connect(function(tool)
  528. if tool:IsA("Tool") then
  529. tool.Activated:Connect(function()
  530. if Domain["Silent Aim"].Enabled then
  531. if SilentTarget ~= nil then
  532. local targetbone
  533. if Domain.Airshot.Enabled then
  534. if SilentTarget.Character.Humanoid.Jump == true then
  535. targetbone = SilentTarget.Character[Domain.Airshot["Target Part"]]
  536. else
  537. targetbone = SilentTarget.Character[Domain["Silent Aim"]["Target Part"]]
  538. end
  539. else
  540. targetbone = SilentTarget.Character[Domain["Silent Aim"]["Target Part"]]
  541. end
  542. if Domain["Silent Aim"]["Nearest Part To Cursor"] then
  543. targetbone = SilentTarget.Character[closestsilentbodypart]
  544. end
  545. local Prediction
  546. if not Domain.Resolver.Enabled then
  547. Prediction = targetbone.Position + v3.new(0,Domain["Silent Aim"]["Target Part Offset"],0) + targetbone.Velocity * PredictionValue
  548. else
  549. if Domain.Resolver.Method == "MoveDirection" then
  550. Prediction = targetbone.Position + v3.new(0,Domain["Silent Aim"]["Target Part Offset"],0) + SilentTarget.Character.Humanoid.MoveDirection * PredictionValue * 16
  551. elseif Domain.Resolver.Method == "No Prediction" then
  552. Prediction = targetbone.Position + v3.new(0,Domain["Silent Aim"]["Target Part Offset"],0)
  553. elseif Domain.Resolver.Method == "Underground" then
  554. targetbone.Velocity = Vector3.new(targetbone.Velocity.X, 0, targetbone.Velocity.Z)
  555. targetbone.AssemblyLinearVelocity = Vector3.new(targetbone.Velocity.X, 0, targetbone.Velocity.Z)
  556. Prediction = targetbone.Position + v3.new(0,Domain["Silent Aim"]["Target Part Offset"],0) + targetbone.Velocity * PredictionValue
  557. end
  558. end
  559. game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Prediction)
  560. end
  561. end
  562. end)
  563. end
  564. end)
  565. end))
  566.  
  567. local targeting = false
  568.  
  569. Mouse.KeyDown:Connect(function(Key)
  570. local Keybind = Domain["Cam Lock"].Key:lower()
  571. if (Key == Keybind) then
  572. if Domain["Cam Lock"].Enabled == true then
  573. if targeting == false then
  574. GetClosestPlayer2()
  575. if CamlockTarget ~= nil then
  576. targeting = true
  577. if Domain["Cam Lock"].Notify then
  578. notify("Locked onto: "..tostring(CamlockTarget))
  579. end
  580. else
  581.  
  582. if Domain["Cam Lock"].Notify then
  583. notify("No Player In FOV")
  584. end
  585. end
  586. else
  587. targeting = false
  588. CamlockTarget = nil
  589. if Domain["Cam Lock"].Notify then
  590. notify("Unlocked")
  591. end
  592. end
  593. end
  594. end
  595. end)
  596.  
  597.  
  598. game:GetService("RunService").RenderStepped:Connect(function()
  599. if Domain["Cam Lock"].Flags["Unlock Outside FOV"] and CamlockTarget and CamlockTarget.Character and CamlockTarget.Character:FindFirstChild(closestcamlockpart) then
  600. if Circle2.Radius <
  601. (Vector2.new(
  602. CurrentCamera:WorldToScreenPoint(CamlockTarget.Character.HumanoidRootPart.Position).X,
  603. CurrentCamera:WorldToScreenPoint(CamlockTarget.Character.HumanoidRootPart.Position).Y
  604. ) - Vector2.new(mouse.X, mouse.Y)).Magnitude
  605. then
  606. CamlockTarget = nil
  607. end
  608. end
  609. if Domain["Cam Lock"].Flags["Unlock On KO"] == true and CamlockTarget ~= nil and CamlockTarget.Character and CamlockTarget.Character:FindFirstChild(closestcamlockpart) then
  610. if CamlockTarget.Character:FindFirstChild("BodyEffects") then
  611. local KoCheck
  612. if CamlockTarget.Character.BodyEffects:FindFirstChild("KO") then
  613. KoCheck = CamlockTarget.Character.BodyEffects:FindFirstChild("KO").Value
  614. elseif CamlockTarget.Character.BodyEffects:FindFirstChild("K.O") then
  615. KoCheck = CamlockTarget.Character.BodyEffects:FindFirstChild("K.O").Value
  616. end
  617.  
  618. if KoCheck then
  619. CamlockTarget = nil
  620. if Domain["Cam Lock"].Notify then
  621. notify("Target Knocked, Unlocked.")
  622. end
  623. end
  624. end
  625. end
  626. if Domain["Cam Lock"].Flags["Unlock Behind Wall"] == true and string.lower(Domain["Cam Lock"].Mode) ~= "fov" and CamlockTarget ~= nil and CamlockTarget.Character and CamlockTarget.Character:FindFirstChild(closestcamlockpart) then
  627. if not RayCastCheck(CamlockTarget.Character[closestcamlockpart], CamlockTarget.Character) then
  628. CamlockTarget = nil
  629. if Domain["Cam Lock"].Notify then
  630. notify("Target Behind Wall, Unlocked.")
  631. end
  632. end
  633. end
  634. if Domain["Cam Lock"].Enabled and CamlockTarget and CamlockTarget.Character and CamlockTarget.Character:FindFirstChild(Domain["Cam Lock"]["Target Part"]) then
  635. if targeting == true then
  636. local targetbone
  637. if Domain.Airshot.Enabled then
  638. if CamlockTarget.Character.Humanoid.Jump == true then
  639. targetbone = CamlockTarget.Character[Domain.Airshot["Target Part"]]
  640. else
  641. targetbone = CamlockTarget.Character[Domain["Cam Lock"]["Target Part"]]
  642. end
  643. else
  644. targetbone = CamlockTarget.Character[Domain["Cam Lock"]["Target Part"]]
  645. end
  646. if Domain["Cam Lock"]["Nearest Part To Cursor"] then
  647. targetbone = CamlockTarget.Character[closestsilentbodypart]
  648. end
  649. if Domain["Global"]["Anti Ground Shots"] then
  650. targetbone.Velocity = v3.new(targetbone.Velocity.X, targetbone.Velocity.Y * 0.5, targetbone.Velocity.Z)
  651. targetbone.AssemblyLinearVelocity = v3.new(targetbone.Velocity.X, targetbone.Velocity.Y * 0.5, targetbone.Velocity.Z)
  652. end
  653. local Prediction
  654. if not Domain.Resolver.Enabled then
  655. Prediction = targetbone.Position + v3.new(0,Domain["Cam Lock"]["Target Part Offset"],0) + targetbone.Velocity * PredictionValue
  656. else
  657. if Domain.Resolver.Method == "MoveDirection" then
  658. Prediction = targetbone.Position + v3.new(0,Domain["Cam Lock"]["Target Part Offset"],0) + CamlockTarget.Character.Humanoid.MoveDirection * PredictionValue * 16
  659. elseif Domain.Resolver.Method == "No Prediction" then
  660. Prediction = targetbone.Position + v3.new(0,Domain["Cam Lock"]["Target Part Offset"],0)
  661. elseif Domain.Resolver.Method == "Underground" then
  662. targetbone.Velocity = Vector3.new(targetbone.Velocity.X, 0, targetbone.Velocity.Z)
  663. targetbone.AssemblyLinearVelocity = Vector3.new(targetbone.Velocity.X, 0, targetbone.Velocity.Z)
  664. Prediction = targetbone.Position + v3.new(0,Domain["Cam Lock"]["Target Part Offset"],0) + targetbone.Velocity * PredictionValue
  665. end
  666. end
  667. local Main = CF.new(CurrentCamera.CFrame.p, Prediction)
  668. if Domain["Cam Lock"].Smoothness.Enabled then
  669. CurrentCamera.CFrame = CurrentCamera.CFrame:Lerp(Main, Domain["Cam Lock"].Smoothness.Value, "Exponential", Enum.EasingDirection.InOut)
  670. else
  671. CurrentCamera.CFrame = CurrentCamera.CFrame:Lerp(Main, 1, "Exponential", Enum.EasingDirection.InOut)
  672. end
  673. end
  674. end
  675. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement