Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getgenv().silentaim_settings = {
- fov = 150,
- hitbox = "Head",
- fovcircle = true,
- }
- -- Services
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- -- Player
- local Player = Players.LocalPlayer
- local Mouse = Player:GetMouse()
- local CurrentCamera = workspace.CurrentCamera
- local function GetClosest(Fov)
- local Target, Closest = nil, Fov or math.huge
- for i,v in pairs(Players:GetPlayers()) do
- if (v.Character and v ~= Player and v.Character:FindFirstChild(getgenv().silentaim_settings.hitbox)) then
- local Position, OnScreen = CurrentCamera:WorldToScreenPoint(v.Character[getgenv().silentaim_settings.hitbox].Position)
- local Distance = (Vector2.new(Position.X, Position.Y) - Vector2.new(Mouse.X, Mouse.Y)).Magnitude
- if (Distance < Closest and OnScreen) then
- Closest = Distance
- Target = v
- end
- end
- end
- return Target
- end
- local Target
- local CircleInline = Drawing.new("Circle")
- local CircleOutline = Drawing.new("Circle")
- RunService.Stepped:Connect(function()
- CircleInline.Radius = getgenv().silentaim_settings.fov
- CircleInline.Thickness = 2
- CircleInline.Position = Vector2.new(Mouse.X, Mouse.Y + 36)
- CircleInline.Transparency = 1
- CircleInline.Color = Color3.fromRGB(255, 255, 255)
- CircleInline.Visible = getgenv().silentaim_settings.fovcircle
- CircleInline.ZIndex = 2
- CircleOutline.Radius = getgenv().silentaim_settings.fov
- CircleOutline.Thickness = 4
- CircleOutline.Position = Vector2.new(Mouse.X, Mouse.Y + 36)
- CircleOutline.Transparency = 1
- CircleOutline.Color = Color3.new()
- CircleOutline.Visible = getgenv().silentaim_settings.fovcircle
- CircleOutline.ZIndex = 1
- Target = GetClosest(getgenv().silentaim_settings.fov)
- end)
- local Old; Old = hookmetamethod(game, "__namecall", function(Self, ...)
- local Args = {...}
- if (not checkcaller() and getnamecallmethod() == "FindPartOnRayWithIgnoreList") then
- if (table.find(Args[2], workspace.WorldIgnore.Ignore) and Target and Target.Character) then
- local Origin = Args[1].Origin
- Args[1] = Ray.new(Origin, Target.Character[getgenv().silentaim_settings.hitbox].Position - Origin)
- end
- end
- return Old(Self, unpack(Args))
- end)
- local dwEntities = game:GetService("Players")
- local dwLocalPlayer = dwEntities.LocalPlayer
- local dwRunService = game:GetService("RunService")
- local settings_tbl = {
- ESP_Enabled = true,
- ESP_TeamCheck = false,
- Chams = true,
- Chams_Color = Color3.fromRGB(255,0,0),
- Chams_Transparency = 0.1,
- Chams_Glow_Color = Color3.fromRGB(255,0,0)
- }
- function destroy_chams(char)
- for k,v in next, char:GetChildren() do
- if v:IsA("BasePart") and v.Transparency ~= 1 then
- if v:FindFirstChild("Glow") and
- v:FindFirstChild("Chams") then
- v.Glow:Destroy()
- v.Chams:Destroy()
- end
- end
- end
- end
- dwRunService.Heartbeat:Connect(function()
- if settings_tbl.ESP_Enabled then
- for k,v in next, dwEntities:GetPlayers() do
- if v ~= dwLocalPlayer then
- if v.Character and
- v.Character:FindFirstChild("HumanoidRootPart") and
- v.Character:FindFirstChild("Humanoid") and
- v.Character:FindFirstChild("Humanoid").Health ~= 0 then
- if settings_tbl.ESP_TeamCheck == false then
- local char = v.Character
- for k,b in next, char:GetChildren() do
- if b:IsA("BasePart") and
- b.Transparency ~= 1 then
- if settings_tbl.Chams then
- if not b:FindFirstChild("Glow") and
- not b:FindFirstChild("Chams") then
- local chams_box = Instance.new("BoxHandleAdornment", b)
- chams_box.Name = "Chams"
- chams_box.AlwaysOnTop = true
- chams_box.ZIndex = 4
- chams_box.Adornee = b
- chams_box.Color3 = settings_tbl.Chams_Color
- chams_box.Transparency = settings_tbl.Chams_Transparency
- chams_box.Size = b.Size + Vector3.new(0.02, 0.02, 0.02)
- local glow_box = Instance.new("BoxHandleAdornment", b)
- glow_box.Name = "Glow"
- glow_box.AlwaysOnTop = false
- glow_box.ZIndex = 3
- glow_box.Adornee = b
- glow_box.Color3 = settings_tbl.Chams_Glow_Color
- glow_box.Size = chams_box.Size + Vector3.new(0.13, 0.13, 0.13)
- end
- else
- destroy_chams(char)
- end
- end
- end
- else
- if v.Team == dwLocalPlayer.Team then
- destroy_chams(v.Character)
- end
- end
- else
- destroy_chams(v.Character)
- end
- end
- end
- else
- for k,v in next, dwEntities:GetPlayers() do
- if v ~= dwLocalPlayer and
- v.Character and
- v.Character:FindFirstChild("HumanoidRootPart") and
- v.Character:FindFirstChild("Humanoid") and
- v.Character:FindFirstChild("Humanoid").Health ~= 0 then
- destroy_chams(v.Character)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement