cr8brooo

Untitled

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