Advertisement
Okb00mer

Untitled

Feb 27th, 2023 (edited)
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.53 KB | None | 0 0
  1. -- sub to halal gaming
  2.  
  3. getgenv().FovKey = "q" -- fov switch key, if you dont wanna look blatant long range rev
  4.  
  5. getgenv().Parts = {"Head", "HumanoidRootPart, UpperTorso"} -- {"Head", "HumanoidRootPart"}
  6.  
  7. getgenv().Hitchance = 100
  8.  
  9. getgenv().Fov = 16 -- semi legit Rev: 9, 8, 8.5, 7.6, 7.5, 7.3
  10. -- Rev(far): 7, 6.7, 6.4, 5.6, 5.3
  11. -- Shotgun: 12, 11, 10, 10.5, 9.8, 9.4,
  12. ------------------
  13. -- legit star =
  14. -- Rev: 6, 5.7, 5.5, 5.2, 5, 4.8, 4.6, 4.3, 4
  15. -- Rev(far): 4, 3.8, 3.6, 3.4, 3.2, 3, 2.8
  16. -- Shotgun: 7, 6.8, 6.7, 6.5, 6.3, 6.1, 6, 5.7, 5.5, 5.3
  17.  
  18. getgenv().ShowFOV = true
  19.  
  20. getgenv().MacroKey = "P" -- to use the built in lua macro
  21.  
  22. -- soft Aim
  23. getgenv().AimlockKey = "c"
  24. getgenv().SmoothnessAmount = 0.026
  25. getgenv().PredictionVelocity = 7.64
  26. ----------------------------------
  27. local Aiming = loadstring(game:HttpGet("https://pastebin.com/raw/3A9wdSkL"))()
  28. Aiming.ShowFOV = getgenv().ShowFOV
  29. Aiming.TargetPart = getgenv().Parts
  30. Aiming.HitChance = getgenv().Hitchance
  31. Aiming.TeamCheck(false)
  32. Aiming.ShowFov = false
  33.  
  34.  
  35.  
  36. local Workspace = game:GetService("Workspace")
  37.  
  38. local Players = game:GetService("Players")
  39.  
  40. local RunService = game:GetService("RunService")
  41.  
  42. local UserInputService = game:GetService("UserInputService")
  43.  
  44.  
  45.  
  46. local LocalPlayer = Players.LocalPlayer
  47.  
  48. local Mouse = LocalPlayer:GetMouse()
  49.  
  50. local CurrentCamera = Workspace.CurrentCamera
  51.  
  52.  
  53. local DaHoodSettings = {
  54.  
  55. SilentAim = true,
  56.  
  57. AimLock = false,
  58.  
  59. Prediction = 0.119,
  60.  
  61. AimLockKeybind = Enum.KeyCode.E,
  62.  
  63. Resolver = true,
  64.  
  65. }
  66.  
  67. getgenv().DaHoodSettings = DaHoodSettings
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74. function Aiming.Check()
  75.  
  76. if not (Aiming.Enabled == true and Aiming.Selected ~= LocalPlayer and Aiming.SelectedPart ~= nil) then
  77.  
  78. return false
  79.  
  80. end
  81.  
  82. local Character = Aiming.Character(Aiming.Selected)
  83.  
  84. local KOd = Character:WaitForChild("BodyEffects")["K.O"].Value
  85.  
  86. local Grabbed = Character:FindFirstChild("GRABBING_CONSTRAINT") ~= nil
  87.  
  88. if (KOd or Grabbed) then
  89.  
  90. return false
  91.  
  92. end
  93.  
  94. return true
  95.  
  96. end
  97.  
  98.  
  99.  
  100. task.spawn(function()
  101.  
  102. while task.wait() do
  103.  
  104. if DaHoodSettings.Resolver and Aiming.Selected ~= nil and (Aiming.Selected.Character) then
  105.  
  106. local oldVel = game.Players[Aiming.Selected.Name].Character.HumanoidRootPart.Velocity
  107.  
  108. game.Players[Aiming.Selected.Name].Character.HumanoidRootPart.Velocity = Vector3.new(oldVel.X, -0, oldVel.Z)
  109.  
  110. end
  111.  
  112. end
  113.  
  114. end)
  115.  
  116. local Script = {Functions = {}}
  117.  
  118.  
  119.  
  120. Script.Functions.getToolName = function(name)
  121.  
  122. local split = string.split(string.split(name, "[")[2], "]")[1]
  123.  
  124. return split
  125.  
  126. end
  127.  
  128.  
  129.  
  130. Script.Functions.getEquippedWeaponName = function(player)
  131.  
  132. if (player.Character) and player.Character:FindFirstChildWhichIsA("Tool") then
  133.  
  134. local Tool = player.Character:FindFirstChildWhichIsA("Tool")
  135.  
  136. 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
  137.  
  138. return Script.Functions.getToolName(Tool.Name)
  139.  
  140. end
  141.  
  142. end
  143.  
  144. return nil
  145.  
  146. end
  147.  
  148.  
  149.  
  150. game:GetService("RunService").RenderStepped:Connect(function()
  151.  
  152. if Script.Functions.getEquippedWeaponName(game.Players.LocalPlayer) ~= nil then
  153.  
  154. local WeaponSettings = GunSettings[Script.Functions.getEquippedWeaponName(game.Players.LocalPlayer)]
  155.  
  156. if WeaponSettings ~= nil then
  157.  
  158. Aiming.FOV = WeaponSettings.FOV
  159.  
  160. else
  161.  
  162. Aiming.FOV = 11.5
  163.  
  164. end
  165.  
  166. end
  167.  
  168. end)
  169.  
  170.  
  171.  
  172. local __index
  173.  
  174. __index = hookmetamethod(game, "__index", function(t, k)
  175.  
  176. if (t:IsA("Mouse") and (k == "Hit" or k == "Target") and Aiming.Check()) then
  177.  
  178. local SelectedPart = Aiming.SelectedPart
  179.  
  180. if (DaHoodSettings.SilentAim and (k == "Hit" or k == "Target")) then
  181.  
  182. local Hit = SelectedPart.CFrame + (SelectedPart.Velocity * DaHoodSettings.Prediction)
  183.  
  184. return (k == "Hit" and Hit or SelectedPart)
  185.  
  186. end
  187.  
  188. end
  189.  
  190.  
  191.  
  192. return __index(t, k)
  193.  
  194. end)
  195.  
  196.  
  197.  
  198. RunService:BindToRenderStep("AimLock", 0, function()
  199.  
  200. if (DaHoodSettings.AimLock and Aiming.Check() and UserInputService:IsKeyDown(DaHoodSettings.AimLockKeybind)) then
  201.  
  202. local SelectedPart = Aiming.SelectedPart
  203.  
  204. local Hit = SelectedPart.CFrame + (SelectedPart.Velocity * DaHoodSettings.Prediction)
  205.  
  206. CurrentCamera.CFrame = CFrame.lookAt(CurrentCamera.CFrame.Position, Hit.Position)
  207.  
  208. end
  209. end)
  210.  
  211. BulletColor = true
  212.  
  213. if BulletColor == true then
  214. bullet_tracer_color = Color3.fromRGB(0, 0, 255)
  215. function GetGun()
  216. if game.Players.LocalPlayer.Character then
  217. for i, v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  218. if v:FindFirstChild 'Ammo' then
  219. return v
  220. end
  221. end
  222. end
  223. return nil
  224. end
  225.  
  226. local Services = {
  227. Players = game:GetService("Players"),
  228. UserInputService = game:GetService("UserInputService"),
  229. RunService = game:GetService("RunService"),
  230. }
  231.  
  232. local Local = {
  233. Player = Services.Players.LocalPlayer,
  234. Mouse = Services.Players.LocalPlayer:GetMouse(),
  235. }
  236. local Other = {
  237. Camera = workspace.CurrentCamera,
  238. BeamPart = Instance.new("Part", workspace)
  239. }
  240.  
  241. Other.BeamPart.Name = "BeamPart"
  242. Other.BeamPart.Transparency = 1
  243. local Settings = {
  244. StartColor = MainAccentColor,
  245. EndColor = MainAccentColor,
  246. StartWidth = 4,
  247. EndWidth = 4,
  248. ShowImpactPoint = true,
  249. ImpactTransparency = 0.2,
  250. ImpactColor = Color3.new(1, 1, 1),
  251. Time = 0.435,
  252. }
  253. game:GetService "RunService".Heartbeat:Connect(function()
  254. if game:GetService("Workspace").Ignored:FindFirstChild 'BULLET_RAYS' and BulletColor then
  255. game:GetService("Workspace").Ignored.BULLET_RAYS:Destroy()
  256. end
  257. end)
  258. local funcs = {}
  259. Local.Mouse.TargetFilter = Other.BeamPart
  260. function funcs:Beam(v1, v2)
  261. v2 = Vector3.new(v2.X - 0.1, v2.Y + 0.2, v2.Z)
  262. local colorSequence = ColorSequence.new({
  263. ColorSequenceKeypoint.new(0, bullet_tracer_color),
  264. ColorSequenceKeypoint.new(1, bullet_tracer_color),
  265. })
  266. local Part = Instance.new("Part", Other.BeamPart)
  267. Part.Size = Vector3.new(0, 0, 0)
  268. Part.Massless = true
  269. Part.Transparency = 1
  270. Part.CanCollide = false
  271. Part.Position = v1
  272. Part.Anchored = true
  273. local Attachment = Instance.new("Attachment", Part)
  274. local Part2 = Instance.new("Part", Other.BeamPart)
  275. Part2.Size = Vector3.new(0, 0, 0)
  276. Part2.Transparency = 0
  277. Part2.CanCollide = false
  278. Part2.Position = v2
  279. Part2.Anchored = true
  280. Part2.Material = Enum.Material.Plastic
  281. Part2.Color = Settings.ImpactColor
  282. Part2.Massless = true
  283. local Attachment2 = Instance.new("Attachment", Part2)
  284. local Beam = Instance.new("Beam", Part)
  285. Beam.FaceCamera = true
  286. Beam.Color = colorSequence
  287. Beam.Attachment0 = Attachment
  288. Beam.Attachment1 = Attachment2
  289. Beam.LightEmission = 6
  290. Beam.LightInfluence = 1
  291. Beam.Width0 = 0.05
  292. Beam.Width1 = 0.05
  293. Beam.Texture = "http://www.roblox.com/asset/?id=5210472215"
  294. Beam.TextureSpeed = 0
  295. Beam.TextureLength = 0
  296. delay(Settings.Time, function()
  297. Part:Destroy()
  298. Part2:Destroy()
  299. end)
  300. end
  301.  
  302. spawn(function()
  303. while task.wait(0.5) do
  304. gun = GetGun()
  305. if gun then
  306. LastAmmo = gun.Ammo.Value
  307. gun.Ammo:GetPropertyChangedSignal("Value"):Connect(function()
  308. if BulletColor and gun.Ammo.Value < LastAmmo then
  309. LastAmmo = gun.Ammo.Value
  310. funcs:Beam(gun.Handle.Position, Local.Mouse.hit.p)
  311. end
  312. end)
  313. end
  314. end
  315. end)
  316.  
  317. local a = "[Revolver]"
  318. end
  319.  
  320. Mouse.KeyDown:Connect(
  321. function(Key)
  322. if Key == getgenv().MacroKey then
  323. SpeedGlitch = not SpeedGlitch
  324. if SpeedGlitch == true then
  325. repeat
  326. game:GetService("RunService").Heartbeat:wait()
  327. keypress(0x49)
  328. game:GetService("RunService").Heartbeat:wait()
  329. keypress(0x4F)
  330. game:GetService("RunService").Heartbeat:wait()
  331. keyrelease(0x49)
  332. game:GetService("RunService").Heartbeat:wait()
  333. keyrelease(0x4F)
  334. game:GetService("RunService").Heartbeat:wait()
  335. until SpeedGlitch == false
  336. end
  337. end
  338. end
  339. )
  340.  
  341. local mouseyea = game.Players.LocalPlayer:GetMouse()
  342. mouseyea.KeyDown:Connect(
  343. function(ToggleKey)
  344. if ToggleKey == getgenv().FovKey then
  345. if Aiming.FOV == 30 then
  346. Aiming.FOV = 8
  347. small:Play()
  348. else
  349. Aiming.FOV = 30
  350. big:Play()
  351. end
  352. end
  353. end
  354. )
  355. getgenv().OldAimPart = "Head"
  356. getgenv().AimPart = "Head" -- For R15 Games: {UpperTorso, LowerTorso, HumanoidRootPart, Head} | For R6 Games: {Head, Torso, HumanoidRootPart}
  357. getgenv().AimRadius = 30 -- How far away from someones character you want to lock on at
  358. getgenv().ThirdPerson = true
  359. getgenv().FirstPerson = true
  360. getgenv().TeamCheck = false -- Check if Target is on your Team (True means it wont lock onto your teamates, false is vice versa) (Set it to false if there are no teams)
  361. getgenv().PredictMovement = true -- Predicts if they are moving in fast velocity (like jumping) so the aimbot will go a bit faster to match their speed
  362. getgenv().CheckIfJumped = true
  363. getgenv().Smoothness = true
  364.  
  365. local Players, Uis, RService, SGui = game:GetService"Players", game:GetService"UserInputService", game:GetService"RunService", game:GetService"StarterGui";
  366. local Client, Mouse, Camera, CF, RNew, Vec3, Vec2 = Players.LocalPlayer, Players.LocalPlayer:GetMouse(), workspace.CurrentCamera, CFrame.new, Ray.new, Vector3.new, Vector2.new;
  367. local Aimlock, MousePressed, CanNotify = true, false, false;
  368. local AimlockTarget;
  369. local OldPre;
  370.  
  371.  
  372.  
  373. getgenv().WorldToViewportPoint = function(P)
  374. return Camera:WorldToViewportPoint(P)
  375. end
  376.  
  377. getgenv().WorldToScreenPoint = function(P)
  378. return Camera.WorldToScreenPoint(Camera, P)
  379. end
  380.  
  381. getgenv().GetObscuringObjects = function(T)
  382. if T and T:FindFirstChild(getgenv().AimPart) and Client and Client.Character:FindFirstChild("Head") then
  383. local RayPos = workspace:FindPartOnRay(RNew(
  384. T[getgenv().AimPart].Position, Client.Character.Head.Position)
  385. )
  386. if RayPos then return RayPos:IsDescendantOf(T) end
  387. end
  388. end
  389.  
  390. getgenv().GetNearestTarget = function()
  391. -- Credits to whoever made this, i didnt make it, and my own mouse2plr function kinda sucks
  392. local players = {}
  393. local PLAYER_HOLD = {}
  394. local DISTANCES = {}
  395. for i, v in pairs(Players:GetPlayers()) do
  396. if v ~= Client then
  397. table.insert(players, v)
  398. end
  399. end
  400. for i, v in pairs(players) do
  401. if v.Character ~= nil then
  402. local AIM = v.Character:FindFirstChild("Head")
  403. if getgenv().TeamCheck == true and v.Team ~= Client.Team then
  404. local DISTANCE = (v.Character:FindFirstChild("Head").Position - game.Workspace.CurrentCamera.CFrame.p).magnitude
  405. local RAY = Ray.new(game.Workspace.CurrentCamera.CFrame.p, (Mouse.Hit.p - game.Workspace.CurrentCamera.CFrame.p).unit * DISTANCE)
  406. local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
  407. local DIFF = math.floor((POS - AIM.Position).magnitude)
  408. PLAYER_HOLD[v.Name .. i] = {}
  409. PLAYER_HOLD[v.Name .. i].dist= DISTANCE
  410. PLAYER_HOLD[v.Name .. i].plr = v
  411. PLAYER_HOLD[v.Name .. i].diff = DIFF
  412. table.insert(DISTANCES, DIFF)
  413. elseif getgenv().TeamCheck == false and v.Team == Client.Team then
  414. local DISTANCE = (v.Character:FindFirstChild("Head").Position - game.Workspace.CurrentCamera.CFrame.p).magnitude
  415. local RAY = Ray.new(game.Workspace.CurrentCamera.CFrame.p, (Mouse.Hit.p - game.Workspace.CurrentCamera.CFrame.p).unit * DISTANCE)
  416. local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
  417. local DIFF = math.floor((POS - AIM.Position).magnitude)
  418. PLAYER_HOLD[v.Name .. i] = {}
  419. PLAYER_HOLD[v.Name .. i].dist= DISTANCE
  420. PLAYER_HOLD[v.Name .. i].plr = v
  421. PLAYER_HOLD[v.Name .. i].diff = DIFF
  422. table.insert(DISTANCES, DIFF)
  423. end
  424. end
  425. end
  426.  
  427. if unpack(DISTANCES) == nil then
  428. return nil
  429. end
  430.  
  431. local L_DISTANCE = math.floor(math.min(unpack(DISTANCES)))
  432. if L_DISTANCE > getgenv().AimRadius then
  433. return nil
  434. end
  435.  
  436. for i, v in pairs(PLAYER_HOLD) do
  437. if v.diff == L_DISTANCE then
  438. return v.plr
  439. end
  440. end
  441. return nil
  442. end
  443.  
  444. Mouse.KeyDown:Connect(function(a)
  445. if not (Uis:GetFocusedTextBox()) then
  446. if a == AimlockKey and AimlockTarget == nil then
  447. pcall(function()
  448. if MousePressed ~= true then MousePressed = true end
  449. local Target;Target = GetNearestTarget()
  450. if Target ~= nil then
  451. AimlockTarget = Target
  452. end
  453. end)
  454. elseif a == AimlockKey and AimlockTarget ~= nil then
  455. if AimlockTarget ~= nil then AimlockTarget = nil end
  456. if MousePressed ~= false then
  457. MousePressed = false
  458. end
  459. end
  460. end
  461. end)
  462.  
  463. RService.RenderStepped:Connect(function()
  464. if getgenv().ThirdPerson == true and getgenv().FirstPerson == true then
  465. if (Camera.Focus.p - Camera.CoordinateFrame.p).Magnitude > 1 or (Camera.Focus.p - Camera.CoordinateFrame.p).Magnitude <= 1 then
  466. CanNotify = true
  467. else
  468. CanNotify = false
  469. end
  470. elseif getgenv().ThirdPerson == true and getgenv().FirstPerson == false then
  471. if (Camera.Focus.p - Camera.CoordinateFrame.p).Magnitude > 1 then
  472. CanNotify = true
  473. else
  474. CanNotify = false
  475. end
  476. elseif getgenv().ThirdPerson == false and getgenv().FirstPerson == true then
  477. if (Camera.Focus.p - Camera.CoordinateFrame.p).Magnitude <= 1 then
  478. CanNotify = true
  479. else
  480. CanNotify = false
  481. end
  482. end
  483. if Aimlock == true and MousePressed == true then
  484. if AimlockTarget and AimlockTarget.Character and AimlockTarget.Character:FindFirstChild(getgenv().AimPart) then
  485. if getgenv().FirstPerson == true then
  486. if CanNotify == true then
  487. if getgenv().PredictMovement == true then
  488. if getgenv().Smoothness == true then
  489. --// The part we're going to lerp/smoothen \\--
  490. local Main = CF(Camera.CFrame.p, AimlockTarget.Character[getgenv().AimPart].Position + AimlockTarget.Character[getgenv().AimPart].Velocity/PredictionVelocity)
  491.  
  492. --// Making it work \\--
  493. Camera.CFrame = Camera.CFrame:Lerp(Main, getgenv().SmoothnessAmount, Enum.EasingStyle.Elastic, Enum.EasingDirection.InOut)
  494. else
  495. Camera.CFrame = CF(Camera.CFrame.p, AimlockTarget.Character[getgenv().AimPart].Position + AimlockTarget.Character[getgenv().AimPart].Velocity/PredictionVelocity)
  496. end
  497. elseif getgenv().PredictMovement == false then
  498. if getgenv().Smoothness == true then
  499. --// The part we're going to lerp/smoothen \\--
  500. local Main = CF(Camera.CFrame.p, AimlockTarget.Character[getgenv().AimPart].Position)
  501.  
  502. --// Making it work \\--
  503. Camera.CFrame = Camera.CFrame:Lerp(Main, getgenv().SmoothnessAmount, Enum.EasingStyle.Elastic, Enum.EasingDirection.InOut)
  504. else
  505. Camera.CFrame = CF(Camera.CFrame.p, AimlockTarget.Character[getgenv().AimPart].Position)
  506. end
  507. end
  508. end
  509. end
  510. end
  511. end
  512. if CheckIfJumped == true then
  513. if AimlockTarget.Character.HuDDDDDDDDDDWmanoid.FloorMaterial == Enum.Material.Air then
  514.  
  515. getgenv().AimPart = "UpperTorso"
  516. else
  517. getgenv().AimPart = getgenv().OldAimPart
  518.  
  519. end
  520. end
  521. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement