Advertisement
ValueKarma

Untitled

Jul 16th, 2022
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.37 KB | None | 0 0
  1. --https://www.youtube.com/c/anto6666
  2. -- // Constants \\ --
  3. -- [ Services ] --
  4. local Services = setmetatable({}, {__index = function(Self, Index)
  5. local NewService = game.GetService(game, Index)
  6. if NewService then
  7. Self[Index] = NewService
  8. end
  9. return NewService
  10. end})
  11.  
  12. -- [ Modules ] --
  13. local UserInterface = loadstring(game:HttpGet("https://raw.githubusercontent.com/icuck/collection-dump/main/AbstractUI", true))()
  14. local Drawing = loadstring(game:HttpGet("https://raw.githubusercontent.com/iHavoc101/Genesis-Studios/main/Modules/DrawingAPI.lua", true))()
  15.  
  16. local ToolTip = require(Services.ReplicatedStorage.Modules_client.TooltipModule)
  17.  
  18. -- [ LocalPlayer ] --
  19. local LocalPlayer = Services.Players.LocalPlayer
  20. local Camera = workspace.CurrentCamera
  21.  
  22. -- [ Raycast Parameters ] --
  23. local RaycastParameters = RaycastParams.new()
  24. RaycastParameters.IgnoreWater = true
  25. RaycastParameters.FilterType = Enum.RaycastFilterType.Blacklist
  26. RaycastParameters.FilterDescendantsInstances = {LocalPlayer.Character}
  27.  
  28. -- // Variables \\ --
  29. -- [ Info ] --
  30. local Info = {
  31. SilentAIMEnabled = false;
  32. TriggeredEnabled = false;
  33. ArmsCheckEnabled = true;
  34. TeamWhitelist = "";
  35. FieldOfView = 250;
  36. }
  37.  
  38. local LastArrest = time()
  39.  
  40. -- [ Interface ] --
  41. local FOVCircle = Drawing.new("Circle", {
  42. Thickness = 2.5,
  43. Color = Color3.fromRGB(200, 200, 200),
  44. NumSides = 25,
  45. Radius = _G.FOV
  46. })
  47.  
  48. local Target = Drawing.new("Triangle", {
  49. Thickness = 5,
  50. Color = Color3.fromRGB(0, 200, 255)
  51. })
  52.  
  53. -- [ Weapons ] --
  54. local Weapons = {
  55. "Remington 870";
  56. "AK-47";
  57. "M9";
  58. "M4A1";
  59. "Hammer";
  60. "Crude Knife";
  61. }
  62.  
  63. -- [ Metatable ] --
  64. local RawMetatable = getrawmetatable(game)
  65. local __NameCall = RawMetatable.__namecall
  66. local __Index = RawMetatable.__index
  67.  
  68.  
  69. -- // Functions \\ --
  70. local function ValidCharacter(Character)
  71. return Character and (Character.FindFirstChildWhichIsA(Character, "Humanoid") and Character.FindFirstChildWhichIsA(Character, "Humanoid").Health ~= 0) or false
  72. end
  73.  
  74. local function NotObstructing(Destination, Ancestor)
  75. -- [ Camera ] --
  76. local ObstructingParts = Camera.GetPartsObscuringTarget(Camera, {Destination}, {Ancestor, LocalPlayer.Character})
  77.  
  78. for i,v in ipairs(ObstructingParts) do
  79. pcall(function()
  80. if v.Transparency >= 1 then
  81. table.remove(ObstructingParts, i)
  82. end
  83. end)
  84. end
  85.  
  86. if #ObstructingParts <= 0 then
  87. return true
  88. end
  89.  
  90. -- [ Raycast ] --
  91. RaycastParameters.FilterDescendantsInstances = {LocalPlayer.Character}
  92.  
  93. local Origin = Camera.CFrame.Position
  94. local Direction = (Destination - Origin).Unit * 500
  95. local RayResult = workspace.Raycast(workspace, Origin, Direction, RaycastParameters) or {
  96. Instance = nil;
  97. Position = Origin + Direction;
  98. Material = Enum.Material.Air;
  99. }
  100.  
  101. if RayResult.Instance and (RayResult.Instance.IsDescendantOf(RayResult.Instance, Ancestor) or RayResult.Instance == Ancestor) then
  102. return true
  103. end
  104.  
  105. -- [ Obstructed ] --
  106. return false
  107. end
  108.  
  109. local function IsArmed(Player)
  110. for i,v in ipairs(Weapons) do
  111. local Tool = Player.Backpack.FindFirstChild(Player.Backpack, v) or Player.Character.FindFirstChild(Player.Character, v)
  112. if Tool then
  113. return true
  114. end
  115. end
  116. return false
  117. end
  118.  
  119. local function ClosestPlayerToCursor(Distance)
  120. local Closest = nil
  121. local Position = nil
  122. local ShortestDistance = Distance or math.huge
  123.  
  124. local MousePosition = Services.UserInputService.GetMouseLocation(Services.UserInputService)
  125.  
  126. for i, v in ipairs(Services.Players.GetPlayers(Services.Players)) do
  127. if v ~= LocalPlayer and (v.Team ~= LocalPlayer.Team and tostring(v.Team) ~= Info.TeamWhitelist) and ValidCharacter(v.Character) then
  128. if Info.ArmsCheckEnabled and (v.Team == Services.Teams.Inmates and IsArmed(v) == false) then
  129. continue
  130. end
  131.  
  132. local ViewportPosition, OnScreen = Camera.WorldToViewportPoint(Camera, v.Character.PrimaryPart.Position)
  133. local Magnitude = (Vector2.new(ViewportPosition.X, ViewportPosition.Y) - MousePosition).Magnitude
  134.  
  135. if OnScreen == false or NotObstructing(v.Character.PrimaryPart.Position, v.Character) == false then
  136. continue
  137. end
  138.  
  139. if Magnitude < ShortestDistance then
  140. Closest = v
  141. Position = ViewportPosition
  142. ShortestDistance = Magnitude
  143. end
  144. end
  145. end
  146.  
  147. return Closest, Position
  148. end
  149.  
  150. local function SwitchGuns()
  151. if LocalPlayer.Character.FindFirstChild(LocalPlayer.Character, "Remington 870") then
  152. local Tool = LocalPlayer.Backpack.FindFirstChild(LocalPlayer.Backpack, "M4A1") or LocalPlayer.Backpack.FindFirstChild(LocalPlayer.Backpack, "AK-47") or LocalPlayer.Backpack.FindFirstChild(LocalPlayer.Backpack, "M9")
  153.  
  154. local Humanoid = LocalPlayer.Character.FindFirstChildWhichIsA(LocalPlayer.Character, "Humanoid")
  155. Humanoid.EquipTool(Humanoid, Tool)
  156. else
  157. local Tool = LocalPlayer.Backpack.FindFirstChild(LocalPlayer.Backpack, "Remington 870")
  158.  
  159. local Humanoid = LocalPlayer.Character.FindFirstChildWhichIsA(LocalPlayer.Character, "Humanoid")
  160. Humanoid.EquipTool(Humanoid, Tool)
  161. end
  162. end
  163.  
  164. local function Crash(Gun, BulletCount, ShotCount)
  165. local ShootEvent = Services.ReplicatedStorage.ShootEvent
  166. local StartTime = time()
  167. local BulletTable = {}
  168.  
  169. for i = 1, BulletCount do
  170. BulletTable[i] = {
  171. Cframe = CFrame.new(),
  172. Distance = math.huge
  173. }
  174. end
  175. for i = 1, ShotCount do
  176. ShootEvent:FireServer(BulletTable, Gun)
  177. if time() - StartTime > 5 then
  178. break
  179. end
  180. end
  181. end
  182.  
  183. -- // User Interface \\ --
  184. -- [ Window ] --
  185. local Window = UserInterface.new("Confinement X", UDim2.new(0, 420, 0, 420))
  186.  
  187. -- [ Assists ] --
  188. Window:Divider("Assists")
  189.  
  190. Window:Toggle("Silent Aim", "Shoots toward the nearest player to your cursor.", false, function(State)
  191. Info.SilentAIMEnabled = State
  192. end)
  193.  
  194. Window:Toggle("Trigger Bot", "Press G to temporarily disable.", false, function(State)
  195. Info.TriggeredEnabled = State
  196. end)
  197.  
  198. Window:Slider("Field Of View", "Recommended: 250", 50, 500, 250, function(Value)
  199. Info.FieldOfView = Value
  200. end)
  201.  
  202. Window:Dropdown("Team Whitelist", "Team for Silent-Aim to ignore.", {"Guards", "Inmates", "Criminals"}, function(Value)
  203. Info.TeamWhitelist = Value
  204. end)
  205.  
  206. Window:Toggle("Danger Check", "Checks if an Inmate has gun.", false, function(State)
  207. Info.ArmsCheckEnabled = State
  208. end)
  209.  
  210. -- [ Rage ] --
  211. Window:Divider("Rage")
  212.  
  213. Window:Button("Kill All", "Kills everyone in-game", function()
  214. local GunScript = (LocalPlayer.Backpack:FindFirstChild("GunInterface", true) or LocalPlayer.Character:FindFirstChild("GunInterface", true))
  215. if GunScript then
  216. for i,v in ipairs(game.Players:GetPlayers()) do
  217. if v ~= LocalPlayer then
  218. local BulletInfo = {
  219. [1] = {
  220. ["RayObject"] = Ray.new(Vector3.new(845.555908, 101.429337, 2269.43945), Vector3.new(-391.152252, 8.65560055, -83.2166901)),
  221. ["Distance"] = 3.2524313926697,
  222. ["Cframe"] = CFrame.new(840.310791, 101.334137, 2267.87988, 0.0636406094, 0.151434347, -0.986416459, 0, 0.988420188, 0.151741937, 0.997972965, -0.00965694897, 0.0629036576),
  223. ["Hit"] = v.Character.Head
  224. },
  225. [2] = {
  226. ["RayObject"] = Ray.new(Vector3.new(845.555908, 101.429337, 2269.43945), Vector3.new(-392.481476, -8.44939327, -76.7261353)),
  227. ["Distance"] = 3.2699294090271,
  228. ["Cframe"] = CFrame.new(840.290466, 101.184189, 2267.93506, 0.0964837447, 0.0589403138, -0.993587971, 4.65661287e-10, 0.998245299, 0.0592165813, 0.995334625, -0.00571343815, 0.0963144377),
  229. ["Hit"] = v.Character.Head
  230. },
  231. [3] = {
  232. ["RayObject"] = Ray.new(Vector3.new(845.555908, 101.429337, 2269.43945), Vector3.new(-389.21701, -2.50536323, -92.2163162)),
  233. ["Distance"] = 3.1665518283844,
  234. ["Cframe"] = CFrame.new(840.338867, 101.236496, 2267.80371, 0.0166504811, 0.0941716284, -0.995416701, 1.16415322e-10, 0.995554805, 0.0941846818, 0.999861419, -0.00156822044, 0.0165764652),
  235. ["Hit"] = v.Character.Head
  236. },
  237. [4] = {
  238. ["RayObject"] = Ray.new(Vector3.new(845.555908, 101.429337, 2269.43945), Vector3.new(-393.353973, 3.13988972, -72.5452042)),
  239. ["Distance"] = 3.3218522071838,
  240. ["Cframe"] = CFrame.new(840.277222, 101.285957, 2267.9707, 0.117109694, 0.118740402, -0.985994935, -1.86264515e-09, 0.992826641, 0.119563118, 0.993119001, -0.0140019981, 0.116269611),
  241. ["Hit"] = v.Character.Head
  242. },
  243. [5] = {
  244. ["RayObject"] = Ray.new(Vector3.new(845.555908, 101.429337, 2269.43945), Vector3.new(-390.73172, 3.2097764, -85.5477524)),
  245. ["Distance"] = 3.222757101059,
  246. ["Cframe"] = CFrame.new(840.317993, 101.286423, 2267.86035, 0.0517584644, 0.123365127, -0.991010666, 0, 0.992340803, 0.123530701, 0.99865967, -0.00639375951, 0.0513620302),
  247. ["Hit"] = v.Character.Head
  248. }
  249. }
  250. Services.ReplicatedStorage.ShootEvent:FireServer(BulletInfo, GunScript.Parent)
  251. Services.ReplicatedStorage.ShootEvent:FireServer(BulletInfo, GunScript.Parent)
  252. end
  253. end
  254. else
  255. ToolTip.update("No gun found!")
  256. end
  257. end)
  258.  
  259. Window:Button("Gun Modification", "Modifies the current gun you are holding.", function()
  260. local GunStates = LocalPlayer.Character:FindFirstChild("GunStates", true)
  261. if GunStates then
  262. local GunInfo = require(GunStates)
  263. GunInfo.ReloadTime = 0
  264. GunInfo.FireRate = 0
  265. GunInfo.AutoFire = true
  266. GunInfo.StoredAmmo = math.huge
  267. GunInfo.MaxAmmo = math.huge
  268. GunInfo.CurrentAmmo = math.huge
  269. end
  270. end)
  271.  
  272. -- [ Miscellaneous ] --
  273. Window:Divider("Miscellaneous")
  274.  
  275. Window:Button("Get Guns", "Grabs all", function()
  276. local HasSWAT = Services.MarketplaceService:UserOwnsGamePassAsync(LocalPlayer.UserId, 96651)
  277.  
  278. workspace.Remote.ItemHandler:InvokeServer(workspace.Prison_ITEMS.giver["Remington 870"].ITEMPICKUP)
  279. if HasSWAT then
  280. workspace.Remote.ItemHandler:InvokeServer(workspace.Prison_ITEMS.giver["M4A1"].ITEMPICKUP)
  281. end
  282. workspace.Remote.ItemHandler:InvokeServer(workspace.Prison_ITEMS.giver["AK-47"].ITEMPICKUP)
  283. workspace.Remote.ItemHandler:InvokeServer(workspace.Prison_ITEMS.giver["M9"].ITEMPICKUP)
  284.  
  285. if HasSWAT then
  286. workspace.Remote.ItemHandler:InvokeServer(workspace.Prison_ITEMS.clothes["Riot Police"].ITEMPICKUP)
  287. end
  288. end)
  289.  
  290. -- [ Credits ] --
  291. Window:Divider("Credits")
  292.  
  293. Window:Button("OminousVibes#7259", "Script Creator", function()
  294. setclipboard("OminousVibes#7259")
  295. end)
  296.  
  297.  
  298. -- // Metatable \\ --
  299. setreadonly(RawMetatable, false)
  300.  
  301. RawMetatable.__index = newcclosure(function(Self, Index)
  302. if Info.SilentAIMEnabled == true and checkcaller() == false then
  303. if typeof(Self) == "Instance" and (Self:IsA("PlayerMouse") or Self:IsA("Mouse")) then
  304. if Index == "Hit" then
  305. local Closest = ClosestPlayerToCursor(Info.FieldOfView)
  306. if Closest then
  307. local Velocity = Closest.Character.PrimaryPart.AssemblyLinearVelocity
  308. local Prediction = Velocity.Unit
  309. if Velocity.Magnitude == 0 then
  310. Prediction = Vector3.new(0, 0, 0)
  311. end
  312. return CFrame.new(Closest.Character.Head.Position + Prediction)
  313. end
  314. end
  315. end
  316. end
  317.  
  318. return __Index(Self, Index)
  319. end)
  320.  
  321.  
  322. setreadonly(RawMetatable, true)
  323.  
  324. -- // Event Listeners \\ --
  325. Services.RunService.RenderStepped:Connect(function()
  326. if Info.SilentAIMEnabled == true then
  327. -- FOV --
  328. FOVCircle.Visible = true
  329. FOVCircle.Radius = Info.FieldOfView
  330. FOVCircle.Position = Services.UserInputService:GetMouseLocation()
  331.  
  332. -- Target --
  333. local Closest, Position = ClosestPlayerToCursor(Info.FieldOfView)
  334. if Closest then
  335. Target.PointA = Vector2.new(Position.X - 25, Position.Y + 25)
  336. Target.PointB = Vector2.new(Position.X + 25, Position.Y + 25)
  337. Target.PointC = Vector2.new(Position.X, Position.Y - 25)
  338. if Info.TriggeredEnabled and not Services.UserInputService:IsKeyDown(Enum.KeyCode.G) then
  339. mouse1click()
  340. end
  341. end
  342. Target.Visible = Closest ~= nil
  343. else
  344. FOVCircle.Visible = false
  345. Target.Visible = false
  346. end
  347. end)
  348.  
  349. LocalPlayer.Chatted:Connect(function(Message)
  350. if string.find(Message:lower(), "-lag") then
  351. local GunScript = (LocalPlayer.Backpack:FindFirstChild("GunInterface", true) or LocalPlayer.Character:FindFirstChild("GunInterface", true))
  352. if GunScript then
  353. ToolTip.update("Lagging...")
  354. Crash(GunScript.Parent, 100, 10)
  355. ToolTip.update("Lagged!")
  356. else
  357. ToolTip.update("Error: No gun found!")
  358. end
  359. end
  360. end)
  361.  
  362. local LastShotDetected = time()
  363. for i,v in ipairs(getconnections(Services.ReplicatedStorage.ReplicateEvent.OnClientEvent)) do
  364. local OldFunction = v.Function
  365. v.Function = function(BulletStats, IsTaser)
  366. if #BulletStats > 25 or time() - LastShotDetected > 0.02 then
  367. ToolTip.update("Bullet Overload: Removing...")
  368. return
  369. end
  370. LastShotDetected = time()
  371. OldFunction(BulletStats, IsTaser)
  372. end
  373. end
  374.  
  375. local LastSoundDetected = time()
  376. for i,v in ipairs(getconnections(Services.ReplicatedStorage.SoundEvent.OnClientEvent)) do
  377. local OldFunction = v.Function
  378. v.Function = function(Sound)
  379. if time() - LastSoundDetected > 0.02 then
  380. ToolTip.update("Audio Overload: Removing...")
  381. return
  382. end
  383. LastSoundDetected = time()
  384. OldFunction(Sound)
  385. end
  386. end
  387.  
  388.  
  389. -- // KeyBinds \\ --
  390. Services.UserInputService.InputBegan:Connect(function(Input, GameProcessed)
  391. if _G.ArrestAssist == false or GameProcessed or LocalPlayer.Character:FindFirstChild("Handcuffs") == nil then
  392. return
  393. end
  394.  
  395. local Delta = time() - LastArrest
  396. if Delta <= 15 then
  397. ToolTip.update("Wait " .. tostring(math.floor(Delta)) .. " seconds before arresting again!")
  398. end
  399.  
  400. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  401. local Closest = ClosestPlayerToCursor(_G.FOV)
  402. if Closest then
  403. local Result = workspace.Remote.arrest:InvokeServer(Closest.Character.HumanoidRootPart)
  404. ToolTip.update(Result == true and "Successfully arrested!" or Result)
  405. if Result == true then
  406. LastArrest = time()
  407. end
  408. end
  409. end
  410. end)
  411.  
  412. Services.ContextActionService:BindAction("Switch Bind", function(actionName, InputState, inputObject)
  413. if InputState == Enum.UserInputState.End then
  414. return
  415. end
  416. pcall(SwitchGuns)
  417. end, false, Enum.KeyCode.Q)
  418.  
  419. -- // Actions \\ --
  420. LocalPlayer.PlayerGui.Home.fadeFrame.Visible = false
  421.  
  422. return {};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement