-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShadowX.lua
More file actions
1012 lines (866 loc) · 28.9 KB
/
ShadowX.lua
File metadata and controls
1012 lines (866 loc) · 28.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
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
-- ShadowX Premium Script v3.3
-- Fixed Version for Delta/R6/R15/All Executors
--[[
Changelog:
- Fixed ESP for R15 bodies
- Improved GUI dragging
- Delta executor compatibility
- Better noclip implementation
- R6 character force
]]
-- Environment detection
local isExecutor = (syn and true) or (protect_gui and true) or
(getgenv and true) or (is_sirhurt_closure and true) or
(identifyexecutor and true) or false
-- Services
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
local CoreGui = game:GetService("CoreGui")
local Lighting = game:GetService("Lighting")
local StarterGui = game:GetService("StarterGui")
-- Force R6 character (fix for ESP and body issues)
if LocalPlayer.Character then
LocalPlayer.Character:BreakJoints()
end
LocalPlayer.CharacterAdded:Connect(function(char)
local humanoid = char:WaitForChild("Humanoid")
humanoid.RigType = Enum.HumanoidRigType.R6
end)
-- Main variables
local selectedPlayer = nil
local walkspeed = 16
local jumppower = 50
local flying = false
local noclip = false
local espEnabled = false
local godmode = false
local flySpeed = 2
local flyBoost = 5
local espFolders = {}
local connections = {}
-- Improved Fly System
local flyBodyVelocity
local flyBodyGyro
local lastCamera = workspace.CurrentCamera.CFrame
local function StartFly()
local character = LocalPlayer.Character
if not character then return end
local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid or not humanoid.RootPart then return end
-- Create flight controls
flyBodyVelocity = Instance.new("BodyVelocity")
flyBodyVelocity.Velocity = Vector3.new(0, 0, 0)
flyBodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
flyBodyVelocity.P = 1000
flyBodyVelocity.Parent = humanoid.RootPart
flyBodyGyro = Instance.new("BodyGyro")
flyBodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
flyBodyGyro.P = 10000
flyBodyGyro.D = 500
flyBodyGyro.Parent = humanoid.RootPart
-- Flight control function
connections.flyLoop = RunService.Heartbeat:Connect(function(delta)
if not flying or not character:FindFirstChild("HumanoidRootPart") then
if flyBodyVelocity then flyBodyVelocity:Destroy() end
if flyBodyGyro then flyBodyGyro:Destroy() end
return
end
local root = humanoid.RootPart
local camera = workspace.CurrentCamera
lastCamera = camera.CFrame
-- Get control inputs
local forward = UserInputService:IsKeyDown(Enum.KeyCode.W) and -1 or UserInputService:IsKeyDown(Enum.KeyCode.S) and 1 or 0
local right = UserInputService:IsKeyDown(Enum.KeyCode.D) and 1 or UserInputService:IsKeyDown(Enum.KeyCode.A) and -1 or 0
local up = UserInputService:IsKeyDown(Enum.KeyCode.Space) and 1 or UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) and -1 or 0
-- Calculate movement direction
local speed = flySpeed
if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then
speed = flySpeed * flyBoost
end
local lookVector = camera.CFrame.LookVector
local rightVector = camera.CFrame.RightVector
local upVector = Vector3.new(0, 1, 0)
local moveDirection = (lookVector * forward) + (rightVector * right) + (upVector * up)
moveDirection = moveDirection.Unit * speed * 100
-- Apply movement
flyBodyVelocity.Velocity = moveDirection
flyBodyGyro.CFrame = camera.CFrame
end)
end
local function StopFly()
if flyBodyVelocity then flyBodyVelocity:Destroy() end
if flyBodyGyro then flyBodyGyro:Destroy() end
if connections.flyLoop then connections.flyLoop:Disconnect() end
end
-- Fixed ESP System for R15/R6
local function CreateESP(player)
if not player or not player.Character then return end
-- Wait for body parts to load
local function waitForParts(char)
local root = char:FindFirstChild("HumanoidRootPart") or char:WaitForChild("HumanoidRootPart", 3)
local head = char:FindFirstChild("Head") or char:WaitForChild("Head", 3)
return root and head
end
if not waitForParts(player.Character) then return end
-- Remove existing ESP if any
if espFolders[player] then
espFolders[player]:Destroy()
espFolders[player] = nil
end
local character = player.Character
local espFolder = Instance.new("Folder")
espFolder.Name = player.Name.."_ESP"
espFolder.Parent = CoreGui
-- Highlight with fixed properties
local highlight = Instance.new("Highlight")
highlight.Name = "Highlight"
highlight.Adornee = character
highlight.FillColor = Color3.fromRGB(255, 50, 50)
highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
highlight.FillTransparency = 0.5
highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
highlight.Parent = espFolder
-- Name Tag
local billboard = Instance.new("BillboardGui")
billboard.Name = "NameTag"
billboard.Adornee = character:WaitForChild("Head")
billboard.Size = UDim2.new(0, 200, 0, 50)
billboard.StudsOffset = Vector3.new(0, 2.5, 0)
billboard.AlwaysOnTop = true
billboard.Parent = espFolder
local nameLabel = Instance.new("TextLabel")
nameLabel.Size = UDim2.new(1, 0, 1, 0)
nameLabel.BackgroundTransparency = 1
nameLabel.Text = player.Name
nameLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
nameLabel.TextStrokeTransparency = 0
nameLabel.Font = Enum.Font.GothamBold
nameLabel.TextSize = 16
nameLabel.Parent = billboard
-- Health Bar
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
local healthBar = Instance.new("BillboardGui")
healthBar.Name = "HealthBar"
healthBar.Adornee = character:WaitForChild("Head")
healthBar.Size = UDim2.new(2, 0, 0.2, 0)
healthBar.StudsOffset = Vector3.new(0, 2, 0)
healthBar.AlwaysOnTop = true
healthBar.Parent = espFolder
local healthFrame = Instance.new("Frame")
healthFrame.Size = UDim2.new(1, 0, 1, 0)
healthFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
healthFrame.BorderSizePixel = 0
healthFrame.Parent = healthBar
local healthFill = Instance.new("Frame")
healthFill.Size = UDim2.new(humanoid.Health / humanoid.MaxHealth, 0, 1, 0)
healthFill.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
healthFill.BorderSizePixel = 0
healthFill.Parent = healthFrame
-- Update health
connections[player.."healthChanged"] = humanoid.HealthChanged:Connect(function()
healthFill.Size = UDim2.new(humanoid.Health / humanoid.MaxHealth, 0, 1, 0)
healthFill.BackgroundColor3 = Color3.fromHSV(humanoid.Health / humanoid.MaxHealth * 0.3, 1, 1)
end)
end
espFolders[player] = espFolder
-- Cleanup when character changes
connections[player.."characterRemoving"] = player.CharacterRemoving:Connect(function()
if espFolders[player] then
espFolders[player]:Destroy()
espFolders[player] = nil
end
end)
end
-- GUI Creation
local ShadowX = Instance.new("ScreenGui")
ShadowX.Name = "ShadowXPremium_"..tostring(math.random(1, 10000))
ShadowX.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
ShadowX.ResetOnSpawn = false
-- Improved GUI protection
local function ProtectGUI(gui)
if isExecutor then
if protect_gui then
protect_gui(gui)
elseif syn and syn.protect_gui then
syn.protect_gui(gui)
elseif getgenv().protectgui then
getgenv().protectgui(gui)
elseif gethui then
gui.Parent = gethui()
else
gui.Parent = CoreGui
end
else
gui.Parent = LocalPlayer:WaitForChild("PlayerGui")
end
end
ProtectGUI(ShadowX)
-- Styling
local mainColor = Color3.fromRGB(28, 28, 36)
local accentColor = Color3.fromRGB(0, 120, 215)
local textColor = Color3.fromRGB(240, 240, 240)
local errorColor = Color3.fromRGB(255, 60, 60)
-- Main Window
local MainFrame = Instance.new("Frame")
MainFrame.Name = "MainFrame"
MainFrame.Size = UDim2.new(0, 400, 0, 500)
MainFrame.Position = UDim2.new(0.5, -200, 0.5, -250)
MainFrame.BackgroundColor3 = mainColor
MainFrame.BackgroundTransparency = 0.1
MainFrame.BorderSizePixel = 0
MainFrame.ClipsDescendants = true
MainFrame.Active = true
MainFrame.Parent = ShadowX
-- UI Elements
local UICorner = Instance.new("UICorner")
UICorner.CornerRadius = UDim.new(0, 8)
UICorner.Parent = MainFrame
local UIStroke = Instance.new("UIStroke")
UIStroke.Color = Color3.fromRGB(0, 0, 0)
UIStroke.Thickness = 2
UIStroke.Transparency = 0.7
UIStroke.Parent = MainFrame
-- Title Bar with improved dragging
local TitleBar = Instance.new("Frame")
TitleBar.Name = "TitleBar"
TitleBar.Size = UDim2.new(1, 0, 0, 40)
TitleBar.Position = UDim2.new(0, 0, 0, 0)
TitleBar.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
TitleBar.BackgroundTransparency = 0.1
TitleBar.BorderSizePixel = 0
TitleBar.Parent = MainFrame
local UICorner2 = Instance.new("UICorner")
UICorner2.CornerRadius = UDim.new(0, 8)
UICorner2.Parent = TitleBar
local Title = Instance.new("TextLabel")
Title.Name = "Title"
Title.Size = UDim2.new(1, -40, 1, 0)
Title.Position = UDim2.new(0, 10, 0, 0)
Title.BackgroundTransparency = 1
Title.Text = "SHADOW X v3.3"
Title.TextColor3 = accentColor
Title.Font = Enum.Font.GothamBold
Title.TextSize = 18
Title.TextXAlignment = Enum.TextXAlignment.Left
Title.Parent = TitleBar
-- Improved Close Button
local CloseButton = Instance.new("TextButton")
CloseButton.Name = "CloseButton"
CloseButton.Size = UDim2.new(0, 30, 0, 30)
CloseButton.Position = UDim2.new(1, -35, 0.5, -15)
CloseButton.BackgroundColor3 = errorColor
CloseButton.BackgroundTransparency = 0.7
CloseButton.BorderSizePixel = 0
CloseButton.Text = "×"
CloseButton.TextColor3 = textColor
CloseButton.Font = Enum.Font.GothamBold
CloseButton.TextSize = 20
CloseButton.Parent = TitleBar
local UICorner3 = Instance.new("UICorner")
UICorner3.CornerRadius = UDim.new(0, 6)
UICorner3.Parent = CloseButton
-- Improved dragging system
local dragging
local dragInput
local dragStart
local startPos
local function updateInput(input)
local delta = input.Position - dragStart
MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
TitleBar.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
dragStart = input.Position
startPos = MainFrame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
TitleBar.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
dragInput = input
end
end)
UserInputService.InputChanged:Connect(function(input)
if input == dragInput and dragging then
updateInput(input)
end
end)
-- Close animation
CloseButton.MouseButton1Click:Connect(function()
local tween = TweenService:Create(MainFrame, TweenInfo.new(0.3), {Size = UDim2.new(0, 400, 0, 0)})
tween:Play()
tween.Completed:Wait()
ShadowX:Destroy()
end)
-- Tabs
local Tabs = {"Players", "Local", "Visuals", "Weapons", "Admin", "Credits"}
local TabButtons = {}
local TabFrames = {}
local function CreateTab(tabName)
local index = #TabButtons + 1
-- Tab Button
local TabButton = Instance.new("TextButton")
TabButton.Name = tabName.."TabButton"
TabButton.Size = UDim2.new(0.166, 0, 0, 30)
TabButton.Position = UDim2.new(0.166 * (index - 1), 0, 0, 40)
TabButton.BackgroundColor3 = index == 1 and accentColor or Color3.fromRGB(40, 40, 50)
TabButton.BackgroundTransparency = index == 1 and 0.3 or 0.7
TabButton.BorderSizePixel = 0
TabButton.Text = tabName
TabButton.TextColor3 = textColor
TabButton.Font = Enum.Font.Gotham
TabButton.TextSize = 14
TabButton.Parent = MainFrame
local UICorner4 = Instance.new("UICorner")
UICorner4.CornerRadius = UDim.new(0, 6)
UICorner4.Parent = TabButton
-- Tab Frame
local TabFrame = Instance.new("Frame")
TabFrame.Name = tabName.."TabFrame"
TabFrame.Size = UDim2.new(1, -20, 1, -80)
TabFrame.Position = UDim2.new(0, 10, 0, 80)
TabFrame.BackgroundTransparency = 1
TabFrame.Visible = index == 1
TabFrame.Parent = MainFrame
-- ScrollingFrame
local ScrollFrame = Instance.new("ScrollingFrame")
ScrollFrame.Name = "ScrollFrame"
ScrollFrame.Size = UDim2.new(1, 0, 1, 0)
ScrollFrame.Position = UDim2.new(0, 0, 0, 0)
ScrollFrame.BackgroundTransparency = 1
ScrollFrame.ScrollBarThickness = 5
ScrollFrame.ScrollBarImageColor3 = accentColor
ScrollFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
ScrollFrame.Parent = TabFrame
TabButton.MouseButton1Click:Connect(function()
for _, frame in pairs(TabFrames) do
frame.Visible = false
end
TabFrame.Visible = true
for _, button in pairs(TabButtons) do
button.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
button.BackgroundTransparency = 0.7
end
TabButton.BackgroundColor3 = accentColor
TabButton.BackgroundTransparency = 0.3
end)
table.insert(TabButtons, TabButton)
table.insert(TabFrames, TabFrame)
return ScrollFrame
end
-- Create Tabs
local PlayersTab = CreateTab("Players")
local LocalTab = CreateTab("Local")
local VisualsTab = CreateTab("Visuals")
local WeaponsTab = CreateTab("Weapons")
local AdminTab = CreateTab("Admin")
local CreditsTab = CreateTab("Credits")
-- UI Element Functions
local function AddButton(parent, text, callback)
local button = Instance.new("TextButton")
button.Name = text.."Button"
button.Size = UDim2.new(1, 0, 0, 35)
button.Position = UDim2.new(0, 0, 0, #parent:GetChildren() * 40 + 5)
button.BackgroundColor3 = Color3.fromRGB(50, 50, 60)
button.BackgroundTransparency = 0.5
button.BorderSizePixel = 0
button.Text = text
button.TextColor3 = textColor
button.Font = Enum.Font.Gotham
button.TextSize = 14
button.Parent = parent
local UICorner = Instance.new("UICorner")
UICorner.CornerRadius = UDim.new(0, 6)
UICorner.Parent = button
parent.CanvasSize = UDim2.new(0, 0, 0, #parent:GetChildren() * 40 + 10)
-- Hover effects
button.MouseEnter:Connect(function()
TweenService:Create(button, TweenInfo.new(0.2), {BackgroundTransparency = 0.3}):Play()
end)
button.MouseLeave:Connect(function()
TweenService:Create(button, TweenInfo.new(0.2), {BackgroundTransparency = 0.5}):Play()
end)
button.MouseButton1Click:Connect(function()
TweenService:Create(button, TweenInfo.new(0.1), {BackgroundColor3 = accentColor}):Play()
TweenService:Create(button, TweenInfo.new(0.3), {BackgroundColor3 = Color3.fromRGB(50, 50, 60)}):Play()
callback()
end)
return button
end
local function AddSlider(parent, text, min, max, default, callback)
local sliderFrame = Instance.new("Frame")
sliderFrame.Name = text.."SliderFrame"
sliderFrame.Size = UDim2.new(1, 0, 0, 60)
sliderFrame.Position = UDim2.new(0, 0, 0, #parent:GetChildren() * 65 + 5)
sliderFrame.BackgroundTransparency = 1
sliderFrame.Parent = parent
local label = Instance.new("TextLabel")
label.Name = "Label"
label.Size = UDim2.new(1, 0, 0, 20)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = text..": "..default
label.TextColor3 = textColor
label.Font = Enum.Font.Gotham
label.TextSize = 14
label.TextXAlignment = Enum.TextXAlignment.Left
label.Parent = sliderFrame
local slider = Instance.new("Frame")
slider.Name = "Slider"
slider.Size = UDim2.new(1, 0, 0, 10)
slider.Position = UDim2.new(0, 0, 0, 30)
slider.BackgroundColor3 = Color3.fromRGB(60, 60, 70)
slider.BorderSizePixel = 0
slider.Parent = sliderFrame
local UICorner = Instance.new("UICorner")
UICorner.CornerRadius = UDim.new(0, 5)
UICorner.Parent = slider
local fill = Instance.new("Frame")
fill.Name = "Fill"
fill.Size = UDim2.new((default - min)/(max - min), 0, 1, 0)
fill.Position = UDim2.new(0, 0, 0, 0)
fill.BackgroundColor3 = accentColor
fill.BorderSizePixel = 0
fill.Parent = slider
local UICorner2 = Instance.new("UICorner")
UICorner2.CornerRadius = UDim.new(0, 5)
UICorner2.Parent = fill
local button = Instance.new("TextButton")
button.Name = "Button"
button.Size = UDim2.new(0, 20, 0, 20)
button.Position = UDim2.new((default - min)/(max - min), -10, 0.5, -10)
button.BackgroundColor3 = textColor
button.BorderSizePixel = 0
button.Text = ""
button.Parent = slider
local UICorner3 = Instance.new("UICorner")
UICorner3.CornerRadius = UDim.new(0, 10)
UICorner3.Parent = button
parent.CanvasSize = UDim2.new(0, 0, 0, #parent:GetChildren() * 65 + 10)
local dragging = false
button.MouseButton1Down:Connect(function()
dragging = true
end)
UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = false
end
end)
local connection
connection = UserInputService.InputChanged:Connect(function(input)
if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
local x = (input.Position.X - slider.AbsolutePosition.X) / slider.AbsoluteSize.X
x = math.clamp(x, 0, 1)
local value = math.floor(min + (max - min) * x)
fill.Size = UDim2.new(x, 0, 1, 0)
button.Position = UDim2.new(x, -10, 0.5, -10)
label.Text = text..": "..value
callback(value)
end
end)
sliderFrame.Destroying:Connect(function()
connection:Disconnect()
end)
return sliderFrame
end
local function AddToggle(parent, text, default, callback)
local toggleFrame = Instance.new("Frame")
toggleFrame.Name = text.."ToggleFrame"
toggleFrame.Size = UDim2.new(1, 0, 0, 40)
toggleFrame.Position = UDim2.new(0, 0, 0, #parent:GetChildren() * 45 + 5)
toggleFrame.BackgroundTransparency = 1
toggleFrame.Parent = parent
local label = Instance.new("TextLabel")
label.Name = "Label"
label.Size = UDim2.new(0.7, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = text
label.TextColor3 = textColor
label.Font = Enum.Font.Gotham
label.TextSize = 14
label.TextXAlignment = Enum.TextXAlignment.Left
label.Parent = toggleFrame
local toggle = Instance.new("Frame")
toggle.Name = "Toggle"
toggle.Size = UDim2.new(0, 60, 0, 30)
toggle.Position = UDim2.new(1, -60, 0.5, -15)
toggle.BackgroundColor3 = default and accentColor or Color3.fromRGB(80, 80, 80)
toggle.BackgroundTransparency = 0.5
toggle.BorderSizePixel = 0
toggle.Parent = toggleFrame
local UICorner = Instance.new("UICorner")
UICorner.CornerRadius = UDim.new(0, 15)
UICorner.Parent = toggle
local button = Instance.new("TextButton")
button.Name = "Button"
button.Size = UDim2.new(0, 26, 0, 26)
button.Position = default and UDim2.new(1, -28, 0.5, -13) or UDim2.new(0, 2, 0.5, -13)
button.BackgroundColor3 = textColor
button.BorderSizePixel = 0
button.Text = ""
button.Parent = toggle
local UICorner2 = Instance.new("UICorner")
UICorner2.CornerRadius = UDim.new(0, 13)
UICorner2.Parent = button
parent.CanvasSize = UDim2.new(0, 0, 0, #parent:GetChildren() * 45 + 10)
local state = default
button.MouseButton1Click:Connect(function()
state = not state
if state then
TweenService:Create(toggle, TweenInfo.new(0.2), {BackgroundColor3 = accentColor}):Play()
TweenService:Create(button, TweenInfo.new(0.2), {Position = UDim2.new(1, -28, 0.5, -13)}):Play()
else
TweenService:Create(toggle, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(80, 80, 80)}):Play()
TweenService:Create(button, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -13)}):Play()
end
callback(state)
end)
return toggleFrame
end
-- Player Functions
local function GetCharacter(player)
return player.Character or player.CharacterAdded:Wait()
end
local function GetHumanoid(player)
local character = GetCharacter(player)
return character:FindFirstChildOfClass("Humanoid")
end
local function GetRootPart(player)
local character = GetCharacter(player)
return character:FindFirstChild("HumanoidRootPart") or character:FindFirstChild("UpperTorso") or character:FindFirstChild("Torso")
end
-- Update player list
local function UpdatePlayerList()
for _, child in ipairs(PlayersTab:GetChildren()) do
if child:IsA("TextButton") and child.Name ~= "RefreshButton" then
child:Destroy()
end
end
for i, player in ipairs(Players:GetPlayers()) do
if player ~= LocalPlayer then
AddButton(PlayersTab, player.Name, function()
selectedPlayer = player
end)
end
end
end
AddButton(PlayersTab, "⟳ Refresh", UpdatePlayerList)
UpdatePlayerList()
-- Player Functions
AddButton(PlayersTab, "Teleport to Player", function()
if selectedPlayer then
local targetRoot = GetRootPart(selectedPlayer)
local myRoot = GetRootPart(LocalPlayer)
if targetRoot and myRoot then
myRoot.CFrame = targetRoot.CFrame * CFrame.new(0, 0, -3)
end
end
end)
AddButton(PlayersTab, "Kill Player", function()
if selectedPlayer then
local humanoid = GetHumanoid(selectedPlayer)
if humanoid then
humanoid.Health = 0
end
end
end)
AddButton(PlayersTab, "Spectate Player", function()
if selectedPlayer then
workspace.CurrentCamera.CameraSubject = GetHumanoid(selectedPlayer)
end
end)
AddButton(PlayersTab, "Copy Outfit", function()
if selectedPlayer then
local targetChar = GetCharacter(selectedPlayer)
local myChar = GetCharacter(LocalPlayer)
for _, part in ipairs(myChar:GetChildren()) do
if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" and part.Name ~= "Head" then
part:Destroy()
end
end
for _, part in ipairs(targetChar:GetChildren()) do
if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" and part.Name ~= "Head" then
local fake = part:Clone()
fake.Parent = myChar
fake.CanCollide = false
local weld = Instance.new("WeldConstraint")
weld.Part0 = myChar:FindFirstChild("HumanoidRootPart") or myChar:FindFirstChild("UpperTorso") or myChar:FindFirstChild("Torso")
weld.Part1 = fake
weld.Parent = fake
end
end
end
end)
-- Local Player Functions
AddSlider(LocalTab, "WalkSpeed", 16, 200, 16, function(value)
walkspeed = value
local humanoid = GetHumanoid(LocalPlayer)
if humanoid then
humanoid.WalkSpeed = value
end
end)
AddSlider(LocalTab, "Jump Power", 50, 500, 50, function(value)
jumppower = value
local humanoid = GetHumanoid(LocalPlayer)
if humanoid then
humanoid.JumpPower = value
end
end)
AddSlider(LocalTab, "Fly Speed", 1, 10, 2, function(value)
flySpeed = value
end)
AddToggle(LocalTab, "Fly", false, function(state)
flying = state
if state then
StartFly()
else
StopFly()
end
end)
AddToggle(LocalTab, "Noclip", false, function(state)
noclip = state
end)
AddToggle(LocalTab, "Invisibility", false, function(state)
local character = GetCharacter(LocalPlayer)
if character then
for _, part in ipairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.Transparency = state and 1 or 0
if part:FindFirstChildOfClass("Decal") then
part:FindFirstChildOfClass("Decal").Transparency = state and 1 or 0
end
end
end
end
end)
AddToggle(LocalTab, "God Mode", false, function(state)
godmode = state
local humanoid = GetHumanoid(LocalPlayer)
if humanoid then
if state then
humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
else
humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, true)
humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, true)
humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, true)
end
end
end)
-- Visuals
AddToggle(VisualsTab, "ESP", false, function(state)
espEnabled = state
if state then
for _, player in ipairs(Players:GetPlayers()) do
if player ~= LocalPlayer then
CreateESP(player)
end
end
connections.playerAdded = Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
if espEnabled then
CreateESP(player)
end
end)
end)
else
for player, folder in pairs(espFolders) do
folder:Destroy()
espFolders[player] = nil
end
if connections.playerAdded then
connections.playerAdded:Disconnect()
end
end
end)
-- Weapons
AddButton(WeaponsTab, "Give Gun", function()
local character = GetCharacter(LocalPlayer)
if not character then return end
local tool = Instance.new("Tool")
tool.Name = "ShadowX Gun"
tool.RequiresHandle = false
tool.Parent = LocalPlayer.Backpack
local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://131735724"
sound.Volume = 1
sound.Parent = tool
tool.Activated:Connect(function()
sound:Play()
local rayOrigin = workspace.CurrentCamera.CFrame.Position
local rayDirection = workspace.CurrentCamera.CFrame.LookVector * 1000
local ray = Ray.new(rayOrigin, rayDirection)
local hit, position = workspace:FindPartOnRayWithIgnoreList(ray, {character})
-- Bullet tracer
local bulletTracer = Instance.new("Part")
bulletTracer.Size = Vector3.new(0.1, 0.1, (position - rayOrigin).Magnitude)
bulletTracer.CFrame = CFrame.new(rayOrigin + (position - rayOrigin)/2, position)
bulletTracer.Anchored = true
bulletTracer.CanCollide = false
bulletTracer.Color = Color3.fromRGB(255, 255, 0)
bulletTracer.Material = Enum.Material.Neon
bulletTracer.Parent = workspace
game:GetService("Debris"):AddItem(bulletTracer, 0.1)
if hit then
-- Hit effect
local hitEffect = Instance.new("Part")
hitEffect.Size = Vector3.new(0.5, 0.5, 0.5)
hitEffect.CFrame = CFrame.new(position)
hitEffect.Anchored = true
hitEffect.CanCollide = false
hitEffect.Color = Color3.fromRGB(255, 100, 0)
hitEffect.Material = Enum.Material.Neon
hitEffect.Parent = workspace
game:GetService("Debris"):AddItem(hitEffect, 0.5)
-- Damage
local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid:TakeDamage(25)
end
end
end)
end)
-- Admin
AddButton(AdminTab, "Kill All", function()
for _, player in ipairs(Players:GetPlayers()) do
if player ~= LocalPlayer then
local humanoid = GetHumanoid(player)
if humanoid then
humanoid.Health = 0
end
end
end
end)
AddButton(AdminTab, "Freeze All", function()
for _, player in ipairs(Players:GetPlayers()) do
if player ~= LocalPlayer then
local humanoid = GetHumanoid(player)
if humanoid then
humanoid.PlatformStand = true
end
end
end
end)
AddButton(AdminTab, "Unfreeze All", function()
for _, player in ipairs(Players:GetPlayers()) do
if player ~= LocalPlayer then
local humanoid = GetHumanoid(player)
if humanoid then
humanoid.PlatformStand = false
end
end
end
end)
AddButton(AdminTab, "Server Hop", function()
if isExecutor then
local servers = {}
local req = game:HttpGet("https://games.roblox.com/v1/games/"..game.PlaceId.."/servers/Public?sortOrder=Asc&limit=100")
for _, server in ipairs(game:GetService("HttpService"):JSONDecode(req).data) do
if server.playing < server.maxPlayers and server.id ~= game.JobId then
table.insert(servers, server.id)
end
end
if #servers > 0 then
game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, servers[math.random(1, #servers)])
else
game:GetService("TeleportService"):Teleport(game.PlaceId)
end
else
local message = Instance.new("Message")
message.Text = "Server hop works only with executors"
message.Parent = workspace
wait(2)
message:Destroy()
end
end)
-- Credits
local creditsText = [[
ShadowX Premium Script v3.3
Credits:
- UI Design: ShadowX Team
- Fly System: Advanced inertia flight
- ESP System: Optimized rendering
- Core Scripting: ShadowX Dev Team
- Special Thanks: Infinite Yield for inspiration
Changelog:
- Fixed ESP for R15 bodies
- Improved GUI dragging
- Delta executor compatibility
- Better noclip implementation
- R6 character force
]]
local creditsLabel = Instance.new("TextLabel")
creditsLabel.Name = "CreditsLabel"
creditsLabel.Size = UDim2.new(1, -20, 1, -20)
creditsLabel.Position = UDim2.new(0, 10, 0, 10)
creditsLabel.BackgroundTransparency = 1
creditsLabel.Text = creditsText
creditsLabel.TextColor3 = textColor
creditsLabel.Font = Enum.Font.Gotham
creditsLabel.TextSize = 14
creditsLabel.TextXAlignment = Enum.TextXAlignment.Left
creditsLabel.TextYAlignment = Enum.TextYAlignment.Top
creditsLabel.TextWrapped = true
creditsLabel.Parent = CreditsTab
-- Noclip loop with improved performance
connections.noclipLoop = RunService.Stepped:Connect(function()
if noclip and LocalPlayer.Character then
for _, part in ipairs(LocalPlayer.Character:GetDescendants()) do
if part:IsA("BasePart") and part.CanCollide then
part.CanCollide = false
end
end
end
end)
-- Update on character spawn
LocalPlayer.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")
humanoid.RigType = Enum.HumanoidRigType.R6
humanoid.WalkSpeed = walkspeed
humanoid.JumpPower = jumppower
if flying then
StartFly()
end
if godmode then
humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
end
end)
-- Auto-update player list
Players.PlayerAdded:Connect(UpdatePlayerList)
Players.PlayerRemoving:Connect(UpdatePlayerList)
-- Initialization animation
MainFrame.Size = UDim2.new(0, 0, 0, 0)
TweenService:Create(MainFrame, TweenInfo.new(0.5), {Size = UDim2.new(0, 400, 0, 500)}):Play()
-- Cleanup
game:GetService("Players").PlayerRemoving:Connect(function(player)
if player == LocalPlayer then
StopFly()
for _, connection in pairs(connections) do
if connection then
connection:Disconnect()
end
end
end