-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrollinggui.lua
2162 lines (2078 loc) · 61.4 KB
/
trollinggui.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
local LibraryName = "Notification Library"
local NotificationLibrary = {}
local TweenService = game:GetService("TweenService")
local CoreGui = game.CoreGui
function NotificationLibrary:RemoveLib()
local Lib = CoreGui:FindFirstChild(LibraryName)
if Lib then
Lib:Destroy()
end
end
function NotificationLibrary:SendNotification(Theme, Message, Duration)
task.spawn(function()
local Library = CoreGui:FindFirstChild(LibraryName)
if not Library then
Library = Instance.new("ScreenGui", CoreGui)
Library.Name = LibraryName
local list = Instance.new("Frame")
local UIListLayout = Instance.new("UIListLayout")
list.Name = "List"
list.Parent = Library
list.AnchorPoint = Vector2.new(0.5, 0.5)
list.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
list.BackgroundTransparency = 1.000
list.BorderSizePixel = 0
list.Position = UDim2.new(0.910761058, 0, 0.45, 0)
list.Size = UDim2.new(0.177655682, 0, 0.869267046, 0)
UIListLayout.Parent = list
UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Right
UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
UIListLayout.Padding = UDim.new(0, 5)
end
local Frame = Instance.new("Frame")
local Header = Instance.new("TextLabel")
local UITextSizeConstraint = Instance.new("UITextSizeConstraint")
local UIGradient = Instance.new("UIGradient")
local Filler = Instance.new("Frame")
local decal = Instance.new("Frame")
local background_shadow = Instance.new("ImageLabel")
local UIAspectRatioConstraint = Instance.new("UIAspectRatioConstraint")
local icon = Instance.new("ImageLabel")
local UIAspectRatioConstraint_2 = Instance.new("UIAspectRatioConstraint")
local bar = Instance.new("Frame")
--Properties:
Frame.Name = "Notification"
Frame.Parent = Library.List
Frame.AnchorPoint = Vector2.new(0.5, 0.5)
Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Frame.BorderSizePixel = 0
Frame.Position = UDim2.new(0.5, 0, 0.109999999, 0)
Frame.Size = UDim2.new(1, 0, 0.0860000029, 0)
Header.Name = "Header"
Header.Parent = Frame
Header.AnchorPoint = Vector2.new(0.5, 0.5)
Header.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Header.BackgroundTransparency = 1.000
Header.BorderSizePixel = 0
Header.Position = UDim2.new(0.592000008, 0, 0.493999988, 0)
Header.Size = UDim2.new(0.788999975, 0, 0.648000002, 0)
Header.ZIndex = 2
Header.Font = Enum.Font.GothamBold
Header.TextScaled = true
Header.TextSize = 14.000
Header.TextWrapped = true
Header.TextXAlignment = Enum.TextXAlignment.Left
Header.TextYAlignment = Enum.TextYAlignment.Top
UITextSizeConstraint.Parent = Header
UITextSizeConstraint.MaxTextSize = 14
UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(31, 31, 31)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(39, 39, 39))}
UIGradient.Rotation = 25
UIGradient.Parent = Frame
Filler.Name = "Filler"
Filler.Parent = Frame
Filler.AnchorPoint = Vector2.new(1, 0.5)
Filler.BorderSizePixel = 0
Filler.Position = UDim2.new(1, 0, 0.5, 0)
Filler.Size = UDim2.new(0.0114559932, 0, 0.99999994, 0)
Filler.ZIndex = 3
decal.Name = "decal"
decal.Parent = Frame
decal.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
decal.BackgroundTransparency = 1.000
decal.BorderSizePixel = 0
decal.Size = UDim2.new(1, 0, 1, 0)
decal.ZIndex = 0
background_shadow.Name = "background_shadow"
background_shadow.Parent = decal
background_shadow.AnchorPoint = Vector2.new(0.5, 0.5)
background_shadow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
background_shadow.BackgroundTransparency = 1.000
background_shadow.BorderSizePixel = 0
background_shadow.Position = UDim2.new(0.5, 0, 0.5, 0)
background_shadow.Size = UDim2.new(1.12800705, 0, 1.86363637, 0)
background_shadow.ZIndex = 0
background_shadow.Image = "rbxassetid://3523728077"
background_shadow.ImageColor3 = Color3.fromRGB(24, 24, 24)
background_shadow.ImageTransparency = 0.700
UIAspectRatioConstraint.Parent = background_shadow
UIAspectRatioConstraint.AspectRatio = 2.669
icon.Name = "Icon"
icon.Parent = decal
icon.AnchorPoint = Vector2.new(0.5, 0.5)
icon.BackgroundTransparency = 1.000
icon.BorderSizePixel = 0
icon.Position = UDim2.new(0.09, 0, 0.5, 0)
icon.Size = UDim2.new(1, 0, 0.5, 0)
icon.ScaleType = Enum.ScaleType.Fit
UIAspectRatioConstraint_2.Parent = icon
UIAspectRatioConstraint_2.AspectRatio = 1.008
bar.Name = "Bar"
bar.Parent = Frame
bar.AnchorPoint = Vector2.new(1, 0.5)
bar.BorderSizePixel = 0
bar.Position = UDim2.new(1, 0, 1, 0)
bar.Size = UDim2.new(0.00999999978, 0, 0.0500000007, 0)
bar.ZIndex = 3
local MainColor
local Image
if Theme == "Success" then
MainColor = Color3.fromRGB(35, 240, 110)
Image = "rbxassetid://6023426926"
elseif Theme == "Info" then
MainColor = Color3.fromRGB(255, 255, 255)
Image = "rbxassetid://7072717857"
elseif Theme == "Warning" then
MainColor = Color3.fromRGB(240, 175, 45)
Image = "rbxassetid://7072980286"
elseif Theme == "Error" then
MainColor = Color3.fromRGB(255, 70, 73)
Image = "rbxassetid://7072725342"
end
local succs, err = pcall(function()
Header.Text = Message
Header.TextColor3 = MainColor
icon.Image = Image
icon.ImageColor3 = MainColor
bar.BackgroundColor3 = MainColor
Filler.BackgroundColor3 = MainColor
Frame.Size = UDim2.new(0, 0,0.087, 0)
Filler.Size = UDim2.new(1, 0,1, 0)
local T1 = TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local T2 = TweenInfo.new(Duration, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local T3 = TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
TweenService:Create(Frame, T1, {Size = UDim2.new(1, 0,0.087, 0)}):Play()
task.wait(0.2)
TweenService:Create(Filler, T3, {Size = UDim2.new(0.011, 0,1, 0)}):Play()
TweenService:Create(bar, T2, {Size = UDim2.new(1, 0,0.05, 0)}):Play()
task.wait(Duration)
TweenService:Create(Filler, T1, {Size = UDim2.new(1, 0,1, 0)}):Play()
task.wait(0.25)
TweenService:Create(Frame, T3, {Size = UDim2.new(0, 0,0.087, 0)}):Play()
task.wait(0.25)
Frame:Destroy()
end)
if not succs then
warn(err)
Frame:Destroy()
end
end)
end
local twait, tspawn, tdelay = task.wait, task.spawn, task.delay
local g = game
while not g:IsLoaded() do twait() end
local plrs = g:GetService("Players")
local lp = plrs.LocalPlayer
local mouse = lp:GetMouse()
local ws = g:GetService("Workspace")
local cg = g:GetService("CoreGui")
local pg = lp:FindFirstChildOfClass("PlayerGui")
local rs = g:GetService("RunService")
local uis = g:GetService("UserInputService")
local stepped = rs.Stepped
local renderstepped = rs.RenderStepped
local heartbeat = rs.Heartbeat
local currentplayer = lp
local fenv = getfenv()
local shp = fenv.sethiddenproperty or fenv.set_hidden_property or fenv.sethiddenprop or fenv.set_hidden_prop
local v3 = Vector3.new
local v3_0 = v3(0, 0, 0)
local v3_101 = v3(1, 0, 1)
local cf = CFrame.new
local flycf = false
local schar, mrandom, mclamp = string.char, math.random, math.clamp
local tfind, tinsert, tremove = table.find, table.insert, table.remove
local tick = os.clock
local instancenew = Instance.new
local function gp(parent, name, className)
if typeof(parent) == "Instance" then
for _, v in pairs(parent:GetChildren()) do
if (v.Name == name) and v:IsA(className) then
return v
end
end
end
return nil
end
local function randomstring(len)
len = len or mrandom(8, 15)
local ret = ""
for i=1, len do
if mrandom(1, 2) == 1 then
ret = ret .. schar(mrandom(97, 122)):lower()
else
ret = ret .. schar(mrandom(97, 122)):upper()
end
end
return ret
end
local function instancefromtable(t)
local instance, parent = instancenew(t.ClassName), t.Parent
t.Parent, t.Name, t.ClassName = nil, t.Name or randomstring(), nil
for i, v in pairs(t) do
instance[i] = v
end
if not parent then
return instance
end
instance.Parent = parent
return instance
end
local guiname = tostring(g.PlaceId) .. "_info"
local function deleteguifrom(a)
gp(a, guiname, "ScreenGui"):Destroy()
end
pcall(deleteguifrom, cg)
pcall(deleteguifrom, pg)
local gui = instancefromtable({
ClassName = "ScreenGui",
Name = guiname,
ResetOnSpawn = false,
ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
IgnoreGuiInset = true
})
gui:GetPropertyChangedSignal("Parent"):Connect(function()
if not (gui and gui.Parent) then
gui = nil
end
end)
local function roundcorners(a)
instancenew("UICorner", a)
end
local mainFrame = instancefromtable({
ClassName = "Frame",
Parent = gui,
BackgroundColor3 = Color3.fromRGB(21, 21, 21),
BorderSizePixel = 0,
Position = UDim2.new(0, 0, 1, -200),
Size = UDim2.new(1, 0, 0, 200)
})
local mf = instancefromtable({
ClassName = "Frame",
Parent = mainFrame,
BackgroundColor3 = mainFrame.BackgroundColor3,
BorderSizePixel = 0,
Position = UDim2.new(0, 0, 1, 0),
Size = UDim2.new(1, 0, 1, 0)
})
local scriptName = instancefromtable({
ClassName = "TextLabel",
Parent = mainFrame,
BackgroundTransparency = 1,
Size = UDim2.new(1, 0, 0, 20),
Font = Enum.Font.SourceSans,
Text = "info script made by MyWorld",
TextColor3 = Color3.fromRGB(181, 181, 181),
TextSize = 20,
TextWrapped = true
})
local line = instancefromtable({
ClassName = "Frame",
Parent = scriptName,
BackgroundColor3 = Color3.fromRGB(255, 255, 255),
BackgroundTransparency = 0.7,
BorderSizePixel = 0,
Position = UDim2.new(0, 5, 1, 0),
Size = UDim2.new(1, -10, 0, 1)
})
local showhide = instancefromtable({
ClassName = "TextButton",
Parent = mainFrame,
BackgroundColor3 = Color3.fromRGB(21, 21, 21),
BorderSizePixel = 0,
Position = UDim2.new(0.5, -25, 0, -30),
Size = UDim2.new(0, 50, 0, 30),
Font = Enum.Font.SourceSans,
Text = "\\/",
TextColor3 = Color3.fromRGB(235, 235, 235),
TextSize = 20
})
local scrollingFrame = instancefromtable({
ClassName = "ScrollingFrame",
Parent = mainFrame,
Active = true,
BackgroundTransparency = 1,
BorderSizePixel = 0,
ClipsDescendants = false,
Position = UDim2.new(0, 5, 0, 30),
Size = UDim2.new(1, -10, 1, -35),
CanvasSize = UDim2.new(0, 0, 0, 0),
ScrollBarThickness = 10,
AutomaticCanvasSize = Enum.AutomaticSize.X
})
local UIListLayout = instancefromtable({
ClassName = "UIListLayout",
Parent = scrollingFrame,
FillDirection = Enum.FillDirection.Horizontal,
SortOrder = Enum.SortOrder.LayoutOrder,
Padding = UDim.new(0, 10)
})
local sn = scriptName.Text
local function notify(msg)
local msg1 = sn .. " - " .. msg
scriptName.Text = msg1
tdelay(3, function()
if scriptName.Text == msg1 then
scriptName.Text = sn
end
end)
end
local ancprt = nil
local function weldtp(part, cfr)
if not (part and part:IsDescendantOf(ws) and part:IsA("BasePart") and (not part:IsGrounded())) then
return stepped:Wait()
end
if not (ancprt and ancprt:IsDescendantOf(ws) and ancprt:IsGrounded()) then
for i, v in pairs(ws:GetDescendants()) do
if v:IsA("BasePart") and v:IsGrounded() then
ancprt = v
break
end
end
end
if not ancprt then
return stepped:Wait()
end
local weld = instancefromtable({
ClassName = "Weld",
Part0 = part,
C0 = cfr:Inverse(),
Part1 = ancprt,
C1 = ancprt.CFrame:Inverse(),
Parent = ancprt
})
stepped:Wait()
pcall(function()
weld:Destroy()
end)
end
local function respawnRequest()
local ccfr = ws.CurrentCamera.CFrame
local c = lp.Character
if c then
lp.Character = nil
lp.Character = c
else
c = instancenew("Model")
lp.Character = c
if lp.Character == c then
lp.Character = nil
end
end
local con0, con1 = nil, nil
con0 = ws.CurrentCamera:GetPropertyChangedSignal("CFrame"):Connect(function()
con0:Disconnect()
con1:Disconnect()
ws.CurrentCamera.CFrame = ccfr
end)
con1 = renderstepped:Connect(function()
con0:Disconnect()
con1:Disconnect()
end)
end
local function removehats(c)
c = c or lp.Character
if not c then return end
for i, v in pairs(c:GetChildren()) do
if v:IsA("Accessory") then
local handle = gp(v, "Handle", "BasePart")
if handle then
handle:Destroy()
end
v:Destroy()
end
end
end
local function makeFrame(parent, text, color)
local frame = instancefromtable({
ClassName = "Frame",
Parent = parent,
BackgroundColor3 = color,
Size = UDim2.new(0, 300, 0, 145),
BorderSizePixel = 0
})
roundcorners(frame)
local framelabel = instancefromtable({
ClassName = "TextLabel",
Parent = frame,
BackgroundTransparency = 1,
Size = UDim2.new(1, 0, 0, 20),
Font = Enum.Font.SourceSans,
Text = text,
TextColor3 = Color3.fromRGB(197, 197, 197),
TextSize = 14
})
local line = instancefromtable({
ClassName = "Frame",
Parent = framelabel,
BackgroundColor3 = Color3.fromRGB(255, 255, 255),
BackgroundTransparency = 0.7,
BorderSizePixel = 0,
Position = UDim2.new(0, 5, 1, 0),
Size = UDim2.new(1, -10, 0, 1)
})
local ScrollingFrame = instancefromtable({
ClassName = "ScrollingFrame",
Parent = frame,
Active = true,
BackgroundTransparency = 1,
BorderSizePixel = 0,
Position = UDim2.new(0, 5, 0, 25),
Size = UDim2.new(1, -5, 1, -30),
CanvasSize = UDim2.new(0, 0, 0, 0),
ScrollBarThickness = 7,
AutomaticCanvasSize = Enum.AutomaticSize.Y
})
local UIListLayout = instancefromtable({
ClassName = "UIListLayout",
Parent = ScrollingFrame,
SortOrder = Enum.SortOrder.LayoutOrder,
Padding = UDim.new(0, 5)
})
return frame
end
local con, hidden, Y, hidespeed = nil, false, -200, 769.69
con = renderstepped:Connect(function(deltaTime)
if not gui then return con:Disconnect() end
if hidden then
Y = mclamp(Y+deltaTime*hidespeed, -200, -5)
else
Y = mclamp(Y-deltaTime*hidespeed, -200, -5)
end
mainFrame.Position = UDim2.new(0, 0, 1, Y)
end)
showhide.MouseButton1Click:Connect(function()
hidden = not hidden
if hidden then
showhide.Text = "/\\"
else
showhide.Text = "\\/"
end
end)
local cbring = {}
local controllable = {}
local lastc = nil
local con = nil
con = lp.CharacterAdded:Connect(function(c)
if not gui then
con:Disconnect()
return
end
if c and c.Parent then
if lastc == c then
return
end
lastc = c
controllable = {}
for i, v in pairs(plrs:GetPlayers()) do
local c = v.Character
if c then
tinsert(controllable, c)
end
end
end
end)
local viewedPlayer = nil
local viewbutton = {Text = ""}
local playersframe = makeFrame(scrollingFrame, "Players", Color3.fromRGB(12, 59, 100))
local playercframe = makeFrame(playersframe, "playerscontrol", Color3.fromRGB(12, 59, 100))
playercframe.BorderSizePixel = 1.000
playercframe.BorderColor3 = Color3.fromRGB(27, 42, 53)
playercframe.Position = UDim2.new(0, 10, -1, -40)
playercframe.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
playercframe.Visible = true
local playerframef = makeFrame(playercframe, "friends", Color3.fromRGB(0, 150, 0))
playerframef.Position = UDim2.new(1, 10, 0, 5)
local function addbtn(parent, plr)
local playerbutton = instancefromtable({
ClassName = "TextButton",
Name = plr.Name,
Parent = parent,
BorderSizePixel = 0,
Size = UDim2.new(1, -10, 0, 20),
Font = Enum.Font.SourceSans,
Text = plr.Name,
TextColor3 = Color3.fromRGB(0, 0, 0),
TextSize = 15
})
if plr.DisplayName ~= plr.Name then
playerbutton.Text = playerbutton.Text .. " (" .. plr.DisplayName .. ")"
end
if plr == lp then
playerbutton.BackgroundColor3 = Color3.fromRGB(100, 200, 200)
else
playerbutton.BackgroundColor3 = Color3.fromRGB(136, 136, 136)
end
roundcorners(playerbutton)
playerbutton.MouseButton1Click:Connect(function()
NotificationLibrary:SendNotification("Success", "viewing player", 5)
playercframe:FindFirstChildOfClass("TextLabel").Text = "player: " .. playerbutton.Text
currentplayer = plr
playercframe.Visible = true
playerframef.Visible = false
viewbutton.Text = ((viewedPlayer == plr) and "unview") or "view"
end)
end
local function unview()
viewedPlayer = nil
viewbutton.Text = "view"
local c = lp.Character
if c and c.Parent then
local subject = c:FindFirstChildOfClass("Humanoid") or c:FindFirstChildWhichIsA("BasePart")
if subject then
ws.CurrentCamera.CameraType = Enum.CameraType.Custom
ws.CurrentCamera.CameraSubject = subject
else
notify("no part to view")
end
else
notify("character not found")
end
end
local playersScroll = playersframe:FindFirstChildOfClass("ScrollingFrame")
for i, v in pairs(plrs:GetPlayers()) do
addbtn(playersScroll, v)
end
local reset = function() end
local con = nil
con = plrs.PlayerAdded:Connect(function(plr)
if gui then
addbtn(playersScroll, plr)
if playerframef.Visible then
tspawn(function()
if plr and plr.Parent and currentplayer:IsFriendsWith(plr.UserId) then
addbtn(playerframef:FindFirstChildOfClass("ScrollingFrame"), plr)
end
end)
end
else
con:Disconnect()
end
end)
local con = nil
con = plrs.PlayerRemoving:Connect(function(plr)
if gui then
local playerbutton = gp(playersScroll, plr.Name, "TextButton")
if playerbutton then
playerbutton:Destroy()
end
if plr == currentplayer then
playercframe.Visible = false
end
if plr == viewedPlayer then
unview()
end
else
con:Disconnect()
end
end)
local hideplayerc = instancefromtable({
ClassName = "TextButton",
Parent = playercframe:FindFirstChildOfClass("TextLabel"),
BackgroundColor3 = Color3.fromRGB(59, 59, 59),
BorderSizePixel = 0,
Position = UDim2.new(1, -17, 0, 2),
Size = UDim2.new(0, 15, 0, 15),
Font = Enum.Font.SourceSans,
Text = "X",
TextColor3 = Color3.fromRGB(206, 206, 206),
TextSize = 14
})
roundcorners(hideplayerc)
hideplayerc.MouseButton1Click:Connect(function()
playercframe.Visible = false
end)
local function makeplrbutton(buttontext)
local button = instancefromtable({
ClassName = "TextButton",
Parent = playercframe:FindFirstChildOfClass("ScrollingFrame"),
BackgroundColor3 = Color3.fromRGB(53, 53, 53),
BorderSizePixel = 0,
Size = UDim2.new(1, -10, 0, 20),
Font = Enum.Font.SourceSans,
Text = buttontext,
TextColor3 = Color3.fromRGB(226, 226, 226),
TextSize = 15
})
roundcorners(button)
return button
end
makeplrbutton("goto").MouseButton1Click:Connect(function()
NotificationLibrary:SendNotification("Success", "brought to player", 5)
local c = lp.Character
if c and c.Parent then
local tp = gp(c, "HumanoidRootPart", "BasePart") or gp(c, "Head", "BasePart") or c:FindFirstChildWhichIsA("BasePart")
if tp then
local c1 = currentplayer.Character
if c1 and c1.Parent then
local to = gp(c1, "HumanoidRootPart", "BasePart") or gp(c1, "Head", "BasePart") or c1:FindFirstChildWhichIsA("BasePart")
if to then
if flycf then
flycf = to.CFrame
else
weldtp(tp, to.CFrame)
end
if viewedPlayer == currentplayer then
unview()
end
notify("goto: " .. currentplayer.Name)
else
notify("no target part found")
end
else
notify("target character not found")
end
else
notify("no part found")
end
else
notify("character not found")
end
end)
viewbutton = makeplrbutton("view")
viewbutton.MouseButton1Click:Connect(function()
if viewedPlayer == currentplayer then
unview()
else
viewedPlayer = currentplayer
viewbutton.Text = "unview"
end
end)
local cbringb = makeplrbutton("cbring")
local function noanimations()
NotificationLibrary:SendNotification("Success", "animate destroyed", 5)
local c = lp.Character
if c then
local hum = c:FindFirstChildOfClass("Humanoid")
if hum then
local animate = gp(c, "Animate", "LocalScript")
if animate then
animate.Disabled = true
end
for i, v in pairs(hum:GetPlayingAnimationTracks()) do
v:Stop()
end
else
notify("humanoid not found")
end
else
notify("character not found")
end
end
local isConnected = nil
isConnected = function(part0, part1, tested)
if not ((typeof(part0) == "Instance") and part0:IsA("BasePart")) then
return false
end
if not ((typeof(part1) == "Instance") and part1:IsA("BasePart")) then
return false
end
if not tested then
tested = {}
end
local ret = false
tinsert(tested, part0)
for i, v in pairs(part0:GetConnectedParts()) do
if part1 == v then
return true
elseif not tfind(tested, v) then
ret = ret or isConnected(v, part1, tested)
end
end
return ret
end
local function attach(c1)
local bck = lp:FindFirstChildOfClass("Backpack")
local c = lp.Character
--checks for: model, humanoid, arm, torso for main character:
if not (c and c.Parent) then
notify("character not found")
return false
end
local hum = c:FindFirstChildOfClass("Humanoid")
if not hum then
notify("humanoid not found")
return false
end
local arm = gp(c, "Right Arm", "BasePart") or gp(c, "RightHand", "BasePart")
if not arm then
notify("arm not found")
return false
end
local torso = gp(c, "Torso", "BasePart") or gp(c, "UpperTorso", "BasePart")
if not torso then
notify("torso not found")
return
end
if torso:IsGrounded() then
notify("torso is grounded")
return
end
if not isConnected(arm, torso) then
notify("arm and toso not connected")
return
end
--checks for: tool:
local tool, handle = nil, nil
for i, v in pairs(c:GetChildren()) do
if v:IsA("Tool") then
handle = gp(v, "Handle", "BasePart")
if handle then
tool = v
break
end
end
end
if (not tool) and bck then
for i, v in pairs(bck:GetChildren()) do
if v:IsA("Tool") then
handle = gp(v, "Handle", "BasePart")
if handle then
tool = v
break
end
end
end
end
if not tool then
notify("no tools with handle found")
return false
end
--checks for: model, humanoid, arm, torso for target character:
if not (c1 and c1.Parent) then
notify("target character not found")
return false
end
local hum1 = c1:FindFirstChildOfClass("Humanoid")
if not hum1 then
notify("target humanoid not found")
return false
end
local arm1 = gp(c1, "Right Arm", "BasePart") or gp(c1, "RightHand", "BasePart")
if not arm1 then
notify("target arm not found")
return false
end
local torso1 = gp(c1, "Torso", "BasePart") or gp(c1, "UpperTorso", "BasePart")
if not torso1 then
notify("target torso not found")
return
end
if torso1:IsGrounded() then
notify("target torso is grounded")
return
end
if not isConnected(arm1, torso1) then
notify("target arm and toso not connected")
return
end
--all checks good
if bck then
for i, v in pairs(c:GetChildren()) do
if v:IsA("Tool") then
v.Parent = bck
end
end
end
removehats(c)
local nhum = hum:Clone()
hum:Destroy()
hum = nhum
hum.Parent = c
hum:EquipTool(tool)
for i, v in pairs(c1:GetDescendants()) do
if v and v:IsA("BasePart") then
v.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
end
end
for i, v in pairs(tool:GetDescendants()) do
if v ~= handle and not v:IsA("TouchTransmitter") then
v:Destroy()
end
end
handle.Massless = true
local attaching = true
tspawn(function()
while renderstepped:Wait() and attaching do
--checks for: model, humanoid, arm, torso for main character:
if not (c and c.Parent) then
handle = nil
tool.Parent = bck
return notify("character removed")
end
if (not hum and hum.Parent) then
handle = nil
tool.Parent = bck
return notify("humanoid removed")
end
if not (arm and arm.Parent) then
handle = nil
tool.Parent = bck
return notify("arm removed")
end
if not (torso and torso.Parent) then
handle = nil
tool.Parent = bck
return notify("torso removed")
end
if torso:IsGrounded() then
handle = nil
tool.Parent = bck
return notify("torso got grounded")
end
if not isConnected(arm, torso) then
handle = nil
tool.Parent = bck
return notify("arm and toso connection removed")
end
--checks for: model, humanoid, arm, torso for target character:
if not (c1 and c1.Parent) then
handle = nil
tool.Parent = bck
return notify("target character removed")
end
if not (hum1 and hum1.Parent) then
handle = nil
tool.Parent = bck
return notify("target humanoid removed")
end
if not (arm1 and arm1.Parent) then
handle = nil
tool.Parent = bck
return notify("target arm removed")
end
if not (torso1 and torso1.Parent) then
handle = nil
tool.Parent = bck
return notify("target torso removed")
end
if torso:IsGrounded() then
handle = nil
tool.Parent = bck
return notify("target torso got grounded")
end
if not isConnected(arm1, torso1) then
handle = nil
tool.Parent = bck
return notify("target arm and toso connection removed")
end
--checks for: tool
if not (tool and tool.Parent) then
handle = nil
tool.Parent = bck
return notify("tool removed")
end
if not (handle and handle.Parent) then
handle = nil
tool.Parent = bck
return notify("tool handle removed")
end
if (tool.Parent ~= c) and (tool.Parent ~= c1) and (tool.Parent ~= bck) then
handle = nil
tool.Parent = bck
return notify("unexpected tool parent")
end
weldtp(arm1, handle.CFrame)
end
end)
while tool do
tool.AncestryChanged:Wait()
attaching = false
break
end
if hum1 and hum1.Parent then
hum1.PlatformStand = true
else
notify("target humanoid removed after attached")
end
return handle
end
makeplrbutton("bring").MouseButton1Click:Connect(function()
NotificationLibrary:SendNotification("Success", "bringing player...", 5)
local plr = currentplayer
local c1 = plr.Character
if not (c1 and c1.Parent) then
notify("target character not found")
return
end
if not tfind(controllable, c1) then
reset(true)
twait(0.1)
end
if not (plr and plr.Parent) then
notify("target player left")
return
end
if not (c1 and c1.Parent) then
c1 = plr.Character
end
if not (c1 and c1.Parent) then
notify("target character not found")
return
end
local c = lp.Character
if not (c and c.Parent) then
notify("character not found")
return
end
local part = gp(c, "HumanoidRootPart", "BasePart") or gp(c, "Torso", "BasePart") or gp(c, "UpperTorso", "BasePart") or gp(c, "Head", "BasePart")
if not part then
notify("part not found")
return
end
local cfr = part.CFrame
local joint = attach(plr.Character)
if not joint then
return
end
weldtp(part, cfr)
twait(0.5)
if c and c.Parent and part and part.Parent and joint and joint.Parent then
weldtp(part, cfr)
if not (joint and joint.Parent) then
notify("joint removed")
reset(false)
return
end
reset(false)
if viewedPlayer == plr then
unview()
end
notify("brought " .. plr.Name)
end
end)
local fekill = nil
fekill = function(c1)
if not (c1 and c1.Parent) then
return notify("target character not found")
end
local torso = gp(c1, "Torso", "BasePart") or gp(c1, "UpperTorso", "BasePart")
if not torso then
return notify("target torso not found")
end