Advertisement
Guest User

test 1

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