-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmoreuncfork.lua
More file actions
1090 lines (1008 loc) · 37.1 KB
/
moreuncfork.lua
File metadata and controls
1090 lines (1008 loc) · 37.1 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
-- // MoreUNC V2.0.0, Have fun skidding devs!
local Operations = { -- Fixes executors that only use lua, not luau
Addition = {'(%w+)(%s*)%+=(%s*)(%w+)', '%1%2=%3%1%2+%3%4'}, -- v1+=v2 -> v1=v1+v2
Subtraction = {'(%w+)(%s*)%-=(%s*)(%w+)', '%1%2=%3%1%2-%3%4'}, -- v1-=v2
Multiplication = {'(%w+)(%s*)%*=(%s*)(%w+)', '%1%2=%3%1%2*%3%4'}, -- v1*=v2
Division = {'(%w+)(%s*)/=(%s*)(%w+)', '%1%2=%3%1%2/%3%4'}, -- v1/=v2
Modulus = {'(%w+)(%s*)%%=(%s*)(%w+)','%1%2=%3%1%2%%%3%4'}, -- v1%=v2
Concatenation = {'(%w+)(%s*)%.%.=(%s*)(%w+)', '%1%2=%3%1%2..%3%4'} -- v1..=v2
}
local forceoverride = {}
function replace(Code)
for _, t in next, Operations do
Code = string.gsub(Code, t[1], t[2])
end
return Code
end
local Options = {
OverrideFunctions = false, -- If the executor Overrides already existing functions
enviroment = setmetatable({}, {__protected = 'This metatable is protected'}),-- i don't really care if you unprotect it.
OverrideIgnore = {'loadstring', 'checkcaller', 'isexecutorclosure', 'isourclosure', 'isexecclosure', 'request', 'getinstances', 'getnilinstances', 'getloadedmodules', 'httpget'} -- Functions you don't wanna override if they already exist
}
-- // Localization:
local rawget = rawget
local loadstring = loadstring
local oldLoadstring = loadstring
local setmetatable = setmetatable
local type = type
local pairs = pairs
local next = next
local typeof = typeof
local debug = debug
local table = table
local string = string
local bit32 = bit32
local require = require
local Queue = {}
Queue.__index = Queue
function Queue.new()
local self = setmetatable({}, Queue)
self.elements = {}
return self
end
function Queue:Queue(element)
table.insert(self.elements, element)
end
function Queue:Update()
if #self.elements == 0 then
return nil
end
return table.remove(self.elements, 1)
end
function Queue:IsEmpty()
return #self.elements == 0
end
function Queue:Current()
return self.elements
end
local ClipboardQueue = Queue.new()
-- // Instances:
local Players = game:GetService("Players")
local ScriptType = script.ClassName == 'Script' and 'Server' or script.ClassName == 'LocalScript' and 'Client' or script.ClassName == 'ModuleScript' and 'Module'
local lp = ScriptType == 'Client' and Players.LocalPlayer or Players.PlayerAdded:Wait()
getgenv = getgenv or function()
return getfenv(0)
end
-- // Variables
local hui = nil
local valid = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
local nilinstances, CachedInstances, DrawingCache = {Instance.new("LocalScript")}, {}, {}
local keys={[0x08]=Enum.KeyCode.Backspace,[0x09]=Enum.KeyCode.Tab,[0x0C]=Enum.KeyCode.Clear,[0x0D]=Enum.KeyCode.Return,[0x10]=Enum.KeyCode.LeftShift,[0x11]=Enum.KeyCode.LeftControl,[0x12]=Enum.KeyCode.LeftAlt,[0x13]=Enum.KeyCode.Pause,[0x14]=Enum.KeyCode.CapsLock,[0x1B]=Enum.KeyCode.Escape,[0x20]=Enum.KeyCode.Space,[0x21]=Enum.KeyCode.PageUp,[0x22]=Enum.KeyCode.PageDown,[0x23]=Enum.KeyCode.End,[0x24]=Enum.KeyCode.Home,[0x2D]=Enum.KeyCode.Insert,[0x2E]=Enum.KeyCode.Delete,[0x30]=Enum.KeyCode.Zero,[0x31]=Enum.KeyCode.One,[0x32]=Enum.KeyCode.Two,[0x33]=Enum.KeyCode.Three,[0x34]=Enum.KeyCode.Four,[0x35]=Enum.KeyCode.Five,[0x36]=Enum.KeyCode.Six,[0x37]=Enum.KeyCode.Seven,[0x38]=Enum.KeyCode.Eight,[0x39]=Enum.KeyCode.Nine,[0x41]=Enum.KeyCode.A,[0x42]=Enum.KeyCode.B,[0x43]=Enum.KeyCode.C,[0x44]=Enum.KeyCode.D,[0x45]=Enum.KeyCode.E,[0x46]=Enum.KeyCode.F,[0x47]=Enum.KeyCode.G,[0x48]=Enum.KeyCode.H,[0x49]=Enum.KeyCode.I,[0x4A]=Enum.KeyCode.J,[0x4B]=Enum.KeyCode.K,[0x4C]=Enum.KeyCode.L,[0x4D]=Enum.KeyCode.M,[0x4E]=Enum.KeyCode.N,[0x4F]=Enum.KeyCode.O,[0x50]=Enum.KeyCode.P,[0x51]=Enum.KeyCode.Q,[0x52]=Enum.KeyCode.R,[0x53]=Enum.KeyCode.S,[0x54]=Enum.KeyCode.T,[0x55]=Enum.KeyCode.U,[0x56]=Enum.KeyCode.V,[0x57]=Enum.KeyCode.W,[0x58]=Enum.KeyCode.X,[0x59]=Enum.KeyCode.Y,[0x5A]=Enum.KeyCode.Z,[0x5D]=Enum.KeyCode.Menu,[0x60]=Enum.KeyCode.KeypadZero,[0x61]=Enum.KeyCode.KeypadOne,[0x62]=Enum.KeyCode.KeypadTwo,[0x63]=Enum.KeyCode.KeypadThree,[0x64]=Enum.KeyCode.KeypadFour,[0x65]=Enum.KeyCode.KeypadFive,[0x66]=Enum.KeyCode.KeypadSix,[0x67]=Enum.KeyCode.KeypadSeven,[0x68]=Enum.KeyCode.KeypadEight,[0x69]=Enum.KeyCode.KeypadNine,[0x6A]=Enum.KeyCode.KeypadMultiply,[0x6B]=Enum.KeyCode.KeypadPlus,[0x6D]=Enum.KeyCode.KeypadMinus,[0x6E]=Enum.KeyCode.KeypadPeriod,[0x6F]=Enum.KeyCode.KeypadDivide,[0x70]=Enum.KeyCode.F1,[0x71]=Enum.KeyCode.F2,[0x72]=Enum.KeyCode.F3,[0x73]=Enum.KeyCode.F4,[0x74]=Enum.KeyCode.F5,[0x75]=Enum.KeyCode.F6,[0x76]=Enum.KeyCode.F7,[0x77]=Enum.KeyCode.F8,[0x78]=Enum.KeyCode.F9,[0x79]=Enum.KeyCode.F10,[0x7A]=Enum.KeyCode.F11,[0x7B]=Enum.KeyCode.F12,[0x90]=Enum.KeyCode.NumLock,[0x91]=Enum.KeyCode.ScrollLock,[0xBA]=Enum.KeyCode.Semicolon,[0xBB]=Enum.KeyCode.Equals,[0xBC]=Enum.KeyCode.Comma,[0xBD]=Enum.KeyCode.Minus,[0xBE]=Enum.KeyCode.Period,[0xBF]=Enum.KeyCode.Slash,[0xC0]=Enum.KeyCode.Backquote,[0xDB]=Enum.KeyCode.LeftBracket,[0xDD]=Enum.KeyCode.RightBracket,[0xDE]=Enum.KeyCode.Quote}
local vim;
-- // Drawing:
local FakeFonts = setmetatable({
UI = 0,
System = 1,
Plex = 2,
Monospace = 3,
}, {
__call = function(s) return s end
})
local Fonts = {
[0] = Enum.Font.Arial,
[1] = Enum.Font.BuilderSans,
[2] = Enum.Font.Gotham,
[3] = Enum.Font.RobotoMono
}
local Base = {
Visible = false,
Color = Color3.new(0,0,0),
ClassName = nil,
Remove = function(self)
for i, v in next, DrawingCache do
if v == self then
local a = i
i:Destroy()
DrawingCache[a] = nil
end
end
end
}
Base.Destroy = Base.Remove
-- // Drawing end
local function try(fn, ...)
return (pcall(fn, ...))
end
local function newcclosure(f)
local a = coroutine.wrap(function(...)
local b = {coroutine.yield()}
while true do
b = {coroutine.yield(f(table.unpack(b)))}
end
end)
a()
return a
end
local function getthreadidentity()
local securityChecks = {
{
name = "None",
number = 0,
canAccess = try(function() return game.Name end)
},
{
name = "PluginSecurity",
number = 1,
canAccess = try(function() return game:GetService("CoreGui").Name end)
},
{
name = "LocalUserSecurity",
number = 3,
canAccess = try(function() return game.DataCost end)
},
{
name = "WritePlayerSecurity",
number = 4,
canAccess = try(Instance.new, "Player")
},
{
name = "RobloxScriptSecurity",
number = 5,
canAccess = try(function() return game:GetService("CorePackages").Name end)
},
{
name = "RobloxSecurity",
number = 6,
canAccess = try(function() return Instance.new("SurfaceAppearance").TexturePack end)
},
{
name = "NotAccessibleSecurity",
number = 7,
canAccess = try(function() Instance.new("MeshPart").MeshId = "" end)
}
}
local lasti = 1
for i = 1, #securityChecks do
if securityChecks[i].canAccess then
lasti = i
else
return lasti
end
end
return lasti
end
if getthreadidentity() >= 3 then
vim = Instance.new("VirtualInputManager")
end
local RBXActive = true
local ClipboardUI = Instance.new("ScreenGui")
local ClipboardBox = Instance.new('TextBox') -- For setclipboard
ClipboardBox.Position = UDim2.new(100, 0, 100, 0) -- VERY off screen
ClipboardBox.Parent = ClipboardUI
local HttpService, DrawingUI = game:GetService('HttpService'), Instance.new("ScreenGui")
-- // Libararies:
local protected_guis = {}
-- // Events:
game.DescendantRemoving:Connect(function(d)
table.insert(nilinstances, d)
end)
game:FindFirstChildOfClass('UserInputService').WindowFocused:Connect(function()
RBXActive = true
end)
game:FindFirstChildOfClass('UserInputService').WindowFocusReleased:Connect(function()
RBXActive = false
end)
function rawlength(t1)
if type(t1) ~= 'table' then return 0 end
local count = 0
for _, _ in next, t1 do count = count + 1 end
end
function shallowequals(t1, t2)
if t1 == nil or t2 == nil then
return false
end
if type(t1) ~= 'table' or type(t2) ~= 'table' then
return false
end
for key, value in next, t1 do
if t2[key] ~= value then
return false
end
end
for key, value in next, t2 do
if t1[key] ~= value then
return false
end
end
return true
end
function SetAliases(func, aliases)
for _, Name in next, aliases do
Options.enviroment[Name] = getgenv()[func] or Options.enviroment[func]
end
end
function AddElement(name, val, aliases, forcebypass)
if forcebypass == true then table.insert(forceoverride, name) end
Options.enviroment[name] = val
if typeof(aliases) == 'table' then
SetAliases(name, aliases)
end
return val
end
function AddEnviroment()
local env = (getgenv and getgenv()) or getfenv(0)
for Name, Value in next, Options.enviroment do
if Options.OverrideFunctions or not env[Name] or table.find(forceoverride, Name) or (type(Value) == 'table' and (not shallowequals(env[Name], Value) or rawlength(Value) > rawlength(env[Name]))) and not table.find(Options.OverrideIgnore, Name) then
env[Name] = Value
elseif env[Name] and not table.find(forceoverride, Name) and not Options.OverrideFunctions or (type(Value) == 'table' and (shallowequals(env[Name], Value) or rawlength(Value) <= rawlength(env[Name]))) or table.find(Options.OverrideIgnore, Name) then
end
end
end
local Base64 = AddElement('base64', {
encode = function(data)
local letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
return ((data:gsub('.', function(x)
local r,b='',x:byte()
for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end
return r;
end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x)
if (#x < 6) then return '' end
local c=0
for i=1,6 do c=c+(x:sub(i,i)=='1' and 2^(6-i) or 0) end
return letters:sub(c+1,c+1)
end)..({ '', '==', '=' })[#data%3+1])
end,
decode = function(data)
local b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
data = string.gsub(data, '[^'..b..'=]', '')
return (data:gsub('.', function(x)
if x == '=' then return '' end
local r, f = '', (b:find(x) - 1)
for i = 6, 1, -1 do
r = r .. (f % 2^i - f % 2^(i - 1) > 0 and '1' or '0')
end
return r;
end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x)
if #x ~= 8 then return '' end
local c = 0
for i = 1, 8 do
c = c + (x:sub(i, i) == '1' and 2^(8 - i) or 0)
end
return string.char(c)
end))
end
})
AddElement('base64encode', Base64.encode, {'base64_encode'})
AddElement('base64decode', Base64.decode, {'base64_decode'})
AddElement('debug', {
getinfo = function(f)
assert(type(f)=='number' or type(f) == 'function', 'invalid argument #1 to \'getinfo\', number or function expected, got ' .. tostring(typeof(f)))
local ParamCount, IsVararg = debug.info(f, 'a')
local n = debug.info(f, 'n') ~= '' and debug.info(f, 'n') or ''
local source = debug.info(f, 's')
return{
numparams = ParamCount,
is_vararg = IsVararg and 1 or 0,
name = n,
currentline = debug.info(f, 'l'),
source = source,
short_src = source:sub(1, 60),
what = source == '[C]' and 'C' or 'Lua',
func = f,
nups = 0
}
end
})
-- // Sandboxing Game:
-- // HTTP Requests Support
local HashLib = setmetatable({}, {
__metatable = 'HashLib // Protected',
__index = function(self, key) -- Make it work for both _ and -
local k1 = key:gsub('_', '-')
local k2 = key:gsub('%-', '_')
local m1, m2 = Hash[k1], Hash[k2]
if m1 then return m1 end
if m2 then return m2 end
return rawget(self, key)
end
})
-- // crypt library
AddElement('crypt', {
hex = {
encode = function(data)
assert(type(data)=='string', 'argument #1 to \'hex.encode\' must be of type string, Received ' .. typeof(data))
local hex = ''
for i = 1, #data do
hex = hex .. string.format("%02x", string.byte(data, i))
end
return hex
end,
decode = function(data)
assert(type(data)=='string', 'argument #1 to \'hex.decode\' must be of type string, Received ' .. typeof(data))
local text = ""
for i = 1, #data, 2 do
local byte_str = string.sub(data, i, i+1)
local byte = tonumber(byte_str, 16)
text = text .. string.char(byte)
end
return text
end
},
custom = {
hash = function(data, alg)
local v1 = HashLib[alg]
local v2 = HashLib[data]
if not v1 and not v2 then
error(string.format("No algorithm found with name '%s' or '%s'", alg, data))
end
if v1 then
return v1(data)
elseif v2 then
return v2(alg)
end
end
},
hash = function(data, alg)
local v1 = HashLib[alg]
local v2 = HashLib[data]
if not v1 and not v2 then
error(string.format("No algorithm found with name '%s' or '%s'", alg, data))
end
if v1 then
return v1(data)
elseif v2 then
return v2(alg)
end
end,
url = {
encode = function(data)
return game:GetService("HttpService"):UrlEncode(data)
end,
decode = function(data)
-- replace + with space
data = string.gsub(data, '%+', ' ')
-- replace hexadecimals with the character for them
data = string.gsub(data, "%%(%x%x)", function(hex)
return string.char(tonumber(hex, 16))
end)
data = string.gsub(data, "\r\n", "\n") -- obvious
return data
end
},
base64 = Base64,
base64_encode = Base64.encode,
base64_decode = Base64.decode,
base64encode = Base64.encode,
base64decode = Base64.decode,
random = function(len)
assert(type(len) == 'number', 'Argument #1 to \'random\' must be a number, got ' .. typeof(len))
assert(len > 0 and len < 1025, 'Argument #1 to \'random\' must be over 0 and must not exceed 1024.')
local a = {}
for _=1,len do local r=math.random(1, #valid)table.insert(a,valid:sub(r,r))end;return table.concat(a)
end,
generatekey = function(len)
len = len or 32
local key = ''
local Valid = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
for _ = 1, len do local n = math.random(1, #Valid) key = key .. string.sub(Valid, n, n) end
return Base64.encode(key)
end,
generatebytes = function(len)
assert(type(len) == 'number', 'Argument #1 to \'generatebytes\' must be a number, got ' .. typeof(len))
local key = ''
local Valid = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
for _ = 1, len do local n = math.random(1, #Valid) key = key .. string.sub(Valid, n, n) end
return Base64.encode(key)
end
}, {'crypto', 'syn.crypto', 'syn_backup.crypto'})
-- // syn Library
AddElement('syn', {
is_beta = function() return true end, -- ???? i do not know why this is needed
protect_gui = function(gui) -- Unofficial protect
protected_guis[gui] = { Parent = gui.Parent, Name = gui.Name }
gui.Parent = gethui()
gui.Name = randomstring(math.random(8, 16))
end,
unprotect_gui = function(gui)
local Gui = rawget(protected_guis, gui)
if not Gui then return error(`GUI {gui.Name} does not exist in the protected guis list.`, 1) end
gui.Name = Gui.Name
gui.Parent = Gui.Parent
protected_guis[gui] = nil
end,
request = rqst,
get_thread_identity = getthreadidentity,
crypto = Options.enviroment.crypt
}, {'syn_backup'})
-- // cache Library
AddElement('cache', {
iscached = function(d)
return CachedInstances[d] ~= 'invalid'
end,
invalidate = function(d)
CachedInstances[d] = 'invalid'
d.Parent = nil
end,
replace = function(a, b)
CachedInstances[a] = b
b.Name = a.Name
b.Parent = a.Parent
a.Parent = nil
end
})
-- // Drawing Library
AddElement('Drawing', {
Fonts = FakeFonts,
new = function(Type)
local function SetBase(tbl)
local baseProps = {
Visible = false,
Color = Color3.new(0,0,0),
ClassName = nil,
ZIndex = 1,
Remove = function(self)
for i, v in next, DrawingCache do
if v == self then
local a = i
i:Destroy()
DrawingCache[a] = nil
end
end
end
}
baseProps.Destroy = baseProps.Remove
for i, v in next, baseProps do
rawset(tbl.__index, i, v)
end
end
if Type == 'Line' then
local a = Instance.new("Frame", DrawingUI)
a.Visible = false
a.Size = UDim2.new(0, 0, 0, 0)
a.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
a.BackgroundTransparency = 1
a.BorderSizePixel = 0
local meta = {}
meta.ClassName = Type
meta.__index = {
Thickness = 1,
From = Vector2.new(0, 0),
To = Vector2.new(0, 0),
Transparency = 0,
updateLine = function(self)
if not a then return end
local from = self.From
local to = self.To
local distance = (to - from).Magnitude
local angle = math.deg(math.atan2(to.Y - from.Y, to.X - from.X))
a.Size = UDim2.new(0, distance, 0, self.Thickness)
a.Position = UDim2.new(0, from.X, 0, from.Y)
a.Rotation = angle
a.BackgroundTransparency = 1 - self.Transparency
a.BackgroundColor3 = self.Color
a.Visible = self.Visible
a.ZIndex = self.ZIndex
end
}
SetBase(meta)
meta.__newindex = function(self, key, value)
if not self then return end
if typeof(meta.__index[key]) == typeof(value) then
rawset(self, key, value)
self:updateLine()
end
end
meta.__metatable = 'This metatable is protected.'
local meta1 = setmetatable({}, meta)
DrawingCache[a] = meta1
return meta1
elseif Type == 'Square' then
local a = Instance.new("Frame", DrawingUI)
a.Visible = false
a.Size = UDim2.new(0, 0, 0, 0)
a.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
a.BackgroundTransparency = 1
a.BorderSizePixel = 0
local b = Instance.new("UIStroke", a)
b.Color = Color3.fromRGB(255, 255, 255)
b.Enabled = true
local meta = {}
meta.ClassName = Type
meta.__index = {
Size = Vector2.new(0,0),
Position = Vector2.new(0, 0),
Filled = false,
updateSquare = function(self)
if not a then return end
a.Size = UDim2.new(0, self.Size.X, 0, self.Size.Y)
a.Position = UDim2.new(0, self.Position.X, 0, self.Position.Y)
b.Enabled = self.Filled
b.Color = self.Color
a.BackgroundColor3 = self.Color
a.ZIndex = self.ZIndex
end
}
SetBase(meta)
meta.__newindex = function(self, key, value)
if not self then return end
if typeof(self[key]) == typeof(value) then
rawset(self, key, value)
self:updateSquare()
end
end
local meta1 = setmetatable({}, meta)
DrawingCache[a] = meta1
return meta1
elseif Type == 'Circle' then
local a = Instance.new("Frame", DrawingUI)
a.Visible = false
a.Size = UDim2.new(0, 0, 0, 0)
a.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
a.BackgroundTransparency = 1
a.BorderSizePixel = 0
local b = Instance.new("UIStroke", a)
b.Color = Color3.fromRGB(255, 255, 255)
b.Enabled = false
b.Thickness = 1
local c = Instance.new("UICorner", a)
c.CornerRadius = UDim.new(1, 0)
local meta = {}
meta.ClassName = Type
meta.__index = {
Thickness = 1,
Filled = false,
NumSides = 0,
Radius = 1,
Position = Vector2.new(0, 0),
Transparency = 0,
updateCircle = function(self)
if not b or not a then return end
a.Visible = self.Visible
a.BackgroundTransparency = self.Transparency - 1
a.Size = UDim2.new(0, self.Radius, 0, self.Radius)
a.Position = UDim2.new(0, self.Position.X, 0, self.Position.Y)
b.Enabled = not self
b.Color = self.Color
a.ZIndex = self.ZIndex
end
}
SetBase(meta)
meta.__newindex = function(self, key, value)
if not self then return end
if typeof(self[key]) == typeof(value) then
rawset(self, key, value)
self:updateCircle()
end
end
local meta1 = setmetatable({}, meta)
DrawingCache[a] = meta1
return meta1
elseif Type == 'Text' then
local a = Instance.new("TextLabel", DrawingUI)
a.Visible = false
a.Size = UDim2.new(0, 0, 0, 0)
a.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
a.BackgroundTransparency = 1
a.BorderSizePixel = 0
a.TextStrokeColor3 = Color3.new(0,0,0)
a.TextStrokeTransparency = 1
local meta = {}
meta.ClassName = Type
meta.__index = {
Text = '',
Transparency = 0,
Size = 0,
Center = false,
Outline = false,
OutlineColor = Color3.new(0,0,0),
Position = Vector2.new(0,0),
Font = 3,
updateText = function(self)
if not a then return end
a.TextScaled = true
a.Size = UDim2.new(0, self.Size * 3, 0, self.Size / 2)
a.Position = UDim2.new(0, self.Position.X, 0, self.Position.Y)
a.Text = self.Text
a.Font = Fonts[self.Font]
a.Visible = self.Visible
a.TextColor3 = self.Color
a.BackgroundTransparency = 1 - self.Transparency
a.BorderSizePixel = self.Outline and 1 or 0
if self.Center then
a.TextXAlignment = Enum.TextXAlignment.Center
a.TextYAlignment = Enum.TextYAlignment.Center
else
a.TextXAlignment = Enum.TextXAlignment.Left
a.TextYAlignment = Enum.TextYAlignment.Top
end
a.TextStrokeTransparency = self.Outline and 0 or 1
a.TextStrokeColor3 = self.OutlineColor
a.ZIndex = self.ZIndex
end
}
SetBase(meta)
meta.__newindex = function(self, key, value)
if not self then return end
if typeof(self[key]) == typeof(value) then
rawset(self, key, value)
self:updateText()
end
end
local meta1 = setmetatable({}, meta)
DrawingCache[a] = meta1
return meta1
end
end})
local old = Options.enviroment.Drawing.new
Options.enviroment.Drawing.new = function(Type)
if Type ~= 'Image' then
return old(Type)
else
return old('Circle')
end
end
AddElement('loadstring', function(code)
local test = oldLoadstring('local result=3;result+=1;return result')()
local test2 = oldLoadstring('local result="h";result..="i";return result')()
if test ~= 4 or test2 ~= 'hi' then
return oldLoadstring(replace(code))
elseif test == 4 and test2 == 'hi' then
return oldLoadstring(code)
end
end, {}, true)
AddElement('getrenderproperty', function(drawing, prop)
return drawing[prop]
end)
AddElement('setrenderproperty', function(a, b, c)
if Options.enviroment.isrenderobj(a) then
a[b] = c
end
end)
AddElement('isrenderobj', function(a)
for c, b in next, DrawingCache do
if b == a then
return true
end
end
return false
end)
AddElement('gethui', function()
if not hui then
local s, _ = pcall(function()
local Path1 = _game:FindFirstChildOfClass('CoreGui')
hui = Instance.new("Folder", Path1)
hui.Name = 'hidden_ui\0'
end)
if not s then
if lp then
hui = Instance.new("Folder", lp:FindFirstChildOfClass("PlayerGui"))
hui.Name = 'hidden_ui\0'
else
if #Players:GetChildren() == 0 then
repeat task.wait() until #Players:GetChildren() > 0
end
local random_player = Players:GetChildren()[math.random(1, #Players:GetChildren())]
hui = Instance.new("Folder", random_player:FindFirstChild("PlayerGui")) -- Add it into a random player's PlayerGui if there isn't a local player
hui.Name = 'hidden_ui\0'
end
end
end
return hui
end, {'get_hidden_ui', 'gethiddenui'})
AddElement('randomstring', function(length)
length = length or 32
local str = {}
for i = 1, length do
local r = math.random(1, #valid)
str[i] = valid:sub(r, r)
end
return table.concat(str)
end)
AddElement('iscclosure', function(a)
return debug.info(a, 's') == '[C]'
end, {'is_c_closure'})
AddElement('islclosure', function(a)
return debug.info(a, 's') ~= '[C]'
end, {'is_l_closure'})
AddElement('isourclosure', function(a) -- Credits to empereans for this
return debug.info(a, 's') == debug.info(1, 's')
end, {'isexecclosure', 'isexeclosure', 'is_executor_closure', 'isexecutorclosure', 'checkclosure'})
AddElement('getinstances', function() return game:GetDescendants() end)
AddElement('getnilinstances', function() return nilinstances end)
AddElement('isreadonly', function(t)
return table.isfrozen(t)
end)
AddElement('isscriptable', function(instance, prop)
assert(typeof(instance) == 'Instance', 'Argument #1 to \'setscriptable\' must be an Instance, got ' .. typeof(instance))
return select(1, pcall(function()
return instance[prop]
end))
end, {'is_scriptable'})
AddElement('getscripts', function()
local a = {}for _, v in next, game:GetDescendants() do if v.ClassName == 'ModuleScript' or v.ClassName == 'LocalScript' then table.insert(a, v) end end;return a
end)
AddElement('getcallingscript', function()
local Source = debug.info(1, 's')
for i, v in next, game:GetDescendants() do if v:GetFullName() == Source then return v end end
end, {'get_calling_script'})
AddElement('isrbxactive', function()
return RBXActive
end, {'isgameactive'})
AddElement('newcclosure', newcclosure) -- Credits to empereans and myworld for this
AddElement('getthreadidentity', getthreadidentity, {'getthreadcontext', 'getidentity'})
AddElement('getrunningscripts', function() -- Purposely made ugly code to make it a 1 liner.
local a={}for _,v in next,game:GetDescendants()do if v.ClassName=='LocalScript'or v.ClassName=='ModuleScript'then table.insert(a,v)end;end;return a
end)
AddElement('getexecutorname', function()
return 'MoreUNC', '2.0.0'
end, {'identifyexecutor'})
AddElement('cleardrawcache', function()
for _, m in next, DrawingCache do m:Remove() end
end)
-- // File System:
local Files = {}
local function startswith(a, b)
return a:sub(1, #b) == b
end
local function endswith(hello, lo)
return hello:sub(#hello - #lo + 1, #hello) == lo
end
AddElement('writefile', function(path, content)
local Path = path:split('/')
local CurrentPath = {}
for i = 1, #Path do
local a = Path[i]
CurrentPath[i] = a
if not Files[a] and i ~= #Path then
Files[table.concat(CurrentPath, '/')] = {}
Files[table.concat(CurrentPath, '/') .. '/'] = Files[table.concat(CurrentPath, '/')]
elseif i == #Path then
Files[table.concat(CurrentPath, '/')] = tostring(content)
end
end
end)
AddElement('makefolder', function(path)
Files[path] = {}
Files[path .. '/'] = Files[path]
end)
AddElement('isfolder', function(path)
return type(Files[path]) == 'table'
end)
AddElement('isfile', function(path)
return type(Files[path]) == 'string'
end)
AddElement('readfile', function(path)
return Files[path]
end)
AddElement('appendfile', function(path, text2)
writefile(path, readfile(path) .. text2)
end)
AddElement('loadfile', function(path)
local content = readfile(path)
if not content then error('File \'' .. tostring(path) .. '\' does not exist.') return '' end
local s, func = pcall(function()
return loadstring(content)
end)
return func, not s and func or nil
end)
AddElement('delfolder', function(path)
local f = Files[path]
if type(f) == 'table' then Files[path] = nil end
end)
AddElement('delfile', function(path)
local f = Files[path]
if type(f) == 'string' then Files[path] = nil end
end)
AddElement('listfiles', function(path)
if not path or path == '' then
local Files = {}
for i, v in pairs(Files) do
if #i:split('/') == 1 then table.insert(Files, i) end
end
return Files
end
if type(Files[path]) ~= 'table' then return error(path .. ' is not a folder.') end
local Files_2 = {}
for i, v in pairs(Files) do
if startswith(i, path .. '/') and not endswith(i, '/') and i ~= path and #i:split('/') == (#path:split('/') + 1) then table.insert(Files_2, i) end
end
return Files_2
end)
AddElement('checkcaller', function()
local info = debug.info(getgenv, 'slnaf')
return debug.info(1, 'slnaf')==info
end)
AddElement('clonefunction', function(f)
return function(...) -- Probably a bad way to do this...
return f(...)
end
end, {'newlclosure'})
AddElement('getscriptclosure', function(module)
assert(typeof(module) ~= 'Instance', 'Argument #1 to \'getscriptclosure\' must be an Instance.')
return require(module)
end, {'getscriptfunction'})
AddElement('getgenv', function()
return getfenv(0)
end)
if vim then
AddElement('mouse1click', function(x, y)
x = x or 0
y = y or 0
vim:SendMouseButtonEvent(x, y, 0, true, game, false)
task.wait()
vim:SendMouseButtonEvent(x, y, 0, false, game, false)
end)
AddElement('mouse2click', function(x, y)
x = x or 0
y = y or 0
vim:SendMouseButtonEvent(x, y, 1, true, game, false)
task.wait()
vim:SendMouseButtonEvent(x, y, 1, false, game, false)
end)
AddElement('mouse1press', function(x, y)
x = x or 0
y = y or 0
vim:SendMouseButtonEvent(x, y, 0, true, game, false)
end)
AddElement('mouse1release', function(x, y)
x = x or 0
y = y or 0
vim:SendMouseButtonEvent(x, y, 0, false, game, false)
end)
AddElement('mouse2press', function(x, y)
x = x or 0
y = y or 0
vim:SendMouseButtonEvent(x, y, 1, true, game, false)
end)
AddElement('mouse2release', function(x, y)
x = x or 0
y = y or 0
vim:SendMouseButtonEvent(x, y, 1, false, game, false)
end)
AddElement('mousescroll', function(x, y, a)
x = x or 0
y = y or 0
a = a and true or false
vim:SendMouseWheelEvent(x, y, a, game)
end)
AddElement('keyclick', function(key)
if typeof(key) == 'number' then
if not keys[key] then return error("Key "..tostring(key) .. ' not found!') end
vim:SendKeyEvent(true, keys[key], false, game)
task.wait()
vim:SendKeyEvent(false, keys[key], false, game)
elseif typeof(key) == 'EnumItem' then
vim:SendKeyEvent(true, key, false, game)
task.wait()
vim:SendKeyEvent(false, key, false, game)
end
end)
AddElement('keypress', function(key)
if typeof(key) == 'number' then
if not keys[key] then return error("Key "..tostring(key) .. ' not found!') end
vim:SendKeyEvent(true, keys[key], false, game)
elseif typeof(key) == 'EnumItem' then
vim:SendKeyEvent(true, key, false, game)
end
end)
AddElement('keyrelease', function(key)
if typeof(key) == 'number' then
if not keys[key] then return error("Key "..tostring(key) .. ' not found!') end
vim:SendKeyEvent(false, keys[key], false, game)
elseif typeof(key) == 'EnumItem' then
vim:SendKeyEvent(false, key, false, game)
end
end)
AddElement('mousemoverel', function(relx, rely)
local Pos = workspace.CurrentCamera.ViewportSize
relx = relx or 0
rely = rely or 0
local x = Pos.X * relx
local y = Pos.Y * rely
vim:SendMouseMoveEvent(x, y, game)
end)
AddElement('mousemoveabs', function(x, y)
x = x or 0
y = y or 0
vim:SendMouseMoveEvent(x, y, game)
end)
AddElement(
"fireproximityprompt",
function(ProximityPrompt)
local Old, Text = game:GetService("UserInputService"):GetFocusedTextBox(), ""
if Old then
Text = Old.Text
Old:ReleaseFocus()
end
local Properties = {"HoldDuration", "MaxActivationDistance", "Enabled", "RequiresLineOfSight"}
local Values = {}
for _, Property in next, Properties do
Values[Property] = ProximityPrompt[Property]
end
-- * Change it's propreties so you can activate it from anywhere!
ProximityPrompt.Enabled = true
ProximityPrompt.RequiresLineOfSight = false
ProximityPrompt.MaxActivationDistance = math.huge
ProximityPrompt.HoldDuration = 0
vim:SendKeyEvent(true, ProximityPrompt.KeyboardKeyCode, false, game)
task.wait()
vim:SendKeyEvent(false, ProximityPrompt.KeyboardKeyCode, false, game)
for PropertyName, PropertyValue in next, Values do
ProximityPrompt[PropertyName] = PropertyValue
end