-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMASTER V2
More file actions
326 lines (288 loc) Β· 9.6 KB
/
MASTER V2
File metadata and controls
326 lines (288 loc) Β· 9.6 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
--// ===========================================================
--// PAYLOAD0 β’ SMART PUSH LOGIC (NO VISUAL DOTS)
--// Auto Aim Basketball Shooter + Soft Wall Align Assist
--// β’ All dots removed (fully invisible)
--// β’ Ultra-fast notifications
--// β’ Full system retained (shoot, push, align)
--// ===========================================================
-- === 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")
-- === STATE ===
getgenv().PAYLOAD0_SYSTEM_ACTIVE = true
local VisualsEnabled = true
local shootKey = nil
local selectedRim = nil
-- === ALIGN CONFIG ===
local PERFECT_DISTANCES = {54.97, 61.53, 68.10}
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)
-- === INSTANT NOTIFY ===
local function notify(msg, color)
if not VisualsEnabled then return end
local gui = Instance.new("ScreenGui")
gui.IgnoreGuiInset = true
gui.ResetOnSpawn = false
gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
gui.Parent = CoreGui
local label = Instance.new("TextLabel")
label.Parent = 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 = 24
label.Text = msg
label.Position = UDim2.new(0.5, 0, 0.9, 0)
label.TextTransparency = 0
task.spawn(function()
for i = 0, 1, 0.1 do
label.TextTransparency = i
task.wait(0.04)
end
gui:Destroy()
end)
end
-- === RIM TRACKER (no dots rendered) ===
local RimSize = Vector3.new(3.632131576538086, 0.5587897300720215, 3.632131576538086)
local Rims = {}
workspace.DescendantAdded:Connect(function(o)
if o:IsA("BasePart") and o.Name == "Rim" and o.Size == RimSize then
table.insert(Rims, o)
end
end)
for _, v in ipairs(workspace:GetDescendants()) do
if v:IsA("BasePart") and v.Name == "Rim" and v.Size == RimSize then
table.insert(Rims, v)
end
end
workspace.DescendantRemoving:Connect(function(o)
for i, rim in ipairs(Rims) do
if rim == o then
table.remove(Rims, i)
break
end
end
if selectedRim == o then
selectedRim = nil
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 ipairs(Rims) 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)
-- === TOGGLES ===
UserInputService.InputBegan:Connect(function(i, gp)
if gp then return end
if i.KeyCode == Enum.KeyCode.O then
VisualsEnabled = not VisualsEnabled
elseif i.KeyCode == Enum.KeyCode.V then
getgenv().PAYLOAD0_SYSTEM_ACTIVE = not getgenv().PAYLOAD0_SYSTEM_ACTIVE
if VisualsEnabled then
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
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)
-- === SHOOT 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 (MULTI-ZONE + SINGLE-KEY PUSH) ===
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 moveKeys = {W=false, A=false, S=false, D=false}
UserInputService.InputBegan:Connect(function(i, gp)
if gp then return end
if i.KeyCode == Enum.KeyCode.W then moveKeys.W = true end
if i.KeyCode == Enum.KeyCode.A then moveKeys.A = true end
if i.KeyCode == Enum.KeyCode.S then moveKeys.S = true end
if i.KeyCode == Enum.KeyCode.D then moveKeys.D = true end
end)
UserInputService.InputEnded:Connect(function(i, gp)
if gp then return end
if i.KeyCode == Enum.KeyCode.W then moveKeys.W = false end
if i.KeyCode == Enum.KeyCode.A then moveKeys.A = false end
if i.KeyCode == Enum.KeyCode.S then moveKeys.S = false end
if i.KeyCode == Enum.KeyCode.D then moveKeys.D = false end
end)
local function shouldPush()
local count = 0
for _, v in pairs(moveKeys) do
if v then count += 1 end
end
return count == 1 and (moveKeys.A or moveKeys.D)
end
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 function getNearestPerfectDistance(current)
local nearest, smallestDiff
for _, pd in ipairs(PERFECT_DISTANCES) do
local diff = math.abs(pd - current)
if not smallestDiff or diff < smallestDiff then
nearest, smallestDiff = pd, diff
end
end
return nearest
end
local smoothBias = Vector3.zero
RunService.RenderStepped:Connect(function()
if not getgenv().PAYLOAD0_SYSTEM_ACTIVE then
hl.Enabled = false
return
else
hl.Enabled = VisualsEnabled
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 target = getNearestPerfectDistance(dist)
local diff = dist - target
local absDiff = math.abs(diff)
local desired = Vector3.zero
if shouldPush() and absDiff < CLAMP_RADIUS then
local strength = (CLAMP_RADIUS - absDiff) / CLAMP_RADIUS
local toRim = Vector3.new(rim.Position.X, 0, rim.Position.Z) - Vector3.new(root.Position.X, 0, root.Position.Z)
local distSign = math.sign(diff)
if distSign > 0 then
local pushDir = -toRim.Unit
desired = pushDir * math.min(strength * MAX_PUSH, MAX_PUSH)
end
end
smoothBias = smoothBias * DAMPING + desired * (1 - DAMPING)
root.CFrame += Vector3.new(smoothBias.X, 0, smoothBias.Z)
if not VisualsEnabled then return end
if absDiff <= 0.10 then
hl.FillColor, hl.OutlineColor = COLOR_LOCKED, COLOR_LOCKED
elseif absDiff < CLAMP_RADIUS then
hl.FillColor, hl.OutlineColor = COLOR_ACTIVE, COLOR_ACTIVE
else
hl.FillColor, hl.OutlineColor = COLOR_IDLE, COLOR_IDLE
end
end)
plr.CharacterAdded:Connect(function(c)
task.wait(0.5)
hl.Adornee = c
end)
print("[π PAYLOAD0 COMPLETE SYSTEM LOADED β MULTI-ZONE ONE-WAY MODE + SINGLE-KEY PUSH]")
print("[V] Toggle system | [O] Toggle visuals | [LMB] Shoot")