Advertisement
c57ksecond

n

Sep 5th, 2021
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. getgenv().SelectTargetKey = "E" -- Must be Capital due to UserInputService
  2. getgenv().AimPart = "Torso" -- Head or Torso, Dont do HumanoidRootPart
  3. getgenv().AV = 10 -- Sets AimVelocity, if your ping is high make sure its 7-10 / if your ping is low make sure its 4-6
  4.  
  5. local Players, Uis, RService = game:GetService("Players"), game:GetService("UserInputService"), game:GetService("RunService")
  6. local Client, Mouse, Camera, CF = Players.LocalPlayer, Players.LocalPlayer:GetMouse(), workspace.CurrentCamera, CFrame.new;
  7. local Aimlock, Selecting = true, false
  8. local StreetsID, PrisonID = tonumber(455366377), tonumber(4669040);
  9.  
  10. Uis.InputBegan:Connect(function(Key, Typing)
  11. if Typing then return end
  12. if Key.KeyCode == Enum.KeyCode[SelectTargetKey] then
  13. Selecting = true
  14. end
  15. end)
  16. Uis.InputEnded:Connect(function(Key, Typing)
  17. if Typing then return end
  18. if Key.KeyCode == Enum.KeyCode[SelectTargetKey] then
  19. Selecting = false
  20. end
  21. end)
  22.  
  23. RService.Stepped:Connect(function()
  24. if Selecting == true and Mouse.Target.Parent:FindFirstChild("Humanoid") and Mouse.Target.Parent ~= Client.Character then
  25. AimlockTarget = Players:FindFirstChild(Mouse.Target.Parent.Name)
  26. Notify("Alert", "Aimlock Target: "..tostring(AimlockTarget), "", 3)
  27. end
  28. end)
  29.  
  30. getgenv().Notify = function(title, text, icon, time)
  31. game.StarterGui:SetCore("SendNotification",{
  32. Title = title;
  33. Text = text;
  34. Icon = "rbxassetid://6598908415";
  35. Duration = time;
  36. })
  37. end
  38.  
  39. local rm = getrawmetatable(game) or debug.getrawmetatable(game) or getmetatable(game);
  40. local ncall = rm.__namecall
  41. setreadonly(rm, false)
  42.  
  43. rm.__namecall = newcclosure(function(self, ...)
  44. local Ag = {...}
  45. local Method = getnamecallmethod()
  46. if Method == "FireServer" and Aimlock == true then
  47. if game.PlaceId ~= (PrisonID) and tostring(self) == "Input" and AimlockTarget ~= nil then
  48. Ag[2].mousehit = AimlockTarget.Character[AimPart].CFrame + AimlockTarget.Character[AimPart].Velocity/AV
  49. return ncall(self, unpack(Ag))
  50. end
  51. if game.PlaceId == (PrisonID) and tostring(self) == "Fire" and AimlockTarget ~= nil then
  52. return ncall(self, AimlockTarget.Character[AimPart].CFrame + AimlockTarget.Character[AimPart].Velocity/AV)
  53. end
  54. end
  55. return ncall(self, unpack(Ag))
  56. end)
  57. setreadonly(rm, true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement