-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.lua
6776 lines (5798 loc) · 173 KB
/
main.lua
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
--[[
hi so since roblox is now terming exploiters i decided to stop n release this
here are some freatures (i couldnt add everything i wanted mb since most execs are garbage)
[+] added | [/] changed | [-] removed
>> added+
features
[+] staff notifier (toggleable) - notifies whenever a moderator is in your game
[+] new system - slider
[+] custom uis
[+] internal ui (toggleable)
[+] more toggles - (internal ui, fling seated, autofill cap, developer mode, )
commands
[+] search - search scripts using scriptblox api
[+] loopdroptools - drops ur tools resets and repeat
[+] highlight - highlight classnames & instances with the name you input
[+] resetfilter / ref - resets the chat filter if roblox keeps tagging your messages
[+] split - split your message into two and uses reset filter to say it
>> changed/
[/] new ui (commandbar, windows, notifications, popups)
[/] recoded the library and half the commands (not all commands lmao)
[/] esp now uses drawing library instead of roblox's highlight, and has a box and text toggle
[/] aimbot options - first person, third person, mouse
[/] all features like waypoints and keybinds are in the settings window
[/] in the command bar recommendation it will show you the argument name now instead of having to look at the icons to see the type of the argument (much better to understand the arguments needed)
[/] servers now should work on solara since it uses a proxy roblox api instead of the actual one, as well you can select the player count of the server you want to join
[/] most of the command names (aliases) have been renamed so i recommend looking at the commands to see the new ones
[/] a new & faster fling method
[/] completely new plugin system, that provides built-in cmd functions & variables
[/] binds now dont need to be held instead just press the key to enable and disable
>> removed
[-] bang & unbang (haha)
]]
if (not game:IsLoaded()) then
game.Loaded:Wait();
end
local Cmd = (getgenv)
or function() return _G end
local Speed = tick()
local Admins = {}
local Settings = {
Prefix = (";");
ChatPrefix = ("!");
Seperator = (",");
Version = ("Beta 1.0");
CustomUI = (Cmd().CustomUI) or "rbxassetid://18617417654",
Waypoints = {},
Events = {
["AutoExecute"] = {},
["Chatted"] = {},
["CharacterAdded"] = {},
["Died"] = {},
["Damaged"] = {},
["PlayerRemoved"] = {},
},
Theme = {
Mode = "Dark",
Transparency = 0,
-- Frames:
Primary = Color3.fromRGB(15, 15, 15),
Secondary = Color3.fromRGB(20, 20, 20),
Actions = Color3.fromRGB(12, 16, 22),
Component = Color3.fromRGB(20, 20, 20),
Highlight = Color3.fromRGB(84, 132, 164),
ScrollBar = Color3.fromRGB(30, 30, 30),
-- Text:
Title = Color3.fromRGB(255, 255, 255),
Description = Color3.fromRGB(155, 155, 155),
-- Outlines:
Shadow = Color3.fromRGB(0, 0, 0),
Outline = Color3.fromRGB(25, 25, 25),
-- Image:
Icon = Color3.fromRGB(255, 255, 255)
},
Toggles = {
FillCap = true,
Developer = false,
Notify = true,
Popups = true,
Interfere = true,
Recommendation = true,
InternalUI = false,
StaffNotifier = true,
IgnoreSeated = true,
},
}
local Connect = (game.Loaded.Connect);
local CWait = (game.Loaded.Wait);
local Clone = (game.Clone);
local Destroy = (game.Destroy);
local Changed = (game.GetPropertyChangedSignal);
local GetService = (function(Property)
local Service = (game.GetService);
local Reference = (cloneref)
or function(reference) return reference end
return Reference( Service(game, Property) );
end)
local Services = ({
Players = GetService("Players"),
Lighting = GetService("Lighting"),
Core = GetService("CoreGui"),
Teams = GetService("CoreGui"),
Insert = GetService("InsertService"),
Http = GetService("HttpService"),
Run = GetService("RunService"),
Input = GetService("UserInputService"),
Tween = GetService("TweenService"),
Teleport = GetService("TeleportService"),
Chat = GetService("TextChatService"),
Replicated = GetService("ReplicatedStorage"),
Market = GetService("MarketplaceService"),
Starter = GetService("StarterGui"),
ContextActionService = GetService("ContextActionService"),
Sound = GetService("SoundService")
});
local Methods = ({
Get = function(URL)
local Method = (game.HttpGet)
return Method(game, URL);
end,
Parent = function(Child)
xpcall(function()
Child.Parent = (gethui and gethui()) or Services.Core
end, function()
Child.Parent = Services.Players.LocalPlayer["PlayerGui"];
end)
end,
});
local Check = (function(Type)
if Type == "File" then
return (isfile and isfolder and writefile and readfile)
elseif Type == "Hook" then
return (hookmetamethod or hookfunction);
end
end);
local LocalPlayer = Services.Players.LocalPlayer
local Character = LocalPlayer.Character
local Backpack = LocalPlayer.Backpack
local Humanoid = (Character and Character:FindFirstChildOfClass("Humanoid"))
local Root = (Character and Character:FindFirstChild("HumanoidRootPart"))
Connect(LocalPlayer.CharacterAdded, function(Char)
Character = (Char);
Humanoid = Character:WaitForChild("Humanoid");
Root = (Character:FindFirstChild("HumanoidRootPart"));
Backpack = (LocalPlayer.Backpack);
end)
local Lower, Split, Sub, GSub, Find, Match, Format, Blank =
string.lower, string.split, string.sub, string.gsub, string.find, string.match, string.format, "", ""
local Unpack, Insert, Discover, Concat, FullArgs =
table.unpack, table.insert, table.find, table.concat, {}
local Spawn, Delay, Wait =
task.spawn, task.delay, task.wait
local JSONEncode, JSONDecode, GenerateGUID =
Services.Http.JSONEncode, Services.Http.JSONDecode, Services.Http.GenerateGUID
local Mouse, PlayerGui =
LocalPlayer:GetMouse(), LocalPlayer.PlayerGui
local Camera = workspace.CurrentCamera
local RespectFilteringEnabled = Services.Sound.RespectFilteringEnabled
local LegacyChat = (Services.Chat.ChatVersion == Enum.ChatVersion.LegacyChatService)
local GetModule = function(Name)
return (Methods.Get(Format("https://raw.githubusercontent.com/lxte/modules/main/cmd/%s", Name)))
end
-- another check in case humanoid not found lmao
if (not Character) or (not Humanoid) or (not Root) then
Spawn(function()
Character = (Character or CWait(LocalPlayer.CharacterAdded))
Humanoid = Character:FindFirstChildOfClass("Humanoid");
Root = Character:FindFirstChild("HumanoidRootPart");
end)
end
-- :: INSERT[UI] ::
local UI = (Services.Run:IsStudio() and script.Parent) or Services.Insert:LoadLocalAsset(Settings.CustomUI);
local Assets = UI.Assets
local Notification = UI.Frame
local CommandBar = UI.Cmd.CommandBar
local Tab = UI.Tab
local Components = Assets.Components
local Features = Assets.Features
local Autofill = CommandBar.Autofill
local Search = CommandBar.Search
local BarShadow = CommandBar.Shadow
local Input = Search.TextBox
local Recommend = Search.Recommend
local Press = Search.Press
local Protected = {}
if Check("Hook") then
xpcall(function()
--// untested since no free exec has hooking lol hopefully doesnt break...
for Index, Descendant in next, UI:GetDescendants() do
Protected[Descendant] = ("RobloxGui");
end
Connect(UI.DescendantAdded, function(Descendant)
Protected[Descendant] = ("RobloxGui");
end)
local Original
local isCaller = checkcaller or function()
return true
end
Original = hookmetamethod(game, "__tostring", function(self)
if self and Protected[self] and not isCaller() then
return Protected[self]
end
return Original
end)
end, function(Result)
if Settings.Toggles.Developer then
warn(Format("Error occured setting gui protection (%s)", Result))
end
end)
end
Methods.Parent(UI);
UI.Name = (GenerateGUID(Services.Http));
Tab.Name = (GenerateGUID(Services.Http));
-- :: FUNCTIONS :: --
local UDimMultiply = function(UDim, Amount)
local Values = {
UDim.X.Scale * Amount;
UDim.X.Offset * Amount;
UDim.Y.Scale * Amount;
UDim.Y.Offset * Amount;
}
return UDim2.new(Unpack(Values))
end
local Minimum = function(Table, Minimum)
local New = {}
if Table then
for i,v in next, Table do
if i == Minimum or i > Minimum then
Insert(New, v);
end
end
end
return New
end
local Chat = function(Message)
if LegacyChat then
Services.Replicated.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(Message, "All");
else
Services.Chat.TextChannels.RBXGeneral:SendAsync(Message);
end
end
local Foreach = function(Table, Func, Loop)
for Index, Value in next, Table do
pcall(function()
if Loop and typeof(Value) == 'table' then
for Index2, Value2 in next, Value do
Func(Index2, Value2)
end
else
Func(Index, Value)
end
end)
end
end
local FindTable = function(Table, Input)
for Index, Value in next, Table do
if Value == Input then
return Value
end
end
end
local MultiSet = function(Object, Properties)
for Index, Property in next, Properties do
Object[Index] = (Property);
end
return Object
end
local Create = function(ClassName, Properties, Children)
local Object = Instance.new(ClassName)
for i, Property in next, Properties or {} do
Object[i] = Property
end
for i, Children in next, Children or {} do
Children.Parent = Object
end
return Object
end
local SetSRadius = setsimulationradius or function(Radius, MaxRadius)
Spawn(function()
LocalPlayer.SimulationRadius = Radius
LocalPlayer.MaxSimulationDistance = MaxRadius
end)
end
local AttachName = GenerateGUID(Services.Http);
local Attach = function(Part, Target)
if (Part and Part:IsA("BasePart") and not Part.Anchored) then
local ModelDescendant = Part:FindFirstAncestorOfClass("Model")
SetSRadius(9e9, 9e9)
if ModelDescendant then
if Services.Players:GetPlayerFromCharacter(ModelDescendant) then
return
end
end
local Attachment = Instance.new("Attachment");
local Position = Instance.new("AlignPosition");
local Orientation = Instance.new("AlignOrientation");
local Attachment2 = Instance.new("Attachment");
Attachment.Name = (AttachName);
Position.Name = (AttachName);
Orientation.Name = (AttachName);
Attachment2.Name = (AttachName);
Attachment.Parent = Part;
Position.Parent = Part;
Orientation.Parent = Part;
Attachment2.Parent = (Target or Root);
Position.Responsiveness = (200);
Orientation.Responsiveness = (200);
Position.MaxForce = (9e9);
Orientation.MaxTorque = (9e9);
Position.Attachment0 = Attachment
Position.Attachment1 = Attachment2
Orientation.Attachment1 = Attachment2
Orientation.Attachment0 = Attachment
return Attachment, Position, Orientation, Attachment2
end
end
local IsStaff = function(Player)
local StaffRoles = { "owner", "admin", "staff", "mod", "founder", "manager", "dev", "president", "leader" , "supervisor", "chairman", "supervising" };
local CurrentRole = Player:GetRoleInGroup(game.CreatorId);
for Index, Role in next, StaffRoles do
if Lower(CurrentRole):find(Role) then
return true, CurrentRole
end
end
end
local Tween = function(Object, Speed, Properties, Info)
local Info = Info or {}
local Style, Direction =
(Info["EasingStyle"]) or Enum.EasingStyle.Sine,
(Info["EasingDirection"]) or Enum.EasingDirection.Out
return Services.Tween:Create(Object, TweenInfo.new(Speed, Style, Direction), Properties):Play()
end
local SetRig = function(Type)
local Avatar = GetService("AvatarEditorService")
Avatar:PromptSaveAvatar(Humanoid.HumanoidDescription, Enum.HumanoidRigType[Type])
CWait(Avatar.PromptSaveAvatarCompleted)
Command.Parse(true, "respawn")
end
local GetClasses = function(Ancestor, Class, GetChildren)
local Results = {};
for Index, Descendant in next, (GetChildren and Ancestor:GetChildren()) or Ancestor:GetDescendants() do
if Descendant:IsA(Class) then
Insert(Results, Descendant)
end
end
return Results
end
local SetNumber = function(Input, Minimum, Max)
Minimum = tonumber(Minimum) or -math.huge
Max = tonumber(Max) or math.huge
if Input then
local Numbered = tonumber(Input);
if Numbered and ((Numbered == (Minimum or Max) or (Numbered < Max) or (Numbered > Minimum))) then
return Numbered;
elseif Lower(Input) == "inf" then
return Max;
else
return 0;
end
else
return 0;
end
end
local GetCharacter = function(Player)
return (Player and Player.Character)
end
local GetRoot = function(Player)
local Char = GetCharacter(Player)
return (Char and Char:FindFirstChild("HumanoidRootPart"))
end
local GetHumanoid = function(Player)
local Char = GetCharacter(Player)
return (Char and Char:FindFirstChildOfClass("Humanoid"))
end
PArguments = {
["all"] = function()
return (Services.Players:GetPlayers());
end,
["others"] = function()
local Targets = {}
Foreach(Services.Players:GetPlayers(), function(Index, Player)
if (Player ~= LocalPlayer) then
Insert(Targets, Player)
end
end)
return Targets
end,
["me"] = function()
return { LocalPlayer }
end,
["random"] = function()
local Amount = Services.Players:GetPlayers()
return { Amount[math.random(1, #Amount)] }
end,
["npc"] = function()
local Targets = {}
for Index, Model in next, GetClasses(workspace, "Model") do
if (Model:FindFirstChildOfClass("Humanoid") and
not Services.Players:GetPlayerFromCharacter(Model)) then
Insert(Targets, Model)
end
end
return Targets
end,
["seated"] = function()
local Targets = {}
for Index, Player in next, GetClasses(Services.Players, "Player") do
local PHumanoid = GetHumanoid(Player)
if (PHumanoid and PHumanoid.Sit) then
Insert(Targets, Player)
end
end
return Targets
end,
["stood"] = function()
local Targets = {}
for Index, Player in next, GetClasses(Services.Players, "Player") do
local PHumanoid = GetHumanoid(Player)
if (PHumanoid and not PHumanoid.Sit) then
Insert(Targets, Player)
end
end
return Targets
end,
["closest"] = function()
local Targets = {}
local ClosestDistance = 9e9
local ClosestPlayer
for Index, Player in next, GetClasses(Services.Players, "Player") do
local Distance = Player:DistanceFromCharacter(Root.Position)
if (Player ~= LocalPlayer) and (Distance < ClosestDistance) then
ClosestDistance = Distance
ClosestPlayer = Player
end
end
return { ClosestPlayer }
end,
["farthest"] = function()
local Targets = {}
local FurthestDistance, FurthestPlayer = 0, nil
for Index, Player in next, GetClasses(Services.Players, "Player") do
local Distance = Player:DistanceFromCharacter(Root.Position)
if (Player ~= LocalPlayer) and (Distance > FurthestDistance) then
FurthestDistance = (Distance)
FurthestPlayer = (Player)
end
end
return { FurthestPlayer }
end,
["enemies"] = function()
local Targets = {}
for Index, Player in next, GetClasses(Services.Players, "Player") do
if (Player.Team ~= LocalPlayer.Team) then
Insert(Targets, Player)
end
end
return Targets
end,
["dead"] = function()
local Targets = {}
for Index, Player in next, GetClasses(Services.Players, "Player") do
local PHumanoid = GetHumanoid(Player);
if (PHumanoid and PHumanoid.Health == 0) then
Insert(Targets, Player)
end
end
return Targets
end,
["alive"] = function()
local Targets = {}
for Index, Player in next, GetClasses(Services.Players, "Player") do
local PHumanoid = GetHumanoid(Player);
if (PHumanoid and PHumanoid.Health > 0) then
Insert(Targets, Player)
end
end
return Targets
end,
["friends"] = function()
local Targets = {}
for Index, Player in next, GetClasses(Services.Players, "Player") do
if (Player:IsFriendsWith(LocalPlayer.UserId)) and (LocalPlayer ~= Player) then
Insert(Targets, Player)
end
end
return Targets
end,
["nonfriends"] = function()
local Targets = {}
for Index, Player in next, GetClasses(Services.Players, "Player") do
if (not Player:IsFriendsWith(LocalPlayer.UserId)) and (LocalPlayer ~= Player) then
Insert(Targets, Player)
end
end
return Targets
end,
}
local GetPlayer = function(Target)
local Target = Lower(Target);
local PlayerType = PArguments[Target];
if PlayerType then
return PlayerType();
else
local Specific = {}
Foreach(Services.Players:GetPlayers(), function(Index, Player)
local Name, Display = Lower(Player.Name), Lower(Player.DisplayName)
if Sub(Name, 1, #Target) == Target then
Insert(Specific, Player)
elseif Sub(Display, 1, #Target) == Target then
Insert(Specific, Player)
end
end)
return Specific
end
end
local Fling = function(Targets)
local S, Result = pcall(function()
local Flung = (0)
local Position = Root.CFrame
local Velocity = Root.Velocity
local DestroyHeight = workspace.FallenPartsDestroyHeight
for Index, Target in next, (Targets) do
local TCharacter = GetCharacter(Target);
local THumanoid = GetHumanoid(Target);
local TRoot = GetRoot(Target);
if (THumanoid) and (TRoot) and (Root) and (THumanoid.Health > 0) and (Target ~= LocalPlayer) then
if not (Settings.Toggles.IngoreSeated and THumanoid.Sit) then
local Timer = tick()
local AlreadyFlung = (TRoot and TRoot.Velocity.Magnitude > 200)
Camera.CameraSubject = (THumanoid);
workspace.FallenPartsDestroyHeight = (-math.huge);
repeat Wait();
local Offset = TRoot.Velocity * Random.new():NextNumber(-0.2, 2.5)
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, false)
Root.Velocity = Vector3.new(0, 1e6, 0)
Root.CFrame = CFrame.new(TRoot.Position + Offset)
until (not TCharacter) or (not Root) or (Settings.Toggles.IgnoreSeated and THumanoid.Sit) or (TRoot.Velocity.Magnitude > 200) or (THumanoid.Health <= 0) or (tick() - Timer >= 2)
if (not AlreadyFlung) and (TRoot and TRoot.Velocity.Magnitude > 200) then
Flung += 1
end
end
end
end
repeat
local Old = Position * CFrame.new(0, 1, 0);
Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
Camera.CameraSubject = (Humanoid)
Root.CFrame = (Old)
Character:SetPrimaryPartCFrame(Old)
for Index, BodyPart in next, GetClasses(Character, "BasePart", true) do
BodyPart.Velocity = Vector3.new(0, 0, 0)
BodyPart.RotVelocity = Vector3.new(0, 0, 0)
end
CWait(Services.Run.Heartbeat);
until not Root or (Root.Position - Position.p).Magnitude < 20
workspace.FallenPartsDestroyHeight = DestroyHeight
return Flung
end)
return Result
end
local SetFly
local ThumbstickMoved
Spawn(function()
local BodyGyro = Instance.new("BodyGyro")
BodyGyro.maxTorque = Vector3.new(1, 1, 1) * 10 ^ 6
BodyGyro.P = 10 ^ 6
local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.maxForce = Vector3.new(1, 1, 1) * 10 ^ 6
BodyVelocity.P = 10 ^ 4
local Flying = false
local Movement = { forward = 0, backward = 0, right = 0, left = 0 }
local function SetFlying(Bool)
Flying = Bool
BodyGyro.Parent = (Flying and Root) or nil
BodyVelocity.Parent = (Flying and Root) or nil
BodyVelocity.Velocity = Vector3.new()
if (Flying) then
BodyGyro.CFrame = Root.CFrame
end
end
local FlySpeed = 3
local function ModifyMovement(newMovement)
Movement = newMovement or Movement
if (Flying) then
local isMoving = Movement.right + Movement.left + Movement.forward + Movement.backward > 0
end
end
local function MovementBind(actionName, InputState, inputObject)
if (InputState == Enum.UserInputState.Begin) then
Movement[actionName] = 1
ModifyMovement()
elseif (InputState == Enum.UserInputState.End) then
Movement[actionName] = 0
ModifyMovement()
end
return Enum.ContextActionResult.Pass
end
Services.ContextActionService:BindAction("forward", MovementBind, false, Enum.PlayerActions.CharacterForward)
Services.ContextActionService:BindAction("backward", MovementBind, false, Enum.PlayerActions.CharacterBackward)
Services.ContextActionService:BindAction("left", MovementBind, false, Enum.PlayerActions.CharacterLeft)
Services.ContextActionService:BindAction("right", MovementBind, false, Enum.PlayerActions.CharacterRight)
local TouchFrame
if PlayerGui:FindFirstChild("TouchGui") then
TouchFrame = PlayerGui.TouchGui:FindFirstChild("TouchControlFrame")
end
local DeadZone = 0.15
local DeadZoneNormalized = 1 - DeadZone
local isTouchOnThumbstick = function(Position)
if not TouchFrame then
return false
end
local ClassicFrame = TouchFrame:FindFirstChild("ThumbstickFrame")
local DynamicFrame = TouchFrame:FindFirstChild("DynamicThumbstickFrame")
local StickFrame = (ClassicFrame and ClassicFrame.Visible) and ClassicFrame or DynamicFrame
if (StickFrame) then
local StickPosition = StickFrame.AbsolutePosition
local StickSize = StickFrame.AbsoluteSize
return Position.X >= StickPosition.X and Position.X <= (StickPosition.X + StickSize.X) and
Position.Y >= StickPosition.Y and
Position.Y <= (StickPosition.Y + StickSize.Y)
end
return false
end
Connect(Services.Input.TouchStarted, function(touch, gameProcessedEvent)
ThumbstickMoved = isTouchOnThumbstick(touch.Position)
end)
Connect(Services.Input.TouchEnded, function(touch, gameProcessedEvent)
if ThumbstickMoved then
ThumbstickMoved = (false);
ModifyMovement({forward = 0, backward = 0, right = 0, left = 0})
end
end)
Connect(Services.Input.TouchMoved, function(touch, gameProcessedEvent)
if ThumbstickMoved then
local MouseVector = (Humanoid.MoveDirection)
local LeftRight = (MouseVector.X)
local ForeBack = (MouseVector.Z)
Movement.left = LeftRight < -DeadZone and -(LeftRight - DeadZone) / DeadZoneNormalized or 0
Movement.right = LeftRight > DeadZone and (LeftRight - DeadZone) / DeadZoneNormalized or 0
Movement.forward = ForeBack < -DeadZone and -(ForeBack - DeadZone) / DeadZoneNormalized or 0
Movement.backward = ForeBack > DeadZone and (ForeBack - DeadZone) / DeadZoneNormalized or 0
ModifyMovement()
end
end)
local Updated = function(dt)
if (Flying) then
local Position = (workspace.CurrentCamera.CFrame);
local Direction =
Position.rightVector * (Movement.right - Movement.left) +
Position.lookVector * (Movement.forward - Movement.backward)
if (Direction:Dot(Direction) > 0) then
Direction = (Direction.unit);
end
BodyGyro.CFrame = Position
BodyVelocity.Velocity = Direction * Humanoid.WalkSpeed * FlySpeed
end
end
SetFly = function(Boolean, SpeedValue)
FlySpeed = SpeedValue or 1
SetFlying(Boolean)
Connect(Services.Run.RenderStepped, Updated)
end
end)
Tab.Visible = false
CommandBar.Actions.Description.Text = Settings.Version
CommandBar.Visible = false
CommandBar.GroupTransparency = 1
-- :: LIBRARY[UI] :: --
local Type
local API = {};
local Library = { Tabs = {} };
local Fill = {};
local Globals = {};
local Feature = {}
local Add = function(Global, Value)
Globals[Global] = Value
end
local Get = function(Global)
return Globals[Global]
end
local Refresh = function(Global, NewValue)
Add(Global, false);
Wait(.2);
Add(Global, NewValue);
end
local Animate = {
Set = function(Component, Title, Description)
local Labels = (Component.Frame);
local TLabel, DLabel = (Labels.Title), (Labels.Description);
if Title then
TLabel.Text = Title
else
Destroy(TLabel);
end
if Description then
DLabel.Text = Description
else
Destroy(DLabel);
end
end,
Open = function(Window, Transparency, Size, CheckVisible, Center, Amount)
if (CheckVisible and not Window.Visible) or not CheckVisible then
local Size = (Size or Window.Size);
local NewSize = UDimMultiply(Size, Amount or 1.1);
local Outline = Window:FindFirstChildOfClass("UIStroke");
MultiSet(Outline, { Transparency = 1 })
MultiSet(Window, {
Size = NewSize,
GroupTransparency = 1,
Visible = true,
Position = (Center and UDim2.fromScale(0.5, 0.5)) or Window.Position
})
Tween(Outline, .25, { Transparency = 0.8 })
Tween(Window, .25, {
Size = Size,
GroupTransparency = Transparency or 0,
})
end
end,
Close = function(Window, Amount, Invisible)
Spawn(function()
local Size = (Window.Size);
local NewSize = UDimMultiply(Size, Amount or 1.1);
local Outline = Window:FindFirstChildOfClass("UIStroke");
Tween(Outline, .25, { Transparency = 1 })
Tween(Window, .25, {
Size = NewSize,
GroupTransparency = 1,
})
if Invisible then
Wait(.25);
Window.Visible = false
end
end)
end,
Drag = function(Window)
if Window then
local Dragging;
local DragInput;
local Start;
local StartPosition;
local function Update(input)
local delta = input.Position - Start
local Screen = UI.AbsoluteSize
local Absolute = Window.AbsoluteSize
Window.Position = UDim2.new(
StartPosition.X.Scale,
math.clamp(StartPosition.X.Offset + delta.X, -(Screen.X / 2) + (Absolute.X / 2), (Screen.X / 2) - (Absolute.X / 2)),
StartPosition.Y.Scale,
math.clamp(StartPosition.Y.Offset + delta.Y, -(Screen.Y / 2) + (Absolute.Y / 2), (Screen.Y / 2) - (Absolute.Y / 2))
)
end
Connect(Window.InputBegan, function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch and not Type then
Dragging = true
Start = Input.Position
StartPosition = Window.Position
Connect(Input.Changed, function()
if Input.UserInputState == Enum.UserInputState.End then
Dragging = false
end
end)
end
end)
Connect(Window.InputChanged, function(Input)
if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch and not Type then
DragInput = Input
end
end)
Connect(Services.Input.InputChanged, function(Input)
if Input == DragInput and Dragging and not Type then
Update(Input)
end
end)
end
end,
};
local Color = function(Color, Factor, Mode)
Mode = Mode or Settings.Theme.Mode
if Mode == "Light" then
return Color3.fromRGB((Color.R * 255) - Factor, (Color.G * 255) - Factor, (Color.B * 255) - Factor)
else
return Color3.fromRGB((Color.R * 255) + Factor, (Color.G * 255) + Factor, (Color.B * 255) + Factor)
end
end
function Library:CreateWindow(Config: { Title: string })
local Window = Clone(Tab);
local Animations = {};
local Component = {};
local Actions = Window.Actions
local Tabs = Window.Tabs
local Topbar = Window.Topbar
local TabName = Topbar.Title
local WindowName = Topbar.Description
local SearchBox = Topbar.SearchBox
local Previous = "Home"
local Current = "Home"
local Maximized = (false);
local Minimzied = (false);
local Minimum, Maximum = Vector2.new(204, 220), Vector2.new(9e9, 9e9)
local List = {
BottomLeft = { X = Vector2.new(-1, 0), Y = Vector2.new(0, 1)};
BottomRight = { X = Vector2.new(1, 0), Y = Vector2.new(0, 1)};
}
Spawn(function()
local MousePos, Size, UIPos = nil, nil, nil
if Window and Window:FindFirstChild("Background") then
local Positions = Window:FindFirstChild("Background")
for Index, Types in next, Positions:GetChildren() do
Connect(Types.InputBegan, function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
Type = Types
MousePos = Vector2.new(Mouse.X, Mouse.Y)
Size = Window.AbsoluteSize
UIPos = Window.Position
end
end)
Connect(Types.InputEnded, function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
Type = nil
end
end)
end
end
local Resize = function(Delta)
if Type and MousePos and Size and UIPos and Window:FindFirstChild("Background")[Type.Name] == Type then
local Mode = List[Type.Name]
local NewSize = Vector2.new(Size.X + Delta.X * Mode.X.X, Size.Y + Delta.Y * Mode.Y.Y)
NewSize = Vector2.new(math.clamp(NewSize.X, Minimum.X, Maximum.X), math.clamp(NewSize.Y, Minimum.Y, Maximum.Y))