Run it
Copy the script and paste it into your executor.
Players = :()
ReplicatedStorage = :()
RunService = :()
UserInputService = :()
Lighting = :()
Workspace = :()
TweenService = :()
Teams = :()
LocalPlayer = Players.LocalPlayer
(conn)
env = (() == ())
env._NF_Conns = env._NF_Conns {}
conn .(env._NF_Conns, conn)
conn
env = (() == ())
(env._NF_Conns) ==
_, c (env._NF_Conns)
(() c:() )
env._NF_Conns = {}
UI
(readfile) ==
_, filename ({ , })
ok, content = (readfile, filename)
ok content content ~=
loaderOk, lib = (() (content)() )
loaderOk (lib) == (lib.CreateWindow) ==
UI = lib
UI
UI = (:())()
((UI) == (UI.CreateWindow) == , )
Settings = {
AntiJump = ,
AntiAFK = ,
AntiFling = ,
AntiKillTarget = ,
AntiKillFreecam = ,
AntiKillFreecamSpeed = ,
CarFly = ,
CarFlySpeed = ,
CarTelekinesis = ,
CarThrowForce = ,
CarHighlight = ,
CarHighlightMode = ,
CarTornado = ,
CarTornadoRadius = ,
CarTornadoSpeed = ,
TargetAntiAimbot = ,
TaseBypass = ,
AmmoHUD = ,
ReloadHUD = ,
PurpleBullets = ,
InfJump = ,
AutoSprint = ,
Underground = ,
UndergroundDepth = ,
UndergroundSpeed = ,
Noclip = ,
QuickRespawn = ,
ReturnOnDeath = ,
AutoWeapon = ,
ESP = ,
TeamColors = ,
Highlight = ,
HighlightColor = .(, , ),
HighlightTransparency = ,
Fullbright = ,
ESPBoxes = ,
ESPHealthBars = ,
ESPWeapon = ,
Tracers = ,
TracerOrigin = ,
SilentTargetSnap = ,
CustomCrosshair = ,
CrosshairStyle = ,
CrosshairGap = ,
Hitmarker = ,
KillEffect = ,
KillEffectStyle = ,
DeathEffect = ,
DeathEffectStyle = ,
RespawnEffect = ,
PlayerTrail = ,
WorldTint = ,
WorldTintColor = ,
CustomSky = ,
SkyPreset = ,
CustomFOV = ,
CameraFOV = ,
NoFog = ,
TargetTeam = ,
RapidFire = ,
SilentAim = ,
SilentAimFOV = ,
SilentAimHitPart = ,
SilentAimHitChance = ,
SilentAimTeamCheck = ,
SilentAimWallCheck = ,
SilentAimShowFOV = ,
WeaponScroll = ,
WeaponScrollDelay = ,
FireRate = ,
TargetKillerWeapon = ,
Spinbot = ,
SpinSpeed = ,
SpinMode = ,
Bhop = ,
BhopAuto = ,
BhopHopHeight = ,
BhopSpeedBoost = ,
BhopAccelerate = ,
BhopPreserveMomentum = ,
}
.Settings = Settings
UndergroundConnection =
UndergroundSavedCFrame =
ESPObjects = {}
OriginalLighting = {
Brightness = Lighting.Brightness,
ClockTime = Lighting.ClockTime,
FogEnd = Lighting.FogEnd,
FogStart = Lighting.FogStart,
FogColor = Lighting.FogColor,
Ambient = Lighting.Ambient,
OutdoorAmbient = Lighting.OutdoorAmbient,
ColorShift_Top = Lighting.ColorShift_Top,
ColorShift_Bottom = Lighting.ColorShift_Bottom,
GlobalShadows = Lighting.GlobalShadows,
ExposureCompensation = Lighting.ExposureCompensation,
}
()
char = LocalPlayer.Character
char , ,
char, char:(), char:()
(cls, props, parent)
inst = .(cls)
props
k, v (props)
inst[k] = v
parent inst.Parent = parent
inst
(root)
root
root.AssemblyLinearVelocity = .zero
root.AssemblyAngularVelocity = .zero
GUN_NAME_HINTS = { , , , , , , , , , }
(tool)
tool tool:()
tool:() tool:() ==
n = tool.Name:()
_, hint (GUN_NAME_HINTS)
n:(hint)
(toolName)
n = (toolName ):()
n:() , , ,
n:() , , ,
n:() , , ,
n:() , , ,
n:() n:() , , ,
n:() , , ,
n:() , , ,
n:() , , ,
n:() , , ,
, , ,
(tool)
tool
_, attrName ({ , , , , })
v = (tool:(attrName))
v v >= .(v)
gs = tool:()
gs
ok, st = (, gs)
ok (st) == (st.Bullets) (st.Bullets) >=
.((st.Bullets))
n = (tool.Name ):()
n:() n:()
(char, includeShieldName)
char
char:() char:()
_, d (char:())
n = d.Name:()
d:() n:() (includeShieldName n:())
(player)
obj = ESPObjects[player]
obj
obj.Highlight obj.Highlight:()
obj.Billboard obj.Billboard:()
ESPObjects[player] =
(player)
Settings.TeamColors player.Team player.Team.TeamColor player.Team.TeamColor.Color
Settings.HighlightColor
(player)
Settings.ESP
(player)
player == LocalPlayer
(player)
char = player.Character
root = char char:()
root
color = (player)
hl = Settings.Highlight (, { Name = , Adornee = char, DepthMode = .HighlightDepthMode.AlwaysOnTop, FillTransparency = Settings.HighlightTransparency, OutlineTransparency = , FillColor = color, OutlineColor = color }, char)
bb = (, { Name = , Adornee = root, Size = .(, ), StudsOffset = .(, , ), AlwaysOnTop = , Active = })
lbl = (, { BackgroundTransparency = , Size = .(, ), Font = .Font.GothamSemibold, TextSize = , TextStrokeTransparency = , TextColor3 = color, Text = player.DisplayName, AutoButtonColor = , Active = , Selectable = }, bb)
lbl:(, player.UserId)
bb.Parent = root
ESPObjects[player] = { Highlight = hl, Billboard = bb, Label = lbl }
lastESPUpdate =
()
Settings.ESP
player (ESPObjects) (player)
now = .()
now - lastESPUpdate <
lastESPUpdate = now
_, _, myRoot = ()
myPos = myRoot myRoot.Position
_, player (Players:())
player ~= LocalPlayer
char = player.Character
hum = char char:()
root = char char:()
char root hum hum.Health >
existing = ESPObjects[player]
existing (Settings.Highlight existing.Highlight) ( Settings.Highlight existing.Highlight)
(player)
obj = ESPObjects[player]
obj obj.Label
dist = myPos .((root.Position - myPos).Magnitude)
hp = .(hum.Health)
obj.LastDist ~= dist obj.LastHP ~= hp
obj.LastDist, obj.LastHP = dist, hp
obj.Label.Text = .(, player.DisplayName, dist, hp)
col = (player)
obj.LastColor ~= col
obj.LastColor = col
obj.Label.TextColor3 = col
obj.Highlight
obj.Highlight.FillColor = col
obj.Highlight.OutlineColor = col
alpha = Settings.HighlightTransparency
obj.Highlight obj.Highlight.FillTransparency ~= alpha obj.Highlight.FillTransparency = alpha
ESPObjects[player]
(player)
_lastTeleportTime =
_tpKeyHeld =
UserInputService.InputBegan:((input, gpe)
input.UserInputType == .UserInputType.Keyboard input.KeyCode == .KeyCode.Q
_tpKeyHeld =
gpe _tpKeyHeld
isClick = input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch
isClick (.() - _lastTeleportTime) <
cam = .CurrentCamera
_, _, myRoot = ()
cam myRoot
clickPos = (input.UserInputType == .UserInputType.Touch)
.(input.Position.X, input.Position.Y)
UserInputService:()
bestPlayer, bestDist = ,
player, obj (ESPObjects)
bb = obj.Billboard
bb bb.Adornee bb.Parent
sp, onScreen = cam:(bb.Adornee.Position + bb.StudsOffset)
onScreen
d = (.(sp.X, sp.Y) - clickPos).Magnitude
d < bestDist bestDist, bestPlayer = d, player
targetRoot = bestPlayer bestPlayer.Character bestPlayer.Character:()
targetRoot
_lastTeleportTime = .()
myRoot.CFrame = .(targetRoot.Position - targetRoot.CFrame.LookVector * , targetRoot.Position)
(myRoot)
)
UserInputService.InputEnded:((input)
input.UserInputType == .UserInputType.Keyboard input.KeyCode == .KeyCode.Q _tpKeyHeld =
)
CustomWeapon = (()
state = { Enabled = , Saved = {}, Applied = {} }
MESHES, TEXTURES = {}, {}
_, name ({ , , , , , , })
MESHES[name] =
TEXTURES[name] =
(tool)
tool tool:() state.Applied[tool]
meshId = MESHES[tool.Name]
meshId
saved = {}
texId = TEXTURES[tool.Name]
_, d (tool:())
d:() d.Name ~=
saved[d] = d.Transparency
d.Transparency =
(()
part = (, { Name = , MeshId = meshId, TextureID = texId d.TextureID , Size = d.Size, Anchored = , CanCollide = , CanQuery = , CanTouch = , Massless = , Transparency = , = d.CFrame }, d.Parent)
(, { Part0 = part, Part1 = d }, part)
)
(saved)
state.Saved[tool] = saved
state.Applied[tool] =
(tool)
state.Applied[tool]
_, d (tool:())
d.Name == (() d:() )
state.Saved[tool]
orig, val (state.Saved[tool])
orig orig.Parent (() orig.Transparency = val )
state.Applied[tool], state.Saved[tool] = ,
hooked = {}
(tool)
tool tool:() hooked[tool]
hooked[tool] =
tool.Equipped:(() state.Enabled (tool) )
tool.Unequipped:(() (tool) )
state.Enabled (tool)
(char)
_, ch (char:())
ch:() (ch)
char.ChildAdded:((ch)
ch:() .(); (ch)
)
char.ChildRemoved:((ch)
ch:() (ch)
)
charHooked =
(v)
v == state.Enabled state.Enabled
state.Enabled = v
v
LocalPlayer.Character (LocalPlayer.Character)
charHooked
charHooked =
LocalPlayer.CharacterAdded:((c)
state.Enabled (c)
)
tool (state.Applied) (tool)
state.Applied, state.Saved = {}, {}
state.Enabled
{
Set = setEnabled,
Get = () state.Enabled ,
SetMeshes = (tbl) .(MESHES); k, v (tbl) MESHES[k] = v ,
SetTextures = (tbl) .(TEXTURES); k, v (tbl) TEXTURES[k] = v ,
}
)()
DamageNumbers = (()
state = { Enabled = , LastHP = {}, PlayerConns = {} }
(pos, amount)
anchor = (, { Name = , Size = .(, , ), Transparency = , CanCollide = , CanQuery = , CanTouch = , Anchored = , Massless = , = .(pos) }, Workspace.CurrentCamera)
bb = (, { Name = , Size = .(, ), AlwaysOnTop = , LightInfluence = , MaxDistance = , Adornee = anchor }, Workspace.CurrentCamera)
label = (, { BackgroundTransparency = , Size = .(, ), Font = .Font.GothamBold, TextScaled = , TextColor3 = .(, , ), TextStrokeTransparency = , TextStrokeColor3 = .(, , ), Text = .. (amount) }, bb)
.(()
t0 = .()
.() - t0 <
t = (.() - t0)
anchor.Parent anchor.CFrame = .(pos + .(, * t, ))
label.TextTransparency = t
label.TextStrokeTransparency = t
.()
bb.Parent bb:()
anchor.Parent anchor:()
)
(player)
state.PlayerConns[player]
_, c (state.PlayerConns[player]) (() c:() )
state.PlayerConns[player] =
state.LastHP[player] =
(player)
player == LocalPlayer
(player)
state.Enabled
char = player.Character
hum = char char:()
hum hum.Health <=
state.LastHP[player] = hum.Health
state.PlayerConns[player] = {
hum.HealthChanged:((hp)
state.Enabled
delta = (state.LastHP[player] hp) - hp
state.LastHP[player] = hp
delta >
ref = char:() char:()
pos = ref (ref.Position + .(, , )) .zero
(pos, .(delta + ))
)
}
(v)
v == state.Enabled state.Enabled
state.Enabled = v
v
state.LastHP = {}
_, p (Players:()) (p)
p (state.PlayerConns) (p)
state.PlayerConns, state.LastHP = {}, {}
_, obj (Workspace.CurrentCamera:())
obj.Name == obj.Name ==
(() obj:() )
state.Enabled
{ Set = setEnabled, Get = () state.Enabled , HookPlayer = hookPlayer, CleanupPlayer = unhookPlayer }
)()
FullbrightConn =
isLightingModifying =
()
isLightingModifying
isLightingModifying =
(()
Lighting.Brightness =
Lighting.FogStart =
Lighting.FogEnd =
Lighting.Ambient = .(, , )
Lighting.OutdoorAmbient = .(, , )
Lighting.GlobalShadows =
Lighting.ExposureCompensation =
)
isLightingModifying =
()
FullbrightConn
FullbrightConn:()
FullbrightConn =
isLightingModifying
isLightingModifying =
(()
k, v (OriginalLighting) Lighting[k] = v
)
isLightingModifying =
()
Settings.Fullbright
FullbrightConn
()
FullbrightConn = Lighting:():(()
Settings.Fullbright isLightingModifying ()
)
()
GIVER_DEFS = { fnfal = { {, , , , }, }, ak = { {, , , , }, }, remington = { {, , , , }, }, shotgun = { {, , , , }, }, mp5 = { {, , , , }, }, sniper = { {, , , , }, } }
(indices, nested)
children = :()
(obj)
obj
tg = obj:()
nested tg tg = tg:()
(tg tg:()) tg
_, idx (indices)
hit = (children[idx])
hit hit
center = indices[]
i = .(, center - ), .(#children, center + )
hit = (children[i])
hit hit
(weaponName)
weaponName
n = (weaponName):()
n:() n:()
obj = :()
inner = obj obj:()
inner inner:() inner
obj obj:() obj
key, spec (GIVER_DEFS)
n:(key)
found = (spec[], spec[])
found found
items = :()
givers = items items:()
givers
_, m (givers:())
m.Name:():(n, , ) (n:() m.Name:():()) ((n:() n:()) m.Name:():())
tg = m:() m:()
tg tg:() tg
(target)
char, hum, root = ()
char root hum
(char, )
UI:({ Title = , Content = , Duration = })
giver
(()
giver = (target) == () (target)
)
giver giver:()
UI:({ Title = , Content = , Duration = })
savedCF = root.CFrame
offset = .(, , )
root.CFrame = giver.CFrame + offset
bv = (, { MaxForce = .(, , ), Velocity = -offset.Unit * }, root)
.()
bv:()
root.CFrame = savedCF
(() hum:(.HumanoidStateType.GettingUp) )
(tool)
tool tool:() tool:() ~=
orig = tool:()
orig ==
cur = (tool:())
orig = (cur ( Settings.RapidFire cur > )) cur (, (tool.Name))
(() tool:(, orig) )
target = Settings.RapidFire .((Settings.FireRate) , ) orig
(() tool:(, target) )
RapidFireHooked = {}
(tool)
tool tool:() RapidFireHooked[tool]
RapidFireHooked[tool] =
Settings.RapidFire (tool)
(tool.Equipped:(()
Settings.RapidFire (tool)
))
(char)
_, ch (char:())
ch:() (ch)
(char.ChildAdded:((ch)
ch:() .(); (ch)
))
(LocalPlayer.CharacterAdded:((char)
.()
(char)
))
LocalPlayer.Character (LocalPlayer.Character)
AutoCriminal = (()
state = { Enabled = , Thread = , LastCF = , Teleporting = }
CRIM_COL = .(, , )
COP_COL = .(, , )
CRIM_CF = .(-, , , , , -, , , , , , )
()
ti = :()
ti
entry = ti:() ti:(LocalPlayer.Name)
frame = entry entry:()
(frame frame:()) frame.BackgroundColor3
(a, b)
.(a.R - b.R) < .(a.G - b.G) < .(a.B - b.B) <
()
state.Enabled state.Teleporting
color = ()
color (color, COP_COL) (color, CRIM_COL)
_, _, root = ()
root (root.Position - CRIM_CF.Position).Magnitude <
state.Teleporting =
state.LastCF = root.CFrame
root.CFrame = CRIM_CF
(root)
.(, ()
_, _, r2 = ()
r2 state.LastCF
r2.CFrame = state.LastCF
(r2)
state.Teleporting =
)
{
Set = (v)
state.Enabled = v ==
state.Thread (.cancel, state.Thread); state.Thread =
state.Teleporting =
state.Enabled
state.Thread = .(()
state.Enabled (step); .()
)
state.Enabled
,
Get = () state.Enabled ,
}
)()
()
UndergroundConnection
UndergroundConnection:()
UndergroundConnection =
_, hum, root = ()
root
p = root.Position
root.CFrame = .(p.X, p.Y + Settings.UndergroundDepth + , p.Z) * (root.CFrame - p)
(root)
hum hum.WalkSpeed = Settings.DefaultSpeed
UndergroundSavedCFrame =
()
UndergroundConnection UndergroundConnection:(); UndergroundConnection =
UndergroundSavedCFrame =
_, hum, root = ()
root hum
UndergroundSavedCFrame = root.CFrame
UndergroundConnection = RunService.RenderStepped:(()
Settings.Underground UndergroundSavedCFrame
_, h2, r2 = ()
r2 h2
cur = r2.CFrame
r2.CFrame = .(cur.Position.X, UndergroundSavedCFrame.Position.Y - Settings.UndergroundDepth, cur.Position.Z) * (cur - cur.Position)
r2.AssemblyLinearVelocity = .(r2.AssemblyLinearVelocity.X, , r2.AssemblyLinearVelocity.Z)
r2.AssemblyAngularVelocity = .zero
)
(state)
Settings.Underground = state
state () ()
LocalPlayer.CharacterAdded:((char)
hum = char:(, )
root = char:(, )
hum root
.()
hum.WalkSpeed = Settings.DefaultSpeed
.Gravity = Settings.Gravity
UndergroundConnection UndergroundConnection:(); UndergroundConnection =
UndergroundSavedCFrame =
Settings.Underground ()
)
Noclip = (()
state = { Enabled = , Conn = , DisabledWalls = {} }
overlapParams = OverlapParams.()
overlapParams.FilterType = .RaycastFilterType.Exclude
groundParams = RaycastParams.()
groundParams.FilterType = .RaycastFilterType.Exclude
(part)
cf = part.CFrame
size = part.Size
hx, hy, hz = size.X * , size.Y * , size.Z *
up = cf.UpVector
right = cf.RightVector
look = cf.LookVector
yExtent = .(up.Y) * hy + .(right.Y) * hx + .(look.Y) * hz
cf.Position.Y - yExtent, cf.Position.Y + yExtent
(part)
part:()
name = part.Name:()
name:() name:() name:()
parent = part.Parent
parent parent:()
pName = parent.Name:()
pName:() pName:()
(part, rootY)
n = part.Name:()
n:() n:() n:() n:()
n:() n:() n:() n:()
n:() n:()
sz = part.Size
minY, maxY = (part)
sz.Y <= .(sz.X, sz.Z) >= minY < rootY maxY <= rootY +
()
part, origCanCollide (state.DisabledWalls)
part part.Parent
(() part.CanCollide = origCanCollide )
state.DisabledWalls = {}
()
state.Enabled
char = LocalPlayer.Character
char
root = char:()
hum = char:()
root hum
root.Anchored
()
_, part (char:())
part:() part.CanCollide part.CanCollide =
groundParams.FilterDescendantsInstances = { char }
overlapParams.FilterDescendantsInstances = { char }
protected = {}
groundRay = :(root.Position + .(, , ), .(, -, ), groundParams)
groundY = root.Position.Y -
groundRay groundRay.Instance
protected[groundRay.Instance] =
groundY = groundRay.Position.Y
hum.MoveDirection.Magnitude >
moveDir = hum.MoveDirection.Unit
forwardRay = :(root.Position + moveDir * + .(, , ), .(, -, ), groundParams)
forwardRay forwardRay.Instance protected[forwardRay.Instance] =
closeRay = :(root.Position + moveDir * + .(, , ), .(, -, ), groundParams)
closeRay closeRay.Instance protected[closeRay.Instance] =
boxCF = root.CFrame * .(, , )
boxSize = .(, , )
touchingParts = {}
(() touchingParts = :(boxCF, boxSize, overlapParams) )
currentWalls = {}
chestY = root.Position.Y +
minWallTop = groundY +
_, part (touchingParts)
part:() part:()
protected[part] (part) (part, root.Position.Y)
_, maxY = (part)
maxY > minWallTop maxY > chestY
currentWalls[part] =
state.DisabledWalls[part] == state.DisabledWalls[part] = part.CanCollide
part.CanCollide =
part, origCanCollide (state.DisabledWalls)
currentWalls[part]
part part.Parent
(() part.CanCollide = origCanCollide )
state.DisabledWalls[part] =
()
state.Enabled
state.Enabled =
Settings.Noclip =
state.Conn state.Conn:()
state.Conn = RunService.Stepped:(onStepped)
()
state.Enabled
state.Enabled =
Settings.Noclip =
state.Conn
state.Conn:()
state.Conn =
part, origCanCollide (state.DisabledWalls)
part part.Parent
(() part.CanCollide = origCanCollide )
state.DisabledWalls = {}
char = LocalPlayer.Character
char
_, part (char:())
part:() part.Name ~= part.CanCollide =
{
Set = (v)
v
()
()
state.Enabled
,
Get = ()
state.Enabled
,
RestoreWalls = restoreWalls,
}
)()
TaseBypass = (()
TASE_ANIMS = { [] = , [] = }
DEFAULT_SPEED =
DEFAULT_JUMP =
Enabled =
humanoid =
lastSpeed = DEFAULT_SPEED
lastJump = DEFAULT_JUMP
eventConns = {}
humanoidConns = {}
charAddedConn =
PlayerTased =
GunRemotes = ReplicatedStorage:()
GunRemotes PlayerTased = GunRemotes:()
(t)
_, c (t)
c (c.Disconnect) ==
(() c:() )
.(t)
()
LocalPlayer:() ~= LocalPlayer:(, )
(character)
character Enabled
hum = character:()
character:(, )
hum
Enabled
humanoid = hum
hum.WalkSpeed > lastSpeed = hum.WalkSpeed
hum.JumpHeight > lastJump = hum.JumpHeight
(humanoidConns)
humanoidConns[#humanoidConns + ] =
hum:():(()
hum.WalkSpeed > lastSpeed = hum.WalkSpeed
)
humanoidConns[#humanoidConns + ] =
hum:():(()
hum.JumpHeight > lastJump = hum.JumpHeight
)
()
Enabled
hum = humanoid
hum hum.Parent hum.Health <=
hum.WalkSpeed == hum.JumpHeight ==
hum.WalkSpeed = lastSpeed
hum.JumpHeight = lastJump
_, track (hum:())
anim = track.Animation
anim TASE_ANIMS[anim.AnimationId] track:()
()
()
Enabled
Enabled =
humanoid =
lastSpeed = DEFAULT_SPEED
lastJump = DEFAULT_JUMP
(humanoidConns)
PlayerTased
eventConns[#eventConns + ] = PlayerTased.OnClientEvent:(()
.(fixTase)
)
eventConns[#eventConns + ] =
LocalPlayer:():(()
Enabled LocalPlayer:() ~= ()
)
charAddedConn = LocalPlayer.CharacterAdded:((c)
humanoid =
.(()
(c)
()
)
)
LocalPlayer.Character
.(()
(LocalPlayer.Character)
()
)
()
Enabled
Enabled =
(eventConns)
(humanoidConns)
charAddedConn
charAddedConn:()
charAddedConn =
humanoid =
{
Set = (v)
v ==
()
()
Enabled
,
Get = ()
Enabled
,
}
)()
FEInvisible = (()
state = { Enabled = , Shifted = , DownOffset = , AnimTrack = , HeartbeatConn = , Highlight = , Saved = {}, RenderKey = }
()
_, hum = ()
hum ~= hum.Health >
(inst, goal)
TweenService:(inst, TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out), goal):()
()
state.Shifted
_, _, root = ()
root state.DownOffset root.CFrame = root.CFrame * state.DownOffset:()
state.Shifted =
state.DownOffset =
state.AnimTrack state.AnimTrack:()
()
state.Enabled state.Shifted ()
_, hum, root = ()
hum root hum.SeatPart
isR15 = hum.RigType == .HumanoidRigType.R15
dy = hum.HipHeight + root.Size.Y * -
pitch = .(isR15 )
downOffset = .(, -dy, ) * .(pitch, , )
state.DownOffset = downOffset
state.Shifted =
root.CFrame = root.CFrame * downOffset
state.AnimTrack state.AnimTrack:()
()
()
state.HeartbeatConn state.HeartbeatConn:(); state.HeartbeatConn =
(() RunService:(state.RenderKey) )
state.AnimTrack
(() state.AnimTrack:(); state.AnimTrack:() )
state.AnimTrack =
state.Saved = {}
state.Shifted =
state.DownOffset =
state.Highlight
h = state.Highlight
state.Highlight =
(h, { OutlineTransparency = })
.(, () (() h:() ) )
()
state.Enabled ()
char, hum = ()
char hum
state.Enabled =
state.Shifted =
state.DownOffset =
_, d (char:())
d:() d:() d:()
state.Saved[d] = state.Saved[d] d.Transparency
(d, { Transparency = })
state.Highlight
h = (, { Name = , FillTransparency = , OutlineColor = .(, , ), OutlineTransparency = , DepthMode = .HighlightDepthMode.AlwaysOnTop, Adornee = char }, char)
(h, { OutlineTransparency = })
state.Highlight = h
isR15 = hum.RigType == .HumanoidRigType.R15
anim = (, { AnimationId = .. (isR15 ) })
animator = hum:() (, , hum)
state.AnimTrack = animator:(anim)
state.AnimTrack.Priority = .AnimationPriority.Action4
state.AnimTrack:(, , )
anim:()
.(, () state.AnimTrack state.AnimTrack.TimePosition = isR15 )
(() RunService:(state.RenderKey) )
RunService:(state.RenderKey, .RenderPriority.Camera.Value - , restoreRigUp)
state.HeartbeatConn = RunService.Heartbeat:(shiftRigDown)
()
state.Enabled
state.Enabled =
inst, val (state.Saved)
inst inst.Parent (inst, { Transparency = val })
()
LocalPlayer.CharacterAdded:(()
state.Enabled
state.Enabled =
()
.()
()
)
{
Set = (v) v () () ; state.Enabled ,
Get = () state.Enabled ,
}
)()
AntiInvis = (()
state = { Enabled = , Conn = , RenderConn = , Revealed = {} }
(hum)
animator = hum hum:()
animator
_, track (animator:())
id = track.Animation (track.Animation.AnimationId)
id:() id:() , track
(player)
data = state.Revealed[player]
data
data.Highlight data.Highlight.Parent (() data.Highlight:() )
_, b (data.Adornments {})
b b.Parent (() b:() )
part, orig (data.Saved {})
part part.Parent
(() part.Transparency = orig; part.LocalTransparencyModifier = )
state.Revealed[player] =
(char, root, hum, saved)
torso = char:() char:()
animator = hum:()
animator torso
sunk = (root.Position.Y - torso.Position.Y) >
_, track (animator:())
id = track.Animation (track.Animation.AnimationId)
sunk id:() id:()
(() track:(); track:(, ) )
rj = root:() torso:()
rj
rj.Transform = .identity
rj.C0 = .(, , , -, , , , , , , , )
rj.C1 = rj.C0
root.Position.Y > - sunk torso.CFrame = root.CFrame
_, d (char:())
(d:() d.Name ~= ) d:()
saved saved[d] == saved[d] = d.Transparency
d.Transparency =
d.LocalTransparencyModifier =
(player)
char = player.Character
root = char char:()
hum = char char:()
char root hum hum.Health <= (player);
data = state.Revealed[player]
data
data = { Saved = {}, Adornments = {} }
state.Revealed[player] = data
(char, root, hum, data.Saved)
_, part (char:())
part:() part.Name ~=
existing = data.Adornments[part]
existing existing.Parent
data.Adornments[part] = (, { Name = , Adornee = part, AlwaysOnTop = , ZIndex = , Size = part.Size + .(, , ), = .(, , ), Transparency = }, part)
data.Highlight data.Highlight.Parent
(()
data.Highlight = (, { Name = , Adornee = char, FillColor = .(, , ), FillTransparency = , OutlineColor = .(, , ), OutlineTransparency = , DepthMode = .HighlightDepthMode.AlwaysOnTop }, char)
)
(player)
char = player.Character
hum = char char:()
char hum hum.Health <=
_, name ({ , , })
p = char:(name)
p p.Transparency >
(hum)
root = char:()
torso = char:() char:()
root (root.Position.Y < - (torso (root.Position.Y - torso.Position.Y) > ))
lastScan =
(v)
v == state.Enabled state.Enabled
state.Enabled = v
state.Conn state.Conn:(); state.Conn =
state.RenderConn state.RenderConn:(); state.RenderConn =
v
state.Conn = RunService.Heartbeat:(()
now = .()
now - lastScan <
lastScan = now
_, p (Players:())
p ~= LocalPlayer
(p) (p) (p)
)
state.RenderConn = RunService.RenderStepped:(()
p, data (state.Revealed)
c = p.Character
r = c c:()
h = c c:()
c r h h.Health <=
(p)
(c, r, h, )
)
p (state.Revealed) (p)
state.Revealed = {}
state.Enabled
{ Set = setEnabled, Get = () state.Enabled , CleanupPlayer = removeReveal }
)()
SprintState = { ShiftHeld = }
(UserInputService.InputBegan:((input)
input.UserInputType == .UserInputType.Keyboard
(input.KeyCode == .KeyCode.LeftShift
input.KeyCode == .KeyCode.RightShift)
SprintState.ShiftHeld =
))
(UserInputService.InputEnded:((input)
input.UserInputType == .UserInputType.Keyboard
(input.KeyCode == .KeyCode.LeftShift
input.KeyCode == .KeyCode.RightShift)
SprintState.ShiftHeld =
))
()
Character = LocalPlayer.Character
Character
Humanoid = Character:()
Humanoid Humanoid.Health <=
Settings.Underground
ug = (Settings.UndergroundSpeed)
.(Humanoid.WalkSpeed - ug) > Humanoid.WalkSpeed = ug
base = (Settings.DefaultSpeed)
speed = (Settings.AutoSprint (SprintState SprintState.ShiftHeld)) (base + ) base
.(Humanoid.WalkSpeed - speed) > Humanoid.WalkSpeed = speed
()
StarterPlayer = :()
StarterScripts = StarterPlayer:()
StarterScripts
starterAntiJump = StarterScripts:()
starterAntiJump starterAntiJump.Disabled =
char = LocalPlayer.Character
char
activeAntiJump = char:()
activeAntiJump activeAntiJump.Disabled =
LocalPlayer.CharacterAdded:((char)
.()
activeAntiJump = char:()
activeAntiJump activeAntiJump.Disabled =
char.ChildAdded:((child)
(child.Name == ) (child:() child:()) child.Disabled =
)
)
(LocalPlayer.Idled:(()
Settings.AntiAFK
(()
vu = :()
vu:()
vu:(.())
)
))
InfJumpState = { SpaceHeld = , JumpConn = , HeartbeatConn = , InputBeganConn = , InputEndedConn = , FocusConn = }
()
Settings.InfJump UserInputService:()
char = LocalPlayer.Character
root = char char:()
hum = char char:()
root hum hum.Health >
jumpVel = .(Settings.JumpPower , )
(()
root.AssemblyLinearVelocity = .(root.AssemblyLinearVelocity.X, jumpVel, root.AssemblyLinearVelocity.Z)
)
(() root.Velocity = .(root.Velocity.X, jumpVel, root.Velocity.Z) )
(() hum:(.HumanoidStateType.Jumping) )
InfJumpState.InputBeganConn = UserInputService.InputBegan:((input, gpe)
gpe
input.KeyCode == .KeyCode.Space InfJumpState.SpaceHeld =
)
InfJumpState.InputEndedConn = UserInputService.InputEnded:((input)
input.KeyCode == .KeyCode.Space InfJumpState.SpaceHeld =
)
InfJumpState.FocusConn = UserInputService.TextBoxFocused:(()
InfJumpState.SpaceHeld =
)
InfJumpState.JumpConn = UserInputService.JumpRequest:(()
Settings.InfJump
()
)
InfJumpState.HeartbeatConn = RunService.Heartbeat:(()
Settings.InfJump
UserInputService:()
isDown =
(() isDown = UserInputService:(.KeyCode.Space) )
InfJumpState.SpaceHeld isDown ()
)
IsRespawning =
IsGrabbingWeapon =
IsTeleportingToDeath =
()
char, bp = LocalPlayer.Character, LocalPlayer:()
_, container ({ char, bp })
container
_, c (container:())
(c) , c
,
(primaryName, fallbackName)
IsGrabbingWeapon IsRespawning IsTeleportingToDeath
IsGrabbingWeapon =
_, hum, root = ()
root hum hum.Health <=
IsGrabbingWeapon =
targetName = primaryName
giver = (targetName)
giver fallbackName
targetName = fallbackName
giver = (fallbackName)
giver
giver = () () ()
targetName =
giver giver:()
IsGrabbingWeapon =
savedCF = root.CFrame
offset = .(, , )
root.CFrame = giver.CFrame + offset
bv = (, { MaxForce = .(, , ), Velocity = -offset.Unit * }, root)
(()
(root, giver, )
.()
(root, giver, )
)
.()
bv.Parent bv:()
root.CFrame = savedCF
(root)
(() hum:(.HumanoidStateType.GettingUp) )
.()
bp = LocalPlayer:()
bp hum
found
_, item (bp:())
(item)
found = item
item.Name:():find(targetName:lower()) then break end
end
end
if found then hum:EquipTool(found) end
end
IsGrabbingWeapon = false
return true
end
--========================================================--
-- QUICK RESPAWN & RETURN ON DEATH
--========================================================--
local RespawnState = { LastAliveCF = nil, LastTeamName = nil, Busy = false, HasDied = false }
local function showTeamSelect(visible)
local pg = LocalPlayer:FindFirstChild("PlayerGui")
local home = pg and pg:FindFirstChild("Home")
if not home then return end
home.Enabled = true
local intro = home:FindFirstChild("IntroFrame") or home:FindFirstChild("intro") or home:FindFirstChild("TeamSelect")
if intro then intro.Visible = visible end
end
local function fixUI()
if not LocalPlayer.Team or LocalPlayer.Team.Name == "Neutral" then
showTeamSelect(true)
return
end
local _, hum = getCharacter()
local cam = workspace.CurrentCamera
if hum and cam then
cam.CameraType = Enum.CameraType.Custom
cam.CameraSubject = hum
end
if IsRespawning or Settings.QuickRespawn then showTeamSelect(false) end
pcall(function() LocalPlayer:SetAttribute("BackpackEnabled", true) end)
end
local function isTeamFull(teamName)
if teamName ~= "Guards" then return false end
local team = Teams:FindFirstChild("Guards")
if not team then return false end
local pg = LocalPlayer:FindFirstChild("PlayerGui")
local home = pg and pg:FindFirstChild("Home")
local ts = home and (home:FindFirstChild("TeamSelectFrame") or home:FindFirstChild("TeamSelect") or home:FindFirstChild("Teams"))
local btn = ts and (ts:FindFirstChild("Guards") or ts:FindFirstChild("Guard"))
local fullLbl = btn and btn:FindFirstChild("Full")
if fullLbl and fullLbl:IsA("GuiObject") and fullLbl.Visible then return true end
local maxGuards = math.clamp(math.floor(#Players:GetPlayers() / 3), 3, 8)
local count = #team:GetPlayers() - (LocalPlayer.Team == team and 1 or 0)
return count >= math.min(maxGuards, 8)
end
local function waitForTeam(teamName, timeout)
local deadline = os.clock() + (timeout or 0.35)
while os.clock() < deadline do
if LocalPlayer.Team and LocalPlayer.Team.Name == teamName then return true end
task.wait(0.02)
end
return false
end
local function changeTeam(teamName, silent)
local colors = { Inmates = "Bright orange", Guards = "Bright blue", Neutral = "Medium stone grey" }
local targetColor = colors[teamName]
if not targetColor then return false end
local curTeam = LocalPlayer.Team and LocalPlayer.Team.Name or ""
if curTeam == teamName then
if not silent and UI and UI.Notify then
UI:Notify({ Title = "Team Switcher", Content = "Already on " .. teamName .. " team!", Duration = 2 })
end
return true
end
local wsRemote = workspace:FindFirstChild("Remote")
local teamEvent = wsRemote and wsRemote:FindFirstChild("TeamEvent")
local loadChar = wsRemote and wsRemote:FindFirstChild("loadchar")
if not teamEvent then return false end
if teamName == "Guards" and isTeamFull("Guards") then
if not silent and UI and UI.Notify then
UI:Notify({ Title = "Team Switcher", Content = "Guards team is full!", Duration = 3, Type = "warn" })
end
return false
end
if teamName == "Neutral" then
pcall(function() teamEvent:FireServer("Medium stone grey") end)
task.defer(showTeamSelect, true)
return true
end
if curTeam ~= "Neutral" then
pcall(function() teamEvent:FireServer("Medium stone grey") end)
waitForTeam("Neutral", 0.5)
end
pcall(function() teamEvent:FireServer(targetColor) end)
task.wait(0.04)
if loadChar then
pcall(function() loadChar:InvokeServer(LocalPlayer) end)
pcall(function() loadChar:InvokeServer(nil, targetColor) end)
end
local repRemotes = ReplicatedStorage:FindFirstChild("Remotes")
local req = repRemotes and repRemotes:FindFirstChild("RequestTeamChange")
if req then
local tObj = Teams:FindFirstChild(teamName)
if tObj then pcall(function() req:InvokeServer(tObj, 1) end) end
end
waitForTeam(teamName, 1.2)
fixUI()
if not silent and UI and UI.Notify then
local switched = LocalPlayer.Team and LocalPlayer.Team.Name == teamName
UI:Notify({ Title = "Team Switcher", Content = switched and ("Switched to " .. teamName .. " team!") or ("Requested switch to " .. teamName), Duration = switched and 2.5 or 2, Type = switched and "success" or nil })
end
return true
end
local function doFastRespawn()
if RespawnState.Busy or IsRespawning then return end
local oldTeam = RespawnState.LastTeamName or (LocalPlayer.Team and LocalPlayer.Team.Name) or "Inmates"
if oldTeam == "Criminals" or oldTeam == "Neutral" or isTeamFull(oldTeam) then oldTeam = "Inmates" end
RespawnState.Busy, IsRespawning = true, true
local safety = task.delay(3.5, function()
if RespawnState.Busy or IsRespawning then
RespawnState.Busy, IsRespawning = false, false
fixUI()
end
end)
task.spawn(function()
for _ = 1, 2 do
changeTeam("Neutral")
waitForTeam("Neutral", 0.35)
task.wait(0.04)
changeTeam(oldTeam)
if waitForTeam(oldTeam, 0.4) then break end
task.wait(0.05)
end
if LocalPlayer.Team and LocalPlayer.Team.Name == "Neutral" then
changeTeam("Inmates")
waitForTeam("Inmates", 0.4)
end
local deadline = os.clock() + 2.5
while os.clock() < deadline do
local _, h, r = getCharacter()
if r and h and h.Health > 0 and LocalPlayer.Team and LocalPlayer.Team.Name ~= "Neutral" then break end
task.wait(0.02)
end
fixUI()
pcall(task.cancel, safety)
RespawnState.Busy, IsRespawning = false, false
end)
end
local function handleReturnOnDeath(char)
if not Settings.ReturnOnDeath or not LocalPlayer.Team or LocalPlayer.Team.Name == "Neutral" then
RespawnState.HasDied = false
return
end
task.spawn(function()
local limit = os.clock() + 4
while os.clock() < limit and IsRespawning do task.wait(0.03) end
local root = char:WaitForChild("HumanoidRootPart", 4)
local hum = char:WaitForChild("Humanoid", 4)
if not root or not hum or hum.Health <= 0 then RespawnState.HasDied = false; return end
if LocalPlayer.Team and LocalPlayer.Team.Name:lower():find("crim") then
local ffLimit = os.clock() + 15
while char:FindFirstChildOfClass("ForceField") and os.clock() < ffLimit do
task.wait(0.1)
if not char.Parent or hum.Health <= 0 then RespawnState.HasDied = false; return end
end
task.wait(0.3)
end
local cf = RespawnState.LastAliveCF
if cf then
IsTeleportingToDeath = true
root.CFrame = cf
resetVel(root)
root.Anchored = true
task.wait(0.06)
if root.Parent then
root.Anchored = false
root.CFrame = cf
resetVel(root)
end
task.wait(0.04)
IsTeleportingToDeath = false
end
RespawnState.HasDied = false
end)
end
local function onPlayerDied()
if not LocalPlayer.Team or LocalPlayer.Team.Name == "Neutral" then return end
if RespawnState.HasDied or RespawnState.Busy or IsRespawning then return end
RespawnState.HasDied = true
if Settings.QuickRespawn then task.spawn(doFastRespawn) end
end
local function hookRespawnCharacter(char)
if RespawnState.DiedConn then RespawnState.DiedConn:Disconnect() end
if RespawnState.HeartbeatConn then RespawnState.HeartbeatConn:Disconnect() end
local hum = char:WaitForChild("Humanoid", 5)
local root = char:WaitForChild("HumanoidRootPart", 5)
if not hum or not root then return end
RespawnState.HeartbeatConn = RunService.Heartbeat:Connect(function()
if (not Settings.QuickRespawn and not Settings.ReturnOnDeath) or RespawnState.Busy or IsRespawning or IsGrabbingWeapon or IsTeleportingToDeath then return end
if hum.Health > 0 and root.Parent then
if root.Position.Y > -50 then RespawnState.LastAliveCF = root.CFrame end
if LocalPlayer.Team and LocalPlayer.Team.Name ~= "Neutral" then RespawnState.LastTeamName = LocalPlayer.Team.Name end
elseif hum.Health <= 0 and not RespawnState.HasDied then
onPlayerDied()
end
end)
RespawnState.DiedConn = hum.Died:Connect(onPlayerDied)
end
RespawnState.CharAddedConn = LocalPlayer.CharacterAdded:Connect(function(newChar)
task.wait(0.05)
if not LocalPlayer.Team or LocalPlayer.Team.Name == "Neutral" then
RespawnState.HasDied = false
showTeamSelect(true)
return
end
if Settings.QuickRespawn or IsRespawning then fixUI() end
handleReturnOnDeath(newChar)
hookRespawnCharacter(newChar)
end)
LocalPlayer:GetPropertyChangedSignal("Team"):Connect(function()
if not LocalPlayer.Team or LocalPlayer.Team.Name == "Neutral" then
RespawnState.Busy, IsRespawning, RespawnState.HasDied, IsTeleportingToDeath = false, false, false, false
task.defer(showTeamSelect, true)
end
end)
if LocalPlayer.Character then hookRespawnCharacter(LocalPlayer.Character) end
local QuickRespawn = {
Set = function(v)
Settings.QuickRespawn = v
if v and LocalPlayer.Team and LocalPlayer.Team.Name ~= "Neutral" then RespawnState.LastTeamName = LocalPlayer.Team.Name end
return v
end,
Get = function() return Settings.QuickRespawn end,
RespawnNow = doFastRespawn,
}
local ReturnOnDeath = {
Set = function(v) Settings.ReturnOnDeath = v; return v end,
Get = function() return Settings.ReturnOnDeath end,
}
local AutoWeapon = (function()
local state = { Enabled = false, LastWeapon = "AK-47", HbConn = nil, CharConn = nil, IsDead = false }
local function grabOnSpawn()
task.spawn(function()
local deadline = os.clock() + 12
while os.clock() < deadline do
local _, h, r = getCharacter()
local waitDeathTp = Settings.ReturnOnDeath and RespawnState.LastAliveCF and (IsTeleportingToDeath or RespawnState.HasDied)
if h and r and h.Health > 0 and not IsRespawning and not IsTeleportingToDeath and not IsGrabbingWeapon and not waitDeathTp then
task.wait(0.12)
if not hasAnyGun() then obtainWeapon(state.LastWeapon or "AK-47", "Remington 870") end
break
end
task.wait(0.05)
end
state.IsDead = false
end)
end
local function setEnabled(v)
if v == state.Enabled then return state.Enabled end
state.Enabled = v
Settings.AutoWeapon = v
if state.HbConn then state.HbConn:Disconnect(); state.HbConn = nil end
if state.CharConn then state.CharConn:Disconnect(); state.CharConn = nil end
state.IsDead = false
if v then
state.HbConn = RunService.Heartbeat:Connect(function()
if not state.Enabled then return end
local char, hum = getCharacter()
if hum and hum.Health > 0 then
local tool = char:FindFirstChildOfClass("Tool")
if tool and isGun(tool) then
state.LastWeapon = tool.Name
elseif not state.LastWeapon then
local _, anyGun = hasAnyGun()
if anyGun then state.LastWeapon = anyGun.Name end
end
elseif hum and hum.Health <= 0 and not state.IsDead then
state.IsDead = true
grabOnSpawn()
end
end)
state.CharConn = LocalPlayer.CharacterAdded:Connect(function()
if state.Enabled then grabOnSpawn() end
end)
end
return state.Enabled
end
return { Set = setEnabled, Get = function() return state.Enabled end }
end)()
--========================================================--
-- TARGET KILLER
--========================================================--
local function isSameTeam(p1, p2)
if not p1 or not p2 then return false end
if p1.Team and p2.Team then
if p1.Team == p2.Team or p1.Team.Name:lower() == p2.Team.Name:lower() then return true end
end
if not p1.Neutral and not p2.Neutral and p1.TeamColor and p2.TeamColor and p1.TeamColor == p2.TeamColor then return true end
local a1, a2 = p1:GetAttribute("Team"), p2:GetAttribute("Team")
if a1 ~= nil and a2 ~= nil and a1 == a2 then return true end
return false
end
local function isUnkillableTarget(p)
if not p or p == LocalPlayer then return true end
if isSameTeam(LocalPlayer, p) then return true end
if p.Neutral or not p.Team or p.Team.Name == "Neutral" then return true end
return false
end
local function getShootEvent()
local ws = workspace:FindFirstChild("GunRemotes")
if ws and ws:FindFirstChild("ShootEvent") then return ws.ShootEvent end
local rs = ReplicatedStorage:FindFirstChild("GunRemotes")
return (rs and rs:FindFirstChild("ShootEvent")) or ReplicatedStorage:FindFirstChild("ShootEvent")
end
local function getGunTracers()
local sm = ReplicatedStorage:FindFirstChild("SharedModules")
local gt = sm and sm:FindFirstChild("GunTracers")
if not gt then
for _, d in ipairs(ReplicatedStorage:GetDescendants()) do
if d:IsA("ModuleScript") and d.Name == "GunTracers" then gt = d; break end
end
end
if not gt then return nil end
local ok, mod = pcall(require, gt)
return ok and mod or nil
end
local function predictAimPosition(targetPart)
if not targetPart then return nil end
local pos = targetPart.Position
local char = targetPart.Parent
local hum = char and char:FindFirstChildOfClass("Humanoid")
local hrp = char and char:FindFirstChild("HumanoidRootPart")
local velPart = (hrp and hrp:IsA("BasePart") and hrp) or targetPart
local vel = velPart.AssemblyLinearVelocity
local hVel = Vector3.new(vel.X, 0, vel.Z)
local hSpeed = hVel.Magnitude
if hSpeed <= 28 and math.abs(vel.Y) <= 22 then
return pos
end
local okPing, pingMs = pcall(function()
return game:GetService("Stats").Network.ServerStatsItem["Data Ping"]:GetValue()
end)
local pingSec = (okPing and tonumber(pingMs)) and (tonumber(pingMs) / 1000) or 0.09
local lead = math.clamp(pingSec * 0.6, 0.025, 0.085)
local hOff = hSpeed > 28 and (hVel * lead) or Vector3.new(0, 0, 0)
if hOff.Magnitude > 3.2 then
hOff = hOff.Unit * 3.2
end
local dy = 0
if math.abs(vel.Y) > 22 or (hum and (hum:GetState() == Enum.HumanoidStateType.Jumping or hum:GetState() == Enum.HumanoidStateType.Freefall) and hSpeed > 28) then
local g = workspace.Gravity or 196.2
dy = math.clamp(vel.Y * lead * 0.45 - 0.25 * g * lead * lead, -1.6, 1.6)
end
local headNudge = (targetPart.Name == "Head" and (hSpeed > 32 or math.abs(vel.Y) > 22)) and -0.35 or 0
return pos + hOff + Vector3.new(0, dy + headNudge, 0)
end
local function fireCleanShootEvent(shootEvent, tool, origin, targetPos, targetPart, bulletCount)
if not shootEvent or not origin or not targetPos then return false end
local env = (typeof(getgenv) == "function" and getgenv()) or _G
if env._NF_MarkLocalShot then env._NF_MarkLocalShot() end
local count = math.max(1, tonumber(bulletCount) or 1)
local payload = {}
local isLegacy = tool and tool:FindFirstChild("GunStates") ~= nil and tool:GetAttribute("ToolType") ~= "Gun"
if isLegacy then
local dir = targetPos - origin
local cf, ray, dist = CFrame.new(origin, targetPos), Ray.new(origin, dir), dir.Magnitude
for i = 1, count do
payload[i] = { RayObject = ray, Distance = dist, Cframe = cf, Hit = targetPart }
end
env._NF_InternalFire = true
pcall(function() shootEvent:FireServer(payload, tool) end)
env._NF_InternalFire = false
else
for i = 1, count do
payload[i] = { origin, targetPos, targetPart }
end
env._NF_InternalFire = true
pcall(function() shootEvent:FireServer(payload) end)
env._NF_InternalFire = false
end
return true
end
local TargetKiller = (function()
local state = {
Enabled = false,
TargetPlayer = nil,
TargetChar = nil,
TargetSpawnTime = 0,
LastCFrame = nil,
LoopConn = nil,
Busy = false,
Resetting = false,
LastAttack = 0,
BaseCooldown = 0.08,
HoldingAntiKill = false,
ShotHoldUntil = 0,
ShotStage = "idle",
SettleStart = 0,
BurstOffset = nil,
ReloadUntil = 0,
ReloadingGun = nil,
SpectatingTarget = false,
ShotCounts = setmetatable({}, { __mode = "k" }),
OrbitAngle = 0,
BlinkAngle = 0,
AnchorGroundY = nil,
LastGrabAttempt = 0,
LastReloadAttempt = 0,
LastTeamWarn = 0,
LastShieldWarn = 0,
}
local WEAPON_PRIORITY = { ["AK-47"] = 1, ["AK47"] = 1, ["M4A1"] = 2, ["MP5"] = 3, ["Remington 870"] = 4, ["Shotgun"] = 4, ["M9"] = 5 }
local function matchesPreference(toolName, preferred)
local nameLower = tostring(toolName):lower()
local prefLower = tostring(preferred):lower()
if nameLower == prefLower or (prefLower:find("ak") and nameLower:find("ak")) then return true end
if (prefLower:find("remington") or prefLower:find("shotgun"))
and (nameLower:find("remington") or nameLower:find("shotgun")) then
return true
end
return false
end
local function equipGun(allowFallback)
local char, hum = getCharacter()
local backpack = LocalPlayer:FindFirstChild("Backpack")
if not char or not backpack then return nil end
local preferredWeapon = Settings.TargetKillerWeapon or "AK-47"
local currentTool = char:FindFirstChildOfClass("Tool")
if preferredWeapon ~= "Equipped / Any" then
if isGun(currentTool) and matchesPreference(currentTool.Name, preferredWeapon) then return currentTool end
for _, item in ipairs(backpack:GetChildren()) do
if isGun(item) and matchesPreference(item.Name, preferredWeapon) then
if hum then hum:EquipTool(item) end
return item
end
end
if not allowFallback then return nil end
end
if isGun(currentTool) then return currentTool end
local bestGun = nil
local bestPriority = math.huge
for _, item in ipairs(backpack:GetChildren()) do
if isGun(item) then
local priority = WEAPON_PRIORITY[item.Name] or 50
if priority < bestPriority then
bestPriority = priority
bestGun = item
end
end
end
if bestGun and hum then hum:EquipTool(bestGun) end
return bestGun
end
local function restoreAutoRotate()
local _, hum = getCharacter()
if hum then
pcall(function() hum.AutoRotate = true end)
end
end
local function syncTargetCamera(targetHum, shouldSpectate)
local cam = Workspace.CurrentCamera
if not cam then return end
if Settings.AntiKillTarget and Settings.AntiKillFreecam then
state.SpectatingTarget = false
return
end
if shouldSpectate and targetHum and targetHum.Health > 0 then
if cam.CameraSubject ~= targetHum then cam.CameraSubject = targetHum end
state.SpectatingTarget = true
elseif state.SpectatingTarget then
state.SpectatingTarget = false
local _, myHum = getCharacter()
if myHum and cam.CameraSubject ~= myHum then cam.CameraSubject = myHum end
end
end
local function resetPosition()
state.HoldingAntiKill = false
state.ShotStage = "idle"
state.ShotHoldUntil = 0
syncTargetCamera(nil, false)
restoreAutoRotate()
local savedCFrame = state.LastCFrame
state.LastCFrame = nil
if Settings.AntiKillTarget then
state.Resetting = false
return
end
local _, hum, root = getCharacter()
if savedCFrame and root then
state.Resetting = true
if Noclip and Noclip.RestoreWalls then pcall(Noclip.RestoreWalls) end
root.Anchored = true
root.CFrame = savedCFrame + Vector3.new(0, 1.0, 0)
root.AssemblyLinearVelocity = Vector3.zero
root.AssemblyAngularVelocity = Vector3.zero
if hum then
pcall(function() hum:ChangeState(Enum.HumanoidStateType.GettingUp) end)
end
task.delay(0.06, function()
if Noclip and Noclip.RestoreWalls then pcall(Noclip.RestoreWalls) end
if root and root.Parent then
root.AssemblyLinearVelocity = Vector3.zero
root.AssemblyAngularVelocity = Vector3.zero
root.Anchored = false
end
state.Resetting = false
end)
end
end
local function buildOrbitRayParams(char, targetChar)
local rayParams = RaycastParams.new()
rayParams.FilterType = (Enum.RaycastFilterType and Enum.RaycastFilterType.Exclude) or Enum.RaycastFilterType.Blacklist
rayParams.RespectCanCollide = true
local ignoreList = { char, targetChar }
for _, folderName in ipairs({ "CarContainer", "Cars", "Vehicles" }) do
local folder = Workspace:FindFirstChild(folderName)
if folder then table.insert(ignoreList, folder) end
end
rayParams.FilterDescendantsInstances = ignoreList
return rayParams
end
local function hasClearShot(char, targetChar, originPos, targetPos)
local delta = targetPos - originPos
if delta.Magnitude < 0.25 then return true end
local hit = Workspace:Raycast(originPos, delta, buildOrbitRayParams(char, targetChar))
return hit == nil
end
local function getFloorY(rayParams, pos)
local hit = Workspace:Raycast(pos + Vector3.new(0, 2, 0), Vector3.new(0, -14, 0), rayParams)
return hit and hit.Position.Y or nil
end
local function detectSitHead(char, root, targetChar, targetRoot)
if not root or not targetRoot then return false end
local rayParams = buildOrbitRayParams(char, targetChar)
local myFloor = getFloorY(rayParams, root.Position)
local tgtFloor = getFloorY(rayParams, targetRoot.Position)
if tgtFloor then
state.AnchorGroundY = tgtFloor
elseif myFloor and (not state.AnchorGroundY or root.Position.Y < state.AnchorGroundY + 14) then
state.AnchorGroundY = myFloor
elseif not state.AnchorGroundY and state.LastCFrame then
state.AnchorGroundY = state.LastCFrame.Position.Y - 3
end
local dXZ = Vector3.new(targetRoot.Position.X - root.Position.X, 0, targetRoot.Position.Z - root.Position.Z).Magnitude
if dXZ < 8 and targetRoot.Position.Y > root.Position.Y + 1.0 then return true end
if not tgtFloor and targetRoot.AssemblyLinearVelocity.Y > 12 then return true end
if not tgtFloor and state.AnchorGroundY and targetRoot.Position.Y > state.AnchorGroundY + 12 then return true end
return false
end
local function pickOrbitCFrame(char, targetChar, targetRoot, targetHead, sitHeadActive)
local aimPos = targetHead.Position
local centerPos = targetRoot and targetRoot.Position or aimPos
local lookVec = targetHead.CFrame.LookVector
local rearBaseAngle = math.atan2(-lookVec.Z, -lookVec.X)
state.OrbitAngle = rearBaseAngle + math.rad(math.random(-75, 75))
local rayParams = buildOrbitRayParams(char, targetChar)
local baseY = sitHeadActive and ((state.AnchorGroundY and (state.AnchorGroundY + 2.8)) or (state.LastCFrame and state.LastCFrame.Position.Y) or centerPos.Y) or centerPos.Y
local chosenPos, fallbackPos, bestFallbackDist = nil, nil, 0
for _, angleOffsetDeg in ipairs({ 0, 35, -35, 70, -70, 125, -125, 180 }) do
local orbitAngle = state.OrbitAngle + math.rad(angleOffsetDeg)
local orbitRadius = sitHeadActive and (math.random(95, 145) / 10) or (math.random(60, 115) / 10)
local heightOffset = sitHeadActive and (math.random(0, 18) / 10) or (math.random(20, 55) / 10)
local radialDirection = Vector3.new(math.cos(orbitAngle), 0, math.sin(orbitAngle))
local candidatePos = Vector3.new(centerPos.X, baseY + heightOffset, centerPos.Z) + radialDirection * orbitRadius
local floorHit = Workspace:Raycast(candidatePos + Vector3.new(0, 2, 0), Vector3.new(0, -4.5, 0), rayParams)
if floorHit and candidatePos.Y < floorHit.Position.Y + 2.5 then
candidatePos = Vector3.new(candidatePos.X, floorHit.Position.Y + 2.5, candidatePos.Z)
end
if sitHeadActive and state.AnchorGroundY then
candidatePos = Vector3.new(candidatePos.X, math.min(candidatePos.Y, state.AnchorGroundY + 5.5), candidatePos.Z)
end
local headOffsetVec = (candidatePos + Vector3.new(0, 1.5, 0)) - aimPos
local bodyOrigin = centerPos + Vector3.new(0, 1.2, 0)
local bodyOffsetVec = candidatePos - bodyOrigin
local headSightHit = Workspace:Raycast(aimPos, headOffsetVec, rayParams)
local bodySightHit = Workspace:Raycast(bodyOrigin, bodyOffsetVec, rayParams)
if not headSightHit and not bodySightHit then
chosenPos = candidatePos
break
elseif headSightHit and headSightHit.Distance > 2.8 and headSightHit.Distance > bestFallbackDist then
bestFallbackDist = headSightHit.Distance
fallbackPos = aimPos + headOffsetVec.Unit * (headSightHit.Distance - 1.4)
end
end
local finalPos = chosenPos or fallbackPos or Vector3.new(centerPos.X + 9, baseY + 1.5, centerPos.Z)
local flatLookTarget = Vector3.new(aimPos.X, finalPos.Y, aimPos.Z)
if (flatLookTarget - finalPos).Magnitude > 0.25 then return CFrame.lookAt(finalPos, flatLookTarget) end
return CFrame.lookAt(finalPos, aimPos)
end
local function pickEvasiveBlinkCFrame(char, targetChar, targetRoot, targetHead, sitHeadActive)
local aimPos = targetHead.Position
local centerPos = targetRoot and targetRoot.Position or aimPos
state.BlinkAngle = (state.BlinkAngle + math.rad(math.random(125, 235))) % (math.pi * 2)
local rayParams = buildOrbitRayParams(char, targetChar)
local floorY = getFloorY(rayParams, centerPos)
local blinkPos
if sitHeadActive or not floorY then
local safeY = (state.AnchorGroundY and (state.AnchorGroundY + 3.2)) or (state.LastCFrame and state.LastCFrame.Position.Y) or centerPos.Y
local blinkRadius = math.random(14, 24)
blinkPos = Vector3.new(
centerPos.X + math.cos(state.BlinkAngle) * blinkRadius,
safeY + (sitHeadActive and (math.random(0, 20) / 10) or math.random(4, 12)),
centerPos.Z + math.sin(state.BlinkAngle) * blinkRadius
)
else
local blinkRadius = math.random(65, 135)
local blinkHeight = math.random(22, 46)
blinkPos = Vector3.new(
centerPos.X + math.cos(state.BlinkAngle) * blinkRadius,
floorY + blinkHeight,
centerPos.Z + math.sin(state.BlinkAngle) * blinkRadius
)
end
local lookAtTarget = Vector3.new(aimPos.X, blinkPos.Y, aimPos.Z)
if (lookAtTarget - blinkPos).Magnitude > 0.25 then return CFrame.lookAt(blinkPos, lookAtTarget) end
return CFrame.new(blinkPos)
end
local function notifyThrottled(stateField, interval, message)
local now = os.clock()
if now - state[stateField] > interval then
state[stateField] = now
UI:Notify({ Title = "Auto Kill Target", Content = message, Duration = 2.5 })
end
end
local function stepTargetKiller()
if not state.Enabled or not state.TargetPlayer or state.Resetting then
state.HoldingAntiKill = false
return
end
if not state.TargetPlayer.Parent then
resetPosition()
state.TargetPlayer = nil
return
end
local char, hum, root = getCharacter()
local targetChar = state.TargetPlayer.Character
if not char or not targetChar then
state.HoldingAntiKill = false
return
end
local targetHum = targetChar:FindFirstChildOfClass("Humanoid")
local targetHead = targetChar:FindFirstChild("Head")
local targetRoot = targetChar:FindFirstChild("HumanoidRootPart")
if not root or not hum or hum.Health <= 0 or not targetHum or targetHum.Health <= 0 or not targetHead then
resetPosition()
return
end
if isSameTeam(LocalPlayer, state.TargetPlayer) then
resetPosition()
notifyThrottled("LastTeamWarn", 5, string.format("Target %s is on your team (%s). Attack cancelled.", state.TargetPlayer.DisplayName, LocalPlayer.Team.Name))
return
end
if IsRespawning or IsGrabbingWeapon or IsTeleportingToDeath then
resetPosition()
return
end
if state.TargetChar ~= targetChar then
state.TargetChar = targetChar
state.TargetSpawnTime = os.clock()
state.AnchorGroundY = nil
end
if os.clock() - (state.TargetSpawnTime or 0) < 0.5 then
resetPosition()
return
end
if hasShield(targetChar, true) then
resetPosition()
notifyThrottled("LastShieldWarn", 3, string.format("Target %s has a shield. Waiting for shield to expire...", state.TargetPlayer.DisplayName))
return
end
local gun = equipGun(false)
if not gun then
if (os.clock() - state.LastGrabAttempt) >= 1.2 and not IsGrabbingWeapon and not IsRespawning and not IsTeleportingToDeath then
resetPosition()
state.LastGrabAttempt = os.clock()
task.spawn(function()
local preferredWeapon = Settings.TargetKillerWeapon or "AK-47"
obtainWeapon((preferredWeapon == "Equipped / Any") and "AK-47" or preferredWeapon, "AK-47")
end)
return
end
gun = equipGun(true)
if not gun then
resetPosition()
return
end
end
if gun.Parent ~= char then
if hum then hum:EquipTool(gun) end
return
end
local realRate = tonumber(gun:GetAttribute("NF_OrigFireRate"))
or (not Settings.RapidFire and tonumber(gun:GetAttribute("FireRate")))
or select(1, getGunDefaults(gun.Name))
local usingAnti = Settings.AntiKillTarget == true
local useEvasiveBlink = usingAnti or (Settings.TargetAntiAimbot == true)
local effectiveCooldown = math.max(realRate + 0.02, useEvasiveBlink and 0.11 or realRate + 0.015)
local currentAmmo = tonumber(gun:GetAttribute("CurrentAmmo"))
local maxAmmo = tonumber(gun:GetAttribute("MaxAmmo")) or select(3, getGunDefaults(gun.Name)) or 28
local realReload = tonumber(gun:GetAttribute("ReloadTime")) or select(4, getGunDefaults(gun.Name)) or 1.8
local shotsUsed = state.ShotCounts[gun] or 0
local now = os.clock()
if state.ReloadingGun == gun and currentAmmo ~= nil and currentAmmo > 0 and now < state.ReloadUntil then
state.ReloadUntil = 0
state.ReloadingGun = nil
end
local needsReload = (currentAmmo ~= nil and currentAmmo <= 0) or (shotsUsed >= maxAmmo)
local sitHeadActive = detectSitHead(char, root, targetChar, targetRoot)
if needsReload or now < state.ReloadUntil then
if now >= state.ReloadUntil and (now - state.LastReloadAttempt) >= 0.65 then
state.LastReloadAttempt = now
state.ReloadUntil = now + realReload + 0.12
state.ReloadingGun = gun
state.ShotCounts[gun] = 0
pcall(function()
local gunRemotes = ReplicatedStorage:FindFirstChild("GunRemotes")
local reloadEvent = gunRemotes and (gunRemotes:FindFirstChild("ReloadEvent") or gunRemotes:FindFirstChild("Reload"))
if reloadEvent and reloadEvent:IsA("RemoteEvent") then reloadEvent:FireServer(gun) end
end)
end
state.ShotStage = "idle"
if useEvasiveBlink then
state.HoldingAntiKill = false
state.ShotHoldUntil = 0
if usingAnti then
syncTargetCamera(nil, false)
restoreAutoRotate()
return
end
syncTargetCamera(targetHum, true)
local blinkCFrame = pickEvasiveBlinkCFrame(char, targetChar, targetRoot, targetHead, sitHeadActive)
root.CFrame = blinkCFrame
pcall(function() char:PivotTo(blinkCFrame) end)
root.AssemblyLinearVelocity = Vector3.zero
root.AssemblyAngularVelocity = Vector3.zero
return
end
end
local activeOrbitCF
if useEvasiveBlink then
syncTargetCamera(targetHum, not usingAnti)
local cooldownDone = (not state.Busy) and ((now - state.LastAttack) >= effectiveCooldown)
if state.ShotStage ~= "settling" then
if not cooldownDone then
state.LastCFrame = state.LastCFrame or root.CFrame
state.HoldingAntiKill = false
state.ShotHoldUntil = 0
if usingAnti then return end
if hum.Sit then hum.Sit = false end
hum.AutoRotate = false
local blinkCFrame = pickEvasiveBlinkCFrame(char, targetChar, targetRoot, targetHead, sitHeadActive)
root.CFrame = blinkCFrame
pcall(function() char:PivotTo(blinkCFrame) end)
root.AssemblyLinearVelocity = Vector3.zero
root.AssemblyAngularVelocity = Vector3.zero
return
end
state.ShotStage = "settling"
state.SettleStart = now
local sampleOrbit = pickOrbitCFrame(char, targetChar, targetRoot, targetHead, sitHeadActive)
state.BurstOffset = sampleOrbit.Position - targetHead.Position
end
state.HoldingAntiKill = true
state.ShotHoldUntil = now + 0.14
state.LastCFrame = state.LastCFrame or root.CFrame
if hum.Sit then hum.Sit = false end
hum.AutoRotate = false
local posNow
if sitHeadActive then
local lateralOrbit = pickOrbitCFrame(char, targetChar, targetRoot, targetHead, true)
posNow = lateralOrbit.Position
else
posNow = targetHead.Position + (state.BurstOffset or Vector3.new(0, 3.5, -8))
end
local lookFlat = Vector3.new(targetHead.Position.X, posNow.Y, targetHead.Position.Z)
activeOrbitCF = ((lookFlat - posNow).Magnitude > 0.25)
and CFrame.lookAt(posNow, lookFlat)
or CFrame.lookAt(posNow, targetHead.Position)
root.CFrame = activeOrbitCF
pcall(function() char:PivotTo(activeOrbitCF) end)
root.AssemblyLinearVelocity = Vector3.zero
root.AssemblyAngularVelocity = Vector3.zero
if (now - state.SettleStart) < (sitHeadActive and 0.05 or 0.11) or state.Busy then return end
else
syncTargetCamera(nil, false)
state.ShotStage = "idle"
state.HoldingAntiKill = true
state.ShotHoldUntil = now + 0.12
state.LastCFrame = state.LastCFrame or root.CFrame
if hum.Sit then hum.Sit = false end
hum.AutoRotate = false
activeOrbitCF = pickOrbitCFrame(char, targetChar, targetRoot, targetHead, sitHeadActive)
root.CFrame = activeOrbitCF
pcall(function() char:PivotTo(activeOrbitCF) end)
root.AssemblyLinearVelocity = Vector3.zero
root.AssemblyAngularVelocity = Vector3.zero
if needsReload or state.Busy or (now - state.LastAttack < effectiveCooldown) then return end
end
local head = char:FindFirstChild("Head")
local fallbackOrigin = (activeOrbitCF and activeOrbitCF.Position or root.Position) + Vector3.new(0, 1.5, 0)
local fireOrigin = (head and (head.Position - fallbackOrigin).Magnitude < 3.5)
and head.Position
or fallbackOrigin
local aimPart = (sitHeadActive and targetRoot and not hasClearShot(char, targetChar, fireOrigin, targetHead.Position)) and targetRoot or targetHead
local aimPos = predictAimPosition(aimPart) or aimPart.Position
if not hasClearShot(char, targetChar, fireOrigin, aimPos) and not hasClearShot(char, targetChar, fireOrigin, aimPart.Position) then
local reOrbit = pickOrbitCFrame(char, targetChar, targetRoot, targetHead, sitHeadActive)
state.BurstOffset = reOrbit.Position - targetHead.Position
state.SettleStart = now - 0.04
return
end
state.Busy = true
local shootEvent = getShootEvent()
if shootEvent then
fireCleanShootEvent(shootEvent, gun, fireOrigin, aimPos, aimPart, getGunPelletCount(gun))
state.ShotCounts[gun] = (state.ShotCounts[gun] or 0) + 1
end
pcall(function()
for _, d in ipairs(gun:GetDescendants()) do
if d:IsA("Sound") and (d.Name:lower():find("fire") or d.Name:lower():find("shoot")) then
d:Play()
break
end
end
end)
local muzzle = gun:FindFirstChild("Muzzle")
local tracerOrigin = (muzzle and (muzzle.Position - fireOrigin).Magnitude < 5)
and muzzle.Position
or fireOrigin
local tracers = getGunTracers()
if tracers and tracers.createBullet then pcall(tracers.createBullet, tracerOrigin, aimPos) end
state.LastAttack = os.clock()
state.ShotStage = "idle"
state.ShotHoldUntil = state.LastAttack + 0.05
state.Busy = false
end
local function setEnabled(enabled)
enabled = enabled == true
if enabled == state.Enabled then return state.Enabled end
state.Enabled = enabled
if state.LoopConn then
state.LoopConn:Disconnect()
state.LoopConn = nil
end
state.Busy = false
if enabled then
state.LastCFrame = nil
state.LastAttack = 0
state.HoldingAntiKill = false
state.ShotHoldUntil = 0
state.OrbitAngle = 0
state.BlinkAngle = 0
state.AnchorGroundY = nil
state.LoopConn = RunService.Heartbeat:Connect(function()
if state.Enabled then pcall(stepTargetKiller) end
end)
else
resetPosition()
end
return state.Enabled
end
return {
Set = setEnabled,
Get = function() return state.Enabled end,
SetTarget = function(player)
if state.TargetPlayer ~= player then
resetPosition()
state.TargetPlayer = player
state.TargetChar = nil
state.TargetSpawnTime = 0
state.AnchorGroundY = nil
end
end,
GetTarget = function() return state.TargetPlayer end,
ShouldHoldAntiKill = function()
return state.Enabled
and state.TargetPlayer ~= nil
and state.HoldingAntiKill == true
and os.clock() <= (state.ShotHoldUntil or 0)
and not state.Resetting
end,
SetCooldown = function(seconds)
state.BaseCooldown = seconds
end,
}
end)()
--========================================================--
-- MOVEMENT
--========================================================--
local SilentAimFovFrame = nil
local function getSafeGuiParent()
if typeof(gethui) == "function" then
local ok, h = pcall(gethui)
if ok and h then return h end
end
local core = game:GetService("CoreGui")
if pcall(function() local f = Instance.new("Folder"); f.Parent = core; f:Destroy() end) then return core end
return LocalPlayer:FindFirstChildOfClass("PlayerGui") or LocalPlayer:FindFirstChild("PlayerGui")
end
local function getCrosshairPos()
local cam = workspace.CurrentCamera
if cam then
if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter
or (UserInputService.TouchEnabled and not UserInputService.MouseEnabled) then
return Vector2.new(cam.ViewportSize.X * 0.5, cam.ViewportSize.Y * 0.5)
end
local pos = UserInputService:GetMouseLocation()
if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCurrentPosition and pos.X <= 1 and pos.Y <= 1 then
return Vector2.new(cam.ViewportSize.X * 0.5, cam.ViewportSize.Y * 0.5)
end
return pos
end
return UserInputService:GetMouseLocation()
end
local function updateSilentAimFOV()
if not Settings.SilentAim or not Settings.SilentAimShowFOV then
if SilentAimFovFrame then SilentAimFovFrame.Visible = false end
return
end
if not SilentAimFovFrame then
local parent = getSafeGuiParent()
if not parent then return end
local sg = mk("ScreenGui", { Name = "NightFall_SilentAimFOV", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = -1 })
local frame = mk("Frame", { Name = "Circle", AnchorPoint = Vector2.new(0.5, 0.5), BackgroundTransparency = 1, BorderSizePixel = 0, Active = false, Selectable = false, Visible = false }, sg)
mk("UICorner", { CornerRadius = UDim.new(1, 0) }, frame)
mk("UIStroke", { Thickness = 1.5, Color = Settings.SilentAimFOVColor or Color3.fromRGB(150, 90, 250), Transparency = 0.3 }, frame)
pcall(function() sg.Parent = parent end)
SilentAimFovFrame = frame
end
local stroke = SilentAimFovFrame:FindFirstChildOfClass("UIStroke")
if stroke then stroke.Color = Settings.SilentAimFOVColor or Color3.fromRGB(150, 90, 250) end
local pos = getCrosshairPos()
local d = (Settings.SilentAimFOV or 180) * 2
SilentAimFovFrame.Size = UDim2.fromOffset(d, d)
SilentAimFovFrame.Position = UDim2.fromOffset(pos.X, pos.Y)
SilentAimFovFrame.Visible = true
end
local WeaponHUD = (function()
local reloadFrame, reloadFill, reloadTimeLbl, reloadTitleLbl
local reloadStates = setmetatable({}, { __mode = "k" })
local activeReloadTool = nil
local arrestBoundTool, arrestActConn = nil, nil
local ammoFrame, ammoCountLbl, ammoMaxLbl, ammoNameLbl, ammoBar
local defLbl, defBox, defGui, defConn, lastScan = nil, nil, nil, nil, 0
local defBoxOrigPos, defGuiOrigEnabled, oldAmmoOrigPos = nil, nil, nil
local lastGsTime, cachedGsTool, cachedGsTbl = 0, nil, nil
local observedMax = setmetatable({}, { __mode = "k" })
local function ensureAmmoHUD()
if ammoFrame then return ammoFrame end
local parent = getSafeGuiParent()
if not parent then return nil end
local sg = mk("ScreenGui", { Name = "NightFall_CustomAmmoHUD", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 100 })
local frame = mk("Frame", { Name = "AmmoHUD", AnchorPoint = Vector2.new(1, 1), Size = UDim2.fromOffset(144, 48), Position = UDim2.new(1, -22, 1, -22), BackgroundColor3 = Color3.fromRGB(15, 15, 20), BackgroundTransparency = 0.18, BorderSizePixel = 0, Visible = false }, sg)
mk("UICorner", { CornerRadius = UDim.new(0, 8) }, frame)
mk("UIStroke", { Thickness = 1.3, Color = Color3.fromRGB(150, 90, 250), Transparency = 0.35 }, frame)
local accent = mk("Frame", { AnchorPoint = Vector2.new(1, 0), Size = UDim2.new(0, 3, 1, -12), Position = UDim2.new(1, -6, 0, 6), BackgroundColor3 = Color3.fromRGB(160, 95, 255), BorderSizePixel = 0 }, frame)
mk("UICorner", { CornerRadius = UDim.new(1, 0) }, accent)
ammoNameLbl = mk("TextLabel", { Size = UDim2.new(1, -20, 0, 12), Position = UDim2.fromOffset(10, 4), BackgroundTransparency = 1, Text = "WEAPON", TextColor3 = Color3.fromRGB(170, 150, 210), Font = Enum.Font.GothamBold, TextSize = 9, TextXAlignment = Enum.TextXAlignment.Left }, frame)
ammoCountLbl = mk("TextLabel", { Size = UDim2.fromOffset(56, 22), Position = UDim2.fromOffset(10, 16), BackgroundTransparency = 1, Text = "0", TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.GothamBold, TextSize = 20, TextXAlignment = Enum.TextXAlignment.Left }, frame)
ammoMaxLbl = mk("TextLabel", { Size = UDim2.fromOffset(64, 18), Position = UDim2.fromOffset(44, 19), BackgroundTransparency = 1, Text = "/ Inf", TextColor3 = Color3.fromRGB(160, 120, 240), Font = Enum.Font.GothamMedium, TextSize = 13, TextXAlignment = Enum.TextXAlignment.Left }, frame)
local bg = mk("Frame", { Size = UDim2.new(1, -20, 0, 3), Position = UDim2.new(0, 10, 1, -6), BackgroundColor3 = Color3.fromRGB(30, 25, 45), BorderSizePixel = 0 }, frame)
mk("UICorner", { CornerRadius = UDim.new(1, 0) }, bg)
ammoBar = mk("Frame", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.fromRGB(150, 90, 250), BorderSizePixel = 0 }, bg)
mk("UICorner", { CornerRadius = UDim.new(1, 0) }, ammoBar)
pcall(function() sg.Parent = parent end)
ammoFrame = frame
return frame
end
local function ensureReloadHUD()
if reloadFrame then return reloadFrame end
local parent = getSafeGuiParent()
if not parent then return nil end
local sg = mk("ScreenGui", { Name = "NightFall_ReloadHUD", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 105 })
local frame = mk("Frame", { Name = "ReloadHUD", AnchorPoint = Vector2.new(0.5, 1), Size = UDim2.fromOffset(130, 26), BackgroundColor3 = Color3.fromRGB(15, 15, 20), BackgroundTransparency = 0.25, BorderSizePixel = 0, Visible = false }, sg)
mk("UICorner", { CornerRadius = UDim.new(0, 6) }, frame)
mk("UIStroke", { Thickness = 1.2, Color = Color3.fromRGB(150, 90, 250), Transparency = 0.4 }, frame)
reloadTitleLbl = mk("TextLabel", { Size = UDim2.new(1, -12, 0, 11), Position = UDim2.fromOffset(6, 2), BackgroundTransparency = 1, Text = "RELOADING", TextColor3 = Color3.fromRGB(220, 215, 240), Font = Enum.Font.GothamBold, TextSize = 9, TextXAlignment = Enum.TextXAlignment.Left }, frame)
reloadTimeLbl = mk("TextLabel", { Size = UDim2.new(1, -12, 0, 11), Position = UDim2.fromOffset(6, 2), BackgroundTransparency = 1, Text = "0.0s", TextColor3 = Color3.fromRGB(180, 150, 255), Font = Enum.Font.GothamMedium, TextSize = 9, TextXAlignment = Enum.TextXAlignment.Right }, frame)
local bg = mk("Frame", { Size = UDim2.new(1, -12, 0, 5), Position = UDim2.fromOffset(6, 16), BackgroundColor3 = Color3.fromRGB(30, 28, 42), BorderSizePixel = 0 }, frame)
mk("UICorner", { CornerRadius = UDim.new(1, 0) }, bg)
reloadFill = mk("Frame", { Size = UDim2.fromScale(0, 1), BackgroundColor3 = Color3.fromRGB(160, 95, 255), BorderSizePixel = 0 }, bg)
mk("UICorner", { CornerRadius = UDim.new(1, 0) }, reloadFill)
mk("UIGradient", { Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(130, 80, 250)), ColorSequenceKeypoint.new(1, Color3.fromRGB(200, 120, 255)) }) }, reloadFill)
pcall(function() sg.Parent = parent end)
reloadFrame = frame
return frame
end
local function enforceBoxHidden(box, lbl, sg)
if box then
pcall(function()
if defBoxOrigPos == nil then defBoxOrigPos = box.Position end
box.Visible = false
box.Position = UDim2.fromScale(-10, -10)
end)
end
if lbl and lbl ~= box then pcall(function() lbl.Visible = false end) end
if sg and sg.Name ~= "Home" then
local sn = sg.Name:lower()
if sn:find("ammo") or sn:find("gun") then
pcall(function()
if defGuiOrigEnabled == nil then defGuiOrigEnabled = sg.Enabled end
sg.Enabled = false
end)
end
end
end
local function restoreDefaultAmmo()
if defConn then defConn:Disconnect(); defConn = nil end
local pg = LocalPlayer:FindFirstChildOfClass("PlayerGui") or LocalPlayer:FindFirstChild("PlayerGui")
local home = pg and pg:FindFirstChild("Home")
local fade = home and home:FindFirstChild("fadeFrame")
local oldAmmo = fade and fade:FindFirstChild("Ammo")
if oldAmmo and oldAmmoOrigPos then
pcall(function()
oldAmmo.Position = oldAmmoOrigPos
oldAmmo.Visible = true
end)
oldAmmoOrigPos = nil
end
if defBox and defBox.Parent then
pcall(function()
if defBoxOrigPos then defBox.Position = defBoxOrigPos end
defBox.Visible = true
end)
end
if defLbl and defLbl.Parent and defLbl ~= defBox then
pcall(function() defLbl.Visible = true end)
end
if defGui and defGui.Parent and defGuiOrigEnabled ~= nil then
pcall(function() defGui.Enabled = defGuiOrigEnabled end)
end
defBoxOrigPos, defGuiOrigEnabled = nil, nil
end
local function hideDefaultAmmo()
local pg = LocalPlayer:FindFirstChildOfClass("PlayerGui") or LocalPlayer:FindFirstChild("PlayerGui")
if not pg then return end
local home = pg:FindFirstChild("Home")
local fade = home and home:FindFirstChild("fadeFrame")
local oldAmmo = fade and fade:FindFirstChild("Ammo")
if oldAmmo then
if oldAmmoOrigPos == nil then oldAmmoOrigPos = oldAmmo.Position end
oldAmmo.Visible = false
oldAmmo.Position = UDim2.fromScale(-10, -10)
end
if defBox and defBox.Parent and defLbl and defLbl.Parent then
enforceBoxHidden(defBox, defLbl, defGui)
return
end
local now = os.clock()
if now - lastScan < 0.25 then return end
lastScan = now
if defConn then defConn:Disconnect(); defConn = nil end
defLbl, defBox, defGui = nil, nil, nil
local cam = workspace.CurrentCamera
local vp = cam and cam.ViewportSize or Vector2.new(1920, 1080)
for _, desc in ipairs(pg:GetDescendants()) do
if desc:IsA("TextLabel") then
local sg = desc:FindFirstAncestorOfClass("ScreenGui")
if sg and not sg.Name:match("^NightFall") then
local txt = desc.Text or ""
local lname = desc.Name:lower()
local isAmmo = txt:match("^%s*%d+%s*/%s*%d+%s*$") or txt:match("^%s*%d+%s*/%s*[Ii][Nn][Ff]%s*$")
or ((lname == "ammo" or lname == "ammolabel" or lname == "ammotext") and txt:match("%d"))
local pos, sz = desc.AbsolutePosition, desc.AbsoluteSize
if isAmmo and sz.X > 0 and sz.X < 460 and sz.Y > 0 and sz.Y < 200 and pos.X >= vp.X * 0.45 and pos.Y >= vp.Y * 0.45 then
local box, cur = desc, desc.Parent
while cur and cur:IsA("GuiObject") do
local csz, cpos = cur.AbsoluteSize, cur.AbsolutePosition
if csz.X > 0 and csz.X <= 460 and csz.Y > 0 and csz.Y <= 220 and cpos.X >= vp.X * 0.40 and cpos.Y >= vp.Y * 0.40 then
box, cur = cur, cur.Parent
else
break
end
end
defLbl, defBox, defGui = desc, box, sg
enforceBoxHidden(box, desc, sg)
defConn = box:GetPropertyChangedSignal("Visible"):Connect(function()
if box.Visible then enforceBoxHidden(box, desc, sg) end
end)
return
end
end
end
end
end
local function readNum(tool, names)
for _, n in ipairs(names) do
local v = tonumber(tool:GetAttribute(n))
if v then return v end
end
for _, n in ipairs(names) do
local ch = tool:FindFirstChild(n)
if ch and (ch:IsA("IntValue") or ch:IsA("NumberValue")) then return tonumber(ch.Value) end
end
return nil
end
local function getGunStates(tool)
local now = os.clock()
if cachedGsTool ~= tool or (now - lastGsTime) > 0.15 then
cachedGsTool, lastGsTime, cachedGsTbl = tool, now, nil
local gs = tool:FindFirstChild("GunStates")
if gs then
local ok, st = pcall(require, gs)
if ok and type(st) == "table" then cachedGsTbl = st end
end
end
return cachedGsTbl
end
local function readAmmoState(tool)
local cur = readNum(tool, { "CurrentAmmo", "Ammo", "Clip", "Mag", "CurrentClip" })
local magMax = readNum(tool, { "MaxAmmo", "MagSize", "MaxClip", "ClipSize", "AmmoCapacity", "MaxMag" })
local reserve = readNum(tool, { "StoredAmmo", "ReserveAmmo", "TotalAmmo", "Reserve" })
if cur == nil or magMax == nil then
local st = getGunStates(tool)
if st then
cur = cur or tonumber(st.CurrentAmmo)
magMax = magMax or tonumber(st.MaxAmmo)
reserve = reserve or tonumber(st.StoredAmmo)
end
end
if defLbl and defLbl.Parent then
local cStr, rStr = (defLbl.Text or ""):match("^%s*(%d+)%s*/%s*([^%s]+)%s*$")
if cStr then
cur = cur or tonumber(cStr)
magMax = magMax or tonumber(rStr)
end
end
local _, _, defMag = getGunDefaults(tool.Name)
cur = cur or defMag
magMax = math.max(magMax or observedMax[tool] or defMag, cur)
observedMax[tool] = magMax
local resText = (reserve and reserve < 99999 and reserve ~= math.huge) and tostring(math.floor(reserve)) or "Inf"
return cur, magMax, resText
end
local function getReloadDur(tool)
if not tool then return 2 end
local attr = tonumber(tool:GetAttribute("ReloadTime"))
if attr and attr > 0 then return attr end
local st = getGunStates(tool)
if st and tonumber(st.ReloadTime) then return tonumber(st.ReloadTime) end
return select(4, getGunDefaults(tool.Name))
end
local function isArrestTool(tool)
if not tool or not tool:IsA("Tool") or isGun(tool) then return false end
local n = tool.Name:lower()
return n:find("handcuff") ~= nil or n:find("cuff") ~= nil or n:find("arrest") ~= nil
end
local function getArrestCooldown(tool)
if not tool then return 1.0 end
local attr = readNum(tool, { "Cooldown", "ArrestCooldown", "ReloadTime", "FireRate", "Delay", "Duration" })
if attr and attr > 0 then return attr end
return 1.0
end
local function setToolReload(tool, title, dur, startAmmo, startAt, force)
if not tool then return end
local now = os.clock()
local existing = reloadStates[tool]
if existing and (now - existing.Start) < existing.Dur and not force then
return existing
end
local st = {
Start = startAt or now,
Dur = dur or 1.5,
Title = title or tool.Name,
StartAmmo = startAmmo,
ByDisabled = (tool.Enabled == false),
}
reloadStates[tool] = st
return st
end
local function startArrestCooldown(tool, customDur)
setToolReload(tool, "ARREST", customDur or getArrestCooldown(tool), nil, os.clock(), true)
end
local function bindArrestTool(tool)
if arrestBoundTool == tool then return end
if arrestActConn then arrestActConn:Disconnect(); arrestActConn = nil end
arrestBoundTool = tool
if tool and isArrestTool(tool) then
arrestActConn = trackConn(tool.Activated:Connect(function()
if Settings.ReloadHUD ~= false then startArrestCooldown(tool) end
end))
end
end
local function startReload(tool, cur)
setToolReload(tool, tool.Name, getReloadDur(tool), tonumber(cur), os.clock(), false)
end
trackConn(UserInputService.InputBegan:Connect(function(input, gpe)
if gpe or input.KeyCode ~= Enum.KeyCode.R then return end
local char = LocalPlayer.Character
local tool = char and char:FindFirstChildOfClass("Tool")
if tool and isGun(tool) then
local cur, magMax = readAmmoState(tool)
if cur == nil or magMax == nil or cur < magMax then startReload(tool, cur) end
end
end))
local function updateReload(tool, cur)
ensureReloadHUD()
local now = os.clock()
for t, s in pairs(reloadStates) do
if not t or not t.Parent or (now - s.Start) >= s.Dur then
reloadStates[t] = nil
elseif isGun(t) and t == tool and s.StartAmmo and cur and cur > s.StartAmmo and (now - s.Start) > 0.2 then
reloadStates[t] = nil
end
end
activeReloadTool = tool
if tool and isGun(tool) then
bindArrestTool(nil)
local attrReload = (tool:GetAttribute("Reloading") == true) or (tool:GetAttribute("IsReloading") == true)
if attrReload and not reloadStates[tool] then
startReload(tool, cur)
elseif not attrReload and reloadStates[tool] and reloadStates[tool].StartAmmo and cur and cur > reloadStates[tool].StartAmmo and (now - reloadStates[tool].Start) > 0.2 then
reloadStates[tool] = nil
end
local snd = tool:FindFirstChild("Reload") or (tool:FindFirstChild("Handle") and tool.Handle:FindFirstChild("Reload"))
if snd and snd:IsA("Sound") and snd.Playing and not reloadStates[tool] then
local dur = (snd.TimeLength > 0 and snd.TimeLength) or getReloadDur(tool)
setToolReload(tool, tool.Name, dur, cur, now - snd.TimePosition, false)
end
elseif tool and isArrestTool(tool) then
bindArrestTool(tool)
local cdAttr = (tool:GetAttribute("OnCooldown") == true)
or (tool:GetAttribute("Reloading") == true)
or (tool:GetAttribute("IsReloading") == true)
or (tool:GetAttribute("Cooldown") == true)
local st = reloadStates[tool]
if (cdAttr or tool.Enabled == false) and not st then
startArrestCooldown(tool)
elseif st and st.ByDisabled and tool.Enabled == true and not cdAttr and (now - st.Start) > 0.15 then
reloadStates[tool] = nil
end
else
bindArrestTool(nil)
end
local st = tool and reloadStates[tool] or nil
if not st or st.Dur <= 0 then
if reloadFrame then reloadFrame.Visible = false end
return
end
local elapsed = now - st.Start
if elapsed >= st.Dur then
reloadStates[tool] = nil
if reloadFrame then reloadFrame.Visible = false end
return
end
if reloadFrame then
local cam = workspace.CurrentCamera
local vp = cam and cam.ViewportSize or Vector2.new(1920, 1080)
local pos = getCrosshairPos()
if pos.X <= 1 and pos.Y <= 1 then pos = vp * 0.5 end
reloadFrame.Position = UDim2.fromOffset(math.clamp(pos.X, 75, math.max(75, vp.X - 75)), math.clamp(pos.Y - 26, 36, math.max(36, vp.Y - 10)))
reloadFill.Size = UDim2.new(math.clamp(elapsed / st.Dur, 0, 1), 0, 1, 0)
reloadTimeLbl.Text = string.format("%.1fs", math.max(0, st.Dur - elapsed))
reloadTitleLbl.Text = st.Title or (tool and tool.Name) or "RELOADING"
reloadFrame.Visible = true
end
end
local function updateAmmo(tool, cur, magMax, resText)
ensureAmmoHUD()
pcall(hideDefaultAmmo)
if not tool or not isGun(tool) then
if ammoFrame then ammoFrame.Visible = false end
return
end
if ammoFrame then
ammoCountLbl.Text = tostring(cur)
ammoCountLbl.TextColor3 = (cur <= 0) and Color3.fromRGB(255, 70, 70) or Color3.new(1, 1, 1)
ammoMaxLbl.Text = "/ " .. tostring(resText or "Inf")
ammoMaxLbl.Position = UDim2.fromOffset(10 + math.max(14, ammoCountLbl.TextBounds.X) + 5, 19)
ammoNameLbl.Text = tool.Name:upper()
ammoBar.Size = UDim2.new(math.clamp(cur / math.max(1, magMax), 0, 1), 0, 1, 0)
ammoFrame.Visible = true
end
end
return {
Update = function()
local char = LocalPlayer.Character
local tool = char and char:FindFirstChildOfClass("Tool")
local cur, magMax, resText = nil, nil, "Inf"
local needState = tool and isGun(tool) and (Settings.AmmoHUD ~= false or Settings.ReloadHUD ~= false)
if needState then
if Settings.AmmoHUD ~= false then pcall(hideDefaultAmmo) end
cur, magMax, resText = readAmmoState(tool)
end
if Settings.ReloadHUD ~= false then
pcall(updateReload, tool, cur)
else
activeReloadTool = nil
if reloadFrame then reloadFrame.Visible = false end
end
if Settings.AmmoHUD ~= false then
pcall(updateAmmo, tool, cur or 0, magMax or 1, resText)
else
if ammoFrame then ammoFrame.Visible = false end
pcall(restoreDefaultAmmo)
end
end,
Unload = function()
table.clear(reloadStates)
activeReloadTool = nil
bindArrestTool(nil)
if reloadFrame then reloadFrame.Visible = false end
if ammoFrame then ammoFrame.Visible = false end
pcall(restoreDefaultAmmo)
end,
IsReloading = function()
local char = LocalPlayer.Character
local t = activeReloadTool or (char and char:FindFirstChildOfClass("Tool"))
local st = t and reloadStates[t]
return st ~= nil and (os.clock() - st.Start) < st.Dur
end,
}
end)()
local PurpleBullets = (function()
local PURPLE = Color3.fromRGB(175, 85, 255)
local PURPLE_LIGHT = Color3.fromRGB(225, 165, 255)
local PURPLE_VERTEX = Vector3.new(1.5, 0.7, 2.2)
local PURPLE_SEQ = ColorSequence.new({ ColorSequenceKeypoint.new(0, PURPLE_LIGHT), ColorSequenceKeypoint.new(0.5, PURPLE), ColorSequenceKeypoint.new(1, Color3.fromRGB(130, 45, 255)) })
local active = setmetatable({}, { __mode = "k" })
local lastLocalFireAt = 0
local function markLocalShot()
lastLocalFireAt = os.clock()
end
do
local env = (typeof(getgenv) == "function" and getgenv()) or _G
env._NF_MarkLocalShot = markLocalShot
end
local function isHoldingGun()
local char = LocalPlayer.Character
local tool = char and char:FindFirstChildOfClass("Tool")
return tool ~= nil and isGun(tool)
end
local function hasRecentShot()
if (os.clock() - lastLocalFireAt) <= 0.55 then return true end
if UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) and isHoldingGun() then
lastLocalFireAt = os.clock()
return true
end
return false
end
local function inAnyChar(inst)
for _, p in ipairs(Players:GetPlayers()) do
if p.Character and inst:IsDescendantOf(p.Character) then return true end
end
return false
end
local function styleInst(inst)
if not inst or not inst.Parent then return end
pcall(function()
if inst:IsA("BasePart") then
inst.Color = PURPLE
inst.Material = Enum.Material.Neon
inst.CastShadow = false
if inst:IsA("MeshPart") and inst.TextureID ~= "" then inst.TextureID = "" end
elseif inst:IsA("DataModelMesh") then
inst.VertexColor = PURPLE_VERTEX
if inst:IsA("FileMesh") and inst.TextureId ~= "" then inst.TextureId = "" end
elseif inst:IsA("Beam") then
inst.Color = PURPLE_SEQ
inst.LightEmission = 1
inst.LightInfluence = 0
if inst.Texture ~= "" then inst.Texture = "" end
elseif inst:IsA("Trail") or inst:IsA("ParticleEmitter") then
inst.Color, inst.LightEmission, inst.LightInfluence = PURPLE_SEQ, 1, 0
elseif inst:IsA("Highlight") then
inst.FillColor, inst.OutlineColor = PURPLE, PURPLE_LIGHT
elseif inst:IsA("Light") then
inst.Color = PURPLE
elseif inst:IsA("SelectionBox") or inst:IsA("SelectionSphere") then
inst.Color3, inst.SurfaceColor3 = PURPLE, PURPLE
elseif inst:IsA("Texture") or inst:IsA("Decal") then
inst.Color3 = PURPLE
elseif inst:IsA("ImageLabel") or inst:IsA("ImageButton") then
inst.ImageColor3 = PURPLE
elseif inst:IsA("Frame") then
inst.BackgroundColor3 = PURPLE
end
end)
end
local function applyPurple(inst)
if not inst or not inst.Parent then return end
active[inst] = os.clock()
styleInst(inst)
for _, d in ipairs(inst:GetDescendants()) do
active[d] = os.clock()
styleInst(d)
end
end
local function getLocalShooterPoints()
local char, _, root = getCharacter()
if not char then return {} end
local pts = {}
local tool = char:FindFirstChildOfClass("Tool")
local muzzle = tool and (tool:FindFirstChild("Muzzle") or tool:FindFirstChild("Handle"))
if muzzle and muzzle:IsA("BasePart") then table.insert(pts, muzzle.Position) end
local head = char:FindFirstChild("Head")
if head then table.insert(pts, head.Position) end
if root then table.insert(pts, root.Position) end
local cam = workspace.CurrentCamera
if cam then table.insert(pts, cam.CFrame.Position) end
return pts
end
local function isLocalPoint(pt)
if typeof(pt) ~= "Vector3" then return false end
local best = math.huge
for _, ref in ipairs(getLocalShooterPoints()) do
best = math.min(best, (pt - ref).Magnitude)
end
if best > 20 then return false end
if hasRecentShot() and best <= 10 then return true end
for _, p in ipairs(Players:GetPlayers()) do
if p ~= LocalPlayer and p.Character then
local oh, oroot = p.Character:FindFirstChild("Head"), p.Character:FindFirstChild("HumanoidRootPart")
local od = math.min(oh and (pt - oh.Position).Magnitude or math.huge, oroot and (pt - oroot.Position).Magnitude or math.huge)
if od < best then return false end
end
end
return true
end
local function extractPos(val)
local t = typeof(val)
if t == "Vector3" then return val end
if t == "CFrame" then return val.Position end
if t == "Instance" and val:IsA("BasePart") then return val.Position end
if type(val) == "table" then return extractPos(val.Origin or val.origin or val.Start or val.startPos or val[1]) end
return nil
end
local function isLocalShot(...)
if typeof(checkcaller) == "function" and checkcaller() then return true end
local sawVec = false
for i = 1, math.min(select("#", ...), 5) do
local p = extractPos(select(i, ...))
if p ~= nil then
sawVec = true
if isLocalPoint(p) then return true end
end
end
if not sawVec then return hasRecentShot() end
return false
end
local function isLocalTracerPart(part)
if inAnyChar(part) then return false end
local ln = part.Name:lower()
local namedTracer = ln:find("bullet") or ln:find("tracer") or ln:find("ray") or ln:find("laser")
or ln:find("projectile") or ln:find("pellet") or ln:find("shot") or ln:find("flash") or ln:find("muzzle")
if not namedTracer and part.CanCollide and part.CanTouch then return false end
local sx, sy, sz = part.Size.X, part.Size.Y, part.Size.Z
local minD, maxD = math.min(sx, sy, sz), math.max(sx, sy, sz)
local looksTracer = namedTracer
or (part.Material == Enum.Material.Neon and minD <= 1.0 and (maxD >= 0.4 or not part.CanCollide))
or (not part.CanCollide and minD <= 1.0 and maxD >= 0.15)
or part:FindFirstChildOfClass("Beam") ~= nil or part:FindFirstChildOfClass("Trail") ~= nil
if not looksTracer then return false end
local cf = part.CFrame
if isLocalPoint(part.Position) then return true end
if sz >= sx and sz >= sy then
return isLocalPoint(cf.Position + cf.LookVector * (sz * 0.5)) or isLocalPoint(cf.Position - cf.LookVector * (sz * 0.5))
elseif sx >= sy then
return isLocalPoint(cf.Position + cf.RightVector * (sx * 0.5)) or isLocalPoint(cf.Position - cf.RightVector * (sx * 0.5))
end
return isLocalPoint(cf.Position + cf.UpVector * (sy * 0.5)) or isLocalPoint(cf.Position - cf.UpVector * (sy * 0.5))
end
local function inViewmodel(d)
local cam = workspace.CurrentCamera
if not cam or not d:IsDescendantOf(cam) then return false end
local vm = cam:FindFirstChildOfClass("Model")
return vm ~= nil and d:IsDescendantOf(vm)
end
local function tryPaintObj(d)
if not d or not d.Parent or active[d] then return true end
if inAnyChar(d) or inViewmodel(d) then return true end
if d:IsA("Beam") then
local a0, a1 = d.Attachment0, d.Attachment1
if (a0 and isLocalPoint(a0.WorldPosition)) or (a1 and isLocalPoint(a1.WorldPosition))
or (d.Parent and d.Parent:IsA("BasePart") and isLocalPoint(d.Parent.Position)) then
applyPurple(d)
return true
end
return false
elseif d:IsA("Trail") or d:IsA("ParticleEmitter") then
if d.Parent and d.Parent:IsA("BasePart") and isLocalPoint(d.Parent.Position) then
applyPurple(d.Parent)
applyPurple(d)
return true
end
return false
elseif d:IsA("BasePart") and isLocalTracerPart(d) then
applyPurple(d)
return true
end
return false
end
local function onNewTracerObj(d)
if Settings.PurpleBullets == false then return end
if not hasRecentShot() then return end
if not (d:IsA("BasePart") or d:IsA("Beam") or d:IsA("Trail") or d:IsA("ParticleEmitter")) then return end
if not tryPaintObj(d) then
task.defer(function()
if d.Parent and not tryPaintObj(d) then
task.delay(0.02, function()
if d.Parent then tryPaintObj(d) end
end)
end
end)
end
end
trackConn(workspace.DescendantAdded:Connect(onNewTracerObj))
local camDescConn = nil
local function bindCamDesc(cam)
if camDescConn then camDescConn:Disconnect(); camDescConn = nil end
if cam then camDescConn = trackConn(cam.DescendantAdded:Connect(onNewTracerObj)) end
end
bindCamDesc(workspace.CurrentCamera)
trackConn(workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
bindCamDesc(workspace.CurrentCamera)
end))
trackConn(UserInputService.InputBegan:Connect(function(input, gpe)
local ut = input.UserInputType
if gpe and ut ~= Enum.UserInputType.Touch then return end
if (ut == Enum.UserInputType.MouseButton1 or ut == Enum.UserInputType.Touch) and isHoldingGun() then markLocalShot() end
end))
local function captureBullet(origFn, ...)
if Settings.PurpleBullets == false then return origFn(...) end
local argc, args = select("#", ...), { ... }
if not isLocalShot(...) then return origFn(...) end
markLocalShot()
for i = 1, argc do
if typeof(args[i]) == "Color3" then
args[i] = PURPLE
elseif type(args[i]) == "table" and typeof(args[i].Color) == "Color3" then
args[i].Color = PURPLE
end
end
local captured = {}
local wsConn = workspace.DescendantAdded:Connect(function(d)
if (d:IsA("BasePart") or d:IsA("Beam") or d:IsA("Trail") or d:IsA("ParticleEmitter")) and not inAnyChar(d) then
table.insert(captured, d)
end
end)
local cam = workspace.CurrentCamera
local camConn = cam and cam.DescendantAdded:Connect(function(d)
if (d:IsA("BasePart") or d:IsA("Beam") or d:IsA("Trail") or d:IsA("ParticleEmitter")) and not inViewmodel(d) then
table.insert(captured, d)
end
end)
local ok, res = pcall(origFn, table.unpack(args, 1, argc))
wsConn:Disconnect()
if camConn then camConn:Disconnect() end
local function paintAll()
for _, obj in ipairs(captured) do applyPurple(obj) end
if typeof(res) == "Instance" then applyPurple(res) end
end
paintAll()
task.defer(paintAll)
task.delay(0.03, paintAll)
return ok and res or nil
end
trackConn(RunService.RenderStepped:Connect(function()
if not next(active) then return end
local now = os.clock()
for inst, born in pairs(active) do
if not inst or not inst.Parent or (now - born) > 0.65 then active[inst] = nil else styleInst(inst) end
end
end))
return { CaptureBullet = captureBullet, MarkShot = markLocalShot }
end)()
trackConn(RunService.RenderStepped:Connect(function()
if Settings.SilentAim and Settings.SilentAimShowFOV then
pcall(updateSilentAimFOV)
elseif SilentAimFovFrame and SilentAimFovFrame.Visible then
SilentAimFovFrame.Visible = false
end
WeaponHUD.Update()
end))
local SilentAim = (function()
local BODY_GROUPS = {
Arms = { "Right Arm", "Left Arm", "RightUpperArm", "LeftUpperArm", "RightLowerArm", "LeftLowerArm", "RightHand", "LeftHand" },
Legs = { "Right Leg", "Left Leg", "RightUpperLeg", "LeftUpperLeg", "RightLowerLeg", "LeftLowerLeg", "RightFoot", "LeftFoot" },
Random = { "Head", "Torso", "UpperTorso", "Right Arm", "Left Arm", "Right Leg", "Left Leg" },
}
local function getTargetPart(char)
if not char then return nil end
local mode = Settings.SilentAimHitPart or "Head"
if mode == "Torso" then
return char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso") or char:FindFirstChild("HumanoidRootPart")
elseif BODY_GROUPS[mode] then
local found = {}
for _, name in ipairs(BODY_GROUPS[mode]) do
local p = char:FindFirstChild(name)
if p then table.insert(found, p) end
end
if #found > 0 then return found[math.random(1, #found)] end
return char:FindFirstChild("HumanoidRootPart")
end
return char:FindFirstChild("Head") or char:FindFirstChild("HumanoidRootPart")
end
local function isPlayerVisible(origin, targetPart, targetChar)
if not Settings.SilentAimWallCheck then return true end
local myChar = LocalPlayer.Character
if not myChar or not targetPart or not targetChar then return false end
local targetPos = targetPart.Position
if (targetPos - origin).Magnitude <= 2 then return true end
local rp = RaycastParams.new()
rp.FilterType = (Enum.RaycastFilterType and Enum.RaycastFilterType.Exclude) or Enum.RaycastFilterType.Blacklist
rp.RespectCanCollide = false
rp.IgnoreWater = true
local ignore = { myChar, workspace.CurrentCamera }
local rayIgnore = Workspace:FindFirstChild("RayIgnore")
if rayIgnore then table.insert(ignore, rayIgnore) end
rp.FilterDescendantsInstances = ignore
local cur = origin
for _ = 1, 10 do
local dir = targetPos - cur
if dir.Magnitude < 0.8 then return true end
local hit = workspace:Raycast(cur, dir, rp)
local inst = hit and hit.Instance
if not inst or inst:IsDescendantOf(targetChar) then return true end
local acc = inst:FindFirstAncestorOfClass("Accessory")
local mdl = inst:FindFirstAncestorOfClass("Model")
local otherHum = mdl and mdl ~= targetChar and mdl:FindFirstChildOfClass("Humanoid")
local n = inst.Name:lower()
local passable = (inst.Transparency >= 0.9)
or n:find("nf_") or n:find("trigger") or n:find("zone") or n:find("spawn")
or acc ~= nil or otherHum ~= nil
if not passable then return false end
table.insert(ignore, acc or mdl or inst)
rp.FilterDescendantsInstances = ignore
cur = hit.Position + dir.Unit * 0.05
end
return false
end
local lastRollTime, lastRollOk, lastRollPlayer, lastRollPart = 0, false, nil, nil
local function getTarget()
if not Settings.SilentAim then return nil, nil end
local char, hum = getCharacter()
local cam = workspace.CurrentCamera
if not char or not hum or hum.Health <= 0 or not cam then return nil, nil end
local mousePos = getCrosshairPos()
local bestDist = tonumber(Settings.SilentAimFOV) or 180
local head = char:FindFirstChild("Head") or char:FindFirstChild("HumanoidRootPart")
local origin = head and head.Position or cam.CFrame.Position
local bestPlayer, bestPart = nil, nil
for _, p in ipairs(Players:GetPlayers()) do
if p ~= LocalPlayer and p.Parent then
local tChar = p.Character
local tHum = tChar and tChar:FindFirstChildOfClass("Humanoid")
if tChar and tHum and tHum.Health > 0 and not (Settings.SilentAimTeamCheck and isUnkillableTarget(p)) and not hasShield(tChar, false) then
local part = getTargetPart(tChar)
if part then
local sp = cam:WorldToViewportPoint(part.Position)
local dist = sp.Z > 0 and (Vector2.new(sp.X, sp.Y) - mousePos).Magnitude or math.huge
if dist <= bestDist and isPlayerVisible(origin, part, tChar) then
bestDist, bestPlayer, bestPart = dist, p, part
end
end
end
end
end
return bestPlayer, bestPart
end
local function getShotTarget()
if not Settings.SilentAim then return nil, nil end
local now = os.clock()
if (now - lastRollTime) < 0.025 then
if not lastRollOk then return nil, nil end
local ch = lastRollPlayer and lastRollPlayer.Character
local hm = ch and ch:FindFirstChildOfClass("Humanoid")
if ch and hm and hm.Health > 0 and lastRollPart and lastRollPart.Parent == ch
and not (Settings.SilentAimTeamCheck and isUnkillableTarget(lastRollPlayer))
and not hasShield(ch, false) then
return lastRollPlayer, lastRollPart
end
end
lastRollTime = now
local chance = tonumber(Settings.SilentAimHitChance) or 100
if chance < 100 and math.random(1, 100) > chance then
lastRollOk, lastRollPlayer, lastRollPart = false, nil, nil
return nil, nil
end
local p, part = getTarget()
lastRollOk = (p ~= nil and part ~= nil)
lastRollPlayer, lastRollPart = p, part
return p, part
end
local function makeLegacyBullet(b, fallbackOrig, targetPos, targetPart)
local rObj = (typeof(b.RayObject) == "Ray" and b.RayObject) or (typeof(b.rayobject) == "Ray" and b.rayobject)
local orig = rObj and rObj.Origin or fallbackOrig
local dir = targetPos - orig
return { RayObject = Ray.new(orig, dir), Distance = dir.Magnitude, Cframe = CFrame.new(orig, targetPos), Hit = targetPart }
end
local function isLegacyBullet(b)
return b.Hit ~= nil or b.hit ~= nil or b.RayObject ~= nil or b.rayobject ~= nil or b.Cframe ~= nil or b.cframe ~= nil
end
local function rewriteBulletsTable(bullets, fallbackOrig, targetPart)
if type(bullets) ~= "table" then return nil end
local targetPos = predictAimPosition(targetPart) or targetPart.Position
if typeof(bullets[1]) == "Vector3" then return { bullets[1], targetPos, targetPart } end
local keys = {}
for k in pairs(bullets) do
if type(k) == "number" and k >= 1 and k == math.floor(k) then table.insert(keys, k) end
end
if #keys == 0 then
return isLegacyBullet(bullets) and makeLegacyBullet(bullets, fallbackOrig, targetPos, targetPart)
or { { fallbackOrig, targetPos, targetPart } }
end
table.sort(keys)
local out = {}
for _, k in ipairs(keys) do
local b = bullets[k]
if type(b) == "table" and b[1] ~= nil then
local orig = (typeof(b[1]) == "Vector3" and b[1]) or fallbackOrig
table.insert(out, { orig, targetPos, targetPart })
elseif type(b) == "table" and isLegacyBullet(b) then
table.insert(out, makeLegacyBullet(b, fallbackOrig, targetPos, targetPart))
else
table.insert(out, b)
end
end
return #out > 0 and out or { { fallbackOrig, targetPos, targetPart } }
end
local hooksInstalled, tracersHooked, lastShotInput, lastFire, shooting = false, false, 0, 0, false
local function hookTracers()
if tracersHooked then return end
pcall(function()
local gt = getGunTracers()
if not gt then return end
local fnKey = (type(gt.createBullet) == "function" and "createBullet") or (type(gt.CreateBullet) == "function" and "CreateBullet")
if not fnKey then return end
local env = (typeof(getgenv) == "function" and getgenv()) or _G
env._NF_SilentTracerHandler = function(startPos, endPos)
if Settings.SilentAim and typeof(startPos) == "Vector3" then
local char, _, root = getCharacter()
local head = char and char:FindFirstChild("Head")
local ref = (head and head.Position) or (root and root.Position)
local cam = workspace.CurrentCamera
local nearShooter = (ref and (startPos - ref).Magnitude < 16)
or (cam and (startPos - cam.CFrame.Position).Magnitude < 16)
if nearShooter then
local _, part = getShotTarget()
if part then
local tool = char and char:FindFirstChildOfClass("Tool")
local muzzle = tool and tool:FindFirstChild("Muzzle")
local newStart = (muzzle and muzzle:IsA("BasePart") and ref and (muzzle.Position - ref).Magnitude < 12)
and muzzle.Position or startPos
return predictAimPosition(part) or part.Position, newStart
end
end
end
return endPos, startPos
end
env._NF_RainbowTracerWrap = function(origFn, ...)
return (PurpleBullets and PurpleBullets.CaptureBullet) and PurpleBullets.CaptureBullet(origFn, ...) or origFn(...)
end
if not env._NF_GunTracersHookedV2 then
local orig = gt[fnKey]
local wrapC = (typeof(newcclosure) == "function" and newcclosure) or function(fn) return fn end
local hooked = wrapC(function(...)
local args, argc = { ... }, select("#", ...)
if not (typeof(checkcaller) == "function" and checkcaller()) and env._NF_SilentTracerHandler then
if typeof(args[1]) == "Vector3" and typeof(args[2]) == "Vector3" then
local newEnd, newStart = env._NF_SilentTracerHandler(args[1], args[2])
args[1], args[2] = newStart, newEnd
elseif typeof(args[2]) == "Vector3" and typeof(args[3]) == "Vector3" then
local newEnd, newStart = env._NF_SilentTracerHandler(args[2], args[3])
args[2], args[3] = newStart, newEnd
end
end
return env._NF_RainbowTracerWrap and env._NF_RainbowTracerWrap(orig, table.unpack(args, 1, argc)) or orig(table.unpack(args, 1, argc))
end)
if typeof(hookfunction) == "function" then orig = hookfunction(orig, hooked) else gt[fnKey] = hooked end
env._NF_GunTracersHookedV2 = true
end
tracersHooked = true
end)
end
do
local env = (typeof(getgenv) == "function" and getgenv()) or _G
for _, oldKey in ipairs({ "_NF_SilentShootHandler", "_NF_SilentShootHandlerV2", "_NF_SilentRayHandlerV2", "_NF_SilentShootHandlerV3", "_NF_SilentRayHandlerV3", "_NF_MouseTargetGetter", "_NF_Settings" }) do
env[oldKey] = nil
end
local function isSelfCall()
return env._NF_InternalFire == true or (typeof(checkcaller) == "function" and checkcaller())
end
local function tryInstallWithWrap(buildFn)
if typeof(newcclosure) == "function" then
if pcall(function() buildFn(newcclosure) end) then return true end
end
return pcall(function() buildFn(function(fn) return fn end) end)
end
if typeof(hookmetamethod) == "function" and typeof(getnamecallmethod) == "function" then
env._NF_SilentShootHandlerV4 = function(_, bullets)
env._NF_HookIntercepted = true
if not Settings.SilentAim or type(bullets) ~= "table" then return nil end
local _, part = getShotTarget()
if not part then return nil end
local char = LocalPlayer.Character
local tool = char and char:FindFirstChildOfClass("Tool")
local muzzle = tool and tool:FindFirstChild("Muzzle")
local head = char and (char:FindFirstChild("Head") or char:FindFirstChild("HumanoidRootPart"))
local cam = workspace.CurrentCamera
local orig = (muzzle and muzzle:IsA("BasePart") and head and (muzzle.Position - head.Position).Magnitude < 10 and muzzle.Position)
or (head and head.Position)
or (cam and cam.CFrame.Position)
return orig and rewriteBulletsTable(bullets, orig, part) or nil
end
env._NF_SilentRayHandlerV4 = function(orig, dir)
if not Settings.SilentAim or typeof(orig) ~= "Vector3" or typeof(dir) ~= "Vector3" or dir.Magnitude < 25 then return nil end
local isMobile = UserInputService.TouchEnabled and not UserInputService.MouseEnabled
if not isMobile and (os.clock() - lastShotInput) >= 0.25 and not UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) then return nil end
local char, _, root = getCharacter()
local tool = char and char:FindFirstChildOfClass("Tool")
local cam = workspace.CurrentCamera
if not tool or not isGun(tool) or not cam or cam.CFrame.LookVector:Dot(dir.Unit) < -0.25 then return nil end
local head = char:FindFirstChild("Head")
local near = (head and (orig - head.Position).Magnitude < 25) or (root and (orig - root.Position).Magnitude < 25) or ((orig - cam.CFrame.Position).Magnitude < 25)
if not near then return nil end
local _, part = getShotTarget()
local aimPos = part and part.Position
local toTarget = aimPos and (aimPos - orig)
if not toTarget or toTarget.Magnitude < 0.01 then return nil end
return toTarget.Unit * math.max(dir.Magnitude, toTarget.Magnitude + 5)
end
if not env._NF_NamecallHookedV4 then
local inHook = false
local ok = tryInstallWithWrap(function(wrapC)
local oldNamecall
oldNamecall = hookmetamethod(game, "__namecall", wrapC(function(self, ...)
local gs = _G.Settings
if not inHook and not isSelfCall() and typeof(self) == "Instance" then
local method = getnamecallmethod()
if method == "FireServer" and self.ClassName == "RemoteEvent" and self.Name == "ShootEvent" then
env._NF_HookIntercepted = true
if env._NF_MarkLocalShot then env._NF_MarkLocalShot() end
if gs and gs.SilentAim then
inHook = true
local okRw, rw = pcall(function(...) return env._NF_SilentShootHandlerV4 and env._NF_SilentShootHandlerV4(self, ...) end, ...)
inHook = false
if okRw and rw then return oldNamecall(self, rw, select(2, ...)) end
end
elseif gs and gs.SilentAim then
if method == "Raycast" and self.ClassName == "Workspace" then
local orig, dir = ...
inHook = true
local okNd, nd = pcall(function() return env._NF_SilentRayHandlerV4 and env._NF_SilentRayHandlerV4(orig, dir) end)
inHook = false
if okNd and nd then return oldNamecall(self, orig, nd, select(3, ...)) end
elseif (method == "FindPartOnRayWithIgnoreList" or method == "FindPartOnRayWithWhitelist" or method == "FindPartOnRay") and self.ClassName == "Workspace" then
local ray = ...
inHook = true
local okNd, nd = pcall(function() return typeof(ray) == "Ray" and env._NF_SilentRayHandlerV4 and env._NF_SilentRayHandlerV4(ray.Origin, ray.Direction) end)
inHook = false
if okNd and nd then return oldNamecall(self, Ray.new(ray.Origin, nd), select(2, ...)) end
end
end
end
return oldNamecall(self, ...)
end))
end)
if ok then env._NF_NamecallHookedV4 = true end
end
hooksInstalled = (env._NF_NamecallHookedV4 == true) or (env._NF_HookIntercepted == true)
end
if not hooksInstalled and typeof(hookfunction) == "function" then
if not env._NF_FireServerHooked then
local ok = tryInstallWithWrap(function(wrapC)
local targetRe = getShootEvent() or Instance.new("RemoteEvent")
local createdProbe = (targetRe.Parent == nil)
local origFS
origFS = hookfunction(targetRe.FireServer, wrapC(function(self, ...)
local gs = _G.Settings
if not isSelfCall() and typeof(self) == "Instance" and self.ClassName == "RemoteEvent" and self.Name == "ShootEvent" then
env._NF_HookIntercepted = true
hooksInstalled = true
if env._NF_MarkLocalShot then env._NF_MarkLocalShot() end
if gs and gs.SilentAim then
local okRw, rw = pcall(function(...) return env._NF_SilentShootHandlerV4 and env._NF_SilentShootHandlerV4(self, ...) end, ...)
if okRw and rw then return origFS(self, rw, select(2, ...)) end
end
end
return origFS(self, ...)
end))
if createdProbe then targetRe:Destroy() end
end)
if ok then
env._NF_FireServerHooked = true
end
end
end
hookTracers()
end
local function getRate(tool)
if not tool then return 0.2 end
local attr = tonumber(tool:GetAttribute("FireRate"))
if attr then return math.max(0.05, attr) end
local ok, st = pcall(function() return require(tool.GunStates) end)
if ok and type(st) == "table" and tonumber(st.FireRate) then return math.max(0.05, tonumber(st.FireRate)) end
return select(1, getGunDefaults(tool.Name))
end
local function isEmptyOrReloading(tool)
if (WeaponHUD and WeaponHUD.IsReloading and WeaponHUD.IsReloading())
or tool:GetAttribute("Reloading") == true
or tool:GetAttribute("IsReloading") == true then
return true
end
return false
end
local function tryShoot()
local env = (typeof(getgenv) == "function" and getgenv()) or _G
if hooksInstalled or env._NF_NamecallHookedV4 or env._NF_HookIntercepted or not Settings.SilentAim then
return
end
local char = LocalPlayer.Character
local tool = char and char:FindFirstChildOfClass("Tool")
if not tool or not isGun(tool) or isEmptyOrReloading(tool) then return end
local now = os.clock()
if (now - lastFire) < math.max(0.08, getRate(tool)) then return end
local _, part = getShotTarget()
local head = char:FindFirstChild("Head") or char:FindFirstChild("HumanoidRootPart")
local shootEv = getShootEvent()
if not part or not head or not shootEv then return end
local aimPos = predictAimPosition(part) or part.Position
fireCleanShootEvent(shootEv, tool, head.Position, aimPos, part, getGunPelletCount(tool))
lastFire = now
end
local function triggerFallbackCheck()
local char = LocalPlayer.Character
local tool = char and char:FindFirstChildOfClass("Tool")
if not tool or not isGun(tool) then return end
local env = (typeof(getgenv) == "function" and getgenv()) or _G
if not hooksInstalled and not env._NF_NamecallHookedV4 and not env._NF_HookIntercepted then
tryShoot()
end
end
trackConn(UserInputService.InputBegan:Connect(function(input, gpe)
local ut = input.UserInputType
if ut == Enum.UserInputType.MouseButton1 then
if not gpe then
lastShotInput, shooting = os.clock(), true
triggerFallbackCheck()
end
elseif ut == Enum.UserInputType.Touch then
lastShotInput = os.clock()
if not gpe then
shooting = true
triggerFallbackCheck()
end
end
end))
trackConn(UserInputService.InputEnded:Connect(function(input)
local ut = input.UserInputType
if ut == Enum.UserInputType.MouseButton1 or ut == Enum.UserInputType.Touch then shooting = false end
end))
trackConn(RunService.Heartbeat:Connect(function()
if shooting and Settings.SilentAim and not hooksInstalled then
local isMobile = UserInputService.TouchEnabled and not UserInputService.MouseEnabled
if isMobile or UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) then tryShoot() else shooting = false end
end
end))
local actConn, deactConn = nil, nil
local function bindTool(tool)
if actConn then actConn:Disconnect(); actConn = nil end
if deactConn then deactConn:Disconnect(); deactConn = nil end
if tool and tool:IsA("Tool") and isGun(tool) then
hookTracers()
actConn = trackConn(tool.Activated:Connect(function()
lastShotInput, shooting = os.clock(), true
triggerFallbackCheck()
end))
deactConn = trackConn(tool.Deactivated:Connect(function()
shooting = false
end))
end
end
local function watchChar(char)
if not char then return end
local cur = char:FindFirstChildOfClass("Tool")
if cur then bindTool(cur) end
trackConn(char.ChildAdded:Connect(function(c) if c:IsA("Tool") then bindTool(c) end end))
trackConn(char.ChildRemoved:Connect(function(c)
if c:IsA("Tool") then
shooting = false
if actConn then actConn:Disconnect(); actConn = nil end
if deactConn then deactConn:Disconnect(); deactConn = nil end
end
end))
end
watchChar(LocalPlayer.Character)
trackConn(LocalPlayer.CharacterAdded:Connect(watchChar))
return { GetTarget = getTarget }
end)()
local VisualExtras = (function()
local PURPLE, PURPLE_BRIGHT = Color3.fromRGB(165, 95, 255), Color3.fromRGB(215, 160, 255)
local WORLD_TINTS = {
Purple = { tint = Color3.fromRGB(220, 185, 255), amb = Color3.fromRGB(70, 45, 110), out = Color3.fromRGB(95, 65, 145) },
Pink = { tint = Color3.fromRGB(255, 185, 230), amb = Color3.fromRGB(110, 45, 85), out = Color3.fromRGB(145, 65, 115) },
Blue = { tint = Color3.fromRGB(180, 210, 255), amb = Color3.fromRGB(40, 65, 115), out = Color3.fromRGB(60, 90, 150) },
Cyan = { tint = Color3.fromRGB(175, 245, 255), amb = Color3.fromRGB(35, 95, 115), out = Color3.fromRGB(55, 130, 150) },
Red = { tint = Color3.fromRGB(255, 180, 180), amb = Color3.fromRGB(110, 40, 40), out = Color3.fromRGB(145, 60, 60) },
Green = { tint = Color3.fromRGB(185, 255, 200), amb = Color3.fromRGB(40, 105, 55), out = Color3.fromRGB(60, 140, 80) },
Orange = { tint = Color3.fromRGB(255, 215, 175), amb = Color3.fromRGB(115, 70, 35), out = Color3.fromRGB(150, 95, 50) },
White = { tint = Color3.fromRGB(245, 245, 255), amb = Color3.fromRGB(110, 110, 115), out = Color3.fromRGB(135, 135, 145) },
}
local GALAXY_TEX = { "15536110634", "15536112543", "15536116141", "15536114370", "15536118762", "15536117282", moon = "4547507884", sun = "6196665106" }
local AESTHETIC_TEX = { "12635309703", "12635311686", "12635312870", "12635313718", "12635315817", "12635316856", moon = "1345054856", sun = "1345009717" }
local NEBULA_TEX = { "159454299", "159454296", "159454293", "159454286", "159454300", "159454288" }
local SPACE_TEX = { "218955819", "218953419", "218954524", "218958493", "218957134", "218950090" }
local NIGHT_TEX = { "1045964490", "1045964368", "1045964655", "1045964655", "1045964655", "1045962969" }
local SKY_PRESETS = {
["Purple Galaxy"] = { tex = GALAXY_TEX, clock = 0.0, stars = 5000, celestial = true, moon = 20, haze = 0.2, glare = 0.25, shiftTop = Color3.fromRGB(185, 115, 255), shiftBot = Color3.fromRGB(55, 25, 105), fog = Color3.fromRGB(75, 45, 120), atmCol = Color3.fromRGB(175, 100, 255), atmDecay = Color3.fromRGB(75, 25, 140), atmDens = 0.05, cloudCol = Color3.fromRGB(190, 130, 255), cloudCover = 0.2 },
["Aesthetic Sky"] = { tex = AESTHETIC_TEX, clock = 18.2, stars = 3500, celestial = true, moon = 16, haze = 0.25, glare = 0.35, shiftTop = Color3.fromRGB(240, 145, 255), shiftBot = Color3.fromRGB(100, 45, 135), fog = Color3.fromRGB(150, 85, 165), atmCol = Color3.fromRGB(235, 140, 240), atmDecay = Color3.fromRGB(115, 45, 135), atmDens = 0.06, cloudCol = Color3.fromRGB(255, 175, 235), cloudCover = 0.25 },
["Purple Nebula"] = { tex = NEBULA_TEX, clock = 22.5, stars = 5000, celestial = true, moon = 18, haze = 0.2, glare = 0.25, shiftTop = Color3.fromRGB(195, 115, 255), shiftBot = Color3.fromRGB(65, 25, 115), fog = Color3.fromRGB(85, 45, 130), atmCol = Color3.fromRGB(175, 100, 255), atmDecay = Color3.fromRGB(75, 25, 140), atmDens = 0.06, cloudCol = Color3.fromRGB(190, 130, 255), cloudCover = 0.25 },
["Deep Space"] = { tex = SPACE_TEX, clock = 0.0, stars = 5000, celestial = true, moon = 20, haze = 0.15, glare = 0.2, shiftTop = Color3.fromRGB(120, 95, 245), shiftBot = Color3.fromRGB(30, 20, 75), fog = Color3.fromRGB(45, 35, 95), atmCol = Color3.fromRGB(110, 95, 235), atmDecay = Color3.fromRGB(35, 25, 85), atmDens = 0.05, cloudCol = Color3.fromRGB(130, 115, 225), cloudCover = 0.2 },
["Night Stars"] = { tex = NIGHT_TEX, clock = 0.0, stars = 5000, celestial = true, moon = 22, haze = 0.15, glare = 0.2, shiftTop = Color3.fromRGB(95, 65, 165), shiftBot = Color3.fromRGB(20, 15, 45), fog = Color3.fromRGB(35, 25, 65), atmCol = Color3.fromRGB(90, 60, 155), atmDecay = Color3.fromRGB(30, 15, 65), atmDens = 0.05, cloudCol = Color3.fromRGB(115, 85, 185), cloudCover = 0.2 },
["Clear Day"] = { tex = nil, clock = 14.0, stars = 0, celestial = true, moon = 11, haze = 0.4, glare = 0.2, shiftTop = Color3.fromRGB(180, 220, 255), shiftBot = Color3.fromRGB(140, 175, 220), fog = Color3.fromRGB(190, 215, 240), atmCol = Color3.fromRGB(165, 210, 255), atmDecay = Color3.fromRGB(110, 165, 225), atmDens = 0.08, cloudCol = Color3.fromRGB(255, 255, 255), cloudCover = 0.25 },
}
local STAR_COLORS = { Color3.fromRGB(195, 125, 255), Color3.fromRGB(225, 170, 255), Color3.fromRGB(155, 80, 255), Color3.fromRGB(245, 225, 255) }
local guiParent = getSafeGuiParent()
if guiParent then
local old = guiParent:FindFirstChild("NightFall_VisualsHUD")
if old then pcall(function() old:Destroy() end) end
end
local visualsGui = mk("ScreenGui", { Name = "NightFall_VisualsHUD", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 5 })
if guiParent then pcall(function() visualsGui.Parent = guiParent end) end
local overlayFolder = mk("Folder", { Name = "PlayerOverlays" }, visualsGui)
local boxPool, tracerPool = {}, {}
local function ensureBox(player)
if boxPool[player] then return boxPool[player] end
local box = mk("Frame", { Name = "Box_" .. player.Name, BackgroundTransparency = 1, BorderSizePixel = 0, Visible = false }, overlayFolder)
local stroke = mk("UIStroke", { Thickness = 1.4, Color = PURPLE }, box)
local hpBg = mk("Frame", { AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(0, -4, 0, 0), Size = UDim2.new(0, 3, 1, 0), BackgroundColor3 = Color3.fromRGB(18, 18, 22), BackgroundTransparency = 0.25, BorderSizePixel = 0, Visible = false }, box)
local hpFill = mk("Frame", { AnchorPoint = Vector2.new(0, 1), Position = UDim2.new(0, 0, 1, 0), Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.fromRGB(80, 255, 130), BorderSizePixel = 0 }, hpBg)
local wpn = mk("TextLabel", { AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 1, 2), Size = UDim2.fromOffset(140, 14), BackgroundTransparency = 1, Font = Enum.Font.GothamBold, TextSize = 10, TextColor3 = PURPLE_BRIGHT, TextStrokeTransparency = 0.35, Text = "", Visible = false }, box)
boxPool[player] = { Box = box, Stroke = stroke, HPBg = hpBg, HPFill = hpFill, Weapon = wpn }
return boxPool[player]
end
local function ensureTracer(player)
if tracerPool[player] then return tracerPool[player] end
tracerPool[player] = mk("Frame", { Name = "Tracer_" .. player.Name, AnchorPoint = Vector2.new(0.5, 0.5), BackgroundColor3 = PURPLE, BackgroundTransparency = 0.15, BorderSizePixel = 0, Visible = false }, overlayFolder)
return tracerPool[player]
end
trackConn(Players.PlayerRemoving:Connect(function(p)
if boxPool[p] then pcall(function() boxPool[p].Box:Destroy() end); boxPool[p] = nil end
if tracerPool[p] then pcall(function() tracerPool[p]:Destroy() end); tracerPool[p] = nil end
end))
local snapLine = mk("Frame", { AnchorPoint = Vector2.new(0.5, 0.5), BackgroundColor3 = PURPLE_BRIGHT, BackgroundTransparency = 0.1, BorderSizePixel = 0, Visible = false }, visualsGui)
local snapRing = mk("Frame", { AnchorPoint = Vector2.new(0.5, 0.5), Size = UDim2.fromOffset(16, 16), BackgroundTransparency = 1, BorderSizePixel = 0, Visible = false }, visualsGui)
mk("UICorner", { CornerRadius = UDim.new(1, 0) }, snapRing)
mk("UIStroke", { Thickness = 1.6, Color = PURPLE_BRIGHT }, snapRing)
local crosshairRoot = mk("Frame", { AnchorPoint = Vector2.new(0.5, 0.5), Size = UDim2.fromOffset(40, 40), BackgroundTransparency = 1, Visible = false }, visualsGui)
local function makeArm(name)
local arm = mk("Frame", { Name = name, AnchorPoint = Vector2.new(0.5, 0.5), BackgroundColor3 = PURPLE_BRIGHT, BorderSizePixel = 0 }, crosshairRoot)
mk("UIStroke", { Thickness = 1, Color = Color3.fromRGB(10, 10, 14), Transparency = 0.25 }, arm)
return arm
end
local chDot = makeArm("Dot")
chDot.Size, chDot.Position = UDim2.fromOffset(3, 3), UDim2.fromScale(0.5, 0.5)
mk("UICorner", { CornerRadius = UDim.new(1, 0) }, chDot)
local chTop, chBottom, chLeft, chRight = makeArm("Top"), makeArm("Bottom"), makeArm("Left"), makeArm("Right")
local hitmarkerRoot = mk("Frame", { AnchorPoint = Vector2.new(0.5, 0.5), Size = UDim2.fromOffset(26, 26), BackgroundTransparency = 1, Visible = false }, visualsGui)
local hitTicks = {}
for idx, s in ipairs({ { -6, -6, 45 }, { 6, -6, -45 }, { -6, 6, -45 }, { 6, 6, 45 } }) do
local t = mk("Frame", { AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, s[1], 0.5, s[2]), Size = UDim2.fromOffset(9, 2), Rotation = s[3], BackgroundColor3 = Color3.new(1, 1, 1), BorderSizePixel = 0 }, hitmarkerRoot)
mk("UIStroke", { Thickness = 1, Color = PURPLE }, t)
hitTicks[idx] = t
end
local STAR_TEX = "rbxassetid://122000198974865"
for _, oldParent in ipairs({ Workspace, Workspace.CurrentCamera }) do
if oldParent then
for _, oldName in ipairs({ "NF_PurpleStars", "NF_NightParticles", "NF_KillEffects" }) do
local old = oldParent:FindFirstChild(oldName)
if old then pcall(function() old:Destroy() end) end
end
end
end
local killFolder = mk("Folder", { Name = "NF_KillEffects" }, Workspace)
local burstPart = mk("Part", { Name = "NF_KillBurst", Size = Vector3.new(0.4, 0.4, 0.4), Transparency = 1, Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, CastShadow = false, Massless = true }, killFolder)
local burstStar = Instance.new("ParticleEmitter")
burstStar.Name = "KillBurstStar"
burstStar.Texture = STAR_TEX
burstStar.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 240, 255)), ColorSequenceKeypoint.new(0.4, PURPLE_BRIGHT), ColorSequenceKeypoint.new(1, PURPLE) })
burstStar.Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.12, 0), NumberSequenceKeypoint.new(0.7, 0.15), NumberSequenceKeypoint.new(1, 1) })
burstStar.Size = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(0.2, 0.95), NumberSequenceKeypoint.new(1, 0) })
burstStar.Lifetime = NumberRange.new(0.75, 1.35)
burstStar.Rate = 0
burstStar.Speed = NumberRange.new(7, 16)
burstStar.SpreadAngle = Vector2.new(180, 180)
burstStar.Drag = 2.8
burstStar.LockedToPart = false
burstStar.LightEmission = 1
burstStar.Brightness = 2.5
burstStar.Rotation = NumberRange.new(0, 360)
burstStar.RotSpeed = NumberRange.new(-120, 120)
burstStar.Enabled = false
burstStar.Parent = burstPart
local burstEmbers = Instance.new("ParticleEmitter")
burstEmbers.Name = "KillBurstEmbers"
burstEmbers.Texture = STAR_TEX
burstEmbers.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(245, 215, 255)), ColorSequenceKeypoint.new(0.5, PURPLE_BRIGHT), ColorSequenceKeypoint.new(1, Color3.fromRGB(110, 45, 210)) })
burstEmbers.Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.1), NumberSequenceKeypoint.new(0.65, 0.35), NumberSequenceKeypoint.new(1, 1) })
burstEmbers.Size = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.35), NumberSequenceKeypoint.new(0.4, 0.55), NumberSequenceKeypoint.new(1, 0) })
burstEmbers.Lifetime = NumberRange.new(1.1, 1.8)
burstEmbers.Rate = 0
burstEmbers.Speed = NumberRange.new(3, 9)
burstEmbers.Acceleration = Vector3.new(0, 12, 0)
burstEmbers.SpreadAngle = Vector2.new(75, 75)
burstEmbers.Drag = 1.6
burstEmbers.LockedToPart = false
burstEmbers.LightEmission = 1
burstEmbers.Brightness = 2.2
burstEmbers.Enabled = false
burstEmbers.Parent = burstPart
local killWaves = {}
local killRigs = {}
local killSparks = {}
local activeRespawns = {}
local MAX_RIGS = 10
local MAX_SPARKS = 72
local APPEARANCE_CLASSES = { Shirt = true, Pants = true, ShirtGraphic = true, BodyColors = true, CharacterMesh = true }
local function ensureKillFolder()
if not killFolder or not killFolder.Parent then killFolder = mk("Folder", { Name = "NF_KillEffects" }, Workspace) end
return killFolder
end
local function destroyEntryModel(list, idx)
local entry = table.remove(list, idx)
if entry and entry.Root then
pcall(function() entry.Root:Destroy() end)
end
end
local function saveAndHidePart(srcPart, saveList)
pcall(function()
if saveList then table.insert(saveList, { Obj = srcPart, Val = srcPart.Transparency }) end
srcPart.Transparency = 1
srcPart.CanCollide = false
for _, child in ipairs(srcPart:GetDescendants()) do
if child:IsA("Decal") or child:IsA("Texture") then
if saveList then table.insert(saveList, { Obj = child, Val = child.Transparency }) end
child.Transparency = 1
end
end
end)
end
local function buildAppearanceRig(sourceChar, rigName, fillTransp, outlineTransp)
local rig = Instance.new("Model")
rig.Name = rigName
for _, child in ipairs(sourceChar:GetChildren()) do
if APPEARANCE_CLASSES[child.ClassName] then child:Clone().Parent = rig end
end
local rigHum = Instance.new("Humanoid")
rigHum.Name = "NF_VisualHum"
rigHum.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
rigHum.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
rigHum.MaxHealth = 100
rigHum.Health = 100
rigHum.BreakJointsOnDeath = false
rigHum.RequiresNeck = false
rigHum.PlatformStand = true
pcall(function() rigHum:SetStateEnabled(Enum.HumanoidStateType.Dead, false) end)
pcall(function() rigHum.EvaluateStateMachine = false end)
rigHum.Parent = rig
local hl = mk("Highlight", { Adornee = rig, FillColor = PURPLE, FillTransparency = fillTransp or 0.9, OutlineColor = PURPLE_BRIGHT, OutlineTransparency = outlineTransp or 0.15, DepthMode = Enum.HighlightDepthMode.Occluded }, rig)
return rig, hl
end
local function cloneVisualPart(srcPart, rig, withTrail)
local chunk = srcPart:Clone()
if not chunk then return nil end
for _, desc in ipairs(chunk:GetDescendants()) do
if desc:IsA("JointInstance") or desc:IsA("Constraint") or desc:IsA("WeldConstraint")
or desc:IsA("LuaSourceContainer") or desc:IsA("Sound")
or desc:IsA("LayerCollector") or desc:IsA("TouchTransmitter") then
desc:Destroy()
end
end
chunk.Name = srcPart.Name
chunk.CanQuery = false
chunk.CanTouch = false
chunk.Massless = false
chunk.CFrame = srcPart.CFrame
local trail = nil
if withTrail and not srcPart.Parent:IsA("Accessory") then
local a0 = mk("Attachment", { Position = Vector3.new(0, 0.4, 0) }, chunk)
local a1 = mk("Attachment", { Position = Vector3.new(0, -0.4, 0) }, chunk)
trail = mk("Trail", {
Attachment0 = a0,
Attachment1 = a1,
Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 240, 255)), ColorSequenceKeypoint.new(0.4, PURPLE_BRIGHT), ColorSequenceKeypoint.new(1, PURPLE) }),
Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.15), NumberSequenceKeypoint.new(1, 1) }),
Lifetime = 0.42,
MinLength = 0.08,
LightEmission = 1,
FaceCamera = true,
}, chunk)
end
chunk.Parent = rig
return chunk, trail
end
local function spawnKillShards(position, count, speedScale)
local folder = ensureKillFolder()
for _ = 1, (count or 12) do
while #killSparks >= MAX_SPARKS do
destroyEntryModel(killSparks, 1)
end
local size = 0.24 + math.random() * 0.3
local spark = mk("Part", {
Name = "NF_KillSpark",
Material = Enum.Material.Neon,
Color = math.random() > 0.45 and PURPLE_BRIGHT or Color3.fromRGB(245, 220, 255),
Transparency = 0.05,
Anchored = false, CanCollide = true, CanQuery = false, CanTouch = false, CastShadow = false,
Size = Vector3.new(size, size * 1.4, size),
CFrame = CFrame.new(position) * CFrame.Angles(math.random() * 6, math.random() * 6, math.random() * 6),
})
local s0 = mk("Attachment", { Position = Vector3.new(0, size * 0.5, 0) }, spark)
local s1 = mk("Attachment", { Position = Vector3.new(0, -size * 0.5, 0) }, spark)
mk("Trail", { Attachment0 = s0, Attachment1 = s1, Color = ColorSequence.new(Color3.fromRGB(255, 240, 255), PURPLE), Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.1), NumberSequenceKeypoint.new(1, 1) }), Lifetime = 0.35, MinLength = 0.05, LightEmission = 1, FaceCamera = true }, spark)
spark.Parent = folder
local dir = Vector3.new(math.random() * 2 - 1, math.random() * 1.4 + 0.15, math.random() * 2 - 1).Unit
spark.AssemblyLinearVelocity = dir * (math.random(32, 74) * (speedScale or 1))
spark.AssemblyAngularVelocity = Vector3.new(math.random(-30, 30), math.random(-30, 30), math.random(-30, 30))
table.insert(killSparks, { Root = spark, Born = os.clock(), Lifetime = 1.6 + math.random() * 0.7 })
end
end
local function spawnKillEffect(position, targetChar, overrideMode)
local folder = ensureKillFolder()
local mode = overrideMode or Settings.KillEffectStyle or "Shatter"
local isBlast = mode == "Explosion"
local isVortex = mode == "Vortex"
local isAscend = mode == "Ascension"
local waveCenter = isVortex and (position + Vector3.new(0, 3.2, 0)) or position
local ringOuter = mk("Part", {
Name = "NF_KillRingOuter", Shape = Enum.PartType.Cylinder, Material = Enum.Material.Neon,
Color = isVortex and PURPLE_BRIGHT or PURPLE, Transparency = 0.12,
Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, CastShadow = false,
Size = Vector3.new(0.24, 1.5, 1.5),
CFrame = CFrame.new(waveCenter) * CFrame.Angles(0, 0, math.rad(90)),
}, folder)
local ringInner = mk("Part", {
Name = "NF_KillRingInner", Shape = Enum.PartType.Cylinder, Material = Enum.Material.Neon,
Color = Color3.fromRGB(245, 225, 255), Transparency = 0.08,
Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, CastShadow = false,
Size = Vector3.new(0.18, 1.2, 1.2),
CFrame = CFrame.new(waveCenter) * CFrame.Angles(math.rad(isVortex and 12 or 22), 0, math.rad(72)),
}, folder)
local orb = mk("Part", {
Name = "NF_KillOrb", Shape = Enum.PartType.Ball, Material = Enum.Material.Neon,
Color = isVortex and Color3.fromRGB(22, 6, 42) or PURPLE_BRIGHT, Transparency = 0.08,
Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, CastShadow = false,
Size = Vector3.new(2.0, 2.0, 2.0),
CFrame = CFrame.new(waveCenter),
}, folder)
local light = mk("PointLight", { Color = PURPLE_BRIGHT, Brightness = isBlast and 5 or 3.5, Range = isBlast and 28 or 20 }, orb)
local pillar = mk("Part", {
Name = "NF_KillPillar", Shape = Enum.PartType.Cylinder, Material = Enum.Material.Neon,
Color = isAscend and Color3.fromRGB(230, 185, 255) or PURPLE_BRIGHT,
Transparency = isVortex and 1 or 0.25,
Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, CastShadow = false,
Size = Vector3.new(2, 3.2, 3.2),
CFrame = CFrame.new(position + Vector3.new(0, 1, 0)) * CFrame.Angles(0, 0, math.rad(90)),
}, folder)
table.insert(killWaves, { Mode = mode, RingOuter = ringOuter, RingInner = ringInner, Orb = orb, Light = light, Pillar = pillar, Position = waveCenter, Born = os.clock(), Lifetime = (isVortex and 2.5) or (isAscend and 2.4) or (isBlast and 0.9) or 0.72 })
if burstPart and burstPart.Parent then
burstPart.CFrame = CFrame.new(waveCenter)
burstStar:Emit(isBlast and 42 or 26)
burstEmbers:Emit(isBlast and 45 or (isAscend and 38 or 28))
end
if not isVortex then spawnKillShards(position, isBlast and 18 or 12, isBlast and 1.45 or 1.0) end
if targetChar and targetChar.Parent then
while #killRigs >= MAX_RIGS do
destroyEntryModel(killRigs, 1)
end
local rig, hl = buildAppearanceRig(targetChar, "NF_KillShatter", 0.9, 0.15)
rig.Parent = folder
local parts, decals = {}, {}
for _, desc in ipairs(targetChar:GetDescendants()) do
if #parts >= 24 then break end
if desc:IsA("BasePart") and desc.Name ~= "HumanoidRootPart"
and desc.Transparency < 0.98 and not desc:FindFirstAncestorOfClass("Tool") then
saveAndHidePart(desc, nil)
local chunk = cloneVisualPart(desc, rig, not isAscend)
if chunk then
local kinematic = isVortex or isAscend
chunk.Anchored = kinematic
chunk.CanCollide = not kinematic
local rel = desc.Position - waveCenter
local baseAng = math.atan2(rel.Z, rel.X)
if not kinematic then
local outDir = rel.Magnitude > 0.12
and rel.Unit
or Vector3.new(math.random() * 2 - 1, 0.25, math.random() * 2 - 1).Unit
local mul = isBlast and 1.55 or 1.0
chunk.AssemblyLinearVelocity = outDir * (math.random(24, 54) * mul)
+ Vector3.new(math.random(-14, 14) * mul, math.random(24, 50) * mul, math.random(-14, 14) * mul)
chunk.AssemblyAngularVelocity = Vector3.new(math.random(-22, 22), math.random(-22, 22), math.random(-22, 22))
end
table.insert(parts, {
Part = chunk,
BaseTransp = chunk.Transparency,
StartPos = desc.Position,
StartCF = desc.CFrame,
Rel = rel,
Radius = math.max(1.5, Vector3.new(rel.X, 0, rel.Z).Magnitude + math.random() * 3.5),
Angle = baseAng,
SpinAxis = Vector3.new(math.random() - 0.5, math.random() - 0.5, math.random() - 0.5).Unit,
SpinSpeed = 2.5 + math.random() * 5,
Drift = Vector3.new((math.random() - 0.5) * 3, 4.5 + math.random() * 4.5, (math.random() - 0.5) * 3),
})
for _, sub in ipairs(chunk:GetDescendants()) do
if sub:IsA("Decal") or sub:IsA("Texture") then
table.insert(decals, { Obj = sub, BaseTransp = sub.Transparency })
end
end
end
end
end
if #parts > 0 then
table.insert(killRigs, { Mode = mode, Center = waveCenter, Root = rig, Highlight = hl, Parts = parts, Decals = decals, Born = os.clock(), Lifetime = isVortex and 2.55 or (isAscend and 3.8 or (4.2 + math.random() * 0.9)) })
else
rig:Destroy()
end
end
end
local function restoreRespawnEntry(entry)
if not entry then return end
if entry.Saved then
for _, item in ipairs(entry.Saved) do
if item.Obj and item.Obj.Parent then
pcall(function()
item.Obj.Transparency = item.Val
if item.Obj:IsA("BasePart") then item.Obj.CanCollide = item.Collide end
end)
end
end
entry.Saved = nil
end
if entry.Root then pcall(function() entry.Root:Destroy() end) end
if entry.Ring then pcall(function() entry.Ring:Destroy() end) end
end
local function spawnRespawnAssembly(char)
if not Settings.RespawnEffect or not char or not char.Parent then return end
task.spawn(function()
local deadline = os.clock() + 2.5
local hrp, torso
while os.clock() < deadline and char.Parent and Settings.RespawnEffect do
hrp = char:FindFirstChild("HumanoidRootPart")
torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
if hrp and torso then break end
task.wait(0.05)
end
if not char.Parent or not hrp or not torso or not Settings.RespawnEffect then return end
task.wait(0.06)
local hum = char:FindFirstChildOfClass("Humanoid")
if not char.Parent or not hum or hum.Health <= 0 then return end
local folder = ensureKillFolder()
local rig, hl = buildAppearanceRig(char, "NF_RespawnRig", 0.85, 0.1)
rig.Parent = folder
local ring = mk("Part", {
Name = "NF_RespawnRing", Shape = Enum.PartType.Cylinder, Material = Enum.Material.Neon,
Color = PURPLE_BRIGHT, Transparency = 0.25,
Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, CastShadow = false,
Size = Vector3.new(0.18, 9, 9),
CFrame = CFrame.new(hrp.Position - Vector3.new(0, 2.5, 0)) * CFrame.Angles(0, 0, math.rad(90)),
}, folder)
local saved, items = {}, {}
local idx = 0
for _, desc in ipairs(char:GetDescendants()) do
if desc:IsA("BasePart") and desc.Name ~= "HumanoidRootPart"
and desc.Transparency < 0.98 and not desc:FindFirstAncestorOfClass("Tool") then
local partOrigTransp, partOrigCollide = desc.Transparency, desc.CanCollide
table.insert(saved, { Obj = desc, Val = partOrigTransp, Collide = partOrigCollide })
for _, sub in ipairs(desc:GetDescendants()) do
if sub:IsA("Decal") or sub:IsA("Texture") then
table.insert(saved, { Obj = sub, Val = sub.Transparency })
end
end
local chunk, trail = cloneVisualPart(desc, rig, true)
saveAndHidePart(desc, nil)
if chunk then
idx += 1
chunk.Anchored = true
chunk.CanCollide = false
local angle = (idx / 8) * math.pi * 2 + math.random() * 0.6
local rad = 10 + math.random() * 6
local hOff = 2 + math.random() * 7.5
local startCF = CFrame.new(hrp.Position + Vector3.new(math.cos(angle) * rad, hOff, math.sin(angle) * rad))
* CFrame.Angles(math.random() * 6, math.random() * 6, math.random() * 6)
chunk.CFrame = startCF
table.insert(items, {
LivePart = desc,
Chunk = chunk,
Trail = trail,
StartCF = startCF,
Swirl = Vector3.new(-math.sin(angle), 0.35, math.cos(angle)) * (2.5 + math.random() * 2.5),
Delay = math.min(0.45, (idx - 1) * 0.055),
Dur = 0.68,
Snapped = false,
OrigTransp = partOrigTransp,
OrigCollide = partOrigCollide,
})
end
end
end
if #items == 0 then
rig:Destroy(); ring:Destroy()
return
end
if burstPart and burstPart.Parent then
burstPart.CFrame = CFrame.new(hrp.Position)
burstEmbers:Emit(22)
end
table.insert(activeRespawns, { Char = char, Root = rig, Highlight = hl, Ring = ring, Saved = saved, Items = items, Born = os.clock(), TotalDur = 1.22 })
end)
end
local activeDeaths = {}
local deathHandled = setmetatable({}, { __mode = "k" })
local function spawnDeathEffect(char, position)
if not char or not char.Parent then return end
local folder = ensureKillFolder()
local style = Settings.DeathEffectStyle or "Shadow Dissolve"
local fxRoot = Instance.new("Model")
fxRoot.Name = "NF_DeathFX"
fxRoot.Parent = folder
local rigColor = (style == "Crystal Freeze" and Color3.fromRGB(220, 195, 255))
or (style == "Orbital Strike" and Color3.fromRGB(255, 235, 255))
or Color3.fromRGB(45, 15, 80)
local rig, hl = buildAppearanceRig(char, "NF_DeathRig", style == "Shadow Dissolve" and 0.35 or 0.7, 0.1)
if hl then
hl.FillColor = rigColor
hl.OutlineColor = style == "Shadow Dissolve" and Color3.fromRGB(160, 75, 255) or PURPLE_BRIGHT
end
rig.Parent = fxRoot
local parts, decals, crystals, rings = {}, {}, {}, {}
for _, desc in ipairs(char:GetDescendants()) do
if #parts >= 24 then break end
if desc:IsA("BasePart") and desc.Name ~= "HumanoidRootPart"
and desc.Transparency < 0.98 and not desc:FindFirstAncestorOfClass("Tool") then
saveAndHidePart(desc, nil)
local chunk, trail = cloneVisualPart(desc, rig, style ~= "Shadow Dissolve")
if chunk then
chunk.Anchored = (style ~= "Orbital Strike")
chunk.CanCollide = (style == "Orbital Strike")
if trail then trail.Enabled = (style == "Orbital Strike") end
if style == "Shadow Dissolve" then
chunk.Material = Enum.Material.Neon
chunk.Color = Color3.fromRGB(70, 25, 130)
elseif style == "Crystal Freeze" then
chunk.Material = Enum.Material.Glass
chunk.Color = Color3.fromRGB(190, 145, 255)
elseif style == "Orbital Strike" then
local out = Vector3.new(math.random() * 2 - 1, 0.8 + math.random() * 1.4, math.random() * 2 - 1).Unit
chunk.AssemblyLinearVelocity = out * math.random(34, 64)
chunk.AssemblyAngularVelocity = Vector3.new(math.random(-24, 24), math.random(-24, 24), math.random(-24, 24))
end
local delayOrder = (desc.Name:find("Leg") and 0)
or (desc.Name == "Torso" and 0.25)
or (desc.Name:find("Arm") and 0.45)
or 0.65
table.insert(parts, {
Part = chunk,
Trail = trail,
BaseTransp = chunk.Transparency,
StartCF = desc.CFrame,
Delay = delayOrder * 0.45,
DriftY = 2.5 + math.random() * 2.5,
})
for _, sub in ipairs(chunk:GetDescendants()) do
if sub:IsA("Decal") or sub:IsA("Texture") then
table.insert(decals, { Obj = sub, BaseTransp = sub.Transparency })
end
end
end
end
end
local lightPart = mk("Part", {
Name = "NF_DeathLight", Size = Vector3.new(0.5, 0.5, 0.5), Transparency = 1,
Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, CFrame = CFrame.new(position),
}, fxRoot)
local light = mk("PointLight", { Color = PURPLE_BRIGHT, Brightness = style == "Orbital Strike" and 7 or 4, Range = style == "Orbital Strike" and 34 or 22 }, lightPart)
local beam = nil
if style == "Shadow Dissolve" then
local rune = mk("Part", {
Name = "NF_DeathRune", Shape = Enum.PartType.Cylinder, Material = Enum.Material.Neon,
Color = PURPLE, Transparency = 0.25, Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, CastShadow = false,
Size = Vector3.new(0.14, 2, 2), CFrame = CFrame.new(position - Vector3.new(0, 2.3, 0)) * CFrame.Angles(0, 0, math.rad(90)),
}, fxRoot)
table.insert(rings, { Part = rune, MaxSize = 14, Delay = 0 })
if burstPart and burstPart.Parent then
burstPart.CFrame = CFrame.new(position)
burstEmbers:Emit(48)
end
elseif style == "Crystal Freeze" then
for _ = 1, 14 do
local len = 1.6 + math.random() * 2.2
local w = 0.45 + math.random() * 0.45
local dir = Vector3.new(math.random() * 2 - 1, math.random() * 1.1 + 0.1, math.random() * 2 - 1).Unit
local crystal = mk("Part", {
Name = "NF_DeathCrystal", Material = Enum.Material.Neon, Color = math.random() > 0.4 and PURPLE_BRIGHT or Color3.fromRGB(220, 200, 255),
Transparency = 0.18, Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, CastShadow = false,
Size = Vector3.new(w, len, w),
CFrame = CFrame.lookAt(position, position + dir) * CFrame.Angles(math.rad(90), math.random() * 3, 0) * CFrame.new(0, len * 0.35, 0),
}, fxRoot)
table.insert(crystals, { Part = crystal, Dir = dir })
end
if burstPart and burstPart.Parent then
burstPart.CFrame = CFrame.new(position)
burstStar:Emit(20)
end
elseif style == "Orbital Strike" then
beam = mk("Part", {
Name = "NF_OrbitalBeam", Shape = Enum.PartType.Cylinder, Material = Enum.Material.Neon,
Color = Color3.fromRGB(245, 225, 255), Transparency = 0.05,
Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, CastShadow = false,
Size = Vector3.new(100, 5.5, 5.5), CFrame = CFrame.new(position + Vector3.new(0, 48, 0)) * CFrame.Angles(0, 0, math.rad(90)),
}, fxRoot)
for idx = 0, 2 do
local ring = mk("Part", {
Name = "NF_OrbitalRing", Shape = Enum.PartType.Cylinder, Material = Enum.Material.Neon,
Color = idx == 1 and Color3.fromRGB(250, 235, 255) or PURPLE_BRIGHT, Transparency = 0.1,
Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, CastShadow = false,
Size = Vector3.new(0.24, 1.5, 1.5), CFrame = CFrame.new(position - Vector3.new(0, 2.2, 0)) * CFrame.Angles(0, 0, math.rad(90)),
}, fxRoot)
table.insert(rings, { Part = ring, MaxSize = 20 + idx * 5, Delay = idx * 0.12 })
end
if burstPart and burstPart.Parent then
burstPart.CFrame = CFrame.new(position)
burstStar:Emit(45)
burstEmbers:Emit(45)
end
end
table.insert(activeDeaths, {
Style = style,
Root = fxRoot,
Highlight = hl,
Light = light,
Position = position,
Beam = beam,
Parts = parts,
Decals = decals,
Crystals = crystals,
Rings = rings,
Shattered = false,
Born = os.clock(),
Lifetime = style == "Orbital Strike" and 2.5 or 3.1,
})
end
local function bindDeathWatcher(char)
if not char then return end
task.spawn(function()
local hum = char:FindFirstChildOfClass("Humanoid") or char:WaitForChild("Humanoid", 4)
if not hum or not char.Parent then return end
trackConn(hum.Died:Connect(function()
if not Settings.DeathEffect or deathHandled[char] then return end
deathHandled[char] = true
local ref = char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Torso") or char:FindFirstChild("Head")
if ref then spawnDeathEffect(char, ref.Position) end
end))
end)
end
if LocalPlayer.Character then bindDeathWatcher(LocalPlayer.Character) end
trackConn(LocalPlayer.CharacterAdded:Connect(function(char)
bindDeathWatcher(char)
spawnRespawnAssembly(char)
end))
local function clearKillEffects()
for _, wave in ipairs(killWaves) do
for _, obj in ipairs({ wave.RingOuter, wave.RingInner, wave.Orb, wave.Pillar }) do
if obj then pcall(function() obj:Destroy() end) end
end
end
killWaves = {}
while #killRigs > 0 do destroyEntryModel(killRigs, #killRigs) end
while #killSparks > 0 do destroyEntryModel(killSparks, #killSparks) end
while #activeDeaths > 0 do destroyEntryModel(activeDeaths, #activeDeaths) end
for i = #activeRespawns, 1, -1 do
restoreRespawnEntry(table.remove(activeRespawns, i))
end
end
local function stepKillEffects(now)
for index = #killWaves, 1, -1 do
local wave = killWaves[index]
local progress = (now - wave.Born) / wave.Lifetime
if progress >= 1 then
for _, obj in ipairs({ wave.RingOuter, wave.RingInner, wave.Orb, wave.Pillar }) do
if obj then pcall(function() obj:Destroy() end) end
end
table.remove(killWaves, index)
else
local eased = 1 - (1 - progress) * (1 - progress)
if wave.Mode == "Vortex" then
local spin = progress * 14
local pulse = math.sin(progress * math.pi)
if wave.Orb.Parent then
local orbS = 0.8 + pulse * 3.0
wave.Orb.Size = Vector3.new(orbS, orbS, orbS)
wave.Orb.Transparency = progress > 0.8 and ((progress - 0.8) / 0.2) or 0.05
end
if wave.RingOuter.Parent then
local rS = 1.5 + pulse * 10
wave.RingOuter.Size = Vector3.new(0.2, rS, rS)
wave.RingOuter.CFrame = CFrame.new(wave.Position) * CFrame.Angles(math.sin(spin * 0.4) * 0.4, spin, math.rad(90))
wave.RingOuter.Transparency = 0.15 + progress * 0.85
end
if wave.RingInner.Parent then
local rIn = 1.0 + pulse * 6.5
wave.RingInner.Size = Vector3.new(0.16, rIn, rIn)
wave.RingInner.CFrame = CFrame.new(wave.Position) * CFrame.Angles(math.rad(65), -spin * 1.4, math.rad(45))
wave.RingInner.Transparency = 0.1 + progress * 0.9
end
else
local isBlast = wave.Mode == "Explosion"
local isAscend = wave.Mode == "Ascension"
if wave.RingOuter.Parent then
local rOut = 1.5 + eased * (isBlast and 23 or (isAscend and 13 or 15))
wave.RingOuLoads code from the internet. It downloads more code when it runs (loadstring + HttpGet), which can change after it was posted. From: raw.githubusercontent.com.

Prison Life