-
Notifications
You must be signed in to change notification settings - Fork 2
/
Utility.lua
634 lines (515 loc) · 21.2 KB
/
Utility.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
local startgetTime = os.clock()
assert(identifyexecutor, "Executor name not found!")
if string.find(identifyexecutor(), "Wave") or getidentity() <= 6 then
return error("Utility has been blocked for Wave and Level 6 and under executors.")
end
local printEnabled = true
local supportedRobloxVersion = "0.636.1.6360627"
local executorName : string = identifyexecutor()
local Players : Players = game:GetService("Players")
local LocalPlayer : Player = Players.LocalPlayer
local CoreGui : CoreGui | PlayerGui = gethui() or game:GetService("CoreGui") or Players.LocalPlayer:WaitForChild("PlayerGui")
local Character : Model = Players.LocalPlayer.Character or Players.LocalPlayer.CharacterAdded:Wait()
local Humanoid : Humanoid = Character:WaitForChild("Humanoid")
LocalPlayer.CharacterAdded:Connect(function(char : Model)
Character = char
Humanoid = char:WaitForChild("Humanoid")
end)
assert(executorName, "Executor not found!")
local function dbgprint(...)
rconsoleprint("(Utility) [PRINT]: ".. ...)
end
local function dbgwarn(...)
rconsoleprint("(Utility) [WARNING]: ".. ...)
end
do -- Print Utility Information
local Contributors = {
"Trax (traxxy123)",
"RazAPIx64.dll (razzoni)",
"xyzkade (xyzkade)",
"Sashaa169 (centerepic)"
}
local Version = "v3.0.0"
local changeLog = {
["v3.0.1"] = {
"Minor update to hooks."
},
["v3.0.0"] = {
"Code cleanup",
"A lot of shit, look up the YT release announcement."
},
["v2.2.0"] = {
"Cleaned up and refactored code.",
"Increased integrity of utility, should be less error prone now."
},
["v2.1.1"] = {
"Optimizations and more stuff by xyzkade!",
"Character functions! (swim, speed, jump, sit)",
"UNC test! (unc)"
}
}
local changeLogString = ""
for version, changes in next, changeLog do
changeLogString = changeLogString .. "Changelog for " .. version .. ":\n"
for _, change in next, changes do
changeLogString = changeLogString .. " - " .. change .. "\n"
end
end
dbgprint(
"Utility Stable " .. Version .. "\n",
"Contact liablelua for any bugs or issues\n",
"Contributors:\n",
table.concat(Contributors, "\n"),
"\n" .. changeLogString
)
end
do -- Load executor-specific patches
local executorPatches = {
["Celery"] = function()
loadstring(game:HttpGet("https://raw.githubusercontent.com/liablelua/Utility/main/getCeleryVersion.lua"))()
if getCeleryVersion() == "2.0.9" or version() == "0.636.1.6360627" then
dbgwarn("⚠️ You are using an Unstable Celery Version (v2.0.9)")
dbgprint("✅ Applying cloneref patch to environment.")
cloneref = function(e) return e end
end
dbgprint("👽 Running Celery v" .. getCeleryVersion())
end
}
if executorPatches[executorName] then
executorPatches[executorName]()
else
dbgwarn("⚠️ No patches available for your executor, script may not work as intended.")
end
end
-- Synapse Save Instance boogaloo
local Params = {
RepoURL = "https://raw.githubusercontent.com/luau/SynSaveInstance/main/",
SSI = "saveinstance",
}
local synsaveinstance = loadstring(game:HttpGet(Params.RepoURL .. Params.SSI .. ".luau", true), Params.SSI)()
do -- Save Instance Patch
if saveinstance == nil then
saveinstance = function(Options : Table)
synsaveinstance(Options)
end
end
end
dbgprint("🛠️ Running Roblox Version: v" .. version())
if version() ~= supportedRobloxVersion then
warn("⚠️ Utility may be patched for this Roblox Update, wait for an update on Utility's end.")
end
NukeUtility = function()
getgenv().UtilityLoaded = nil
getgenv().UtilityStorage = nil
getgenv().Hooks = nil
table.clear(getgenv().Remotes)
getgenv().Remotes = {}
getTime = nil
hook = nil
unhook = nil
remotescan = nil
key = nil
prompt = nil
notification = nil
uload = nil
headshot = nil
logs = nil
test = nil
end
getTime = function()
local CurgetTime = os.date("!*t")
local hour = CurgetTime.hour
local minute = CurgetTime.min
local second = CurgetTime.sec
return "["..hour..":"..minute..":"..second.."]"
end
-- Don't mind "getTime" it's used for logging certain things and whatnot.
-- NukeUtility() -- Uncomment if your testing Utility Source
local utilityVersion = "stable-dc772e43300b07754f4739b746938a15"
local update = string.gsub(game:HttpGet("https://raw.githubusercontent.com/liablelua/Utility/main/version_update.txt"), "^%s*(.-)%s*$", "%1")
if update ~= utilityVersion then
table.insert(getgenv().UtilityStorage, getTime() .. ": Utility has a new update (" .. update .. ") and needs to be downloaded soon.")
end
if getgenv().UtilityLoaded ~= nil then
if typeof(getgenv().UtilityLoaded) == "boolean" then
if getgenv().UtilityLoaded then
table.insert(getgenv().UtilityStorage, getTime()..": Utility has already been loaded, don't execute again.")
else
table.insert(getgenv().UtilityStorage, getTime()..": Utility is loading, don't execute again.")
end
else
table.insert(getgenv().UtilityStorage, getTime()..": Utility has failed to load.")
end
else
local AntiTamper = {}
getgenv().UtilityLoaded = false
getgenv().UtilityStorage = {}
getgenv().Hooks = {}
getgenv().Remotes = {}
table.insert(getgenv().UtilityStorage, getTime()..": Utility started.")
hook = function(rem, func)
if getgenv().Hooks[rem.Name] == nil then
table.insert(getgenv().UtilityStorage, getTime()..": Used hook on "..rem.Name..".")
local success, connection = pcall(function()
return rem.OnClientEvent:Connect(func)
end)
if success then
getgenv().Hooks[rem.Name] = connection
else
warn("Failed to hook "..rem.Name..": "..connection)
end
end
end
unhook = function(rem)
if getgenv().Hooks[rem.Name] then
table.insert(getgenv().UtilityStorage, getTime()..": Removed hook on "..rem.Name..".")
getgenv().Hooks[rem.Name]:Disconnect()
getgenv().Hooks[rem.Name] = nil
end
end
remotescan = function(scan : Instance, deep : boolean)
table.insert(getgenv().UtilityStorage, getTime()..": Used Remote Scan on "..scan.Name..".")
local Children = scan:GetChildren()
for _, b : Instance in next, Children do
table.insert(getgenv().UtilityStorage, getTime() .. ": Scanned: " ..b.Name.. ".")
dbgprint(b.Name .. " | " .. b.ClassName)
if deep ~= nil then
if typeof(deep) == "boolean" then
for _, d in b:GetChildren() do
table.insert(getgenv().UtilityStorage, getTime()..": Scanned: "..d.Name..".")
dbgprint(d.Name .. " | " .. d.ClassName)
end
else
break
end
end
end
end
scanall = function(f : Instance)
table.insert(getgenv().UtilityStorage, getTime()..": Scanning, "..f.Name..".")
for _, v : Instance in next, f:GetDescendants() do
if v:IsA("RemoteEvent") and v.Parent:IsA("Folder") then
table.insert(getgenv().Remotes, v)
end
end
end
key = function(keyInput, keyWeb)
table.insert(getgenv().UtilityStorage, getTime()..": Key system loaded.")
local theKey = string.gsub(game:HttpGet(keyWeb), "^%s*(.-)%s*$", "%1")
if theKey == keyInput then
return true
else
return false
end
end
prompt = function(promptText : string, cancelText : string, acceptText : string, cancelFunction : any, acceptFunction : any)
table.insert(getgenv().UtilityStorage, getTime()..": Prompt loaded.")
local CancelButton = Instance.new("TextButton")
local AcceptButton = Instance.new("TextButton")
do -- UI Initialization
local prompt = Instance.new("ScreenGui")
local Frame = Instance.new("Frame")
local UICorner = Instance.new("UICorner")
local Frame_2 = Instance.new("Frame")
local TextLabel = Instance.new("TextLabel")
local TextLabel2 = Instance.new("TextLabel")
local UICorner_2 = Instance.new("UICorner")
local UICorner_3 = Instance.new("UICorner")
local UISizeConstraint = Instance.new("UISizeConstraint")
prompt.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
Frame.AnchorPoint = Vector2.new(0.5, 0.5)
Frame.BackgroundColor3 = Color3.new(0.227451, 0.227451, 0.227451)
Frame.BackgroundTransparency = 0.5
Frame.BorderSizePixel = 0
Frame.Position = UDim2.new(0.5, 0, 0.5, 0)
Frame.Size = UDim2.new(0.300000012, 0, 0.300000012, 0)
Frame_2.BackgroundColor3 = Color3.new(0.513726, 0.513726, 0.513726)
Frame_2.BackgroundTransparency = 0.5
Frame_2.BorderSizePixel = 0
Frame_2.Position = UDim2.new(0, 0, 0.200000003, 0)
Frame_2.Size = UDim2.new(1, 0, 0, 2)
Frame_2.ZIndex = 2
TextLabel.BackgroundTransparency = 1
TextLabel.Position = UDim2.new(0, 0, 8.70190391e-08, 0)
TextLabel.Size = UDim2.new(0, 350, 0, 35)
TextLabel.Font = Enum.Font.BuilderSans
TextLabel.Text = "Prompt"
TextLabel.TextColor3 = Color3.new(1, 1, 1)
TextLabel.TextScaled = true
TextLabel.TextSize = 14
TextLabel.TextWrapped = true
TextLabel2.BackgroundTransparency = 1
TextLabel2.Position = UDim2.new(8.70190391e-08, 0, 0.24522391, 0)
TextLabel2.Size = UDim2.new(0, 350, 0, 74)
TextLabel2.Font = Enum.Font.BuilderSans
TextLabel2.Text = promptText
TextLabel2.TextColor3 = Color3.new(1, 1, 1)
TextLabel2.TextSize = 14
TextLabel2.TextWrapped = true
CancelButton.BackgroundColor3 = Color3.new(0.141176, 0.141176, 0.141176)
CancelButton.BackgroundTransparency = 0.5
CancelButton.BorderSizePixel = 0
CancelButton.Position = UDim2.new(0.0251197852, 0, 0.666999996, 0)
CancelButton.Size = UDim2.new(0.449999988, 0, 0.300000012, 0)
CancelButton.Font = Enum.Font.BuilderSansExtraBold
CancelButton.Text = cancelText
CancelButton.TextColor3 = Color3.new(1, 1, 1)
CancelButton.TextSize = 14
AcceptButton.BackgroundColor3 = Color3.new(0.141176, 0.141176, 0.141176)
AcceptButton.BackgroundTransparency = 0.5
AcceptButton.BorderSizePixel = 0
AcceptButton.Position = UDim2.new(0.520727217, 0, 0.666999996, 0)
AcceptButton.Size = UDim2.new(0.449999988, 0, 0.300000012, 0)
AcceptButton.Font = Enum.Font.BuilderSansExtraBold
AcceptButton.Text = acceptText
AcceptButton.TextColor3 = Color3.new(1, 1, 1)
AcceptButton.TextSize = 14
UISizeConstraint.MaxSize = Vector2.new(350, 175)
UISizeConstraint.MinSize = Vector2.new(350, 175)
UICorner_2.Parent = AcceptButton
UISizeConstraint.Parent = Frame
UICorner_3.Parent = AcceptButton
AcceptButton.Parent = Frame
AcceptButton.Parent = Frame
TextLabel2.Parent = Frame
TextLabel.Parent = Frame
Frame_2.Parent = Frame
UICorner.Parent = Frame
Frame.Parent = prompt
prompt.Parent = CoreGui
end
CancelButton.MouseButton1Down:Once(function()
prompt:Destroy()
cancelFunction()
end)
AcceptButton.MouseButton1Down:Connect(function()
prompt:Destroy()
acceptFunction()
end)
end
notification = function(text : string, notificationTime : number)
table.insert(getgenv().UtilityStorage, getTime() .. ": Notification loaded.")
local Notification = Instance.new("ScreenGui")
do -- UI Initialization
local Frame2 = Instance.new("Frame")
local UICorner = Instance.new("UICorner")
local Frame = Instance.new("Frame")
local TextLabel = Instance.new("TextLabel")
local TextLabel2 = Instance.new("TextLabel")
local UISizeConstraint = Instance.new("UISizeConstraint")
Notification.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
Frame2.Parent = Notification
Frame2.AnchorPoint = Vector2.new(0.5, 0.5)
Frame2.BackgroundColor3 = Color3.new(0.227451, 0.227451, 0.227451)
Frame2.BackgroundTransparency = 0.5
Frame2.BorderSizePixel = 0
Frame2.Position = UDim2.new(0.5, 0, 0.150000006, 0)
Frame2.Size = UDim2.new(0.300000012, 0, 0.185211286, 0)
Frame.BackgroundColor3 = Color3.new(0.513726, 0.513726, 0.513726)
Frame.BackgroundTransparency = 0.5
Frame.BorderSizePixel = 0
Frame.Position = UDim2.new(0, 0, 0.200000003, 0)
Frame.Size = UDim2.new(1, 0, 0, 1)
TextLabel.BackgroundTransparency = 1
TextLabel.BorderSizePixel = 0
TextLabel.Position = UDim2.new(8.70190391e-08, 0, 9.78964181e-08, 0)
TextLabel.Size = UDim2.new(0, 350, 0, 24)
TextLabel.Font = Enum.Font.BuilderSans
TextLabel.Text = "Notification"
TextLabel.TextColor3 = Color3.new(1, 1, 1)
TextLabel.TextScaled = true
TextLabel.TextSize = 14
TextLabel.TextWrapped = true
TextLabel2.BackgroundTransparency = 1
TextLabel2.Position = UDim2.new(8.70190391e-08, 0, 0.24522391, 0)
TextLabel2.Size = UDim2.new(0, 350, 0, 74)
TextLabel2.Font = Enum.Font.BuilderSans
TextLabel2.Text = text
TextLabel2.TextColor3 = Color3.new(1, 1, 1)
TextLabel2.TextSize = 14
TextLabel2.TextWrapped = true
UISizeConstraint.MaxSize = Vector2.new(350, 116)
UISizeConstraint.MinSize = Vector2.new(350, 116)
UISizeConstraint.Parent = Frame2
TextLabel2.Parent = Frame2
TextLabel.Parent = Frame2
UICorner.Parent = Frame2
Frame.Parent = Frame2
Notification.Parent = CoreGui
end
task.delay(notificationTime, function()
Notification:Destroy()
end)
end
registerTampers = function(variables)
table.insert(getgenv().UtilityStorage, getTime()..": Registered tamper variables.")
for i, v in variables do
AntiTamper[i] = v
end
end
updateTamper = function(var,upd)
table.insert(getgenv().UtilityStorage, getTime()..": Updated tamper variables.")
AntiTamper[var] = upd
end
checkTamper = function(vars)
table.insert(getgenv().UtilityStorage, getTime()..": Tamper check started.")
local Tampered = false
for i, v in vars do
if not (AntiTamper[i] == v and v == vars[i]) then
table.insert(getgenv().UtilityStorage, getTime()..": The variables were tampered with.")
Tampered = true
end
end
return Tampered
end
uload = function(x)
table.insert(getgenv().UtilityStorage, getTime()..": uload used for link: "..x..".")
return loadstring(readfile(x))
end
headshot = function(id)
table.insert(getgenv().UtilityStorage, getTime()..": Headshot used for UID: "..tostring(id)..".")
local HeadShot = Players:GetUserThumbnailAsync(id, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
return HeadShot
end
logs = function(ret)
if ret ~= nil then
if ret then
return getgenv().UtilityStorage
end
end
for i,v in next, getgenv().UtilityStorage do
dbgprint(v)
end
end
antiskid = function(scOwner,scValue)
table.insert(getgenv().UtilityStorage, getTime()..": Anti-Skid Protection Ran.")
if scValue ~= scOwner then
task.spawn(function()
while task.wait() do
NukeUtility()
end
end)
task.wait(2)
LocalPlayer:Kick("❎ THE OWNER OF THIS SCRIPT IS A SKID ❎ [Kicked by Utility Anti-Skid]")
end
end
speed = function(val : number)
if Humanoid then
Humanoid.WalkSpeed = val
end
end
jump = function(val : number)
if Humanoid then
Humanoid.JumpPower = val
end
end
sit = function()
if Humanoid then
Humanoid.Sit = not Humanoid.Sit
end
end
swim = function()
if Humanoid then
if Humanoid:GetState() ~= Enum.HumanoidStateType.Swimming then
Humanoid:SetStateEnabled("GettingUp", false)
Humanoid:ChangeState("Swimming")
else
Humanoid:SetStateEnabled("GettingUp", true)
end
end
end
unc = function()
loadstring(game:HttpGet("https://raw.githubusercontent.com/unified-naming-convention/NamingStandard/main/UNCCheckEnv.lua"))()
end
iy = function()
task.spawn(function()
loadstring(game:HttpGet("https://raw.githubusercontent.com/EdgeIY/infiniteyield/master/source"))()
end)
end
fromhex = function(str : string)
return str:gsub('..', function(cc) return string.char(tonumber(cc, 16)) end)
end
tohex = function(str : string)
return str:gsub('.', function(c) return string.format('%02X', string.byte(c)) end)
end
runtests = function()
dbgprint("")
table.insert(getgenv().UtilityStorage, getTime()..": Started compatibility test.")
local testfuncs = {
{hook, "Local Hooking"},
{unhook, "Local Unhooking"},
{remotescan, "Remote Scanner"},
{key, "Key System"},
{prompt, "Prompt Library"},
{notification, "Notification Library"},
{headshot, "Player Headshots"},
{logs, "Utility Logger"},
{speed, "Humanoid Properties"},
{unc, "UNC Tests"},
{iy, "Infinite Yield"},
{fromhex, "Hex Conversions"}
}
for _, v in next, testfuncs do
if v[1] == nil then
dbgprint("❎ "..v[2].." not found.")
else
dbgprint("✅ "..v[2].." found.")
end
end
if antiskid ~= nil then dbgprint("✅ antiskid function") else dbgprint("❎ antiskid function")
task.spawn(function()
while task.wait(1) do
NukeUtility()
end
end)
task.wait(2)
LocalPlayer:Kick("⚠️ THIS SKID THOUGHT HE COULD BYPASS ANTISKID? ⚠️")
end
if NukeUtility ~= nil then dbgprint("✅ NukeUtility function") else dbgprint("❎ NukeUtility function")
task.spawn(function()
while task.wait(1) do
NukeUtility()
end
end)
task.wait(2)
LocalPlayer:Kick("⚠️ THIS SKID THOUGHT HE COULD BYPASS ANTISKID? ⚠️")
end
if checkTamper ~= nil and updateTamper ~= nil and registerTampers ~= nil then dbgprint("✅ Tamper functions") else dbgprint("❎ Tamper functions")
task.spawn(function()
while task.wait(1) do
NukeUtility()
end
end)
task.wait(2)
LocalPlayer:Kick("⚠️ THIS SKID THOUGHT HE COULD BYPASS ANTISKID? ⚠️")
end
table.insert(getgenv().UtilityStorage, getTime() .. ": Finished compatibility test.")
end
-- Final Anti-Skid measures (unbypassable?)
task.spawn(function()
while task.wait(10) do
if antiskid == nil or NukeUtility == nil or test == nil or checkTamper == nil or updateTamper == nil or registerTampers == nil then
getgenv().UtilityLoaded = nil
getgenv().UtilityStorage = nil
getgenv().Hooks = nil
getgenv().Remotes = {}
getTime = nil
hook = nil
unhook = nil
remotescan = nil
key = nil
prompt = nil
notification = nil
uload = nil
headshot = nil
logs = nil
test = nil
task.wait(2)
LocalPlayer:Kick("⚠️ THIS SKID THOUGHT HE COULD BYPASS ANTISKID? ⚠️")
end
end
end)
table.insert(getgenv().UtilityStorage, getTime()..": Utility loaded.")
runtests()
getgenv().UtilityLoaded = true
end