-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
script.lua
3146 lines (2776 loc) · 88 KB
/
script.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--[[
https://github.com/nexpid/OCPlus
CC-BY-4.0 license license
The Creative Commons Attribution 4.0 International License is an open
and flexible license that grants users the ability to share, adapt,
and build upon the contents of this project for any purpose, including
commercial endeavors. Under this license, users are required to provide
appropriate attribution to the original author(s), acknowledging their
contribution to the work. This license promotes collaboration and
innovation by allowing individuals and organizations to leverage and
modify the project while ensuring that credit is given to the creators.
]]
-- Services n global stuff
task.wait()
local version = "0.9"
local accent = Color3.fromHex("986dcf")
local CAS = game:GetService("ContextActionService")
local VIM = game:GetService("VirtualInputManager")
local TS = game:GetService("TweenService")
local RS = game:GetService("RunService")
local IS = game:GetService("InsertService")
local MS = game:GetService("MarketplaceService")
local UIS = game:GetService("UserInputService")
local HTTP = game:GetService("HttpService")
local FPS = 0
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local hui = gethui or gethiddenui
if not hui then hui = game.CoreGui
else hui = hui() end
if game.GameId ~= 1053132402 then
local m = Instance.new("Message", hui)
m.Text = "This script only works in Obby Creator."
task.wait(3)
m:Destroy()
return
end
local pui = plr:WaitForChild("PlayerGui")
local ldo = pui:WaitForChild("LoadObby")
local ui = pui:WaitForChild("Edit")
local tpb = pui:WaitForChild("TopBar")
local chf = pui:WaitForChild("TrackInputs").ChangeFrame
local out = pui:WaitForChild("LocalOutput")
local tt = ui.SelectionFrame
local props = ui.PropertiesFrame
local propsTxt = props.ScrollingFrame.cEffects1.ScrollingFrame.text1.Text
-- Tools
task.wait()
_G.ocPLncSpeed = _G.ocPLncSpeed or 1.1
local meetamethod = tick()
_G.ocPLmetamethod = meetamethod
local ocpAPI = "https://ocplus-utilities.repl.co/"
_G.ocPLuser = _G.ocPLuser or {}
for _, x in pairs(game.Players:GetChildren()) do
_G.ocPLuser[tostring(x.UserId)] = x.Name
end
local function cacheUsername(uid, func)
uid = tostring(uid)
if _G.ocPLuser[uid] then
if func then func(_G.ocPLuser[uid]) end
else
if func then func("...") end
task.spawn(function()
local k, username = pcall(game.Players.GetNameFromUserIdAsync, game.Players, tonumber(uid))
if not k or not username then username = "[invalid]" end
_G.ocPLuser[uid] = username
if func then func(username) end
end)
end
end
_G.ocPLLCa = _G.ocPLLCa or {}
local function loadLAsset(xr)
if _G.ocPLLCa[xr] then
return _G.ocPLLCa[xr]:Clone()
else
local oi = IS:LoadLocalAsset(xr)
_G.ocPLLCa[xr] = oi:Clone()
return oi
end
end
local addonsFr, keybindsFr, colpStuff
local toFetch = {
{"rbxassetid://12318412905", function(x) addonsFr = x end},
{"rbxassetid://12094135305", function(x) keybindsFr = x end},
{"rbxassetid://12217234108", function(x) colpStuff = x end},
}
-- Fetching
for _, x in pairs(toFetch) do
local id, fn = x[1], x[2]
fn(loadLAsset(id))
end
local Req = request or httprequest or http_request or (http and http.request) or (syn and syn.request)
local executor = identifyexecutor and identifyexecutor() or "unknown"
local platform = UIS:GetPlatform().Name
local customast = getcustomasset or getsynasset
if not Req then
local message = Instance.new("Message")
message.Text = (("🚨 bad exploit alert 🚨\nyour exploit (%s) doesn't support any form of HTTP requests (required)"):format(executor))
message.Parent = game.CoreGui
task.wait(5)
message:Destroy()
return
end
local function getLProperty(obj, k)
local scs = pcall(gethiddenproperty, obj, k)
return scs
end
local function HttpGet(url, tag, extra)
extra = extra or {}
extra.Url = url
extra.Method = extra.Method or "GET"
local isc, response = pcall(Req, extra)
if not isc then
response = {
Success = false,
StatusCode = "NaN",
StatusMessage = response,
Headers = {},
Cookies = {}
}
end
if not response.Success then
local st = tostring(response.StatusCode) .. " " .. tostring(response.StatusMessage)
local caption = ("An error has occured while trying to fetch from: %s\nHTTP Status: %s\n\nA complete error has been copied to your clipboard."):format(url, st)
if messagebox then
local message = messagebox(caption, "Uh Oh!", 0)
else
rconsoleclear()
rconsolename("HTTP Error")
rconsoleprint(caption)
rconsoleprint("\n\nThis console will close in 10 seconds.")
task.delay(10, function()
rconsoleclear()
rconsoleclose()
end)
end
local heads = {}
for x, y in pairs(response.Headers or {}) do
table.insert(heads, (" %s = %s"):format(x, y))
end
local cookies = {}
for x, y in pairs(response.Cookies or {}) do
table.insert(cookies, (" %s = %s"):format(x, y))
end
local tosave = ([[--= HTTP Crash Log Generated by OC+ =--
Version: %s
Player: %s (UserID: %s)
Executor: %s
Platform: %s
Error: %s
Request URL: %s
Request Tag: %s
Response Status: %s
Response Headers:
%s
Response Cookies:
%s
Response Body:
%s]]):format(
version,
plr.Name,
plr.UserId,
executor,
platform,
(isc and "NONE" or response),
url,
tag or "NONE",
st,
table.concat(heads, "\n"),
table.concat(cookies, "\n"),
response.Body or ""
)
setclipboard(tosave)
return
end
return response.Body
end
local icons = HTTP:JSONDecode(HttpGet("https://raw.githubusercontent.com/nexpid/OCPlus/main/assets/iconOverride.json", "icons"))
local iconMap = {}
for _, x in pairs(icons) do
if not typeof(x) == "table" then continue end
for y, z in pairs(x) do
iconMap[y] = z[2]
end
end
-- Reverting numero uno
if _G.ocPLrpcW then _G.ocPLrpcW:Close(); _G.ocPLrpcW = nil end
for y, x in pairs(_G.ocPLbackup or {}) do
for p, v in pairs(x) do
pcall(function()
y[p] = v
end)
end
end
local Yay, Yoy = 0, 0
for _, x in pairs(_G.ocPLrunningAds or {}) do
Yoy += 1
task.spawn(function()
pcall(x)
Yay += 1
end)
end
repeat task.wait() until Yay >= Yoy
local par = gethui and gethui() or game.CoreGui
if par:FindFirstChild("ohno") then par.ohno:Destroy() end
local ohno = Instance.new("ScreenGui")
ohno.Name = "ohno"
ohno.IgnoreGuiInset = true
ohno.Parent = par
local function preloadJumpscare(location)
local z = Instance.new("ImageLabel")
z.Name = "prepre"
z.Image = location
z.BackgroundTransparency = 1
z.Visible = true
z.Size = UDim2.new(0, 100, 0, 100)
z.Parent = ohno
task.spawn(function()
repeat task.wait() until z.IsLoaded
z:Destroy()
end)
end
local function preloadAudio(location)
local z = Instance.new("Sound")
z.SoundId = location
z.Volume = 1
z.Parent = workspace
task.spawn(function()
repeat task.wait() until z.IsLoaded
z:Destroy()
end)
end
local function getSelected()
local b = {}
for _, x in pairs(ui.LocalScript:GetChildren()) do
if x.Name == "BoxSelection" then b[#b+1] = x.Adornee end
end
return b
end
local isFrozenKb = false
local function freezeKBs()
isFrozenKb = true
end
local function unfreezeKBs()
isFrozenKb = false
end
local function hstuff(path, url, id, zamn)
if not isfile(path) then
if id == "lol" then writefile(path, url)
else writefile(path, HttpGet(url, id)) end
end
if zamn == "jumpscare" then preloadJumpscare(customast(path))
elseif zamn == "audio" then preloadAudio(customast(path)) end
end
local function docomic()
return HTTP:JSONEncode({
name = "Comic Sans",
faces = {
{
name = "Regular",
weight = 400,
style = "normal",
assetId = customast("ocplus/other/comic.ttf")
},
{
name = "Regular Italic",
weight = 400,
style = "italic",
assetId = customast("ocplus/other/comici.ttf")
},
{
name = "Bold",
weight = 700,
style = "normal",
assetId = customast("ocplus/other/comicbd.ttf")
},
{
name = "Bold Italic",
weight = 700,
style = "italic",
assetId = customast("ocplus/other/comicz.ttf")
}
}
})
end
task.spawn(function()
if not isfolder("ocplus") then makefolder("ocplus") end
if not isfolder("ocplus/images") then makefolder("ocplus/images") end
if not isfolder("ocplus/sounds") then makefolder("ocplus/sounds") end
if not isfolder("ocplus/download") then makefolder("ocplus/download") end
if not isfolder("ocplus/settings") then makefolder("ocplus/settings") end
if not isfolder("ocplus/other") then makefolder("ocplus/other") end
if not isfolder("ocplus/addons") then makefolder("ocplus/addons") end
hstuff("ocplus/other/comic.ttf", "https://raw.githubusercontent.com/nexpid/OCPlus/refs/heads/main/cdn/other/comic.ttf", "getting assets comic.ttf")
hstuff("ocplus/other/comici.ttf", "https://raw.githubusercontent.com/nexpid/OCPlus/refs/heads/main/cdn/other/comici.ttf", "getting assets comici.ttf")
hstuff("ocplus/other/comicbd.ttf", "https://raw.githubusercontent.com/nexpid/OCPlus/refs/heads/main/cdn/other/comicbd.ttf", "getting assets comicbd.ttf")
hstuff("ocplus/other/comicz.ttf", "https://raw.githubusercontent.com/nexpid/OCPlus/refs/heads/main/cdn/other/comicz.ttf", "getting assets comicz.ttf")
hstuff("ocplus/other/comic.json", docomic(), "lol")
hstuff("ocplus/images/logo_tile.png", "https://raw.githubusercontent.com/nexpid/OCPlus/refs/heads/main/cdn/images/logo_tile.png", "getting assets ocplus_bg.png", "jumpscare")
hstuff("ocplus/images/logo.png", "https://raw.githubusercontent.com/nexpid/OCPlus/refs/heads/main/cdn/images/logo.png", "getting assets ocplus.png", "jumpscare")
hstuff("ocplus/images/shocked.png", "https://raw.githubusercontent.com/nexpid/OCPlus/refs/heads/main/cdn/images/shocked.png", "getting assets surprised.png", "jumpscare")
hstuff("ocplus/sounds/violinScreech.mp3", "https://raw.githubusercontent.com/nexpid/OCPlus/refs/heads/main/cdn/sounds/violinScreech.mp3", "getting assets violinScreech.mp3", "audio")
hstuff("ocplus/sounds/vineBoom.mp3", "https://raw.githubusercontent.com/nexpid/OCPlus/refs/heads/main/cdn/sounds/vineBoom.mp3", "getting assets vineBoom_1.mp3", "audio")
hstuff("ocplus/sounds/lois I'm in ocplus.mp3", "https://raw.githubusercontent.com/nexpid/OCPlus/refs/heads/main/cdn/sounds/peter.mp3", "hey lois I broke the OC+ script", "audio")
end)
local function jumpscare(location, t)
local s = Instance.new("ImageLabel", ohno)
s.BorderSizePixel = 0
s.Size = UDim2.new(1, 0, 1, 0)
s.BackgroundTransparency = 1
s.ScaleType = Enum.ScaleType.Fit
s.Image = location
s.ImageTransparency = 0
t = t or 1
TS:Create(s, TweenInfo.new(t), {
ImageTransparency = 1
}):Play()
task.delay(t+0.1, function()
s:Destroy()
end)
end
local function playAudio(location, volume)
local s = Instance.new("Sound")
s.SoundId = location
s.Volume = volume or 1
s.Parent = game.CoreGui
s:Play()
s.Ended:Connect(function()
s:Destroy()
end)
end
local function getVersionID(a)
local h = a:split("-")
local n = 0
local t = h[1]:split(".")
for i = 1, math.floor(#t/2) do
local j = #t - i + 1
t[i], t[j] = t[j], t[i]
end
local mult = 1
for i, x in pairs(t) do
n = n + x*mult
mult = mult * 10
end
return n
end
local classIdentifiers = {
BackgroundColor3 = {
Frame = true,
ImageButton = true,
TextButton = true,
ImageLabel = true,
TextLabel = true,
ScrollingFrame = true,
TextBox = true,
VideoFrame = true,
ViewportFrame = true,
},
TextColor3 = {
TextButton = true,
TextLabel = true,
TextBox = true
},
ImageColor3 = {
ViewportFrame = true,
ImageLabel = true,
ImageButton = true
}
}
-- console formatting yay
task.spawn(function()
local cons = game.CoreGui:WaitForChild("DevConsoleMaster", 1337):WaitForChild("DevConsoleWindow", 1337):WaitForChild("DevConsoleUI", 1337)
if _G.ocPLconsole then _G.ocPLconsole:Disconnect() end
local function checkCDescendant(x)
if x.Parent.Name ~= "ClientLog" and x.Parent.Name ~= "ServerLog" then return end
local z = x:FindFirstChild("msg")
if not z then return end
local txt = ""
local toUnwrite = {}
local written = ""
local sqNext, isSq = false, false
local toxt = z:GetAttribute("ogtext") or z.Text
if not z:GetAttribute("ogtext") then
z:SetAttribute("ogtext", toxt)
z.Text = z.Text:gsub("&", "&"):gsub("'", "'"):gsub("\"", """):gsub(">", ">"):gsub("<", "<")
end
for _, B in pairs(toxt:split("")) do
if sqNext then
sqNext = false
if B == "[" then isSq = true
else isSq = false; txt += B end
end
if B == "\x1B" then sqNext = true end
if not isSq and not sqNext then
txt = txt .. B
elseif isSq then
if B == ";" or B == "m" then
if B == "m" then isSq = false end
local form = {
["1"] = "b",
["3"] = "i",
["4"] = "u",
["9"] = "s"
}
local color = {
["30"] = "#000000",
["31"] = "#cd3131",
["32"] = "#0dbc79",
["33"] = "#e5e510",
["34"] = "#2472c8",
["35"] = "#bc3fbc",
["36"] = "#11a8cd",
["37"] = "#e5e5e5",
["90"] = "#666666",
["91"] = "#f14c4c",
["92"] = "#23d18b",
["93"] = "#f5f543",
["94"] = "#3b8eea",
["95"] = "#d670d6",
["96"] = "#29b8db",
["97"] = "#e5e5e5"
}
if written == "0" then
txt = txt .. table.concat(toUnwrite, "")
toUnwrite = {}
end
for A, C in pairs(form) do
if written == A then
txt = txt .. "<"..C..">"
table.insert(toUnwrite, 1, "</"..C..">")
end
end
for A, C in pairs(color) do
if written == A then
txt = txt .. ("<font color=\"%s\">"):format(C)
table.insert(toUnwrite, 1, "</font>")
end
end
written = ""
else
if B ~= "[" then
written = written .. B
end
end
end
end
txt = txt .. table.concat(toUnwrite, "")
z.RichText = true
z.Text = txt
end
_G.ocPLconsole = cons.DescendantAdded:Connect(checkCDescendant)
for _, x in pairs(cons:GetDescendants()) do
checkCDescendant(x)
end
end)
local function getKey(a)
return UIS:GetStringForKeyCode(a)
end
local function getKeyboardKey(char)
for _, d in pairs(Enum.KeyCode:GetEnumItems()) do
local z = getKey(d)
if z:lower() == char:lower() then return d end
end
return Enum.KeyCode.Return
end
_G.ocPLevents = _G.ocPLevents or {}
local function ev(e)
_G.ocPLevents[#_G.ocPLevents+1] = e
end
_G.ocPLrunningAds = {}
-- cwy about it :3
local IsEditing2 = pui.IsEditing
local function doInArea(p1, p2, mode)
local v4 = nil;
v4 = p1.Area;
if mode == 3 then
local v5 = v4.Size.Z / 2 + 60;
local v6 = v4.Size.Y / 2;
local v7 = v4.Size.X / 2 + 20;
return Vector3.new(math.clamp(p2.X, v4.Position.X - v7, v4.Position.X + v7), math.clamp(p2.Y, v4.Position.Y - v6 - 10, v4.Position.Y + v6 + 30), math.clamp(p2.Z, v4.Position.Z - v5, v4.Position.Z + v5));
end;
if mode ~= 2 then
return;
end;
if IsEditing2.Value ~= true then
local v8 = v4.Size.Z / 2;
local v9 = v4.Size.Y / 2;
local v10 = v4.Size.X / 2;
return Vector3.new(math.clamp(p2.X, v4.Position.X - v10, v4.Position.X + v10), math.clamp(p2.Y, v4.Position.Y - v9, v4.Position.Y + v9 + 30), math.clamp(p2.Z, v4.Position.Z - v8, v4.Position.Z + v8));
end;
local v11 = v4.Size.Z / 2 + 20;
local v12 = v4.Size.Y / 2;
local v13 = v4.Size.X / 2;
return Vector3.new(math.clamp(p2.X, v4.Position.X - v13, v4.Position.X + v13), math.clamp(p2.Y, v4.Position.Y - v12 - 10, v4.Position.Y + v12 + 30), math.clamp(p2.Z, v4.Position.Z - v11, v4.Position.Z + v11));
end;
local ncSpeed = 0
local oldm
local xoldPos, xoldCam
oldm = hookmetamethod(game, "__newindex", function(self, k, v)
if _G.ocPLmetamethod == meetamethod then
if tostring(self) == "BodyPosition" and k == "Position" then
if xoldPos then
local diff = v-xoldPos
v = xoldPos+diff*ncSpeed
end
if pui.CurrentObby.Value then v = doInArea(pui.CurrentObby.Value, v, 2) end
xoldPos = v
end
end
return oldm(self, k, v)
end)
local doingKB = false
local adds = {}
-- Addons aONE
-- Enhancements
_G.ocPLiconz = {}
local assignA, doColorPicker, doIcons, doLoaded, plusIcon, setCopies, setObbyTimer = {}, nil, nil, nil, nil, nil, nil
-- DRpc
local setActivity, rpcA = nil, nil
-- Darkmode
_G.ocPLbackup = _G.ocPLbackup or {}
local dmed, redoThingiesOmg = {}, nil
local addons = {
enhance = {
title = "UI Enhancements",
description = "Modernizes Obby Creator’s interface for better usage and clear alot of the clutter.",
settings = {
{
name = "HQ Text",
id = "textenhance",
type = "toggle",
description = "Makes Text higher quality."
},
{
name = "Colors++",
id = "colorpicker",
type = "toggle",
description = "Adds fancy features to the color picker."
},
{
name = "Fancy Icons",
id = "icons",
type = "toggle",
description = "Replaces OC's icons with cooler and darkmode supported icons."
},
{
name = "Grid/List View",
id = "gridlist",
type = "toggle",
description = "Adds a grid/list view to the Load Obby screen."
},
{
name = "Maximise Text",
id = "maxtext",
type = "toggle",
description = "Adds a maximise button next to the Text property."
},
{
name = "More Copy Buttons",
id = "copybtns",
type = "toggle",
description = "Adds more Copy buttons to the properties tab."
},
{
name = "Obby Timer",
id = "obbytimer",
type = "toggle",
description = "Shows how long you've been playing/editing an obby."
}
},
run = {
start = function(Util)
Util.run.update(Util)
end,
update = function(Util, key)
if not key or key == "textenhance" then
local b = Util.data.textenhance and 2 or 1
for x in pairs(assignA) do
pcall(function()
x.PixelsPerStud = 27*b
x.CanvasSize = Vector2.new(640, 480)*b
end)
end
end
if not key or key == "colorpicker" then doColorPicker(Util.data.colorpicker) end
if not key or key == "icons" then doIcons(Util.data.icons) end
if not key or key == "gridlist" then doLoaded(Util.data.gridlist) end
if not key or key == "maxtext" then plusIcon.Visible = Util.data.maxtext end
if not key or key == "copybtns" then setCopies(Util.data.copybtns) end
if not key or key == "obbytimer" then setObbyTimer(Util.data.obbytimer) end
end,
stop = function(Util)
for x in pairs(assignA) do
pcall(function()
x.PixelsPerStud = 27
x.CanvasSize = Vector2.new(640, 480)
end)
end
doColorPicker(false)
doIcons(false)
doLoaded(false)
plusIcon.Visible = false
setCopies(false)
setObbyTimer(false)
end
},
working = true
},
drpc = {
title = "Discord RPC",
description = "Implements a new Obby Creator Discord RPC, which showcases what obby are you playing or editing.",
settings = {},
run = {
start = function(Util)
repeat task.wait() until _G.ocPLrpcW ~= nil
if _G.ocPLrpcW == false then
if Util.reconn and Util.reconn >= tick() then
Util.reconn = tick()
Util.canInteract = false
out:Fire("Reconnecting...", Color3.new(0.75, 0.75, 0.75), 5)
rpcA(true)
Util.canInteract = true
if not _G.ocPLrpcW then Util.disable() return end
else
Util.disable()
Util.reconn = tick()+0.75
return out:Fire("OC+ RPC not connected! (doube click to reconnect!)", Color3.new(1, 0.2, 0.2), 5)
end
end
setActivity()
end,
stop = function(Util)
setActivity()
end
},
working = true
},
revert = {
title = "Revert Lighting",
description = "Reverts Obby Creator's lighting back to Compability.",
settings = {},
run = {
set = function(yas)
setscriptable(game.Lighting, "Technology", true)
sethiddenproperty(game.Lighting, "Technology", yas
and Enum.Technology.Compatibility
or Enum.Technology.Future)
end,
start = function(Util)
Util.run.set(true)
end,
stop = function(Util)
Util.run.set(false)
end
},
working = true
},
darkmode = {
title = "Dark Mode",
description = "Turns OC's UI to a gamer-friendly shade. (to be replaced by Themes!)",
settings = {
{
name = "Mode",
id = "mode",
type = "choose",
description = "Switch between dark mode modes.",
choose = {"Monochrome", "Saturated"}
}
},
run = {
set = function(Util, fps, arr, a)
Util.canInteract = false
local i = 0
for y, x in pairs(arr) do
i=i+1
for p, v in pairs(x) do
local scs, xod = pcall(function()
if y[p] == v then return end
y[p] = v
end)
end
if i % math.floor(fps) == 0 then RS.RenderStepped:Wait() end
end
ui.SettingsFrame.ThisFrame.MusicFrame.Back.ImageColor3 = Color3.new(a, a, a)
Util.canInteract = true
end,
start = function(Util)
Util.run.set(Util, FPS*10, dmed, 1)
end,
update = function(Util, key)
if key == "mode" then
redoThingiesOmg()
end
end,
stop = function(Util)
Util.run.set(Util, FPS*10, _G.ocPLbackup, 0)
end
},
working = true
},
themes = {
title = "Themes",
description = "Implements the ability to create themes, import and export themes as JSON files, preset themes like Dark Mode and more to come.",
settings = {},
working = false
},
plugins = {
title = "Improved Plugins",
description = "Implements new plugins for usage such as Roblox Music, unlock paywalled plugins and more to come.",
settings = {},
working = false
},
debug = {
title = "Debugging",
description = "Implements a fancy console which tracks what buttons were activated.",
settings = {},
working = false
},
imparts = {
title = "Improved Parts",
description = "Implements the ability to group parts, lock parts and save those combinations to a JSON file.",
settings = {},
working = false
},
impremades = {
title = "Improved Premades",
description = "Implements the ability to export premades as JSON files, infinite local premades and more to come.",
settings = {},
working = false
}
}
local adkeys = {"enhance", "drpc", "revert", "darkmode", "themes", "plugins", "debug", "imparts", "impremades"}
adds = {
enhance = {
enabled = false,
textenhance = true,
colorpicker = true,
icons = true,
gridlist = true,
maxtext = true,
copybtns = true,
obbytimer = true,
gridstyle = "list"
},
drpc = {
enabled = false
},
revert = {
enabled = false
},
darkmode = {
enabled = false,
mode = "Saturated"
}
}
local defaultAdds = table.clone(adds)
if isfile("ocplus/settings/addons.json") then
local yay = pcall(function()
local newadds = HTTP:JSONDecode(readfile("ocplus/settings/addons.json"))
for A, B in pairs(newadds) do
adds[A] = B
end
end)
if not yay then
print("uh oh!")
end
end
local keys = {}
for y in pairs(addons) do keys[#keys+1] = y end
for _, x in pairs(listfiles("ocplus/addons")) do
if x:sub(-4, #x) ~= ".lua" then continue end
local y = readfile(x)
local addn, err = loadstring(y)
if addn then addn = addn() end
if addn then
if typeof(addn) ~= "table" then err = "Addon is not a table"
elseif typeof(addn.id) ~= "string" then err = "Addon.id is not a string"
elseif typeof(addn.title) ~= "string" then err = "Addon.title is not a string"
elseif typeof(addn.description) ~= "string" then err = "Addon.description is not a string"
elseif typeof(addn.version) ~= "number" then err = "Addon.version is not a number"
elseif typeof(addn.author) ~= "number" then err = "Addon.author is not a number"
elseif typeof(addn.settings) ~= "table" then err = "Addon.author is not a table"
elseif typeof(addn.data) ~= "table" then err = "Addon.author is not a table"
elseif table.find(keys, addn.id) then err = "Cannot overwrite official addon!"
elseif addons[addn.id] then err = "Addon with that ID already exists!" end
end
if err then
warn("==================")
warn("Failed loading addon!")
warn("Addon source: "..x)
warn("Loading error: "..err)
warn("==================")
else
addn.community = true
addn.working = true
addn.data.enabled = false
addn.path = x
local id = addn.id..""
defaultAdds[id] = addn.data
if not adds[id] then adds[id] = addn.data end
addons[id] = addn
end
end
local function doSettingsUI(redo)
ui.SettingsFrame.Back.Size = UDim2.new(1, 0, 1+redo*2, 0)
ui.SettingsFrame.Back.Position = UDim2.new(0.5, 0, 0.5, 0)
ui.SettingsFrame.Back.AnchorPoint = Vector2.new(0.5, 0.5)
ui.SettingsFrame.ThisFrame.Position = UDim2.new(0.5, 0, -redo, 0)
ui.SettingsFrame.ThisFrame.AnchorPoint = Vector2.new(0.5, 0)
ui.SettingsFrame.TextLabel.Position = UDim2.new(0.5, 0, -redo, 0)
ui.SettingsFrame.ClearButton.Position = UDim2.new(0.75, 0, 0.94+redo, 0)
ui.SettingsFrame.RevertButton.Position = UDim2.new(0.75, 0, 0.85+redo, 0)
ui.SettingsFrame.PermissionButton.Position = UDim2.new(0.75, 0, 0.76+redo, 0)
ui.SettingsFrame.TutorialButton.Position = UDim2.new(0.75, 0, 0.67+redo, 0)
if ui.SettingsFrame:FindFirstChild("OCPlusReload") then
ui.SettingsFrame.OCPlusReload.Position = UDim2.new(0.75, 0, 0.58+redo, 0)
end
ui.SettingsFrame.Close.Position = UDim2.new(1, -5, -redo, 5)
ui.SettingsFrame.DataUsedFrame.Position = UDim2.new(-0.075, 0, 0.4+redo/2, 0)
ui.SettingsFrame.TotalCostLabel.Position = UDim2.new(-0.025, 0, 0.85+redo/2, 0)
end
-- Reverting numero dos
task.wait()
CAS:UnbindAction("Keybinds")
if ui.PartCount:FindFirstChild("Timer") then ui.PartCount.Timer:Destroy() end
if ldo.CurrentObby:FindFirstChild("Timer") then ldo.CurrentObby.Timer:Destroy() end
if propsTxt:FindFirstChild("Plus") then propsTxt.Plus:Destroy() end
if ui:FindFirstChild("PlusBig") then ui.PlusBig:Destroy() end
if ldo.LoadFrame:FindFirstChild("ViewList") then ldo.LoadFrame.ViewList:Destroy() end
if ldo.LoadFrame:FindFirstChild("ViewGrid") then ldo.LoadFrame.ViewGrid:Destroy() end
if ui.SettingsFrame.ThisFrame:FindFirstChild("Addons") then ui.SettingsFrame.ThisFrame.Addons:Destroy() end
if ui.SettingsFrame.ThisFrame:FindFirstChild("Keybinds") then ui.SettingsFrame.ThisFrame.Keybinds:Destroy() end
if ui.SettingsFrame.ThisFrame:FindFirstChild("NoclipSpeed") then ui.SettingsFrame.ThisFrame.NoclipSpeed:Destroy() end
if ui.SettingsFrame:FindFirstChild("OCPlusReload") then ui.SettingsFrame.OCPlusReload:Destroy() end
if ui:FindFirstChild("AddonsFrame") then ui.AddonsFrame:Destroy() end
if ui:FindFirstChild("KeybindsFrame") then ui.KeybindsFrame:Destroy() end
if props.ColorPicker:FindFirstChild("cstuff") then props.ColorPicker.cstuff:Destroy() end
for _, x in pairs(_G.ocPLevents) do x:Disconnect() end
_G.ocPLevents = {}
for _, x in pairs(props.ScrollingFrame:GetDescendants()) do
if x.Name == "CopyButton" then x:Destroy() end
end
for x, y in pairs(_G.ocPLiconz) do x.Image = y end
doSettingsUI(0)
task.wait()
-- o
ev(RS.Heartbeat:Connect(function()
if not plr.Character or not plr.Character:FindFirstChild("BodyPosition", true) then
xoldPos = nil
end
if workspace.CurrentCamera.CameraType ~= Enum.CameraType.Scriptable then
xoldCam = nil
end
end))
-- UI (1)
task.wait()
-- key is either a Enum.KeyCode.X.Name or Enum.ModifierKey.X.Name
local keybinds = {
["Edit > Build Mode"] = {"One"},
["Edit > Fly Mode"] = {"Two"},
["Edit > Cam Mode"] = {"Three"},
["Edit > Switch Mode Back"] = {"Q"},
["Edit > Switch Mode"] = {"E"},
["Edit > Delete"] = {"Delete"},
["Edit > Tilt/Teleport"] = {"T"},
["Edit > Rotate"] = {"R"},
["Edit > Duplicate Objects"] = {"Ctrl", "C"},
["Noclip > Fly Up"] = {"C"},
["Noclip > Fly Down"] = {"Z"}
}
local defaultKeybinds = table.clone(keybinds)
local order = {"Edit > Build Mode", "Edit > Fly Mode", "Edit > Cam Mode", "Edit > Switch Mode Back", "Edit > Switch Mode", "Edit > Delete", "Edit > Tilt/Teleport", "Edit > Rotate", "Edit > Duplicate Objects", "Noclip > Fly Up", "Noclip > Fly Down"}
local function hasKeybind(kb, ignore, ignoreB)
for a, b in pairs(keybinds) do
if ignore == a then continue end
if b[#b] == kb then return true end
end
for a, b in pairs(adds) do
local add = addons[a]
local setss = add.settings or {}
for _, c in pairs(b) do
local sett = setss[c]
if not sett then continue end
if ignoreB == a and ignore == c then continue end
if sett == kb then return true end
end
end
return false
end
if isfile("ocplus/settings/keybinds.json") then
local yay = pcall(function()
local newkeybs = HTTP:JSONDecode(readfile("ocplus/settings/keybinds.json"))
for A, B in pairs(newkeybs) do
if not keybinds[A] then continue end
keybinds[A] = B
end
end)
if not yay then
print("uh oh! 2")
end
end
-- Keybinds
local function reloadKeybinds()
CAS:UnbindAction("Keybinds")
local deafK = {
"Keybinds",
function() return Enum.ContextActionResult.Sink end,
false,
2001,