[OPEN SOURCE] BLOXSTRIKE - SILENT AIM
About
- SILENT AIM
Script
pbx pull y7ejyqykdmopen-source-bloxstrike-silent-aim.luau181 lines · 4.8kb
--[[*
*If you enjoy the script, please consider liking the post.*
*It helps motivate me to release more open-source scripts*
*and keep existing ones updated.*
*MADE BY: https://rscripts.net/@Yamis_Scripts*
*]]
local pid = 114234929420007
if game.PlaceId ~= pid then
warn(("The correct game for this script is [BloxStrike] (PlaceId: %d)."):format(pid))
return
end
local idex = identifyexecutor
if type(idex) == "function" then
local ok, ex = pcall(idex)
if ok and type(ex) == "string" then
ex = ex:lower()
if ex:find("xeno", 1, true) or ex:find("solara", 1, true) then
local sg = game:GetService("StarterGui")
local msg = {
Title = "YS HUB - BloxStrike",
Text = "Your current executor isn't supported due to missing required capabilities.",
Duration = 8
}
local shown = false
for _ = 1, 8 do
shown = pcall(sg.SetCore, sg, "SendNotification", msg)
if shown then
break
end
task.wait(0.25)
end
if not shown then
warn("[YS BloxStrike] Unsupported executor: " .. ex)
end
return
end
end
end
local plrs = game:GetService("Players")
local rs = game:GetService("ReplicatedStorage")
local lp = plrs.LocalPlayer
local pg = lp:WaitForChild("PlayerGui")
local blt = require(rs.Components.Weapon.Classes.Bullet)
local getRI = require(rs.Components.Common.GetRayIgnore)
local teams = { Terrorists = true, ["Counter-Terrorists"] = true }
local prev = pg:FindFirstChild("Silent Aim Cleanup")
local rerun = prev ~= nil
if prev then
assert(prev:IsA("BindableFunction"), "Silent Aim cleanup name is occupied")
prev:Invoke()
prev:Destroy()
end
local cast = blt._performRaycast
assert(type(cast) == "function", "BloxStrike bullet raycast is unavailable")
local rp = RaycastParams.new()
rp.FilterType = Enum.RaycastFilterType.Exclude
rp.CollisionGroup = "Bullet"
local function pick(org, rng)
local cam = workspace.CurrentCamera
local myTm = lp:GetAttribute("Team")
if not cam or not teams[myTm] then
return nil
end
local dm = workspace:GetAttribute("Gamemode") == "Deathmatch"
local look = cam.CFrame.LookVector
local best, bestA, bestD = nil, -math.huge, math.huge
rp.FilterDescendantsInstances = getRI()
local function check(ch, tm)
if not ch or not ch:IsDescendantOf(workspace) or not teams[tm]
or (not dm and tm == myTm) then
return
end
local hd = ch:FindFirstChild("Head")
if not hd or not hd:IsA("BasePart") then
return
end
local ofs = hd.Position - org
local dist = ofs.Magnitude
if dist < 0.1 or dist > rng then
return
end
local hit = workspace:Raycast(org, ofs, rp)
if hit and not hit.Instance:IsDescendantOf(ch) then
return
end
local dot = ofs:Dot(look) / dist
if dot > bestA or (dot == bestA and dist < bestD) then
best, bestA, bestD = hd, dot, dist
end
end
for _, p in plrs:GetPlayers() do
if p ~= lp and p:GetAttribute("Dead") == false
and (tonumber(p:GetAttribute("Health")) or 0) > 0 then
check(p.Character, p:GetAttribute("Team"))
end
end
local bots = workspace:FindFirstChild("Characters")
if bots then
for _, ch in bots:GetChildren() do
if ch:IsA("Model") and ch:GetAttribute("Bot") == true
and ch:GetAttribute("Dead") ~= true
and (tonumber(ch:GetAttribute("Health")) or 1) > 0 then
check(ch, ch:GetAttribute("Team"))
end
end
end
return best
end
local lastW, lastS, lastH
local function aim(b, sp)
local res = cast(b, sp)
local w = b.Weapon
local seq = w.ShotSeq
local rng = b.Properties.Range or 500
if w ~= lastW or seq ~= lastS then
lastW, lastS = w, seq
lastH = pick(res.Origin, rng)
end
local hd = lastH
if not hd or not hd:IsDescendantOf(workspace) then
return res
end
local dir = hd.Position - res.Origin
local dist = dir.Magnitude
if dist < 0.1 or dist > rng then
return res
end
res.Direction = dir.Unit
res.Distance = dist
res.Hits = {}
return res
end
local stop = Instance.new("BindableFunction")
stop.Name = "Silent Aim Cleanup"
stop.OnInvoke = function()
if blt._performRaycast == aim then
blt._performRaycast = cast
end
task.defer(function()
stop:Destroy()
end)
return true
end
blt._performRaycast = aim
stop.Parent = pg
print("[BloxStrike SA] Made by Yamis_Scripts: https://rscripts.net/@Yamis_Scripts")
if rerun then
print("[YS BloxStrike] Previous instance cleared and reran")
end
print("[YS BloxStrike] Silent Aim running")Changelog
1 version