Advertisement
klops

Anarchy Aimbow

Oct 29th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.50 KB | None | 0 0
  1. -- /$$$$$$ /$$$$$$ /$$ /$$ /$$ /$$ /$$$$$$ /$$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$ /$$
  2. -- /$$__ $$|_ $$_/| $$$ /$$$| $$ /$ | $$ /$$__ $$| $$__ $$| $$ /$$/ /$$__ $$ /$$__ $$ /$$$$
  3. -- | $$ \ $$ | $$ | $$$$ /$$$$| $$ /$$$| $$| $$ \ $$| $$ \ $$| $$ /$$/ | $$ \__/ |__/ \ $$ |_ $$
  4. -- | $$$$$$$$ | $$ | $$ $$/$$ $$| $$/$$ $$ $$| $$ | $$| $$$$$$$/| $$$$$/ | $$$$$$ /$$$$$/ | $$
  5. -- | $$__ $$ | $$ | $$ $$$| $$| $$$$_ $$$$| $$ | $$| $$__ $$| $$ $$ \____ $$ |___ $$ | $$
  6. -- | $$ | $$ | $$ | $$\ $ | $$| $$$/ \ $$$| $$ | $$| $$ \ $$| $$\ $$ /$$ \ $$ /$$ \ $$ | $$
  7. -- | $$ | $$ /$$$$$$| $$ \/ | $$| $$/ \ $$| $$$$$$/| $$ | $$| $$ \ $$| $$$$$$/ | $$$$$$//$$ /$$$$$$
  8. -- |__/ |__/|______/|__/ |__/|__/ \__/ \______/ |__/ |__/|__/ \__/ \______/ \______/|__/|______/
  9. -- "IT ACTUALLY WORKS THIS TIME"
  10.  
  11.  
  12. -- AIMWORKS 3.1: NEARLY DECENT..
  13. -- THE GREATEST AIMBOT ON ROBLOX
  14. -- AND PROBABLY THE BUGGIEST TOO
  15. -- BUT WHATEVER IT'S GOOD ENOUGH
  16. -- WRITTEN BY UNREAL AND SCAPTER
  17. -- THANKS AUSTIN, CACA22, SAFAZI
  18. -- THANKS THETRUERIAS TOO UR GR8
  19. -- THANKS FOR CHOOSING FAZE SHIT
  20. -- SHOUTOUT TO CHROME/XETRICS XD
  21.  
  22. -- i should probably be using userinputservice
  23. -- tbh i shud probably get working on proper FOV stuffs
  24. -- prune dead vars
  25. -- FOV restrictions
  26. -- ESPP :D(Chams - Scap)
  27.  
  28. -- added in this version (3.1): huge amount of bug fixes, even uglier code (i keep impressing myself with how bad this can get... i need 2 rewrite this soon),
  29.  
  30. local accuracy = 80
  31. local aimkey = "f"
  32. local toggle_teamcheck = "h" --Ez-Pz Fix so people don't have to rejoin on FFA/TDM Games.
  33. local headshot = 0
  34. local ignoreFOV = true
  35. local ignoreWalls = true
  36. local perfect_aim = true
  37. local perfect_aim_firstperson_distance = 28
  38. local rage_triggers = false --Elysian Only
  39. local RenderLassos = true
  40. local ShootingTeam = false -- will target neutral people anyways XDDD
  41. local SpreadControlRadius = Vector3.new(25, 25, 15) -- the larger you make those numbers the more likely your bullet is to hit. anything above 25, 25, 25 is a bit much. try 15, 15, 5
  42. local trigger_speed = 0.1
  43. local triggers = false --Elysian Only
  44. local Chams = falsee --Buggy
  45. local FriendCheck=true
  46.  
  47. --Player Whitelist(People who don't get shot at.)
  48. local Whitelist = {"ihanks", "Lua_Environment", "badbeech", "HeroJero", "AimWorks"}
  49. for i,v in pairs(game.Players:GetChildren()) do --Adds anyone in-game who's friends with the Currenet player into the list.
  50. if game.Players.LocalPlayer:IsFriendsWith(v.userId) and FriendCheck then
  51. table.insert(Whitelist, v.Name)
  52. end
  53. end
  54.  
  55. game.Players.PlayerAdded:connect(function(player) --Adds friends to whitelist if they're just joining the game.
  56. if game.Players.LocalPlayer:IsFriendsWith(player.userId) and FriendCheck then
  57. table.insert(Whitelist, player.Name)
  58. end
  59. end)
  60.  
  61. -- todo --
  62. _G.SwordFightMode =false -- stuff that i am testing goes in _G. so i can toggle it
  63.  
  64. -- aim engine vars
  65. -- todo: more priorities
  66. -- prune dead vars
  67. local aim_through_list = {nil, nil, nil}
  68. local bone_name
  69. local camera = workspace.CurrentCamera
  70. local closest_distance
  71. local deathBlock
  72. local distance
  73. local FilteringEnabled = workspace.FilteringEnabled
  74. local huge = math.huge
  75. local in_fov
  76. local lasso
  77. local localplayer = game:GetService("Players").LocalPlayer
  78. local most_viable_player
  79. local mouse = localplayer:GetMouse()
  80. local CreatorId = game.CreatorId
  81. local players_service = game:GetService("Players")
  82. local position
  83. local random = math.random
  84. local ray = Ray.new
  85. local ray_start
  86. local running = true
  87. local sleeping
  88. local target
  89. local tele_bone
  90. local targ_bone
  91. local ticksslept = 0
  92. local trigger_debounce
  93. local vector
  94. local viableplayers = {}
  95.  
  96. local function FindInstance(instance_className, search_directory) -- i can inline this in a LOT of places... plus i can very very easily make this return a table of all found parts if a certain parameter is passed... might add that feature to my boilerplate
  97.  
  98. if not search_directory then return end
  99.  
  100. for i, v in pairs(search_directory:GetChildren()) do
  101. if v.className == instance_className then
  102. return(v)
  103. end
  104. end
  105.  
  106. end
  107.  
  108. local function CreateBlockOfDeath()
  109.  
  110. if deathBlock then deathBlock:Destroy() end
  111.  
  112. deathBlock = Instance.new("Part", workspace)
  113. deathBlock.CanCollide = false
  114. deathBlock.Size = SpreadControlRadius
  115. deathBlock.Locked = true
  116. mouse.TargetFilter = deathBlock
  117. return deathBlock -- unnecessary
  118.  
  119. end -- Finished
  120.  
  121. local function ReturnsScreenCoordinatesAsVectorAndFOVChecksAsBool(player, bone) -- note: figure out what i wanted to do with datas in here
  122.  
  123. if not bone then
  124. return {_, false}
  125. end
  126.  
  127. return camera:WorldToScreenPoint(player.Character[bone].Position)
  128.  
  129. end
  130.  
  131. local function ReturnsPlayerCheckResults(player)
  132.  
  133. -- Checks teams. If we won't shoot teammates and they're a teammate when we're not neutral, target them. We do this now because it can save a lot of FPS.
  134. if not ShootingTeam then -- if not shooting teammates
  135. if player.TeamColor == localplayer.TeamColor then -- if we're not shooting teammates and they're teammates
  136. if not (player.Neutral and localplayer.Neutral) then -- if we're not shooting teammates and they're teammates and they're not neutral
  137. return false
  138. end
  139. end
  140. end
  141.  
  142. --Read through player 'Whitelist'
  143. for i,v in pairs(Whitelist) do
  144. if player.Name == v then
  145. return false
  146. end
  147. end
  148.  
  149. -- Checks if person is yourself.
  150. if player == localplayer then
  151. return false
  152. end
  153.  
  154. -- Checks if the player can be hurt.
  155. if FindInstance("ForceField", player.Character) or FindInstance("Humanoid", player.Character, true).MaxHealth == huge then
  156. return false
  157. end
  158.  
  159. -- Checks if they're dead.
  160. if FindInstance("Humanoid", player.Character, true).Health == 0 then
  161. return false
  162. end
  163.  
  164. -- Checks if person is in FOV.
  165. local screen_position, in_fov = ReturnsScreenCoordinatesAsVectorAndFOVChecksAsBool(player, "Torso")
  166. if not (in_fov or ignoreFOV) then
  167. return false
  168. else
  169. return player, screen_position
  170. end
  171.  
  172. end
  173.  
  174. local function ReturnsBoneOrFalse(player)
  175.  
  176. if perfect_aim then
  177. return (FilteringEnabled and "Head" or "Left Arm") -- should be Head or left arm
  178. end
  179.  
  180. if not (random(1, 100) <= accuracy) then
  181. return false
  182. end
  183.  
  184. if (random(1, 100) <= headshot) and FilteringEnabled then
  185. return "Head"
  186. end
  187.  
  188. return "Left Arm" -- should be left arm
  189.  
  190. end
  191.  
  192.  
  193. -- rewrite for cursor distance checks then optimize
  194. local function ReturnsViablePlayerOrNil() -- this is a clusterfuck i should probably branch this off into more functions... especially one for raycasting
  195. aim_through_list[1], aim_through_list[2] = deathBlock, localplayer.Character
  196. local distance = 1000
  197. local closest_distance = 1000
  198. local most_viable_player = nil
  199.  
  200. -- FPS optimizations for shitty pcs... should more than double FPS in some situations. not really necessary for me :D..
  201. -- if sleeping and ticksslept ~= 15 then
  202. -- ticksslept = ticksslept + 1
  203. -- return target
  204. -- end
  205.  
  206. local your_character = localplayer.Character
  207. local your_head = your_character and your_character:FindFirstChild "Head"
  208.  
  209. for i, player_being_checked in pairs(players_service:GetPlayers()) do -- getplayers is underrated
  210.  
  211. local player_or_false, targets_coordinates = ReturnsPlayerCheckResults(player_being_checked)
  212.  
  213. if player_or_false then
  214.  
  215. local char = player_being_checked.Character
  216. local target_torso = char and char:FindFirstChild "Torso" -- where the ray will aim/shoot for
  217.  
  218. if target_torso then
  219.  
  220. -- phantom fuckery tbh
  221. -- aim ahead (why arent we just taking advantage of ignorerays austin tf) of gun sights... Swag :O
  222. if (camera.Focus.p - camera.CoordinateFrame.p).magnitude <= 1 then
  223. ray_start = your_head.Position + your_head.CFrame.lookVector * 10 + Vector3.new(0, 3, 0)
  224. else
  225. ray_start = your_head.Position + Vector3.new(0, 2, 0)
  226. end
  227.  
  228. -- ray_start = your_head.Position + your_head.CFrame.lookVector * 10 + Vector3.new(0, 3, 0) -- doododoo do DOODODOododoDoERFAhaagr
  229.  
  230. if not targets_coordinates then -- unnecessary rn
  231. distance = (Vector2.new(targets_coordinates.X, targets_coordinates.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude -- broken
  232. else
  233. distance = (Vector2.new(targets_coordinates.X, targets_coordinates.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude
  234. end
  235. vector = (target_torso.Position - ray_start)
  236.  
  237. -- distance = vector -- bug
  238.  
  239. if (not targets_coordinates) or (distance <= closest_distance) then
  240.  
  241. -- create ray that starts at 'ray_start' and points towards the target
  242. local new_ray = ray(ray_start, vector.unit * 1000) -- "fire" ray and make sure to ignore our own character
  243. local hit, position = workspace:FindPartOnRayWithIgnoreList(new_ray, aim_through_list) -- check if the ray hit anything and if it's a descendant of the target's character
  244.  
  245. if (hit and hit:isDescendantOf(char)) or ignoreWalls then
  246. -- only change closest_distance if the target character is visible
  247. closest_distance = distance
  248. most_viable_player = player_being_checked
  249. end -- hit or ignore walls
  250.  
  251. end -- meets distance or no priority
  252.  
  253. end -- closes player_or_false
  254.  
  255. end -- closes player_or_false check
  256. end -- closes table loop
  257.  
  258. blockName = ReturnsBoneOrFalse(most_viable_player)
  259. sleeping = true
  260. return most_viable_player
  261.  
  262. end -- closes function
  263.  
  264.  
  265. function CreateChams()
  266. if Chams then
  267. for i,v in pairs(camera:GetChildren()) do
  268. v:Destroy()
  269. end
  270. for q,player in pairs(game.Players:GetPlayers()) do
  271. if player.Character.Head:FindFirstChild("face") then
  272. player.Character.Head.face:Destroy()
  273. end
  274. if player.Character.Head:FindFirstChild("BoxHandleAdornment") then
  275. local ESP = false
  276. else
  277. if player.Name ~= localplayer.Name then
  278. for i,v in pairs(player.Character:GetChildren()) do
  279. if v:IsA("BasePart") then
  280. if v.Name ~= "Head" then
  281. local fakeChams = Instance.new("BoxHandleAdornment", v)
  282. local esp = Instance.new("BoxHandleAdornment", camera)
  283. for c,w in pairs(Whitelist) do
  284. if player.Name == w then
  285. esp.Color3 = Color3.new(0,0,255)
  286. esp.Adornee = v
  287. esp.AlwaysOnTop = true
  288. else
  289. if player.TeamColor == localplayer.TeamColor then
  290. esp.Color3 = Color3.new(0,255,0)
  291. esp.Adornee = v
  292. esp.AlwaysOnTop = true
  293. else
  294. if player.TeamColor ~= localplayer.TeamColor then
  295. esp.Color3 = Color3.new(255,0,0)
  296. esp.Adornee = v
  297. esp.AlwaysOnTop = true
  298. end
  299. end
  300. end
  301. end
  302. end
  303. end
  304. end
  305. end
  306. end
  307. end
  308. end
  309. end
  310.  
  311. CreateChams()
  312.  
  313. game.Workspace.ChildAdded:connect(function(child)
  314. if child:IsA("Model") or child:IsA("Folder") then
  315. CreateChams()
  316. end
  317. end)
  318.  
  319. game.Workspace.ChildRemoved:connect(function(child)
  320. if child:IsA("Model") or child:IsA("Folder") then
  321. CreateChams()
  322. end
  323. end)
  324.  
  325. game.Players.LocalPlayer.Changed:connect(function()
  326. CreateChams()
  327. end)
  328.  
  329. local function TargetPlayer(player) -- this needs to be refactored
  330.  
  331. -- not needed anymore unless you want sticky aim (this can be a good thing) or the aimbot lags you
  332. -- sticky aim would be defined as "wont instantly target another guy if they enter the screen"
  333.  
  334. -- if ticksslept == 15 then -- ok
  335. -- ticksslept = 0
  336. -- sleeping = false
  337. -- end
  338.  
  339. if aim_through_list[3] then
  340. aim_through_list[3].Position = aim_through_list[3].Position + Vector3.new(0,200,0)
  341. table.remove(aim_through_list, 3)
  342. end
  343.  
  344. if not player then -- i see this and i pretty much give up on rewriting
  345. if lasso then lasso:Destroy() lasso = nil end -- this feels wrong. i cant stand reusing code outside functions >:(
  346. target = nil
  347. lasso = Instance.new("SelectionPointLasso", camera)
  348. lasso.Humanoid, lasso.Point = FindInstance("Humanoid", localplayer.Character, true), mouse.Hit.p
  349. lasso.Color3 = Color3.new(0,255,0)
  350. return -- this one line here determines a surprising amount about how the aimbot works XD
  351. -- thats not a good thing :(
  352. end
  353.  
  354. if RenderLassos then -- should be snaplassos... always gon be lassos tbh
  355. if lasso then lasso:Destroy() lasso = nil end
  356. lasso = Instance.new("SelectionPartLasso", camera)
  357. lasso.Humanoid, lasso.Part = FindInstance("Humanoid", player.Character, true), game.Players.LocalPlayer.Character.Torso
  358. lasso.Color3 = Color3.new(0,255,0)
  359. end
  360.  
  361. bone_name = ReturnsBoneOrFalse(player)
  362.  
  363. if player.Character.Head and bone_name then
  364. -- this lets us force headshots :D
  365. tele_bone = player.Character[bone_name]
  366. tele_bone.Parent = player.Character
  367. tele_bone.Size = SpreadControlRadius
  368. tele_bone.CanCollide = false
  369. tele_bone.CFrame = CFrame.new(workspace.CurrentCamera.CoordinateFrame.p + workspace.CurrentCamera.CoordinateFrame.lookVector * perfect_aim_firstperson_distance, workspace.CurrentCamera.CoordinateFrame.p) -- // thx to my main man safazi,,,, for this and for showing me the magic of coordinateframe <3
  370. tele_bone.Transparency=1
  371. tele_bone:ClearAllChildren()
  372. table.insert(aim_through_list, 3, tele_bone)
  373. -- swager
  374. target = player
  375. return player
  376.  
  377. end
  378.  
  379. if bone_name then
  380. deathBlock.Parent = player.Character
  381. deathBlock.CanCollide = false
  382. deathBlock.Name = bone_name
  383. else
  384. return
  385. end
  386.  
  387. target = player
  388. return player
  389.  
  390. end
  391.  
  392.  
  393. --[[
  394.  
  395. INIT PROCESS DOCUMENTATION:
  396.  
  397. 1] CREATE DEATHBLOCK
  398. 2] MAKE DEATHBLOCK REGENERATE
  399. 3] USE BINDTORENDERSTEP TO START AIMBOT LOOP
  400. 4] DETECT KEY INPUT (WITHOUT USERINPUTSERVICE. I KNOW THAT IM LAME)
  401.  
  402. ]]--
  403.  
  404.  
  405. CreateBlockOfDeath()
  406. workspace.DescendantRemoving:connect(function(instance)
  407. if instance == deathBlock then CreateBlockOfDeath() end
  408. end)
  409. -- Keeps blockie safe :33 XD
  410.  
  411. -- test? havent tried
  412. local function shoot() -- elysian only :33333 XDd. bother jordan, not mememememe.
  413.  
  414. if not mouse1press then return end
  415.  
  416. if trigger_debounce then return end
  417.  
  418. trigger_debounce = true
  419.  
  420. if rage_triggers and mouse1press() then
  421.  
  422. mouse1press()
  423. wait(0.1)
  424. mouse1release()
  425.  
  426. elseif mouse1press then
  427.  
  428. mouse1press()
  429. wait(0)
  430. mouse1release()
  431. wait(trigger_speed)
  432.  
  433. end
  434.  
  435. trigger_debounce = false
  436.  
  437. end
  438.  
  439. -- refaactorrrr
  440. game:GetService("RunService"):BindToRenderStep("First", Enum.RenderPriority.First.Value, function() -- another clusterfuck
  441.  
  442. if running then
  443. if localplayer.Character then -- pretty sure i do this in getviableplayer lmao tbh
  444. TargetPlayer(ReturnsViablePlayerOrNil())
  445. if target and target.Character then
  446. if localplayer:GetMouse().Target == deathBlock then return end -- praise targetfilter!
  447. -- later
  448. -- deathBlock.CFrame = CFrame.new(localplayer.Character.Head.Position + (mouse.Hit.p + localplayer.Character.Head.Position).unit * 16)
  449. -- print(deathBlock)
  450. if triggers then shoot() end
  451. else
  452. deathBlock.Parent = workspace
  453. end
  454. end
  455. end
  456.  
  457. end)
  458.  
  459. local keydown = mouse.KeyDown:connect(function(keys)
  460. if (keys == aimkey) then
  461. running = not running
  462. if (running) then
  463. print("[SILENTAIM] activated.")
  464. else
  465. print("[SILENTAIM] deactivated.")
  466. end
  467. end
  468. end)
  469.  
  470. local keydowns = mouse.KeyDown:connect(function(keys)
  471. if (keys == toggle_teamcheck) then
  472. if (ShootingTeam) then
  473. print("[SILENTAIM] Team Shooting deactivated")
  474. ShootingTeam = false
  475. else
  476. print("[SILENTAIM] Team Shooting activated")
  477. ShootingTeam = true
  478. end
  479. end
  480. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement