Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Aimworks 3.1 (Edit for Gun Simulator)
- I feel sorry for who ever made this game
- Just another trash simulator down the drain
- --]]
- local accuracy = 80
- local aimkey = "f"
- local toggle_teamcheck = "h"
- local headshot = 35
- local ignoreFOV = true
- local ignoreWalls = true
- local perfect_aim = true
- local perfect_aim_firstperson_distance = 28
- local rage_triggers = false
- local RenderLassos = true
- local ShootingTeam = false
- local SpreadControlRadius = Vector3.new(25, 25, 15)
- local trigger_speed = 0.1
- local triggers = false
- local Chams = false
- local Whitelist = {"ROBLOX"}
- for i,v in pairs(game.Players:GetChildren()) do
- if game.Players.LocalPlayer:IsFriendsWith(v.userId) then
- table.insert(Whitelist, v.Name)
- end
- end
- game.Players.PlayerAdded:connect(function(player)
- if game.Players.LocalPlayer:IsFriendsWith(player.userId) then
- table.insert(Whitelist, player.Name)
- end
- end)
- local aim_through_list = {nil, nil, nil}
- local bone_name
- local camera = workspace.CurrentCamera
- local closest_distance
- local deathBlock
- local distance
- local FilteringEnabled = workspace.FilteringEnabled
- local huge = math.huge
- local in_fov
- local lasso
- local localplayer = game:GetService("Players").LocalPlayer
- local most_viable_player
- local mouse = localplayer:GetMouse()
- local CreatorId = game.CreatorId
- local players_service = game:GetService("Players")
- local position
- local random = math.random
- local ray = Ray.new
- local ray_start
- local running = true
- local sleeping
- local target
- local tele_bone
- local targ_bone
- local ticksslept = 0
- local trigger_debounce
- local vector
- local viableplayers = {}
- local function FindInstance(instance_className, search_directory)
- if not search_directory then return end
- for i, v in pairs(search_directory:GetChildren()) do
- if v.className == instance_className then
- return(v)
- end
- end
- end
- local function CreateBlockOfDeath()
- if deathBlock then deathBlock:Destroy() end
- deathBlock = Instance.new("Part", workspace)
- deathBlock.CanCollide = false
- deathBlock.Size = SpreadControlRadius
- deathBlock.Locked = true
- mouse.TargetFilter = deathBlock
- return deathBlock
- end
- local function ReturnsScreenCoordinatesAsVectorAndFOVChecksAsBool(player, bone)
- if not bone then
- return {_, false}
- end
- return camera:WorldToScreenPoint(player.Character[bone].Position)
- end
- local function ReturnsPlayerCheckResults(player)
- if not ShootingTeam then
- if player.TeamColor == localplayer.TeamColor then
- if not (player.Neutral and localplayer.Neutral) then
- return false
- end
- end
- end
- for i,v in pairs(Whitelist) do
- if player.Name == v then
- return false
- end
- end
- if player == localplayer then
- return false
- end
- if FindInstance("ForceField", player.Character) or FindInstance("Humanoid", player.Character, true).MaxHealth == huge then
- return false
- end
- if FindInstance("Humanoid", player.Character, true).Health == 0 then
- return false
- end
- local screen_position, in_fov = ReturnsScreenCoordinatesAsVectorAndFOVChecksAsBool(player, "Torso")
- if not (in_fov or ignoreFOV) then
- return false
- else
- return player, screen_position
- end
- end
- local function ReturnsBoneOrFalse(player)
- if perfect_aim then
- return (FilteringEnabled and "Head" or "Left Arm")
- end
- if not (random(1, 100) <= accuracy) then
- return false
- end
- if (random(1, 100) <= headshot) and FilteringEnabled then
- return "Head"
- end
- return "Left Arm"
- end
- local function ReturnsViablePlayerOrNil()
- aim_through_list[1], aim_through_list[2] = deathBlock, localplayer.Character
- local distance = 1000
- local closest_distance = 1000
- local most_viable_player = nil
- local your_character = localplayer.Character
- local your_head = your_character and your_character:FindFirstChild "Head"
- for i, player_being_checked in pairs(players_service:GetPlayers()) do
- local player_or_false, targets_coordinates = ReturnsPlayerCheckResults(player_being_checked)
- if player_or_false then
- local char = player_being_checked.Character
- local target_Torso = char and char:FindFirstChild "Torso"
- if target_Torso then
- if (camera.Focus.p - camera.CoordinateFrame.p).magnitude <= 1 then
- ray_start = your_head.Position + your_head.CFrame.lookVector * 10 + Vector3.new(0, 3, 0)
- else
- ray_start = your_head.Position + Vector3.new(0, 2, 0)
- end
- if not targets_coordinates then
- distance = (Vector2.new(targets_coordinates.X, targets_coordinates.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude
- else
- distance = (Vector2.new(targets_coordinates.X, targets_coordinates.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude
- end
- vector = (target_Torso.Position - ray_start)
- if (not targets_coordinates) or (distance <= closest_distance) then
- local new_ray = ray(ray_start, vector.unit * 1000)
- local hit, position = workspace:FindPartOnRayWithIgnoreList(new_ray, aim_through_list)
- if (hit and hit:isDescendantOf(char)) or ignoreWalls then
- closest_distance = distance
- most_viable_player = player_being_checked
- end
- end
- end
- end
- end
- blockName = ReturnsBoneOrFalse(most_viable_player)
- sleeping = true
- return most_viable_player
- end
- function CreateChams()
- if Chams then
- for i,v in pairs(camera:GetChildren()) do
- v:Destroy()
- end
- for q,player in pairs(game.Players:GetPlayers()) do
- if player.Character.Head:FindFirstChild("face") then
- player.Character.Head.face:Destroy()
- end
- if player.Character.Head:FindFirstChild("BoxHandleAdornment") then
- local ESP = false
- else
- if player.Name ~= localplayer.Name then
- for i,v in pairs(player.Character:GetChildren()) do
- if v:IsA("BasePart") then
- if v.Name ~= "Head" then
- local fakeChams = Instance.new("BoxHandleAdornment", v)
- local esp = Instance.new("BoxHandleAdornment", camera)
- for c,w in pairs(Whitelist) do
- if player.Name == w then
- esp.Color3 = Color3.new(0,0,255)
- esp.Adornee = v
- esp.AlwaysOnTop = true
- else
- if player.TeamColor == localplayer.TeamColor then
- esp.Color3 = Color3.new(0,255,0)
- esp.Adornee = v
- esp.AlwaysOnTop = true
- else
- if player.TeamColor ~= localplayer.TeamColor then
- esp.Color3 = Color3.new(255,0,0)
- esp.Adornee = v
- esp.AlwaysOnTop = true
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- CreateChams()
- game.Workspace.ChildAdded:connect(function(child)
- if child:IsA("Model") or child:IsA("Folder") then
- CreateChams()
- end
- end)
- game.Workspace.ChildRemoved:connect(function(child)
- if child:IsA("Model") or child:IsA("Folder") then
- CreateChams()
- end
- end)
- game.Players.LocalPlayer.Changed:connect(function()
- CreateChams()
- end)
- local function TargetPlayer(player)
- if aim_through_list[3] then
- aim_through_list[3].Position = aim_through_list[3].Position + Vector3.new(0,200,0)
- table.remove(aim_through_list, 3)
- end
- if not player then
- if lasso then lasso:Destroy() lasso = nil end
- target = nil
- lasso = Instance.new("SelectionPointLasso", camera)
- lasso.Humanoid, lasso.Point = FindInstance("Humanoid", localplayer.Character, true), mouse.Hit.p
- lasso.Color3 = Color3.new(0,255,0)
- return
- end
- if RenderLassos then
- if lasso then lasso:Destroy() lasso = nil end
- lasso = Instance.new("SelectionPartLasso", camera)
- lasso.Humanoid, lasso.Part = FindInstance("Humanoid", player.Character, true), game.Players.LocalPlayer.Character.Torso
- lasso.Color3 = Color3.new(0,255,0)
- end
- bone_name = ReturnsBoneOrFalse(player)
- if player.Character.Head and bone_name then
- tele_bone = player.Character[bone_name]
- tele_bone.Parent = player.Character
- tele_bone.Size = SpreadControlRadius
- tele_bone.CanCollide = false
- tele_bone.CFrame = CFrame.new(workspace.CurrentCamera.CoordinateFrame.p + workspace.CurrentCamera.CoordinateFrame.lookVector * perfect_aim_firstperson_distance, workspace.CurrentCamera.CoordinateFrame.p)
- tele_bone.Transparency=1
- tele_bone:ClearAllChildren()
- table.insert(aim_through_list, 3, tele_bone)
- target = player
- return player
- end
- if bone_name then
- deathBlock.Parent = player.Character
- deathBlock.CanCollide = false
- deathBlock.Name = bone_name
- else
- return
- end
- target = player
- return player
- end
- CreateBlockOfDeath()
- workspace.DescendantRemoving:connect(function(instance)
- if instance == deathBlock then CreateBlockOfDeath() end
- end)
- local function shoot()
- if not mouse1press then return end
- if trigger_debounce then return end
- trigger_debounce = true
- if rage_triggers and mouse1press() then
- mouse1press()
- wait(0.1)
- mouse1release()
- elseif mouse1press then
- mouse1press()
- wait(0)
- mouse1release()
- wait(trigger_speed)
- end
- trigger_debounce = false
- end
- game:GetService("RunService"):BindToRenderStep("First", Enum.RenderPriority.First.Value, function() -- another clusterfuck
- if running then
- if localplayer.Character then
- TargetPlayer(ReturnsViablePlayerOrNil())
- if target and target.Character then
- if localplayer:GetMouse().Target == deathBlock then return end
- if triggers then shoot() end
- else
- deathBlock.Parent = workspace
- end
- end
- end
- end)
- local keydown = mouse.KeyDown:connect(function(keys)
- if (keys == aimkey) then
- running = not running
- if (running) then
- print("[SILENTAIM] activated.")
- else
- print("[SILENTAIM] deactivated.")
- end
- end
- end)
- local keydowns = mouse.KeyDown:connect(function(keys)
- if (keys == toggle_teamcheck) then
- if (ShootingTeam) then
- print("[SILENTAIM] Team Shooting deactivated")
- ShootingTeam = false
- else
- print("[SILENTAIM] Team Shooting activated")
- ShootingTeam = true
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement