Advertisement
Okb00mer

Untitled

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