Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
15,852
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.21 KB | None | 0 0
  1. --[[
  2. Aimworks 3.1 (Edit for Gun Simulator)
  3. I feel sorry for who ever made this game
  4. Just another trash simulator down the drain
  5. --]]
  6.  
  7. local accuracy = 80
  8. local aimkey = "f"
  9. local toggle_teamcheck = "h"
  10. local headshot = 35
  11. local ignoreFOV = true
  12. local ignoreWalls = true
  13. local perfect_aim = true
  14. local perfect_aim_firstperson_distance = 28
  15. local rage_triggers = false
  16. local RenderLassos = true
  17. local ShootingTeam = false
  18. local SpreadControlRadius = Vector3.new(25, 25, 15)
  19. local trigger_speed = 0.1
  20. local triggers = false
  21. local Chams = false
  22.  
  23. local Whitelist = {"ROBLOX"}
  24. for i,v in pairs(game.Players:GetChildren()) do
  25. if game.Players.LocalPlayer:IsFriendsWith(v.userId) then
  26. table.insert(Whitelist, v.Name)
  27. end
  28. end
  29.  
  30. game.Players.PlayerAdded:connect(function(player)
  31. if game.Players.LocalPlayer:IsFriendsWith(player.userId) then
  32. table.insert(Whitelist, player.Name)
  33. end
  34. end)
  35.  
  36. local aim_through_list = {nil, nil, nil}
  37. local bone_name
  38. local camera = workspace.CurrentCamera
  39. local closest_distance
  40. local deathBlock
  41. local distance
  42. local FilteringEnabled = workspace.FilteringEnabled
  43. local huge = math.huge
  44. local in_fov
  45. local lasso
  46. local localplayer = game:GetService("Players").LocalPlayer
  47. local most_viable_player
  48. local mouse = localplayer:GetMouse()
  49. local CreatorId = game.CreatorId
  50. local players_service = game:GetService("Players")
  51. local position
  52. local random = math.random
  53. local ray = Ray.new
  54. local ray_start
  55. local running = true
  56. local sleeping
  57. local target
  58. local tele_bone
  59. local targ_bone
  60. local ticksslept = 0
  61. local trigger_debounce
  62. local vector
  63. local viableplayers = {}
  64.  
  65. local function FindInstance(instance_className, search_directory)
  66.  
  67. if not search_directory then return end
  68.  
  69. for i, v in pairs(search_directory:GetChildren()) do
  70. if v.className == instance_className then
  71. return(v)
  72. end
  73. end
  74.  
  75. end
  76.  
  77. local function CreateBlockOfDeath()
  78.  
  79. if deathBlock then deathBlock:Destroy() end
  80.  
  81. deathBlock = Instance.new("Part", workspace)
  82. deathBlock.CanCollide = false
  83. deathBlock.Size = SpreadControlRadius
  84. deathBlock.Locked = true
  85. mouse.TargetFilter = deathBlock
  86. return deathBlock
  87.  
  88. end
  89.  
  90. local function ReturnsScreenCoordinatesAsVectorAndFOVChecksAsBool(player, bone)
  91.  
  92. if not bone then
  93. return {_, false}
  94. end
  95.  
  96. return camera:WorldToScreenPoint(player.Character[bone].Position)
  97.  
  98. end
  99.  
  100. local function ReturnsPlayerCheckResults(player)
  101.  
  102. if not ShootingTeam then
  103. if player.TeamColor == localplayer.TeamColor then
  104. if not (player.Neutral and localplayer.Neutral) then
  105. return false
  106. end
  107. end
  108. end
  109.  
  110. for i,v in pairs(Whitelist) do
  111. if player.Name == v then
  112. return false
  113. end
  114. end
  115.  
  116. if player == localplayer then
  117. return false
  118. end
  119.  
  120. if FindInstance("ForceField", player.Character) or FindInstance("Humanoid", player.Character, true).MaxHealth == huge then
  121. return false
  122. end
  123.  
  124. if FindInstance("Humanoid", player.Character, true).Health == 0 then
  125. return false
  126. end
  127.  
  128. local screen_position, in_fov = ReturnsScreenCoordinatesAsVectorAndFOVChecksAsBool(player, "UpperTorso")
  129. if not (in_fov or ignoreFOV) then
  130. return false
  131. else
  132. return player, screen_position
  133. end
  134.  
  135. end
  136.  
  137. local function ReturnsBoneOrFalse(player)
  138.  
  139. if perfect_aim then
  140. return (FilteringEnabled and "Head" or "Left Arm")
  141. end
  142.  
  143. if not (random(1, 100) <= accuracy) then
  144. return false
  145. end
  146.  
  147. if (random(1, 100) <= headshot) and FilteringEnabled then
  148. return "Head"
  149. end
  150.  
  151. return "Left Arm"
  152.  
  153. end
  154.  
  155.  
  156. local function ReturnsViablePlayerOrNil()
  157. aim_through_list[1], aim_through_list[2] = deathBlock, localplayer.Character
  158. local distance = 1000
  159. local closest_distance = 1000
  160. local most_viable_player = nil
  161.  
  162. local your_character = localplayer.Character
  163. local your_head = your_character and your_character:FindFirstChild "Head"
  164.  
  165. for i, player_being_checked in pairs(players_service:GetPlayers()) do
  166.  
  167. local player_or_false, targets_coordinates = ReturnsPlayerCheckResults(player_being_checked)
  168.  
  169. if player_or_false then
  170.  
  171. local char = player_being_checked.Character
  172. local target_UpperTorso = char and char:FindFirstChild "UpperTorso"
  173.  
  174. if target_UpperTorso then
  175.  
  176. if (camera.Focus.p - camera.CoordinateFrame.p).magnitude <= 1 then
  177. ray_start = your_head.Position + your_head.CFrame.lookVector * 10 + Vector3.new(0, 3, 0)
  178. else
  179. ray_start = your_head.Position + Vector3.new(0, 2, 0)
  180. end
  181.  
  182.  
  183. if not targets_coordinates then
  184. distance = (Vector2.new(targets_coordinates.X, targets_coordinates.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude
  185. else
  186. distance = (Vector2.new(targets_coordinates.X, targets_coordinates.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude
  187. end
  188. vector = (target_UpperTorso.Position - ray_start)
  189.  
  190.  
  191. if (not targets_coordinates) or (distance <= closest_distance) then
  192.  
  193. local new_ray = ray(ray_start, vector.unit * 1000)
  194. local hit, position = workspace:FindPartOnRayWithIgnoreList(new_ray, aim_through_list)
  195.  
  196. if (hit and hit:isDescendantOf(char)) or ignoreWalls then
  197. closest_distance = distance
  198. most_viable_player = player_being_checked
  199. end
  200.  
  201. end
  202.  
  203. end
  204.  
  205. end
  206. end
  207.  
  208. blockName = ReturnsBoneOrFalse(most_viable_player)
  209. sleeping = true
  210. return most_viable_player
  211.  
  212. end
  213.  
  214.  
  215. function CreateChams()
  216. if Chams then
  217. for i,v in pairs(camera:GetChildren()) do
  218. v:Destroy()
  219. end
  220. for q,player in pairs(game.Players:GetPlayers()) do
  221. if player.Character.Head:FindFirstChild("face") then
  222. player.Character.Head.face:Destroy()
  223. end
  224. if player.Character.Head:FindFirstChild("BoxHandleAdornment") then
  225. local ESP = false
  226. else
  227. if player.Name ~= localplayer.Name then
  228. for i,v in pairs(player.Character:GetChildren()) do
  229. if v:IsA("BasePart") then
  230. if v.Name ~= "Head" then
  231. local fakeChams = Instance.new("BoxHandleAdornment", v)
  232. local esp = Instance.new("BoxHandleAdornment", camera)
  233. for c,w in pairs(Whitelist) do
  234. if player.Name == w then
  235. esp.Color3 = Color3.new(0,0,255)
  236. esp.Adornee = v
  237. esp.AlwaysOnTop = true
  238. else
  239. if player.TeamColor == localplayer.TeamColor then
  240. esp.Color3 = Color3.new(0,255,0)
  241. esp.Adornee = v
  242. esp.AlwaysOnTop = true
  243. else
  244. if player.TeamColor ~= localplayer.TeamColor then
  245. esp.Color3 = Color3.new(255,0,0)
  246. esp.Adornee = v
  247. esp.AlwaysOnTop = true
  248. end
  249. end
  250. end
  251. end
  252. end
  253. end
  254. end
  255. end
  256. end
  257. end
  258. end
  259. end
  260.  
  261. CreateChams()
  262.  
  263. game.Workspace.ChildAdded:connect(function(child)
  264. if child:IsA("Model") or child:IsA("Folder") then
  265. CreateChams()
  266. end
  267. end)
  268.  
  269. game.Workspace.ChildRemoved:connect(function(child)
  270. if child:IsA("Model") or child:IsA("Folder") then
  271. CreateChams()
  272. end
  273. end)
  274.  
  275. game.Players.LocalPlayer.Changed:connect(function()
  276. CreateChams()
  277. end)
  278.  
  279. local function TargetPlayer(player)
  280.  
  281. if aim_through_list[3] then
  282. aim_through_list[3].Position = aim_through_list[3].Position + Vector3.new(0,200,0)
  283. table.remove(aim_through_list, 3)
  284. end
  285.  
  286. if not player then
  287. if lasso then lasso:Destroy() lasso = nil end
  288. target = nil
  289. lasso = Instance.new("SelectionPointLasso", camera)
  290. lasso.Humanoid, lasso.Point = FindInstance("Humanoid", localplayer.Character, true), mouse.Hit.p
  291. lasso.Color3 = Color3.new(0,255,0)
  292. return
  293. end
  294.  
  295. if RenderLassos then
  296. if lasso then lasso:Destroy() lasso = nil end
  297. lasso = Instance.new("SelectionPartLasso", camera)
  298. lasso.Humanoid, lasso.Part = FindInstance("Humanoid", player.Character, true), game.Players.LocalPlayer.Character.UpperTorso
  299. lasso.Color3 = Color3.new(0,255,0)
  300. end
  301.  
  302. bone_name = ReturnsBoneOrFalse(player)
  303.  
  304. if player.Character.Head and bone_name then
  305. tele_bone = player.Character[bone_name]
  306. tele_bone.Parent = player.Character
  307. tele_bone.Size = SpreadControlRadius
  308. tele_bone.CanCollide = false
  309. tele_bone.CFrame = CFrame.new(workspace.CurrentCamera.CoordinateFrame.p + workspace.CurrentCamera.CoordinateFrame.lookVector * perfect_aim_firstperson_distance, workspace.CurrentCamera.CoordinateFrame.p)
  310. tele_bone.Transparency=1
  311. tele_bone:ClearAllChildren()
  312. table.insert(aim_through_list, 3, tele_bone)
  313. target = player
  314. return player
  315.  
  316. end
  317.  
  318. if bone_name then
  319. deathBlock.Parent = player.Character
  320. deathBlock.CanCollide = false
  321. deathBlock.Name = bone_name
  322. else
  323. return
  324. end
  325.  
  326. target = player
  327. return player
  328.  
  329. end
  330.  
  331.  
  332. CreateBlockOfDeath()
  333. workspace.DescendantRemoving:connect(function(instance)
  334. if instance == deathBlock then CreateBlockOfDeath() end
  335. end)
  336.  
  337. local function shoot()
  338.  
  339. if not mouse1press then return end
  340.  
  341. if trigger_debounce then return end
  342.  
  343. trigger_debounce = true
  344.  
  345. if rage_triggers and mouse1press() then
  346.  
  347. mouse1press()
  348. wait(0.1)
  349. mouse1release()
  350.  
  351. elseif mouse1press then
  352.  
  353. mouse1press()
  354. wait(0)
  355. mouse1release()
  356. wait(trigger_speed)
  357.  
  358. end
  359.  
  360. trigger_debounce = false
  361.  
  362. end
  363.  
  364. game:GetService("RunService"):BindToRenderStep("First", Enum.RenderPriority.First.Value, function() -- another clusterfuck
  365.  
  366. if running then
  367. if localplayer.Character then
  368. TargetPlayer(ReturnsViablePlayerOrNil())
  369. if target and target.Character then
  370. if localplayer:GetMouse().Target == deathBlock then return end
  371. if triggers then shoot() end
  372. else
  373. deathBlock.Parent = workspace
  374. end
  375. end
  376. end
  377.  
  378. end)
  379.  
  380. local keydown = mouse.KeyDown:connect(function(keys)
  381. if (keys == aimkey) then
  382. running = not running
  383. if (running) then
  384. print("[SILENTAIM] activated.")
  385. else
  386. print("[SILENTAIM] deactivated.")
  387. end
  388. end
  389. end)
  390.  
  391. local keydowns = mouse.KeyDown:connect(function(keys)
  392. if (keys == toggle_teamcheck) then
  393. if (ShootingTeam) then
  394. print("[SILENTAIM] Team Shooting deactivated")
  395. ShootingTeam = false
  396. else
  397. print("[SILENTAIM] Team Shooting activated")
  398. ShootingTeam = true
  399. end
  400. end
  401. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement