-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOriginal
More file actions
326 lines (296 loc) · 9.9 KB
/
Original
File metadata and controls
326 lines (296 loc) · 9.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
--// ===========================================================
--// Original Push Assist + Click TO SHOOT
--// ===========================================================
-- === SERVICES ===
local Players = game:GetService('Players')
local UserInputService = game:GetService('UserInputService')
local RunService = game:GetService('RunService')
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local CoreGui = game:GetService('CoreGui')
local Camera = workspace.CurrentCamera
local plr = Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local remotes = ReplicatedStorage:WaitForChild('Remotes')
local shootRemote = remotes:WaitForChild('Shoot')
-- === GLOBAL STATE ===
getgenv().PAYLOAD0_SYSTEM_ACTIVE = true
local DotsEnabled = true
local toggleOn = true
local shootKey, selectedRim = nil, nil
-- === CONFIG (ALIGN) ===
local PERFECT_DISTANCE = 54.97
local CLAMP_RADIUS = 1
local ACTIVE_RANGE = 90
local MAX_PUSH = 0.06
local DAMPING = 0.9
local COLOR_LOCKED = Color3.fromRGB(0, 255, 100)
local COLOR_ACTIVE = Color3.fromRGB(255, 230, 70)
local COLOR_IDLE = Color3.fromRGB(255, 70, 70)
-- === Notify ===
local function notify(msg, color)
local gui = Instance.new('ScreenGui', CoreGui)
gui.ResetOnSpawn = false
local label = Instance.new('TextLabel', gui)
label.AnchorPoint = Vector2.new(0.5, 0.5)
label.BackgroundTransparency = 1
label.TextColor3 = color or Color3.new(1, 1, 1)
label.Font = Enum.Font.Code
label.TextSize = 26
label.Text = msg
label.Position = UDim2.new(0.5, 0, 0.9, 0)
task.spawn(function()
task.wait(1.5)
gui:Destroy()
end)
end
-- === Rim Dot ESP ===
local RimDots = {}
local RimSize =
Vector3.new(3.632131576538086, 0.5587897300720215, 3.632131576538086)
local function addRimDot(rim)
local dot = Drawing.new('Circle')
dot.Radius, dot.Filled, dot.Color = 4, true, Color3.new(1, 0, 0)
RimDots[rim] = dot
end
local function removeRimDot(rim)
if RimDots[rim] then
RimDots[rim]:Remove()
RimDots[rim] = nil
end
if selectedRim == rim then
selectedRim = nil
end
end
RunService.RenderStepped:Connect(function()
if not getgenv().PAYLOAD0_SYSTEM_ACTIVE then
for _, dot in pairs(RimDots) do
dot.Visible = false
end
return
end
for rim, dot in pairs(RimDots) do
if rim:IsDescendantOf(workspace) and DotsEnabled then
local pos, on = Camera:WorldToViewportPoint(rim.Position)
dot.Position, dot.Visible = Vector2.new(pos.X, pos.Y), on
dot.Color = (rim == selectedRim) and Color3.new(1, 1, 0)
or Color3.new(1, 0, 0)
dot.Radius = (rim == selectedRim) and 6 or 4
else
dot.Visible = false
end
end
end)
workspace.DescendantAdded:Connect(function(o)
if o:IsA('BasePart') and o.Name == 'Rim' and o.Size == RimSize then
addRimDot(o)
end
end)
workspace.DescendantRemoving:Connect(removeRimDot)
for _, v in ipairs(workspace:GetDescendants()) do
if v:IsA('BasePart') and v.Name == 'Rim' and v.Size == RimSize then
addRimDot(v)
end
end
-- === Auto Rim Lock ===
task.spawn(function()
while task.wait(0.1) do
if not getgenv().PAYLOAD0_SYSTEM_ACTIVE then
continue
end
local root = plr.Character
and plr.Character:FindFirstChild('HumanoidRootPart')
if not root then
continue
end
local bestRim, bestDist = nil, 85
for rim in pairs(RimDots) do
if rim:IsDescendantOf(workspace) then
local dist = (rim.Position - root.Position).Magnitude
if dist < bestDist then
local _, on = Camera:WorldToViewportPoint(rim.Position)
if on then
bestRim, bestDist = rim, dist
end
end
end
end
if bestRim and bestRim ~= selectedRim then
selectedRim = bestRim
notify('🎯 Auto-Locked Nearest Rim', Color3.fromRGB(255, 230, 0))
end
end
end)
-- === Input Toggles ===
UserInputService.InputBegan:Connect(function(i, gp)
if gp then
return
end
if i.KeyCode == Enum.KeyCode.O then
DotsEnabled = not DotsEnabled
elseif i.KeyCode == Enum.KeyCode.V then
getgenv().PAYLOAD0_SYSTEM_ACTIVE = not getgenv().PAYLOAD0_SYSTEM_ACTIVE
notify(
getgenv().PAYLOAD0_SYSTEM_ACTIVE and 'System ON' or 'System OFF',
getgenv().PAYLOAD0_SYSTEM_ACTIVE and Color3.new(0, 1, 0)
or Color3.new(1, 0, 0)
)
end
end)
-- === Capture Shoot Key ===
local old
old = hookmetamethod(game, '__namecall', function(self, ...)
local m = getnamecallmethod()
if m == 'FireServer' and self == shootRemote then
local args = { ... }
if type(args[3]) == 'string' and not shootKey then
shootKey = args[3]
notify('Shoot key captured!', Color3.new(0, 1, 0))
end
end
return old(self, ...)
end)
-- === Shooting Logic ===
local lastTick, moveOffset = 0, Vector3.zero
local function computeOffset()
if tick() - lastTick > 0.1 then
local hum = plr.Character
and plr.Character:FindFirstChildOfClass('Humanoid')
local moveDir = (hum and hum.MoveDirection) or Vector3.zero
moveOffset = Vector3.new(moveDir.X * 1.5, 0, moveDir.Z * 1.5)
lastTick = tick()
end
return moveOffset
end
local function computeArc(dist)
return Vector3.new(0, 43 + (dist / 15), 0)
end
local function smartAim(rim)
local offset = computeOffset()
local root = plr.Character:FindFirstChild('HumanoidRootPart')
if not root then
return rim.Position
end
local dist = (root.Position - rim.Position).Magnitude
return rim.Position + computeArc(dist) - offset
end
local function shootAtTarget()
if not getgenv().PAYLOAD0_SYSTEM_ACTIVE then
return
end
if not (selectedRim and selectedRim:IsDescendantOf(workspace)) then
return notify('❌ No Target', Color3.new(1, 0.3, 0.3))
end
if not shootKey then
return notify('⚙️ Shoot Key Missing', Color3.new(1, 0.8, 0.3))
end
local char = plr.Character
if not char then
return
end
local head, root = char:FindFirstChild('Head'), char.PrimaryPart
if not (head and root) then
return
end
local aimPos = smartAim(selectedRim)
local dir = (aimPos - head.Position).Unit
local shootFrom = root.Position + dir * 3.8
if shootFrom.Y - root.Position.Y < 4 then
shootFrom = root.Position + dir * 4
end
shootRemote:FireServer(aimPos, shootFrom, shootKey)
notify('🏀 Shot Fired!', Color3.new(0, 1, 0))
end
UserInputService.InputBegan:Connect(function(i, gp)
if gp or not getgenv().PAYLOAD0_SYSTEM_ACTIVE then
return
end
if i.UserInputType == Enum.UserInputType.MouseButton1 then
shootAtTarget()
end
end)
-- === ALIGN ASSIST (DAMPED) ===
local hl = CoreGui:FindFirstChild('PerfectRangeGlow')
or Instance.new('Highlight')
hl.Name = 'PerfectRangeGlow'
hl.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
hl.FillTransparency = 0.25
hl.OutlineTransparency = 0
hl.Adornee = plr.Character
hl.Parent = CoreGui
hl.Enabled = true
local rims = {}
for _, v in ipairs(workspace:GetDescendants()) do
if v:IsA('BasePart') and v.Name == 'Lol' and v.Parent.Name == 'Rim' then
table.insert(rims, v)
end
end
local function nearestRim(rootPos)
local nearest, nearestDist
for _, rim in ipairs(rims) do
if rim:IsDescendantOf(workspace) then
local rimXZ = Vector3.new(rim.Position.X, 0, rim.Position.Z)
local dist = (rimXZ - Vector3.new(rootPos.X, 0, rootPos.Z)).Magnitude
if not nearestDist or dist < nearestDist then
nearest, nearestDist = rim, dist
end
end
end
return nearest, nearestDist
end
local smoothBias = Vector3.zero
local fadeAlpha = 1
RunService.RenderStepped:Connect(function(dt)
if not getgenv().PAYLOAD0_SYSTEM_ACTIVE then
fadeAlpha = math.clamp(fadeAlpha - dt * 3, 0, 1)
hl.FillTransparency = 0.25 + (1 - fadeAlpha) * 0.75
hl.OutlineTransparency = 1 - fadeAlpha
hl.Enabled = fadeAlpha > 0.05
return
else
fadeAlpha = math.clamp(fadeAlpha + dt * 3, 0, 1)
hl.FillTransparency = 0.25
hl.OutlineTransparency = 0
hl.Enabled = true
end
local char = plr.Character
local hum = char and char:FindFirstChildOfClass('Humanoid')
local root = char and char:FindFirstChild('HumanoidRootPart')
if not (hum and root) then
return
end
local rim, dist = nearestRim(root.Position)
if not rim or dist > ACTIVE_RANGE then
hl.Enabled = false
smoothBias = Vector3.zero
return
end
local rimXZ = Vector3.new(rim.Position.X, 0, rim.Position.Z)
local rootXZ = Vector3.new(root.Position.X, 0, root.Position.Z)
local dirToRim = (rimXZ - rootXZ).Unit
local diff = dist - PERFECT_DISTANCE
local absDiff = math.abs(diff)
local desired = Vector3.zero
if absDiff < CLAMP_RADIUS then
local strength = (CLAMP_RADIUS - absDiff) / CLAMP_RADIUS
local direction = -dirToRim * diff
desired = direction.Unit * math.min(strength * MAX_PUSH, MAX_PUSH)
end
smoothBias = smoothBias * DAMPING + desired * (1 - DAMPING)
root.CFrame += Vector3.new(smoothBias.X, 0, smoothBias.Z)
if absDiff <= 0.10 then
hl.FillColor = COLOR_LOCKED
hl.OutlineColor = COLOR_LOCKED
elseif absDiff < CLAMP_RADIUS then
hl.FillColor = COLOR_ACTIVE
hl.OutlineColor = COLOR_ACTIVE
else
hl.FillColor = COLOR_IDLE
hl.OutlineColor = COLOR_IDLE
end
end)
plr.CharacterAdded:Connect(function(c)
task.wait(0.5)
hl.Adornee = c
end)
print('[🏀 Payload0 Full System Loaded]')
print('[V] Toggle full system | [O] Toggle dots | [LMB] Shoot')