-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoverkill.lua
More file actions
2012 lines (1807 loc) · 60.8 KB
/
Copy pathoverkill.lua
File metadata and controls
2012 lines (1807 loc) · 60.8 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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--[[
Roblox Official Shooter Assist - V4 ULTRA EDITION
Put in: StarterPlayer > StarterPlayerScripts > LocalScript
IMPORTANT:
This is a clean Roblox Studio LocalScript for YOUR OWN shooter game.
It does not use executor APIs, getgenv, hookmetamethod, CoreGui, Drawing, readfile/writefile, etc.
It provides official/accessibility/debug systems:
- Aim assist / target assist for your own game
- Debug ESP for your own game
- Official weapon bridge via BindableEvent/BindableFunction
- Mobile-friendly controls
- Server-safe design: server must still validate ammo, cooldown, teams, LOS, damage, distance, etc.
Created PlayerGui bridge objects:
- BindableEvent: OfficialV4UltraFireRequested
- BindableFunction: OfficialV4UltraGetCorrectedAim
Style goal:
Inspired by old-school multi-column dark UI: top tabs, 3 columns, colored sections, neon glow, patterned background.
]]
---------------------------------------------------------------------
-- Services
---------------------------------------------------------------------
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
local Lighting = game:GetService("Lighting")
local CollectionService = game:GetService("CollectionService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
local Camera = workspace.CurrentCamera
while not Camera do
task.wait()
Camera = workspace.CurrentCamera
end
---------------------------------------------------------------------
-- Official weapon bridge
---------------------------------------------------------------------
local FireRequested = PlayerGui:FindFirstChild("OfficialV4UltraFireRequested")
if not FireRequested then
FireRequested = Instance.new("BindableEvent")
FireRequested.Name = "OfficialV4UltraFireRequested"
FireRequested.Parent = PlayerGui
end
local CorrectedAim = PlayerGui:FindFirstChild("OfficialV4UltraGetCorrectedAim")
if not CorrectedAim then
CorrectedAim = Instance.new("BindableFunction")
CorrectedAim.Name = "OfficialV4UltraGetCorrectedAim"
CorrectedAim.Parent = PlayerGui
end
---------------------------------------------------------------------
-- Settings
---------------------------------------------------------------------
local S = {
-- UI
MenuOpen = true,
ActiveTab = "Aim",
Accent = Color3.fromRGB(0, 170, 255),
Accent2 = Color3.fromRGB(255, 170, 30),
Accent3 = Color3.fromRGB(210, 45, 255),
Background = Color3.fromRGB(18, 18, 22),
Panel = Color3.fromRGB(28, 28, 34),
Panel2 = Color3.fromRGB(36, 36, 44),
Text = Color3.fromRGB(235, 235, 245),
Muted = Color3.fromRGB(155, 160, 175),
Glass = 0.08,
DimTransparency = 0.38,
Blur = true,
BlurSize = 8,
Pattern = true,
AnimatedGradient = true,
Particles = true,
Animations = true,
RainbowAccent = false,
UIScaleMobile = true,
ShowTopButton = true,
ShowMiniStatus = true,
ShowNotifications = true,
OpenKey = Enum.KeyCode.RightShift,
-- Permissions
AdminOnly = false,
AllowedUserIds = {},
-- Target selection
TargetPlayers = true,
TargetNPCs = false,
UseAimTargetTag = true,
TeamCheck = true,
AliveCheck = true,
IgnoreSpawnProtection = true,
SpawnProtectionAttribute = "SpawnProtected",
AimPart = "Head",
NPCFolders = {"NPCs", "Enemies", "Targets"},
-- Aim core
AimAssist = true,
AutoAim = true,
HoldToAim = false,
AimInput = Enum.UserInputType.MouseButton2,
StickyTarget = true,
TargetLock = true,
Prediction = true,
VelocityPrediction = true,
DynamicSmoothing = true,
NearCenterBoost = true,
Deadzone = true,
AimRadius = 230,
AimStrength = 0.28,
MinAimStrength = 0.06,
MaxAimStrength = 0.68,
PredictionLead = 0.13,
VerticalPrediction = 0.35,
MaxDistance = 1500,
MinConfidence = 0.40,
DeadzoneRadius = 7,
FOVPriority = 0.62,
DistancePriority = 0.18,
HealthPriority = 0.10,
VisiblePriority = 0.18,
StickyBonus = 0.22,
PreferVisible = true,
PreferLowHealth = false,
PreferClosestCrosshair = true,
PreferClosestDistance = true,
-- Switching/walls
LineOfSight = false,
WallMemory = true,
WallMemoryTime = 0.55,
StickyTime = 1.35,
SwitchCooldown = 0.22,
SwitchAdvantage = 0.24,
RequireLOSForAim = false,
RequireLOSForFire = true,
-- Official shooting bridge
ShotCorrection = true,
AutoFireRequest = false,
FireRate = 9,
FireConfidence = 0.72,
OnlyFireWhenCentered = true,
FireCenterRadius = 42,
BurstMode = false,
BurstShots = 3,
BurstDelay = 0.065,
Triggerbot = false,
TriggerDelay = 0.045,
ManualCorrectionOnly = false,
-- ESP
ESP = true,
ESPPlayers = true,
ESPNPCs = false,
ESPNames = true,
ESPDistance = true,
ESPHealth = true,
ESPTeam = true,
ESPConfidence = true,
ESPState = true,
ESPHighlights = true,
ESPBoxes = true,
ESPSnaplines = true,
ESPOffscreenArrows = true,
ESPTargetMarker = true,
ESPVisibleWallColors = true,
ESPTeamColors = true,
ESPMaxDistance = 2200,
ESPTextSize = 13,
ESPLineThickness = 2,
ESPBoxThickness = 2,
ESPUpdateRate = 1 / 30,
ESPHealthBar = true,
ESPNameBackground = true,
ESPOnlyEnemies = true,
-- Visuals
ShowFOV = true,
FOVRainbow = false,
FOVFilled = true,
FOVFillTransparency = 0.93,
FOVThickness = 2,
ShowCrosshair = true,
CrosshairGap = 6,
CrosshairLength = 9,
CrosshairThickness = 2,
CrosshairDot = true,
ShowPredictionDot = true,
ShowTargetDot = true,
ShowAimLine = true,
ShowLockRing = true,
ReadyColor = Color3.fromRGB(45, 255, 170),
WallColor = Color3.fromRGB(255, 210, 60),
EnemyColor = Color3.fromRGB(65, 205, 255),
TargetColor = Color3.fromRGB(255, 70, 220),
-- Death zone / own-game arena helpers
DeathZoneAssist = false,
DeathZoneFolder = "DeathZones",
DeathZoneWarning = true,
DeathZoneESP = true,
DeathZoneDistance = 80,
DeathZoneColor = Color3.fromRGB(255, 70, 70),
-- Debug
DebugHUD = true,
DebugPrintTarget = false,
PrintFireRequests = false,
ShowPerformance = true,
}
---------------------------------------------------------------------
-- Runtime state
---------------------------------------------------------------------
local State = {
HoldingAim = false,
Target = nil,
TargetKind = nil,
Part = nil,
Character = nil,
Humanoid = nil,
AimPosition = nil,
PredictedPosition = nil,
Confidence = 0,
LOS = false,
Reason = "Starting",
Distance = 0,
ScreenDistance = math.huge,
LastSeen = 0,
LastLOS = 0,
LastSwitch = 0,
LastFire = 0,
BurstLeft = 0,
NextBurst = 0,
Best = nil,
FPS = 60,
FrameCounter = 0,
LastFPS = os.clock(),
LastESPUpdate = 0,
LastTrigger = 0,
}
local Connections = {}
local EspCache = {}
local NotificationIndex = 0
---------------------------------------------------------------------
-- Helper utilities
---------------------------------------------------------------------
local function clamp(x, a, b)
return math.max(a, math.min(b, x))
end
local function now()
return os.clock()
end
local function round(n, places)
local m = 10 ^ (places or 0)
return math.floor(n * m + 0.5) / m
end
local function addConnection(conn)
table.insert(Connections, conn)
return conn
end
local function isAllowed()
if not S.AdminOnly then
return true
end
for _, id in ipairs(S.AllowedUserIds) do
if id == LocalPlayer.UserId then
return true
end
end
return false
end
local function tween(obj, info, props)
if S.Animations then
TweenService:Create(obj, info, props):Play()
else
for k, v in pairs(props) do
obj[k] = v
end
end
end
local function corner(obj, r)
local c = Instance.new("UICorner")
c.CornerRadius = UDim.new(0, r)
c.Parent = obj
return c
end
local function stroke(obj, color, transparency, thickness)
local s = Instance.new("UIStroke")
s.Color = color or S.Accent
s.Transparency = transparency or 0.35
s.Thickness = thickness or 1
s.Parent = obj
return s
end
local function gradient(obj, c1, c2, rot)
local g = Instance.new("UIGradient")
g.Color = ColorSequence.new(c1, c2)
g.Rotation = rot or 0
g.Parent = obj
return g
end
local function clearGui(layer)
for _, ch in ipairs(layer:GetChildren()) do
if ch:IsA("GuiObject") then
ch:Destroy()
end
end
end
local function colorForTeam(player)
if player and player.TeamColor then
return player.TeamColor.Color
end
return S.EnemyColor
end
local function currentAccent()
if S.RainbowAccent or S.FOVRainbow then
return Color3.fromHSV((tick() % 5) / 5, 1, 1)
end
return S.Accent
end
local function safeName(obj)
return obj and obj.Name or "none"
end
---------------------------------------------------------------------
-- Permission gate
---------------------------------------------------------------------
if not isAllowed() then
-- Console silent: blocked quietly when AdminOnly is enabled.
return
end
---------------------------------------------------------------------
-- Target data
---------------------------------------------------------------------
local function isEnemyPlayer(player)
if player == LocalPlayer then
return false
end
if S.ESPOnlyEnemies or S.TeamCheck then
if LocalPlayer.Team and player.Team and LocalPlayer.Team == player.Team then
return false
end
end
return true
end
local function getAimPartFromCharacter(char)
if not char then return nil end
return char:FindFirstChild(S.AimPart)
or char:FindFirstChild("Head")
or char:FindFirstChild("HumanoidRootPart")
or char.PrimaryPart
or char:FindFirstChildWhichIsA("BasePart")
end
local function isSpawnProtected(char)
if not S.IgnoreSpawnProtection then
return false
end
if not char then return false end
local attr = char:GetAttribute(S.SpawnProtectionAttribute)
if attr == true then
return true
end
local ff = char:FindFirstChildOfClass("ForceField")
return ff ~= nil
end
local function getPlayerTargetData(player)
if not player or not player.Parent then
return nil, "No player"
end
if not isEnemyPlayer(player) then
return nil, "Friendly/self"
end
local char = player.Character
if not char then
return nil, "No character"
end
if isSpawnProtected(char) then
return nil, "Spawn protected"
end
local hum = char:FindFirstChildOfClass("Humanoid")
if S.AliveCheck and (not hum or hum.Health <= 0) then
return nil, "Dead"
end
local part = getAimPartFromCharacter(char)
if not part or not part:IsA("BasePart") then
return nil, "No aim part"
end
return {
kind = "Player",
object = player,
player = player,
character = char,
humanoid = hum,
part = part,
name = player.Name,
}, "OK"
end
local function getNPCTargetData(model)
if not model or not model:IsA("Model") then
return nil, "Bad NPC"
end
if isSpawnProtected(model) then
return nil, "Spawn protected"
end
local hum = model:FindFirstChildOfClass("Humanoid")
if S.AliveCheck and hum and hum.Health <= 0 then
return nil, "Dead"
end
local part = getAimPartFromCharacter(model)
if not part or not part:IsA("BasePart") then
return nil, "No aim part"
end
return {
kind = "NPC",
object = model,
player = nil,
character = model,
humanoid = hum,
part = part,
name = model.Name,
}, "OK"
end
local function getPartTargetData(part)
if not part or not part:IsA("BasePart") then
return nil, "Bad part"
end
return {
kind = "Part",
object = part,
player = nil,
character = part,
humanoid = nil,
part = part,
name = part.Name,
}, "OK"
end
local function collectTargets(includeForESP)
local targets = {}
if S.TargetPlayers or (includeForESP and S.ESPPlayers) then
for _, p in ipairs(Players:GetPlayers()) do
local d = getPlayerTargetData(p)
if d then
table.insert(targets, d)
end
end
end
if S.TargetNPCs or (includeForESP and S.ESPNPCs) then
for _, folderName in ipairs(S.NPCFolders) do
local folder = workspace:FindFirstChild(folderName)
if folder then
for _, model in ipairs(folder:GetChildren()) do
local d = getNPCTargetData(model)
if d then
table.insert(targets, d)
end
end
end
end
end
if S.UseAimTargetTag then
for _, obj in ipairs(CollectionService:GetTagged("AimTarget")) do
if obj:IsA("Model") then
local d = getNPCTargetData(obj)
if d then table.insert(targets, d) end
elseif obj:IsA("BasePart") then
local d = getPartTargetData(obj)
if d then table.insert(targets, d) end
end
end
end
return targets
end
---------------------------------------------------------------------
-- Aim math
---------------------------------------------------------------------
local function hasLineOfSight(part, character)
if not Camera or not part then
return false, nil
end
local origin = Camera.CFrame.Position
local direction = part.Position - origin
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
params.FilterDescendantsInstances = { LocalPlayer.Character, Camera }
local hit = workspace:Raycast(origin, direction, params)
if not hit then
return true, nil
end
if typeof(character) == "Instance" and hit.Instance:IsDescendantOf(character) then
return true, hit.Instance
end
if hit.Instance == part then
return true, hit.Instance
end
return false, hit.Instance
end
local function predictedPosition(part)
if not S.Prediction then
return part.Position
end
if not S.VelocityPrediction then
return part.Position
end
local v = part.AssemblyLinearVelocity
local adjusted = Vector3.new(v.X, v.Y * S.VerticalPrediction, v.Z)
return part.Position + adjusted * S.PredictionLead
end
local function worldToScreen(worldPos)
local vp = Camera.ViewportSize
local center = Vector2.new(vp.X / 2, vp.Y / 2)
local pos, onScreen = Camera:WorldToViewportPoint(worldPos)
local pos2 = Vector2.new(pos.X, pos.Y)
local dist = (pos2 - center).Magnitude
return pos, onScreen and pos.Z > 0, dist, center
end
local function candidateFromTarget(data, forESP)
local aimPos = predictedPosition(data.part)
local worldDist = (aimPos - Camera.CFrame.Position).Magnitude
local maxDist = forESP and S.ESPMaxDistance or S.MaxDistance
if worldDist > maxDist then
return nil, "Too far"
end
local screen, onScreen, screenDist = worldToScreen(aimPos)
if not forESP then
if not onScreen then
return nil, "Off screen"
end
if screenDist > S.AimRadius then
return nil, "Outside FOV"
end
end
local los = hasLineOfSight(data.part, data.character)
if not forESP then
if S.RequireLOSForAim and not los then
return nil, "No LOS"
end
if S.LineOfSight and not los then
local recentWallMemory = S.WallMemory and data.object == State.Target and (now() - State.LastLOS) <= S.WallMemoryTime
if not recentWallMemory then
return nil, "Wall blocked"
end
end
end
local radiusAlpha = 1 - clamp(screenDist / math.max(S.AimRadius, 1), 0, 1)
local distanceAlpha = 1 - clamp(worldDist / math.max(S.MaxDistance, 1), 0, 1)
local healthAlpha = 0
if data.humanoid and data.humanoid.MaxHealth > 0 then
healthAlpha = 1 - clamp(data.humanoid.Health / data.humanoid.MaxHealth, 0, 1)
end
local confidence = 0
confidence += radiusAlpha * S.FOVPriority
confidence += distanceAlpha * S.DistancePriority
if S.PreferLowHealth then
confidence += healthAlpha * S.HealthPriority
end
if S.PreferVisible then
confidence += los and S.VisiblePriority or -0.12
end
if S.StickyTarget and data.object == State.Target then
confidence += S.StickyBonus
end
confidence = clamp(confidence, 0, 1)
local score = 0
if S.PreferClosestCrosshair then
score += screenDist
end
if S.PreferClosestDistance then
score += worldDist * 0.028
end
if S.PreferLowHealth then
score -= healthAlpha * 55
end
if S.PreferVisible and los then
score -= 30
end
score -= confidence * 88
if S.StickyTarget and data.object == State.Target then
score *= 0.70
end
return {
base = data,
object = data.object,
kind = data.kind,
player = data.player,
character = data.character,
humanoid = data.humanoid,
part = data.part,
name = data.name,
aimPos = aimPos,
screen = screen,
onScreen = onScreen,
screenDistance = screenDist,
distance = worldDist,
los = los,
confidence = confidence,
score = score,
healthAlpha = healthAlpha,
}, "OK"
end
local function chooseBestTarget()
if not S.AimAssist then
State.Target = nil
State.Best = nil
State.Confidence = 0
State.Reason = "Aim off"
return nil
end
local t = now()
local best = nil
local bestReason = "Scanning"
if S.StickyTarget and State.Target and (t - State.LastSeen) <= S.StickyTime then
for _, data in ipairs(collectTargets(false)) do
if data.object == State.Target then
local candidate = candidateFromTarget(data, false)
if candidate then
best = candidate
bestReason = "Sticky"
end
break
end
end
end
for _, data in ipairs(collectTargets(false)) do
local candidate = candidateFromTarget(data, false)
if candidate then
if not best then
best = candidate
bestReason = "Best"
else
local canSwitch = (t - State.LastSwitch) >= S.SwitchCooldown
local advantage = (best.score - candidate.score) / math.max(math.abs(best.score), 1)
if candidate.object == State.Target then
best = candidate
bestReason = "Sticky"
elseif canSwitch and candidate.score < best.score and advantage >= S.SwitchAdvantage then
best = candidate
bestReason = "Switched"
end
end
end
end
if best then
if State.Target ~= best.object then
State.LastSwitch = t
if S.DebugPrintTarget then
-- Console silent by default. Enable your own print here if needed.
end
end
State.Target = best.object
State.TargetKind = best.kind
State.Part = best.part
State.Character = best.character
State.Humanoid = best.humanoid
State.AimPosition = best.aimPos
State.PredictedPosition = best.aimPos
State.Confidence = best.confidence
State.LOS = best.los
State.Distance = best.distance
State.ScreenDistance = best.screenDistance
State.LastSeen = t
if best.los then
State.LastLOS = t
end
State.Best = best
State.Reason = bestReason .. " / " .. (best.los and "clear" or "wall")
return best
end
State.Target = nil
State.TargetKind = nil
State.Part = nil
State.Character = nil
State.Humanoid = nil
State.AimPosition = nil
State.PredictedPosition = nil
State.Confidence = 0
State.LOS = false
State.Distance = 0
State.ScreenDistance = math.huge
State.Best = nil
State.Reason = "No valid target"
return nil
end
---------------------------------------------------------------------
-- UI root
---------------------------------------------------------------------
local Gui = Instance.new("ScreenGui")
Gui.Name = "OfficialV4UltraEdition"
Gui.ResetOnSpawn = false
Gui.IgnoreGuiInset = true
Gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
Gui.DisplayOrder = 999999
Gui.Enabled = true
Gui.Parent = PlayerGui
local Blur = Lighting:FindFirstChild("OfficialV4UltraBlur")
if not Blur then
Blur = Instance.new("BlurEffect")
Blur.Name = "OfficialV4UltraBlur"
Blur.Parent = Lighting
end
Blur.Size = S.MenuOpen and S.BlurSize or 0
local Dim = Instance.new("Frame")
Dim.Name = "Dim"
Dim.Size = UDim2.fromScale(1, 1)
Dim.BackgroundColor3 = Color3.fromRGB(2, 4, 14)
Dim.BackgroundTransparency = S.DimTransparency
Dim.BorderSizePixel = 0
Dim.Visible = S.MenuOpen
Dim.Parent = Gui
local DimGradient = gradient(Dim, Color3.fromRGB(10, 40, 70), Color3.fromRGB(65, 20, 75), 25)
local PatternLayer = Instance.new("Frame")
PatternLayer.Name = "PatternLayer"
PatternLayer.Size = UDim2.fromScale(1, 1)
PatternLayer.BackgroundTransparency = 1
PatternLayer.Visible = S.MenuOpen
PatternLayer.Parent = Gui
for i = 1, 28 do
local bubble = Instance.new("Frame")
bubble.AnchorPoint = Vector2.new(0.5, 0.5)
bubble.Position = UDim2.fromScale(math.random(), math.random())
local size = math.random(22, 85)
bubble.Size = UDim2.fromOffset(size, size)
bubble.BackgroundColor3 = i % 3 == 0 and S.Accent2 or (i % 3 == 1 and S.Accent or S.Accent3)
bubble.BackgroundTransparency = 0.86
bubble.BorderSizePixel = 0
bubble.Parent = PatternLayer
corner(bubble, 999)
end
local ParticleLayer = Instance.new("Frame")
ParticleLayer.Name = "ParticleLayer"
ParticleLayer.Size = UDim2.fromScale(1, 1)
ParticleLayer.BackgroundTransparency = 1
ParticleLayer.Visible = S.MenuOpen and S.Particles
ParticleLayer.Parent = Gui
local Particles = {}
for i = 1, 48 do
local p = Instance.new("Frame")
p.AnchorPoint = Vector2.new(0.5, 0.5)
p.Size = UDim2.fromOffset(math.random(2, 6), math.random(2, 6))
p.Position = UDim2.fromScale(math.random(), 1 + math.random() * 0.2)
p.BackgroundColor3 = i % 2 == 0 and S.Accent or S.Accent3
p.BackgroundTransparency = math.random(35, 70) / 100
p.BorderSizePixel = 0
p.Parent = ParticleLayer
corner(p, 999)
Particles[p] = {
speed = math.random(12, 42) / 10000,
drift = math.random(-18, 18) / 100000,
}
end
local TopButton = Instance.new("TextButton")
TopButton.Name = "TopButton"
TopButton.AnchorPoint = Vector2.new(1, 0)
TopButton.Position = UDim2.new(1, -16, 0, 16)
TopButton.Size = UDim2.fromOffset(150, 48)
TopButton.BackgroundColor3 = Color3.fromRGB(18, 20, 28)
TopButton.BackgroundTransparency = 0.04
TopButton.BorderSizePixel = 0
TopButton.Font = Enum.Font.GothamBlack
TopButton.Text = S.MenuOpen and "✕ CLOSE" or "◆ V4 ULTRA"
TopButton.TextColor3 = Color3.new(1, 1, 1)
TopButton.TextSize = 15
TopButton.Visible = true
TopButton.ZIndex = 10000
TopButton.Parent = Gui
corner(TopButton, 10)
stroke(TopButton, S.Accent, 0.10, 2)
gradient(TopButton, Color3.fromRGB(30, 34, 46), Color3.fromRGB(12, 14, 20), -90)
local Root = Instance.new("Frame")
Root.Name = "Root"
Root.AnchorPoint = Vector2.new(0.5, 0.5)
Root.Position = UDim2.fromScale(0.5, 0.5)
Root.Size = UDim2.fromOffset(1180, 640)
Root.BackgroundColor3 = S.Background
Root.BackgroundTransparency = S.Glass
Root.BorderSizePixel = 0
Root.Visible = S.MenuOpen
Root.Parent = Gui
corner(Root, 4)
stroke(Root, Color3.fromRGB(240, 240, 240), 0.05, 3)
local RootScale = Instance.new("UIScale")
RootScale.Parent = Root
local RootPattern = Instance.new("Frame")
RootPattern.Name = "RootPattern"
RootPattern.Size = UDim2.fromScale(1, 1)
RootPattern.BackgroundColor3 = Color3.fromRGB(20, 20, 26)
RootPattern.BackgroundTransparency = 0.15
RootPattern.BorderSizePixel = 0
RootPattern.Parent = Root
corner(RootPattern, 4)
gradient(RootPattern, Color3.fromRGB(18, 22, 31), Color3.fromRGB(8, 10, 15), 0)
for i = 1, 34 do
local c = Instance.new("Frame")
c.AnchorPoint = Vector2.new(0.5, 0.5)
c.Position = UDim2.fromScale(math.random(), math.random())
local size = math.random(18, 80)
c.Size = UDim2.fromOffset(size, size)
c.BackgroundColor3 = i % 2 == 0 and Color3.fromRGB(70, 50, 18) or Color3.fromRGB(30, 35, 50)
c.BackgroundTransparency = 0.78
c.BorderSizePixel = 0
c.Parent = RootPattern
corner(c, 999)
end
local Header = Instance.new("Frame")
Header.Name = "Header"
Header.Size = UDim2.new(1, 0, 0, 56)
Header.BackgroundColor3 = Color3.fromRGB(18, 18, 22)
Header.BackgroundTransparency = 0.03
Header.BorderSizePixel = 0
Header.Parent = Root
stroke(Header, Color3.fromRGB(0, 0, 0), 0.2, 1)
gradient(Header, Color3.fromRGB(35, 35, 38), Color3.fromRGB(14, 14, 18), -90)
local Title = Instance.new("TextLabel")
Title.BackgroundTransparency = 1
Title.Position = UDim2.fromOffset(12, 2)
Title.Size = UDim2.new(1, -160, 0, 22)
Title.Font = Enum.Font.Code
Title.Text = "uwu-style official V4 Ultra"
Title.TextColor3 = Color3.fromRGB(225, 225, 235)
Title.TextSize = 17
Title.TextXAlignment = Enum.TextXAlignment.Left
Title.Parent = Header
local HeaderClose = Instance.new("TextButton")
HeaderClose.Name = "HeaderClose"
HeaderClose.AnchorPoint = Vector2.new(1, 0)
HeaderClose.Position = UDim2.new(1, -8, 0, 5)
HeaderClose.Size = UDim2.fromOffset(96, 24)
HeaderClose.BackgroundColor3 = Color3.fromRGB(58, 24, 32)
HeaderClose.BackgroundTransparency = 0.05
HeaderClose.BorderSizePixel = 0
HeaderClose.Font = Enum.Font.Code
HeaderClose.Text = "close"
HeaderClose.TextColor3 = Color3.fromRGB(255, 210, 220)
HeaderClose.TextSize = 15
HeaderClose.ZIndex = 50
HeaderClose.Parent = Header
corner(HeaderClose, 3)
stroke(HeaderClose, Color3.fromRGB(255, 80, 120), 0.25, 1)
local TabBar = Instance.new("Frame")
TabBar.Name = "TabBar"
TabBar.Position = UDim2.fromOffset(10, 25)
TabBar.Size = UDim2.new(1, -20, 0, 30)
TabBar.BackgroundTransparency = 1
TabBar.Parent = Header
local Content = Instance.new("Frame")
Content.Name = "Content"
Content.Position = UDim2.fromOffset(10, 66)
Content.Size = UDim2.new(1, -20, 1, -76)
Content.BackgroundTransparency = 1
Content.Parent = Root
local LeftColumn = Instance.new("ScrollingFrame")
local MidColumn = Instance.new("ScrollingFrame")
local RightColumn = Instance.new("ScrollingFrame")
local Columns = {LeftColumn, MidColumn, RightColumn}
for i, col in ipairs(Columns) do
col.Name = "Column" .. i
col.Position = UDim2.fromOffset((i - 1) * 386, 0)
col.Size = UDim2.fromOffset(374, 564)
col.BackgroundTransparency = 1
col.BorderSizePixel = 0
col.ScrollBarThickness = 3
col.ScrollBarImageColor3 = i == 1 and S.Accent or (i == 2 and S.Accent2 or S.Accent3)
col.CanvasSize = UDim2.fromOffset(0, 800)
col.Parent = Content
end
local function updateScale()
local vp = Camera and Camera.ViewportSize or Vector2.new(1280, 720)
local scale = math.min(vp.X / 1280, vp.Y / 760)
if S.UIScaleMobile then
scale = clamp(scale, 0.50, 1)
else
scale = clamp(scale, 0.70, 1)
end
RootScale.Scale = scale
end
---------------------------------------------------------------------
-- UI widgets
---------------------------------------------------------------------
local UI = {}
UI.TabButtons = {}
UI.Elements = {}
UI.ColumnY = {0, 0, 0}
local function getColumn(index)
return Columns[index]
end
local function resetColumns()
for _, col in ipairs(Columns) do
clearGui(col)
end
UI.ColumnY = {0, 0, 0}
end
local function section(columnIndex, title, accent)
local col = getColumn(columnIndex)
local y = UI.ColumnY[columnIndex]
local sec = Instance.new("Frame")
sec.Position = UDim2.fromOffset(0, y)
sec.Size = UDim2.fromOffset(374, 40)
sec.BackgroundColor3 = Color3.fromRGB(28, 28, 34)
sec.BackgroundTransparency = 0.08
sec.BorderSizePixel = 0
sec.Parent = col
corner(sec, 2)
stroke(sec, accent, 0.25, 1)
local line = Instance.new("Frame")
line.Position = UDim2.fromOffset(0, 0)
line.Size = UDim2.new(1, 0, 0, 3)
line.BackgroundColor3 = accent
line.BorderSizePixel = 0
line.Parent = sec
local label = Instance.new("TextLabel")
label.BackgroundTransparency = 1
label.Position = UDim2.fromOffset(12, 8)
label.Size = UDim2.new(1, -24, 0, 24)