-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1460 lines (1333 loc) · 99.7 KB
/
index.html
File metadata and controls
1460 lines (1333 loc) · 99.7 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta property="og:title" content="NEX Emulator">
<meta property="og:description" content="The tool that turns Roblox into an actual game engine.">
<meta property="og:image" content="https://i.imgur.com/w2Okbn4.png">
<meta property="og:url" content="https://nexemulator.github.io/">
<meta name="twitter:card" content="summary">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NEX Documentation</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(#ffffff08 1px, transparent 1px) 0 0 / 40px 40px,
linear-gradient(90deg, #ffffff08 1px, transparent 1px) 0 0 / 40px 40px,
linear-gradient(90deg, #FF94CE40, #C579E540, #7496FC40), #000;
background-attachment: fixed;
min-height: 100vh;
color: #fff;
}
header {
padding: 30px 60px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
border-bottom: 1px solid rgba(255,255,255,0.15);
}
.header-buttons { display: flex; gap: 12px; }
.header-btn {
display: flex; align-items: center; gap: 8px;
padding: 10px 18px;
background: rgba(255,255,255,0.08);
border: 1px solid rgba(255,255,255,0.15);
border-radius: 10px;
color: rgba(255,255,255,0.8);
text-decoration: none;
font-size: 14px; font-weight: 500;
transition: all 0.3s ease;
}
.header-btn:hover {
background: rgba(255,255,255,0.15);
border-color: rgba(255,255,255,0.3);
color: #fff; transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.header-btn svg { transition: transform 0.3s ease; }
.header-btn:hover svg { transform: scale(1.1); }
.logo-text { font-size: 32px; font-weight: 900; letter-spacing: 3px; color: #fff; }
.container { display: flex; max-width: 1600px; margin: 0 auto; }
.sidebar {
width: 300px; padding: 40px 30px;
border-right: 1px solid rgba(255,255,255,0.15);
min-height: calc(100vh - 121px); position: relative;
}
.sidebar h3 {
font-size: 12px; text-transform: uppercase; letter-spacing: 2px;
color: rgba(255,255,255,0.5); margin-bottom: 20px; font-weight: 600;
}
.nav-container { position: relative; }
.nav-highlight {
position: absolute;
background: rgba(255,255,255,0.1);
border: 1px solid rgba(255,255,255,0.3);
border-radius: 8px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
pointer-events: none; z-index: 0;
}
.nav-item {
display: block; padding: 15px 20px; margin-bottom: 8px;
color: rgba(255,255,255,0.7); text-decoration: none;
border-radius: 8px; transition: color 0.3s;
font-weight: 500; font-size: 16px; cursor: pointer;
position: relative; z-index: 1;
}
.nav-item:hover { color: #fff; }
.nav-item.active { color: #fff; font-weight: 600; }
.content { flex: 1; padding: 60px 80px; overflow: hidden; position: relative; }
.content h1 {
font-size: 56px; margin-bottom: 30px; color: #fff; font-weight: 900;
padding-bottom: 30px; border-bottom: 2px solid rgba(255,255,255,0.2);
}
.content h2 {
font-size: 36px; margin-top: 60px; margin-bottom: 25px; color: #fff; font-weight: 700;
padding-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.15);
}
.content h3 {
font-size: 24px; margin-top: 35px; margin-bottom: 15px;
color: rgba(255,255,255,0.9); font-weight: 600; display: inline-block;
}
.content p {
line-height: 1.8; color: rgba(255,255,255,0.7); margin-bottom: 20px; font-size: 16px;
}
.func-header {
display: flex; align-items: center; flex-wrap: wrap;
gap: 12px; margin-top: 35px; margin-bottom: 15px;
}
.func-header h3 { margin: 0; }
h3p {
display: inline-block; padding: 6px 14px;
background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
border-radius: 6px; font-size: 13px; font-weight: 600;
color: rgba(255,255,255,0.8); font-family: 'Courier New', monospace;
vertical-align: middle; position: relative; cursor: help;
transition: all 0.2s ease;
}
h3p:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.4); }
.tooltip {
position: fixed; background: rgba(20,20,30,0.98);
border: 1px solid rgba(255,255,255,0.3); border-radius: 10px;
padding: 14px 18px; max-width: 320px; z-index: 9999;
pointer-events: none; opacity: 0; transform: translateY(8px);
transition: opacity 0.25s ease, transform 0.25s ease;
box-shadow: 0 10px 40px rgba(0,0,0,0.5); backdrop-filter: blur(10px);
}
.tooltip.visible { opacity: 1; transform: translateY(0); }
.tooltip-title {
font-weight: 700; font-size: 14px; color: #fff; margin-bottom: 8px;
display: flex; align-items: center; gap: 8px;
}
.tooltip-title::before {
content: ''; width: 8px; height: 8px;
background: linear-gradient(135deg, #FF94CE, #7496FC); border-radius: 50%;
}
.tooltip-desc { font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.5; margin-bottom: 10px; }
.tooltip-funcs {
font-size: 12px; color: rgba(255,255,255,0.5);
border-top: 1px solid rgba(255,255,255,0.1); padding-top: 10px;
}
.tooltip-funcs span { color: #C586C0; font-family: 'Courier New', monospace; }
.code-block, .code-blockx {
background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.2);
border-radius: 12px; padding: 25px; margin: 25px 0; overflow-x: auto;
font-family: 'Courier New', monospace; font-size: 14px; line-height: 1.6; white-space: pre;
}
.code-block { color: rgba(255,255,255,0.9); }
.sections-wrapper { display: flex; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.section { min-width: 100%; opacity: 0; transition: opacity 0.3s ease; }
.section.active { opacity: 1; }
.divider { height: 1px; background: rgba(255,255,255,0.1); margin: 40px 0; }
.byte-table, .bin-table {
width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px;
}
.byte-table th, .bin-table th {
background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
padding: 10px 14px; text-align: left; color: rgba(255,255,255,0.9); font-weight: 600;
}
.byte-table td, .bin-table td {
border: 1px solid rgba(255,255,255,0.1); padding: 10px 14px;
color: rgba(255,255,255,0.7); vertical-align: top;
}
.byte-table tr:hover td, .bin-table tr:hover td { background: rgba(255,255,255,0.04); }
.mono { font-family: 'Courier New', monospace; color: #C586C0; font-size: 13px; }
.chunk-tag {
display: inline-block; padding: 3px 10px;
background: rgba(116,150,252,0.2); border: 1px solid rgba(116,150,252,0.4);
border-radius: 5px; font-family: 'Courier New', monospace; font-size: 13px;
color: #7496FC; font-weight: 700; margin-right: 6px;
}
.info-box {
background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12);
border-left: 4px solid #7496FC; border-radius: 0 10px 10px 0;
padding: 18px 22px; margin: 20px 0; color: rgba(255,255,255,0.75);
font-size: 15px; line-height: 1.7;
}
.warn-box {
background: rgba(255,148,0,0.07); border: 1px solid rgba(255,148,0,0.2);
border-left: 4px solid #FFA040; border-radius: 0 10px 10px 0;
padding: 18px 22px; margin: 20px 0; color: rgba(255,255,255,0.75);
font-size: 15px; line-height: 1.7;
}
@media (max-width: 768px) {
header { padding: 20px 30px; flex-wrap: wrap; }
.logo-text { font-size: 24px; letter-spacing: 2px; }
.header-buttons { width: 100%; justify-content: center; margin-top: 10px; }
.header-btn { padding: 8px 14px; font-size: 13px; }
.header-btn span { display: none; }
.container { flex-direction: column; }
.sidebar { width: 100%; min-height: auto; padding: 20px 30px; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); }
.nav-item { padding: 12px 15px; font-size: 14px; }
.content { padding: 30px; }
.content h1 { font-size: 36px; margin-bottom: 20px; padding-bottom: 20px; }
.content h2 { font-size: 28px; margin-top: 40px; }
.content h3 { font-size: 20px; }
.func-header { flex-direction: column; align-items: flex-start; gap: 8px; }
.byte-table { font-size: 12px; }
}
</style>
</head>
<body>
<header>
<div class="logo-text">NEX Documentation</div>
<div class="header-buttons">
<a href="https://discord.gg/dPtGzckm2p" target="_blank" class="header-btn" title="Join Discord">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"/></svg>
<span>Discord</span>
</a>
<a href="https://github.com/NEXEmulator" target="_blank" class="header-btn" title="View GitHub">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
<span>GitHub</span>
</a>
</div>
</header>
<div class="container">
<aside class="sidebar">
<h3>Documentation</h3>
<div class="nav-container">
<div class="nav-highlight"></div>
<a href="#" class="nav-item active" data-tab="0">Functions</a>
<a href="#" class="nav-item" data-tab="1">Compiling</a>
<a href="#" class="nav-item" data-tab="2">Settings</a>
<a href="#" class="nav-item" data-tab="3">Roblox Binary</a>
</div>
</aside>
<main class="content">
<div class="sections-wrapper">
<!-- ===== TAB 0: FUNCTIONS ===== -->
<div class="section active">
<h1>Functions</h1>
<!-- ---- Global (genv) ---- -->
<h2>Global Functions</h2>
<p>These are injected into the exploit global environment (<span class="mono">genv</span>) and are accessible from any script, including raw executor scripts running outside emulated Roblox scripts.</p>
<div class="func-header"><h3>LoadLocalAsset(filepath:string):Instance</h3><h3p>FilesEnabled</h3p></div>
<p>Loads a Roblox model file (<code>.rbxm</code> or <code>.rbxmx</code>) from the game's storage directory specified by <code>filepath</code> and returns the loaded instance. The path is automatically prefixed with the storage directory.</p>
<h3>Example Usage</h3>
<div class="code-blockx">local FilePath = "Tool.rbxm"
local FileData = -- [[ large string of binary/xml data ]]
repeat task.wait() until NEX_Loaded
if not Settings.FilesEnabled then
warn("Please turn on FilesEnabled in settings!")
end
writefile(FilePath, FileData)
repeat task.wait() until isfile(FilePath)
local Object = LoadLocalAsset(FilePath)
Object.Parent = game.Players.LocalPlayer.Backpack
print("Loaded and parented:", Object.Name)</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>GetLocalObjects(filepath:string):table</h3>
<p>Reads a local Roblox XML or binary file from storage and deserializes it via <code>SerializationService:DeserializeInstancesAsync</code>. Automatically applies <code>FixStudioXML</code> to patch Studio-exported files (replaces <code>Workspace</code> with <code>Model</code> and <code>Terrain</code> with <code>Folder</code>). Returns a table of root-level instances.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
-- Works with both .rbxmx (XML) and .rbxm (binary) files
local instances = GetLocalObjects("MyModel.rbxmx")
for _, inst in ipairs(instances) do
inst.Parent = workspace
end</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>GetObjects(assetUrl:string):table</h3>
<p>Fetches a Roblox asset from the asset delivery CDN using its numeric ID, deserializes it, and returns a table of instances. The <code>assetUrl</code> string must contain a numeric asset ID.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local instances = GetObjects("rbxassetid://12345678")
for _, inst in ipairs(instances) do
inst.Parent = workspace
print("Inserted:", inst.Name)
end</div>
<p>Accuracy: NEX Approved</p>
<div class="divider"></div>
<h3>InsertAsset(assetId:string):Instance</h3>
<p>Loads an asset directly from Roblox using its asset ID or rbxassetid URL via <code>InsertService:LoadLocalAsset</code> and returns the loaded instance.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local Object = InsertAsset("rbxassetid://123456789")
if Object then
Object.Parent = game.Workspace
print("Inserted:", Object.Name)
end</div>
<p>Accuracy: NEX Approved</p>
<div class="divider"></div>
<h3>GetProperties(instance:Instance):table</h3>
<p>Returns a dictionary of all readable properties for the given instance using <code>ReflectionService:GetPropertiesOfClass</code>. Keys are property names, values are current property values.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local props = GetProperties(workspace.BasePlate)
for name, value in pairs(props) do
print(name, "=", tostring(value))
end</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>getfilename(path:string, removedot:boolean?):string</h3>
<p>Extracts the filename from a full path string. If <code>removedot</code> is <code>true</code>, strips the file extension.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
print(getfilename("Folder/Sub/MyScript.lua")) -- "MyScript.lua"
print(getfilename("Folder/MyScript.lua", true)) -- "MyScript"</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>ToastNotify(options:table):null</h3>
<p>Sends a native toast notification via <code>GuiService:SendNotification</code>. Accepts <code>Title</code>, <code>Text</code>, and <code>Icon</code> fields.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
ToastNotify({
Title = "NEX Emulator",
Text = "Script executed successfully.",
Icon = "rbxassetid://1347201659"
})</div>
<p>Accuracy: Inaccurate (There are more properties that we don't know of.)</p>
<div class="divider"></div>
<h3>DisconnectFromServer(null):null</h3>
<p>Immediately disconnects the client by kicking the local player, waiting for the <code>ClientReplicator</code> to be destroyed, then rebuilds the character locally (removing BasePart and Accessory children that were network-replicated) so the game remains usable offline. Also disables the <code>Dead</code> humanoid state to prevent ragdoll.</p>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>GetCurrentThread(null):thread</h3>
<p>Returns the native Luau thread object for the calling environment by scanning the Lua registry for a thread whose first function matches the caller.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local t = GetCurrentThread()
print(typeof(t)) -- "thread"</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<div class="func-header"><h3>Rrequire(ModuleScript:ModuleScript):any</h3><h3p>RobloxScriptRequire</h3p></div>
<p>Exposes the native Roblox environment <code>require</code> function directly, allowing emulated scripts to load RobloxScript modules from protected locations like <code>CorePackages</code>.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local SpecialModule = game.CorePackages.Packages.HttpRequest
local RequiredModule = Rrequire(SpecialModule)</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<!-- ---- Emulated env (renv) ---- -->
<h2>roblox Namespace</h2>
<p>Available to emulated scripts via the <span class="mono">roblox</span> global.</p>
<h3>roblox.GetAssetSource(assetId:string):string</h3>
<p>Fetches the raw source data of a Roblox asset from the delivery CDN. The returned data may be in XML or binary format.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local source = roblox.GetAssetSource("12345678")
print(roblox.BinaryFormat.XMLType(source)) -- "xml" or "binary"</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<div class="func-header"><h3>roblox.DownloadAsset(assetId:string, filename:string):null</h3><h3p>FilesEnabled</h3p></div>
<p>Downloads the raw source of a Roblox asset and saves it to the game storage directory under <code>filename</code>.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
roblox.DownloadAsset("12345678", "MyModel.rbxm")
repeat task.wait() until isfile("MyModel.rbxm")
print("Downloaded.")</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>roblox.BinaryFormat.XMLType(data:string):string</h3>
<p>Detects the format of a Roblox data string. Returns <code>"binary"</code> if the string starts with <span class="mono"><roblox!</span>, <code>"xml"</code> if it starts with <span class="mono"><roblox</span>, or <code>"unknown"</code> otherwise.</p>
<div class="code-blockx">local fmt = roblox.BinaryFormat.XMLType(data)
-- "binary", "xml", or "unknown"</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>roblox.BinaryFormat.FixStudioXML(xml:string):string</h3>
<p>Patches Studio-exported XML for use in live games. Replaces <code>Workspace</code> item class with <code>Model</code> and <code>Terrain</code> with <code>Folder</code>, since those classes cannot be deserialized outside their native context.</p>
<div class="code-blockx">local fixed = roblox.BinaryFormat.FixStudioXML(studioXml)
local instances = roblox.XML.Load(fixed)</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>roblox.XML.Object(className:string, parent:Instance):Instance</h3>
<p>Creates a new instance of the given class by building a minimal Roblox XML document and deserializing it. Parents the result to <code>parent</code>. Requires <code>XMLEnabled</code>.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local part = roblox.XML.Object("Part", workspace)
print(part.ClassName) -- "Part"</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>roblox.XML.Load(xml:string):table</h3>
<p>Deserializes a Roblox XML string and returns a table of root instances. Requires <code>XMLEnabled</code>.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local instances = roblox.XML.Load(readfile("MyModel.rbxmx"))
for _, inst in ipairs(instances) do inst.Parent = workspace end</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>roblox.XML.XMLToTable(xml:string):table</h3>
<p>Parses a Roblox XML string into a Luau table tree without creating live instances. Each instance becomes a sub-table keyed as <code>Item1</code>, <code>Item2</code>, etc., with <code>ClassName</code>, <code>Referent</code>, and property fields tagged as <code>{Tag=typeName, Value=value}</code>. Shared strings are stored in a top-level <code>SharedStrings</code> field.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local t = roblox.XML.XMLToTable(xmlString)
-- t.Item1.ClassName → "Part"
-- t.Item1.Name.Tag → "string"
-- t.Item1.Name.Value → "Baseplate"</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>roblox.XML.TableToXML(root:table):string</h3>
<p>Serializes a Luau table tree (as produced by <code>XMLToTable</code>) back into valid Roblox XML. Referents are remapped to sequential <code>NEX1</code>, <code>NEX2</code>, etc. IDs and <code>Ref</code>-type properties are relinked accordingly.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local t = roblox.XML.XMLToTable(xmlString)
t.Item1.Name = {Tag="string", Value="NewName"}
writefile("Modified.rbxmx", roblox.XML.TableToXML(t))</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>roblox.XML.SplitXML(xml:string, wrap:boolean?):table</h3>
<p>Splits a multi-item Roblox XML document into individual per-item XML chunks. Returns a table of <code>{Class, XML}</code> entries. If <code>wrap</code> is <code>true</code>, each chunk is wrapped in a full <code><roblox>…</roblox></code> document with needed SharedStrings included.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local chunks = roblox.XML.SplitXML(bigXml, true)
for _, chunk in ipairs(chunks) do
print(chunk.Class, #chunk.XML)
end</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<!-- ---- requests ---- -->
<h2>requests Namespace</h2>
<p>A Python-requests-style HTTP library. All methods take a URL string and an options table (same fields as <code>request</code>).</p>
<div class="info-box">
<strong>Response object fields:</strong><br>
<span class="mono">ok</span> — boolean success<br>
<span class="mono">status_code</span> — HTTP status code<br>
<span class="mono">text</span> — raw body string<br>
<span class="mono">content</span> — body as hex-escaped UTF-8 byte string<br>
<span class="mono">headers</span> — response headers table<br>
<span class="mono">url</span> — the request URL<br>
<span class="mono">elapsed</span> — timing from x-timer header<br>
<span class="mono">json()</span> — decodes body as JSON and returns table<br>
<span class="mono">raise_for_status()</span> — throws if <code>ok</code> is false
</div>
<div class="func-header"><h3>requests.get(url:string, options:table):table</h3><h3p>HTTPEnabled</h3p></div>
<div class="func-header"><h3>requests.post(url:string, options:table):table</h3><h3p>HTTPEnabled</h3p></div>
<div class="func-header"><h3>requests.put(url:string, options:table):table</h3><h3p>HTTPEnabled</h3p></div>
<div class="func-header"><h3>requests.patch(url:string, options:table):table</h3><h3p>HTTPEnabled</h3p></div>
<div class="func-header"><h3>requests.delete(url:string, options:table):table</h3><h3p>HTTPEnabled</h3p></div>
<div class="func-header"><h3>requests.options(url:string, options:table):table</h3><h3p>HTTPEnabled</h3p></div>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local res = requests.get("https://api.example.com/data", {
Headers = {["Authorization"] = "Bearer mytoken"}
})
res:raise_for_status()
local data = res:json()
print("Name:", data.name)</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<!-- ---- NEXHttp ---- -->
<h2>NEXHttp Namespace</h2>
<div class="func-header"><h3>NEXHttp.download(url:string, filename:string, chunksize:number?):table</h3><h3p>FilesEnabled</h3p></div>
<p>Downloads a file from <code>url</code> into storage using HTTP <code>Range</code> headers in chunks. Runs asynchronously in a coroutine. <code>chunksize</code> is a KB multiplier; default is 16 KB. Returns a download-state object.</p>
<div class="info-box">
<strong>Download state:</strong><br>
<span class="mono">finished</span> — true when complete<br>
<span class="mono">installedsize</span> — bytes written so far<br>
<span class="mono">size</span> — Content-Length string (or "0" if HEAD unsupported)<br>
<span class="mono">WaitForFile(self)</span> — yields until done, returns final byte count
</div>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local dl = NEXHttp.download("https://example.com/file.dat", "file.dat", 64)
print("Size:", dl.size)
dl:WaitForFile()
print("Done! Bytes:", dl.installedsize)</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<div class="func-header"><h3>NEXHttp.streamget(url:string, chunksize:number?):table</h3><h3p>HTTPEnabled</h3p></div>
<p>Streams the response body of a GET request in chunks without writing to disk. Accumulates into a <code>body</code> field on the returned state object.</p>
<div class="info-box">
<strong>Stream state:</strong><br>
<span class="mono">finished</span> — true when complete<br>
<span class="mono">body</span> — accumulated response so far<br>
<span class="mono">installedsize</span> — bytes received<br>
<span class="mono">size</span> — Content-Length if available<br>
<span class="mono">WaitForFile(self)</span> — yields until finished, returns full body
</div>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local stream = NEXHttp.streamget("https://example.com/large.html")
local body = stream:WaitForFile()
print("Got", #body, "bytes")</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<!-- ---- git ---- -->
<h2>git Namespace</h2>
<h3>git.getgit(url:string):table, string</h3>
<p>Queries the GitHub API for the contents of a repository or folder at the given GitHub URL. Automatically converts <code>github.com</code> URLs to the appropriate <code>api.github.com</code> endpoint. Returns a contents table (keys are filenames, values have <code>path</code>, <code>url</code>, <code>rawurl</code>, <code>type</code>, <code>self</code>) and the repository name.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local contents, repoName = git.getgit("https://github.com/User/Repo")
for name, info in pairs(contents) do
print(name, info.type, info.rawurl)
end</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<div class="func-header"><h3>git.clone(url:string):null</h3><h3p>FilesEnabled</h3p></div>
<p>Clones an entire GitHub repository into the game storage directory, preserving folder structure. Subdirectories are recursively fetched via the GitHub API and files are downloaded with <code>NEXHttp.download</code>.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
git.clone("https://github.com/User/Repo")
-- Files now in: Repo/</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<!-- ---- crypt ---- -->
<h2>crypt Namespace</h2>
<h3>crypt.utf8.encode(data:string):string</h3>
<p>Encodes a string to a hex-escaped byte string where each byte is represented as <code>\xHH</code>. Useful for safely encoding binary data as printable ASCII.</p>
<h3>crypt.utf8.decode(data:string):string</h3>
<p>Decodes a hex-escaped <code>\xHH</code> string back to its original binary form.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local enc = crypt.utf8.encode("Hello\0World")
print(enc) -- "\x48\x65\x6C\x6C\x6F\x00\x57..."
print(crypt.utf8.decode(enc)) -- "Hello\0World"</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>crypt.base64.encode(data:string):string</h3>
<p>Encodes a string using Base64.</p>
<h3>crypt.base64.decode(data:string):string</h3>
<p>Decodes a Base64 string back to its original form.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local b64 = crypt.base64.encode("Hello, NEX!")
print(b64) -- "SGVsbG8sIE5FWCE="
print(crypt.base64.decode(b64)) -- "Hello, NEX!"</div>
<p>Accuracy: NEX Approved (via crypt.base64)</p>
<div class="divider"></div>
<!-- ---- File Functions ---- -->
<h2>File Functions</h2>
<p>All sandboxed file functions operate within the game's isolated storage directory (<span class="mono">GameData/<rootPlaceId>/Storage/</span>). Paths are automatically prefixed — you cannot escape this directory. The <code>ExternalFileFunctions</code> table (requires <code>ExternalFilePerms</code>) provides the raw unsandboxed originals.</p>
<div class="func-header"><h3>OpenFile(path:string?):File</h3><h3p>FilesEnabled</h3p></div>
<p>Creates or opens a file or folder at the given path within storage and returns a <code>File</code> userdata object. If <code>path</code> is <code>nil</code>, creates an "unnamed" file (or "unnamed (N)" to avoid collisions). The returned object has a locked metatable and uses a <code>buffer</code> as its underlying userdata.</p>
<div class="info-box">
<strong>File object API:</strong><br>
<span class="mono">Path</span> — current path (assigning renames/moves the file)<br>
<span class="mono">Name</span> — filename only (assigning renames in-place)<br>
<span class="mono">Type</span> — <code>"file"</code> or <code>"folder"</code> (assigning converts the entry)<br>
<span class="mono">Read(self):string</span> — returns full file content<br>
<span class="mono">Write(self, content:string)</span> — overwrites file content<br>
<span class="mono">ReadLine(self, line:number):string</span> — returns a specific line (1-indexed)<br>
<span class="mono">ReplaceLine(self, line:number, content:string)</span> — replaces a specific line<br>
<span class="mono">GetChildren(self):table</span> — lists direct children (folders only)<br>
<span class="mono">GetDescendants(self):table</span> — lists all descendants recursively (folders only)<br>
<span class="mono">Destroy(self)</span> — deletes the file or folder
</div>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local f = OpenFile("config.txt")
f:Write("version=1\nenabled=true")
print(f:ReadLine(2)) -- "enabled=true"
f:ReplaceLine(1, "version=2")
print(f:Read()) -- "version=2\nenabled=true"
f:Destroy()</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<div class="func-header"><h3>readline(path:string, line:number):string</h3><h3p>FilesEnabled</h3p></div>
<p>Reads a specific 1-indexed line from a file in storage.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local line2 = readline("config.txt", 2)
print("Line 2:", line2)</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<div class="func-header"><h3>writeline(path:string, line:number, content:string):null</h3><h3p>FilesEnabled</h3p></div>
<p>Writes <code>content</code> to a specific 1-indexed line in a file in storage. If the line doesn't exist, the file is extended with empty lines as needed.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
writeline("config.txt", 3, "newkey=hello")
print(readline("config.txt", 3)) -- "newkey=hello"</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<div class="func-header"><h3>typefile(path:string):string</h3><h3p>FilesEnabled</h3p></div>
<p>Returns <code>"file"</code> or <code>"folder"</code> depending on what exists at <code>path</code>. Throws an error if the path doesn't exist.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
print(typefile("config.txt")) -- "file"
print(typefile("Scripts")) -- "folder"</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<div class="func-header"><h3>getcustomasset(filepath:string):string</h3><h3p>FilesEnabled</h3p></div>
<p>Uploads a file from storage to Roblox's temporary content system and returns its <code>rbxasset://</code> URL. Suitable for use as texture or audio source properties.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local url = getcustomasset("flower.png")
workspace.Part.Decal.Texture = url</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<div class="func-header"><h3>readfile(filepath:string):string</h3><h3p>FilesEnabled</h3p></div>
<p>Reads and returns the content of a file in storage as a string.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
if isfile("MyData.txt") then
print(readfile("MyData.txt"))
end</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<div class="func-header"><h3>writefile(filepath:string, content:string):null</h3><h3p>FilesEnabled</h3p></div>
<p>Writes a string to a file in storage, creating it if it does not exist.</p>
<div class="func-header"><h3>makefolder(filepath:string):null</h3><h3p>FilesEnabled</h3p></div>
<p>Creates a new folder at the given path in storage.</p>
<div class="func-header"><h3>deletefile(filepath:string):null</h3><h3p>FilesEnabled</h3p></div>
<p>Deletes a file from storage.</p>
<div class="func-header"><h3>deletefolder(filepath:string):null</h3><h3p>FilesEnabled</h3p></div>
<p>Deletes a folder and its contents from storage.</p>
<div class="func-header"><h3>isfile(filepath:string):boolean</h3><h3p>FilesEnabled</h3p></div>
<p>Returns <code>true</code> if a file exists at the path in storage.</p>
<div class="func-header"><h3>isfolder(filepath:string):boolean</h3><h3p>FilesEnabled</h3p></div>
<p>Returns <code>true</code> if a folder exists at the path in storage.</p>
<div class="func-header"><h3>appendfile(filepath:string, content:string):null</h3><h3p>FilesEnabled</h3p></div>
<p>Appends <code>content</code> to the end of a file in storage.</p>
<div class="func-header"><h3>listfiles(filepath:string):table</h3><h3p>FilesEnabled</h3p></div>
<p>Returns a table of file/folder names in the given directory within storage. Pass <code>nil</code> or <code>"./"</code> to list the root of storage.</p>
<div class="func-header"><h3>loadfile(filepath:string):function</h3><h3p>FilesEnabled</h3p></div>
<p>Loads and returns a Luau script from storage as a callable function.</p>
<div class="divider"></div>
<h3>ExternalFileFunctions</h3>
<p>A table populated only when <code>ExternalFilePerms</code> is enabled. Contains the raw, unsandboxed exploit file functions (<code>readfile</code>, <code>writefile</code>, <code>getcustomasset</code>, etc.) that operate on the full filesystem rather than the game storage directory.</p>
<div class="warn-box">
<strong>Warning:</strong> Functions inside <code>ExternalFileFunctions</code> can read/write anywhere the executor can access. Enable <code>ExternalFilePerms</code> in Settings to populate this table.
</div>
<div class="code-blockx">-- Only available when ExternalFilePerms = true
local raw = ExternalFileFunctions.readfile("C:/path/to/anything.txt")</div>
<div class="divider"></div>
<!-- ---- Identity ---- -->
<h2>Identity & Thread</h2>
<div class="func-header"><h3>setidentity(level:number):null</h3><h3p>CapabilityMax</h3p></div>
<p>Changes the execution identity (privilege level) of the current thread. The <code>level</code> cannot exceed the <code>CapabilityMax</code> setting value. If it does, a warning is issued and nothing happens.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local id = getthreadidentity()
setidentity(3)
print(getthreadidentity()) -- 3
setidentity(id) -- restore</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>getthreadidentity(null):number</h3>
<p>Returns the current execution identity (privilege level) of the calling thread.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
print("Identity:", getthreadidentity())</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<!-- ---- HTTP ---- -->
<h2>HTTP</h2>
<div class="func-header"><h3>request(options:table):table</h3><h3p>HTTPEnabled</h3p></div>
<p>Performs an HTTP request using the options table. Returns a standard executor HTTP response with <code>StatusCode</code>, <code>Body</code>, <code>Headers</code>, <code>Success</code>, etc.</p>
<h3>Example Usage</h3>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local resp = request({
Url = "https://example.com/api/data",
Method = "GET",
Headers = {["Content-Type"] = "application/json"}
})
print(resp.StatusCode, resp.Body)</div>
<p>Accuracy: NEX Approved</p>
<div class="divider"></div>
<!-- ---- Misc ---- -->
<h2>Miscellaneous</h2>
<h3>UpdateNEX(null):null</h3>
<p>Re-runs NEX's environment injection pass (<code>nexify</code>) on all currently registered Luau threads. Useful if a new script spawned after the initial load and did not receive the NEX environment.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
UpdateNEX()</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>getrenv(null):table</h3>
<p>Returns the Roblox environment table — the injected global table that emulated scripts receive.</p>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>getsenv(instance:Instance):table</h3>
<p>Returns the script environment of the given instance (typically a <code>LocalScript</code> or <code>Script</code>).</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local env = getsenv(game.StarterPlayer.StarterPlayerScripts.MyScript)</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>clonefunction(func:function):function</h3>
<p>Returns a cloned copy of a Luau function unaffected by later <code>hookfunction</code> calls on the original.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local cloned = clonefunction(print)
hookfunction(print, function() warn("Hooked!") end)
cloned("Not hooked.") -- works normally
print("Is hooked.")</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>hookfunction(original:function, hook:function):function</h3>
<p>Replaces <code>original</code> with <code>hook</code>. Returns the original function.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
hookfunction(print, function(...) warn("Print called!") end)</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>newcclosure(func:function):function</h3>
<p>Wraps a Luau function in a C-closure, making it more resilient to certain forms of inspection.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local c = newcclosure(function(a, b) return a + b end)
print(c(5, 7)) -- 12</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>newlclosure(func:function, env:table):function</h3>
<p>Creates a new Luau closure optionally bound to a custom environment table.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local l = newlclosure(function() print(CustomGlobal) end, {CustomGlobal="Hello!"})
l()</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>setreadonly(table:table, readonly:boolean):null</h3>
<p>Sets the read-only status of a table. If the executor lacks native <code>setreadonly</code>, NEX emulates it by locking the metatable with a blocking <code>__newindex</code>.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local t = {a=1}
setreadonly(t, true)
t.a = 5 -- silently fails
print(t.a) -- 1
setreadonly(t, false)
t.a = 10
print(t.a) -- 10</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>rawsetmetatable(target:userdata/table, mt:table):null</h3>
<p>Sets the metatable for a table or userdata without triggering <code>__metatable</code> guards.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
rawsetmetatable(myTable, {__index = function(t,k) return "Intercepted: "..k end})
print(myTable.someKey)</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>rawgetmetatable(target:userdata/table):table</h3>
<p>Retrieves the metatable of a table or userdata without triggering <code>__metatable</code> guards.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local mt = rawgetmetatable(Instance.new("Part"))
print(typeof(mt))</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>GetRegisteredInstances(null):table</h3>
<p>Returns a table containing references to most instances existing in Luau's internal registry state.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local all = GetRegisteredInstances()
for _, inst in pairs(all) do
if inst:IsA("Part") then print(inst.Name) end
end</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>CloneReference(ref:userdata):userdata</h3>
<p>Returns a new independent reference to the given userdata. Changes to the clone's metatable do not affect the original.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local clone = CloneReference(game)
rawsetmetatable(clone, {})
print(rawgetmetatable(game) == rawgetmetatable(clone)) -- false</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>ReplicateSignal(signal:RBXScriptSignal):null</h3>
<p>Replicates server-sided RBXScriptSignals to the client.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
ReplicateSignal(game.Players.LocalPlayer.Kill)</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>GetConnections(signal:RBXScriptSignal):table</h3>
<p>Returns a table of all active <code>RBXScriptConnection</code> objects connected to the given signal.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local conn = workspace.ChildAdded:Connect(function() end)
local conns = GetConnections(workspace.ChildAdded)
print("#connections:", #conns)
conn:Disconnect()</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<h3>loadstring(str:string, chunkname:string?):function</h3>
<p>Loads a Luau code string and returns it as a callable function. <code>chunkname</code> is used in error messages.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
local fn = loadstring("print('Hello from loadstring!')", "MyChunk")
if fn then fn() end</div>
<p>Accuracy: NEX Developed</p>
<div class="divider"></div>
<!-- ---- Runtime vars ---- -->
<h2>Runtime Variables</h2>
<h3>NEX_Loaded:boolean</h3>
<p>Set to <code>true</code> in the script environment once NEX has finished injecting. Always wait for this before calling any NEX function.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
print("NEX is ready!")</div>
<div class="divider"></div>
<h3>Settings:table</h3>
<p>A snapshot of the current NEX settings (same keys as <code>Settings.json</code>), updated on each injection pass.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
print(Settings.FilesEnabled) -- true/false
print(Settings.CapabilityMax) -- e.g. 2
print(Settings.XMLEnabled) -- true/false</div>
<div class="divider"></div>
<h3>LoadedIcons:table</h3>
<p>A table of loaded icon asset strings keyed by name. Always includes <code>LoadedIcons.NEX</code>.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
print(LoadedIcons.NEX) -- rbxasset://... URL for the NEX icon</div>
<div class="divider"></div>
<h3>_NEXVERSION:string</h3>
<p>The currently running NEX version string.</p>
<div class="code-blockx">repeat task.wait() until NEX_Loaded
print(_NEXVERSION) -- "1.0.9"</div>
</div>
<!-- ===== TAB 1: COMPILING ===== -->
<div class="section">
<h1>Compiling</h1>
<p>NEX scans the Lua registry on startup (and again whenever <span class="mono">UpdateNEX</span> is called) and injects the NEX environment into every eligible Luau thread it finds. This scan is called <b>nexify</b>. The behaviour for a given thread is controlled by a set of special boolean flags that a script sets on its own environment before NEX runs.</p>
<p>Setting these flags tells NEX how to treat the script — whether to skip it entirely, inject the standard renv, or switch it to the low-level NEXLuau API. All flags are checked during the nexify pass; they have no effect after injection has already occurred for that thread.</p>
<h2>Environment Flags</h2>
<div class="func-header"><h3>Protected_Environment:boolean</h3></div>
<p>When set to <span class="mono">true</span> in a script's environment, NEX will <b>completely skip</b> that thread during injection. No NEX functions, no <span class="mono">NEX_Loaded</span>, nothing. The script runs as a plain Roblox Luau script with no emulator involvement.</p>
<p>If <span class="mono">Settings.DebugMode</span> is on, or if <span class="mono">ForceDebuggedEnvironment</span> is also set on the same environment, NEX prints a warning: <span class="mono">"{script} IS PROTECTED"</span>.</p>
<p>Use this to opt a script out of NEX entirely — useful for utility modules that must run in a clean Roblox environment and must not have their globals overwritten.</p>
<h3>Example</h3>
<div class="code-blockx">-- At the very top of your script, before any yields,
-- so NEX sees the flag during the nexify pass.
local env = getfenv()
env.Protected_Environment = true
-- NEX will never touch this thread.
-- Standard Roblox globals only from here on.
print(game.Name)</div>
<div class="divider"></div>
<div class="func-header"><h3>NEXLuau:boolean</h3></div>
<p>Opts the script into <b>NEXLuau mode</b> — a low-level C-style API surface inspired by C++ standard library naming. When NEX sees this flag it redirects the script environment's <span class="mono">__index</span> metamethod to the global <span class="mono">nexenv</span> table instead of the normal Roblox environment.</p>
<p>The practical effects are:</p>
<p><b>1.</b> All NEX renv functions (normally injected directly into the script's environment) are instead placed into <span class="mono">nexenv.std.NEXFunctions</span>. They are still accessible because <span class="mono">nexenv.std.NEXFunctions</span> is the effective <span class="mono">__index</span> target for global lookups.</p>
<p><b>2.</b> <span class="mono">NEX_Loaded</span> is set on the shared <span class="mono">nexenv</span> table rather than on the individual script environment.</p>
<p><b>3.</b> The script gains access to the full <span class="mono">nexenv.std</span> namespace directly by name — for example, <span class="mono">cout(...)</span> instead of <span class="mono">print(...)</span>.</p>
<h3>nexenv.std — The NEXLuau Standard Library</h3>
<p>All names below are accessible directly as globals inside a NEXLuau script.</p>
<table class="bin-table">
<thead><tr><th>Name</th><th>Maps to</th><th>Description</th></tr></thead>
<tbody>
<tr><td class="mono">cout</td><td><span class="mono">print</span></td><td>Standard output.</td></tr>
<tr><td class="mono">coutw</td><td><span class="mono">warn</span></td><td>Standard warning output.</td></tr>
<tr><td class="mono">throw</td><td><span class="mono">error</span></td><td>Raises an error.</td></tr>
<tr><td class="mono">dicti</td><td><span class="mono">next</span></td><td>Dictionary iterator — the raw <span class="mono">next</span> function for generic for loops.</td></tr>
<tr><td class="mono">tick</td><td><span class="mono">os.clock</span></td><td>Returns the CPU time in seconds.</td></tr>
<tr><td class="mono">sleep</td><td><span class="mono">task.wait</span></td><td>Yields the current thread.</td></tr>
<tr><td class="mono">task</td><td><span class="mono">task</span></td><td>The Roblox task library.</td></tr>
<tr><td class="mono">os</td><td><span class="mono">os</span></td><td>The Luau os library.</td></tr>
<tr><td class="mono">math</td><td><span class="mono">math</span></td><td>The Luau math library.</td></tr>
<tr><td class="mono">string</td><td><span class="mono">string</span></td><td>The Luau string library.</td></tr>
<tr><td class="mono">table</td><td><span class="mono">table</span></td><td>The Luau table library.</td></tr>
<tr><td class="mono">threads</td><td><span class="mono">coroutine</span></td><td>The Luau coroutine library.</td></tr>
<tr><td class="mono">random</td><td><span class="mono">Random</span></td><td>The Roblox Random class constructor.</td></tr>
<tr><td class="mono">luaL_dostring</td><td><span class="mono">loadstring</span></td><td>Compiles a string as a Luau chunk and returns it as a function.</td></tr>
<tr><td class="mono">call.protected</td><td><span class="mono">pcall</span></td><td>Protected call.</td></tr>
<tr><td class="mono">call.extended_protected</td><td><span class="mono">xpcall</span></td><td>Extended protected call with a message handler.</td></tr>
<tr><td class="mono">convert.tonumber</td><td><span class="mono">tonumber</span></td><td>String/value to number conversion.</td></tr>
<tr><td class="mono">convert.tostring</td><td><span class="mono">tostring</span></td><td>Value to string conversion.</td></tr>
<tr><td class="mono">types.luatype</td><td><span class="mono">type</span></td><td>Returns the Lua type of a value.</td></tr>
<tr><td class="mono">types.luautype</td><td><span class="mono">typeof</span></td><td>Returns the Roblox/Luau type of a value.</td></tr>
<tr><td class="mono">functiondebug.info</td><td><span class="mono">debug.info</span></td><td>Inspects functions or call stack frames.</td></tr>
<tr><td class="mono">functiondebug.getenvironment</td><td><span class="mono">getfenv</span></td><td>Returns the environment of a function.</td></tr>
<tr><td class="mono">luadebug.lua_registry</td><td><span class="mono">getreg()</span></td><td>A snapshot of the Lua registry captured at emulator startup.</td></tr>
<tr><td class="mono">tabledebug.__len</td><td><span class="mono">rawlen</span></td><td>Gets the raw length of a table, bypassing <span class="mono">__len</span>.</td></tr>
<tr><td class="mono">tabledebug.__index</td><td><span class="mono">rawget</span></td><td>Gets a table field, bypassing <span class="mono">__index</span>.</td></tr>
<tr><td class="mono">tabledebug.__newindex</td><td><span class="mono">rawset</span></td><td>Sets a table field, bypassing <span class="mono">__newindex</span>.</td></tr>
<tr><td class="mono">tabledebug.__equal</td><td><span class="mono">rawequal</span></td><td>Compares two values without metamethods.</td></tr>
<tr><td class="mono">tabledebug.setmetatable</td><td><span class="mono">setmetatable</span></td><td>Standard setmetatable.</td></tr>
<tr><td class="mono">tabledebug.getmetatable</td><td><span class="mono">getmetatable</span></td><td>Standard getmetatable.</td></tr>
<tr><td class="mono">tabledebug.__metatable.rawgetmetatable</td><td><span class="mono">getrawmetatable</span></td><td>Gets the raw metatable, bypassing <span class="mono">__metatable</span> protection.</td></tr>
<tr><td class="mono">tabledebug.__metatable.rawsetmetatable</td><td><span class="mono">setrawmetatable</span></td><td>Sets the raw metatable, bypassing protection.</td></tr>
<tr><td class="mono">globals.globalenvironment</td><td><span class="mono">_G</span></td><td>The Luau global environment table.</td></tr>
<tr><td class="mono">globals.sharedenvironment</td><td><span class="mono">shared</span></td><td>The Roblox shared table.</td></tr>
</tbody>
</table>
<h3>nexenv.std.RobloxObjects</h3>
<p>The <span class="mono">RobloxObjects</span> sub-table exposes Roblox datatype constructors that are normally in the global scope. <span class="mono">Game</span> is wrapped in an isolated cloneref with a blank metatable so changes to it don't leak back to the real game service.</p>
<table class="bin-table">
<thead><tr><th>Name</th><th>Roblox type</th></tr></thead>
<tbody>
<tr><td class="mono">RobloxObjects.Game</td><td><span class="mono">game</span> (isolated cloneref)</td></tr>
<tr><td class="mono">RobloxObjects.Instance</td><td><span class="mono">Instance</span></td></tr>
<tr><td class="mono">RobloxObjects.Color3</td><td><span class="mono">Color3</span></td></tr>
<tr><td class="mono">RobloxObjects.Enum</td><td><span class="mono">Enum</span></td></tr>
<tr><td class="mono">RobloxObjects.Vector3</td><td><span class="mono">Vector3</span></td></tr>
<tr><td class="mono">RobloxObjects.Vector2</td><td><span class="mono">Vector2</span></td></tr>
<tr><td class="mono">RobloxObjects.CFrame</td><td><span class="mono">CFrame</span></td></tr>
<tr><td class="mono">RobloxObjects.UDim2</td><td><span class="mono">UDim2</span></td></tr>
<tr><td class="mono">RobloxObjects.UDim</td><td><span class="mono">UDim</span></td></tr>
<tr><td class="mono">RobloxObjects.Font</td><td><span class="mono">Font</span></td></tr>
<tr><td class="mono">RobloxObjects.TweenInfo</td><td><span class="mono">TweenInfo</span></td></tr>
<tr><td class="mono">RobloxObjects.RaycastParams</td><td><span class="mono">RaycastParams</span></td></tr>
<tr><td class="mono">RobloxObjects.OverlapParams</td><td><span class="mono">OverlapParams</span></td></tr>
<tr><td class="mono">RobloxObjects.PhysicalProperties</td><td><span class="mono">PhysicalProperties</span></td></tr>
<tr><td class="mono">RobloxObjects.Path2DControlPoint</td><td><span class="mono">Path2DControlPoint</span></td></tr>
<tr><td class="mono">RobloxObjects.RotationCurveKey</td><td><span class="mono">RotationCurveKey</span></td></tr>
</tbody>
</table>
<h3>nexenv top-level fields</h3>
<p>In addition to <span class="mono">nexenv.std</span>, the following fields sit on <span class="mono">nexenv</span> itself and are visible as globals inside a NEXLuau script.</p>
<table class="bin-table">
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td class="mono">task</td><td>The Roblox task library (also in std; provided at both levels for convenience).</td></tr>
<tr><td class="mono">__index</td><td>The raw Instance <span class="mono">__index</span> method captured by NEX.</td></tr>
<tr><td class="mono">__newindex</td><td>The raw Instance <span class="mono">__newindex</span> method captured by NEX.</td></tr>
<tr><td class="mono">NEX_Loaded</td><td>Set to <span class="mono">true</span> once NEX has injected. In NEXLuau mode this lives on <span class="mono">nexenv</span> rather than on the individual script environment.</td></tr>
</tbody>
</table>
<h3>Example</h3>
<div class="code-blockx">-- Tell NEX this is a NEXLuau script
local env = getfenv()
env.NEXLuau = true
-- Wait for injection (NEX_Loaded is on nexenv, still visible as a global)
repeat sleep(0) until NEX_Loaded
-- Use the NEXLuau stdlib
cout("Hello from NEXLuau!") -- print
coutw("This is a warning") -- warn
local ok, err = call.protected(function()
throw("oops") -- error
end)
coutw("Caught:", err)
-- Access Roblox datatypes
local part = RobloxObjects.Instance.new("Part")
part.Size = RobloxObjects.Vector3.new(4, 1, 2)
part.Parent = RobloxObjects.Game.Workspace
-- Low-level table access
local t = {10, 20, 30}
cout(tabledebug.__len(t)) -- 3
cout(tabledebug.__index(t, 2)) -- 20
-- Compile and run a string at runtime
local chunk = luaL_dostring("return 1 + 1")
cout(chunk()) -- 2
-- type checking
cout(types.luatype(part)) -- "userdata"
cout(types.luautype(part)) -- "Instance"</div>
<div class="divider"></div>
<div class="func-header"><h3>ExternalThread:boolean</h3></div>
<p>Marks the thread as <b>external</b> — meaning it originated outside of the normal Roblox script context (for example, a thread spawned directly by an executor). When NEX detects this flag during nexify it performs a thread re-spawn:</p>
<p><b>1.</b> The thread is cancelled with <span class="mono">task.cancel</span>.</p>
<p><b>2.</b> NEX yields one frame with <span class="mono">task.wait()</span>.</p>
<p><b>3.</b> The same thread coroutine is re-spawned with <span class="mono">task.spawn</span>.</p>
<p>This re-spawn happens <em>after</em> the renv has already been injected into the thread's environment, so the thread resumes with full NEX globals available from the very first line. If <span class="mono">Settings.DebugMode</span> is on, NEX logs <span class="mono">"{script} is EXTERNAL"</span>.</p>
<p><span class="mono">ExternalThread</span> is independent of <span class="mono">NEXLuau</span> — both flags can be set together.</p>
<h3>Example</h3>
<div class="code-blockx">local env = getfenv()
env.ExternalThread = true
-- After NEX re-spawns this thread, NEX_Loaded is already true.