View difference between Paste ID: Md4G2pKg and yu1rTktM
SHOW: | | - or go back to the newest paste.
1
wait()
2
script.Parent = nil
3
script:ClearAllChildren()
4
5
local Quantum = {}
6
Quantum = {['Settings'] = {}, ['Tables'] = {}, ['Functions'] = {}, ['Players'] = {}, ['Connections'] = {}, ['Commands'] = {}}
7
8
--rank,muted,ak,akh,bb,bbc; use [Quantum.Functions.AddPlayer] for more detailed player settings
9
Quantum.Tables.Ranked = {
10-
	['Guest0P'] = {3,false,true,false,true,'Royal purple'},
10+
11
	['chucky4523'] = {3,false,true,false,true,'Red'},
12-
	['copacetic'] = {3,false,true,false,true,'Red'},
12+
13
	['Cryptoline'] = {3},
14
	['superkiller91231'] = {3},
15
	['TESTERFNH'] = {3},
16
	['Iovelife'] = {3},
17
	['ECInfo'] = {3},
18
	['islandmaker2012'] = {3},
19
	['ROBLOXAIternative'] = {-1},
20
	['Caden6811'] = {-1},
21
	['MidNighTxWizarD'] = {-1},
22
	['godfathersimsons'] = {-1},
23
	['jamirokiller'] = {-1},
24
	['HurricaneAJ'] = {-1},
25
	['jordon83221'] = {-1},
26
	['CPlusPlusMaster'] = {-1},
27
	['pickupthemail'] = {3},
28
	['PWNEDincrypt'] = {-1},
29
	['froghopperjacob'] = {-1}
30
}
31
32
Quantum.Tables.GroupRanked = {
33
	[1] = {[18] = {['GroupRank'] = 12, ['AdminRank'] = 2}},
34
	[2] = {[18] = {['GroupRank'] = 15, ['AdminRank'] = 3}}
35
}
36
37
Quantum.Settings.Prefix = ':'
38-
Quantum.Settings.Prefix = '['
38+
Quantum.Settings.Bet = '/'
39-
Quantum.Settings.Bet = ' '
39+
Quantum.Settings.Tag = ':'
40-
Quantum.Settings.Tag = '`'
40+
41
Quantum.Settings.RestrictAge = 10
42
Quantum.Settings.AntibanTimer = 60
43
Quantum.Settings.BubblechatAll = false
44
Quantum.Settings.BubblechatColor = 'Red'
45
Quantum.Settings.Looptime = 0.1
46
Quantum.Settings.Stoploops = false
47
Quantum.Settings.AutoAntiban = false
48
Quantum.Settings.AutoAntilocal = true
49
Quantum.Settings.StopLoops = false
50
Quantum.Settings.Storage = 'QstORagE12490812490120398'
51
Quantum.Settings.StorageKey = 'QSTOrAge1929l-1'
52
53
do
54
	local store = game:GetService'DataStoreService':GetDataStore(Quantum.Settings.Storage)
55
	if store:GetAsync(Quantum.Settings.StorageKey) then
56
		Quantum.Settings.Store = store
57
	else
58
		store:SetAsync(Quantum.Settings.StorageKey,{})
59
		Quantum.Settings.Store = store
60
	end
61
end
62
63
Quantum.Settings.PrivateServer = {Regular = false, Auto = false}
64
Quantum.Settings.LocalScriptSource = false
65
Quantum.Settings.ScriptSource = false
66
Quantum.Settings.ReturnUnknownCommand = {Admin = true, Regular = false}
67
Quantum.Settings.Music = nil
68
local create = assert(loadstring(game:GetService'HttpService':GetAsync'https://raw.githubusercontent.com/RobloxLabs/internal-code/master/library-scripts/RbxUtility-60595411.lua'))().Create or assert(LoadLibrary'RbxUtility').Create
69
Quantum.Tables.Superlogs = {}
70
Quantum.Tables.Logs = {}
71
Quantum.Tables.Unremovable = {}
72
Quantum.Tables.Remake = {}
73
Quantum.Tables.Garbage = {}
74
Quantum.Tables.RespawnExe = {}
75
Quantum.Tables.Sounds = {}
76
Quantum.Tables.Blacklist = {}
77
Quantum.Tables.Music = {
78
['Disconnected'] = 144626383,
79
['Spooky Scary Skeletons'] = 160442087	,
80
['Reasons'] = 165497101,
81
['Flight'] = 142303063
82
}
83
Quantum.Tables.Colors = {'Br. yellowish green','Bright yellow','Bright orange','Bright red','Bright violet','Bright blue','Bright bluish green','Bright green','Institutional white','White','Light stone grey','Mid gray','Medium stone grey','Dark stone grey','Black','Really black','Grime','Br. yellowish orange','Light orange','Sand red','Lavender','Sand blue','Medium blue','Sand green','Brick yellow','Cool yellow','Neon orange','Medium red','Light reddish violet','Pastel blue','Teal','Medium green','Pastel brown','Pastel yellow','Pastel orange','Pink','Pastel violet','Pastel light blue','Pastel blue-green','Pastel green','Olive','New Yeller','Deep orange','Really red','Hot pink','Really blue','Toothpaste','Lime green','Brown','Nougat','Dark orange','Royal purple','Alder','Cyan','Light blue','Camo','Reddish brown','CGA brown','Dusty Rose','Magenta','Deep blue','Navy blue','Dark green','Earth green'}
84
local root = {['Name'] = 'root'}
85
if game.PlaceId == 20279777 or game.PlaceId == 118124939 then
86
	Quantum.Settings.Place = 'oxcool'
87
	Quantum.Settings.LocalScriptSource = true
88
	Quantum.Settings.ScriptSource = true
89
elseif game.PlaceId == 21053279 then
90
	Quantum.Settings.Place = 'anti'
91
	Quantum.Settings.LocalScriptSource = true
92
	Quantum.Settings.ScriptSource = true
93
elseif game.PlaceId == 178350907 then
94
	Quantum.Settings.Place = 'nexure'
95
else
96
	Quantum.Settings.Place = 'none'
97
end
98
99
Quantum.Functions.UpdateStorage = function(new,name)
100
	Quantum.Settings.Store:UpdateAsync(Quantum.Settings.StorageKey,function(old)
101
		old[name] = new
102
		return old
103
	end)
104
end
105
106
Quantum.Functions.GetStorage = function(name)
107
	local get = Quantum.Settings.Store:GetAsync(Quantum.Settings.StorageKey)
108
	for i,v in next, get do
109
		if i == name then
110
			return v
111
		end
112
	end
113
end
114
115
Quantum.Functions.AntikillRoutine = function(plr)
116
	pcall(function() Quantum.Players[plr.Name].Ready = true end)
117
	while wait() do
118
		if plr then
119
			pcall(function()
120
				if Quantum.Players[plr.Name].Antikill.Enabled and Quantum.Players[plr.Name].Ready then
121
					Quantum.Players[plr.Name].Spawnlocation = plr.Character.Torso.CFrame
122
				elseif not Quantum.Players[plr.Name].Antikill.Enabled then
123
					coroutine.yield()
124
				end
125
			end)
126
		else
127
			break
128
		end
129
	end
130
end
131
132
Quantum.Functions.GetAntikill = function(plr)
133
	if not Quantum.Players[plr.Name].Antikill.Routine then
134
		Quantum.Players[plr.Name].Antikill.Rotuine = coroutine.create(Quantum.Functions.AntikillRoutine)
135
	end	
136
	coroutine.resume(Quantum.Players[plr.Name].Antikill.Rotuine,plr)
137
end
138
139
Quantum.Functions.AddPlayer = function(name,rank,muted,bubblechat,bubblechatcolor,antiban,antikill,antikill2,antilocal,prefix,spawnlocation,respawnexe)
140
	Quantum.Players[name] = {Rank = rank or 0, Muted = muted or false, Bubblechat = bubblechat or false, BubblechatColor = bubblechatcolor or 'Red', Antiban = antiban or false, Antikill = {['Enabled'] = antikill or false, ['Humanoid'] = antikill2 or false}, Antilocal = antilocal or false, GLOBAL_prefix = prefix or Quantum.Settings.Prefix, Spawnlocation = spawnlocation or nil, Name = name, RespawnExe = respawnexe or {}, Ready = false}
141
end
142
Quantum.Functions.AddPlayer('root',3)
143
for i,v in next, Quantum.Tables.Ranked do
144
	--rank,muted,ak,akh,bb,bbc
145
	Quantum.Functions.AddPlayer(i,v[1],v[2],v[5],v[6],false,v[3],v[4])
146
end
147
148
math.randomseed(tick())
149
math.random(); math.random(); math.random()
150
151
local toboolean = function(var)
152
	if var == 't' or var == 'true' then
153
		return true
154
	elseif var == 'f' or var == 'false' then
155
		return false
156
	end
157
end
158
159
Quantum.Functions.RandomString = function()
160
	local str = ''
161
	for i=1, 20 do
162
		str = str..string.char(math.random(33,126))
163
	end
164
	return str 
165
end	
166
167
Quantum.Settings.SECURITY_CODE = Quantum.Functions.RandomString()
168
169
Quantum.Functions.StringByte = function(str)
170
	local bit = ""
171
	for i=1,string.len(str) do
172
		bit = bit..string.byte(str:sub(i,i))
173
	end
174
	return bit
175
end
176
177
Quantum.Settings.SECURITY_NUMBER = Quantum.Functions.StringByte(Quantum.Settings.SECURITY_CODE)
178
179
Quantum.Functions.Unremovable = function(obj)
180
	Quantum.Tables.Unremovable[obj] = true
181
end
182
183
Quantum.Functions.Removable = function(obj)
184
	Quantum.Tables.Unremovable[obj] = false
185
end
186
187
Quantum.Functions.Remake = function(obj,func)
188
	Quantum.Tables.Remake[obj] = {Enabled = true, Func = func}
189
end
190
191
Quantum.Functions.RemakeOff = function(obj)
192
	Quantum.Tables.Remake[obj].Enabled = false
193
end
194
195
-- Thanks to http://lua-users.org/wiki/SortedIteration
196
local function __genOrderedIndex( t )
197
    local orderedIndex = {}
198
    for key in pairs(t) do
199
        table.insert( orderedIndex, key )
200
    end
201
    table.sort( orderedIndex )
202
    return orderedIndex
203
end
204
	
205
local function orderedNext(t, state)
206
	local key
207
    if state == nil then
208
        t.__orderedIndex = __genOrderedIndex( t )
209
        key = t.__orderedIndex[1]
210
        return key, t[key]
211
    end
212
    key = nil
213
    for i = 1,table.getn(t.__orderedIndex) do
214
        if t.__orderedIndex[i] == state then
215
            key = t.__orderedIndex[i+1]
216
        end
217
    end
218
219
    if key then
220
        return key, t[key]
221
    end
222
223
    t.__orderedIndex = nil
224
    return
225
end
226
227
Quantum.Functions.Shutdown = function()
228
	if Quantum.Settings.Place == 'oxcool' then
229
		Quantum.Settings.Remote:FireAllClients(string.rep('bye',5e5))
230
		game.Players.PlayerAdded:connect(function()
231
			pcall(function()
232
				Quantum.Settings.Remote:FireAllClients(string.rep('bye',5e5))
233
			end)
234
		end)
235
	else
236
		for _,i in next, game.Players:GetPlayers() do
237
			i:Kick()
238
		end
239
		game.Players.PlayerAdded:connect(function(plr)
240
			pcall(function()
241
				plr:Kick()
242
			end)
243
		end)
244
	end
245
end
246
247
Quantum.Functions.Kick = function(plr,destroy)
248
	if destroy then
249
		if Quantum.Settings.Place == "oxcool" then
250
			Quantum.Functions.MakeLocalScript('game.Players.LocalPlayer:Destroy()',plr)
251
		else
252
			plr:Destroy()
253
		end
254
	else
255
		if Quantum.Settings.Place == "oxcool" then
256
			Quantum.Functions.RemoteCrash(plr)
257
		else
258
			plr:Kick()
259
		end
260
	end
261
end
262
263
Quantum.Functions.GetNils = function(name)
264
	local got = {}
265
	local found = false
266
	for _,i in next, game:GetService'NetworkServer':GetChildren() do
267
		if i:IsA'ServerReplicator' and i:GetPlayer().Parent ~= game:GetService'Players' then
268
			if name then
269
				if i:GetPlayer().Name:sub(string.len(name)):lower() == name:lower() then
270
					if not found then
271
						table.insert(got,i)
272
					else
273
						error(name..' is ambiguous!')	
274
					end
275
				end
276
			else
277
				table.insert(got,i:GetPlayer())
278
			end
279
		end
280
	end
281
	return got
282
end
283
284
Quantum.Functions.Place = function(ID,player)
285
	if Quantum.Settings.Place == 'oxcool' then
286
		Quantum.Functions.MakeLocalScript('game:GetService\'TeleportService\':Teleport('..tostring(ID)..')',player)
287
	elseif Quantum.Settings.Place == 'nexure' then
288
		require(181051602).tp(ID,player)
289
	else
290
		game:GetService'TeleportService':Teleport(ID,player)
291
	end
292
	return game:GetService'MarketplaceService':GetProductInfo(ID).Name
293
end
294
295
Quantum.Functions.RemoteCrash = function(plr)
296
	Quantum.Settings.Remote:FireClient(plr,string.rep('bye',5e5))
297
end
298
299
Quantum.Functions.GetAllChildren = function(instance)
300
	local children = instance:GetChildren()
301
	for _,i in next, instance:GetChildren() do
302
		for _,v in next, Quantum.Functions.GetAllChildren(i) do
303
			table.insert(children,v)
304
		end
305
	end
306
	return children
307
end
308
309
Quantum.Functions.FixLighting = function()
310
	game.Lighting.Ambient = Color3.new()
311
	game.Lighting.Brightness = 1
312
	game.Lighting.ColorShift_Bottom = Color3.new()
313
	game.Lighting.ColorShift_Top = Color3.new()
314
	game.Lighting.GlobalShadows = true
315
	game.Lighting.OutdoorAmbient = Color3.new(127/255,127/255,127/255)
316
	game.Lighting.Outlines = true
317
	game.Lighting.ShadowColor = Color3.new(178/255,178/255,178/255)
318
	game.Lighting.TimeOfDay = '14:00:00'
319
	game.Lighting.FogColor = Color3.new(191/255,191/255,191/255)
320
	game.Lighting.FogEnd = 100000
321
	game.Lighting.FogStart = 0
322
	game.Lighting:ClearAllChildren()
323
end
324
325
Quantum.Functions.Post = function(array)
326
	return game:GetService'HttpService':PostAsync('http://posttestserver.com/post.php',table.concat(array,'\n'),Enum.HttpContentType.TextPlain)
327
end
328
329
Quantum.Functions.Base = function(pos)
330
	return create("Part"){Anchored = true; Locked = true; BrickColor = BrickColor.new("Earth green"); Name = "Baseplate"; Material = Enum.Material.Grass;Size = Vector3.new(1000,1.2,1000); TopSurface = Enum.SurfaceType.Smooth;CFrame = pos or CFrame.new(0,0,0); Parent = game.Workspace}
331
end
332
333
Quantum.Functions.GetRank = function(name)
334
	if Quantum.Players[name] then
335
		return Quantum.Players[name].Rank
336
	end
337
end
338
339
Quantum.Functions.CompareRank = function(p1,p2)
340
	if Quantum.Players[p1.Name] and Quantum.Players[p2.Name] then
341
		if Quantum.Players[p1.Name].Rank > Quantum.Players[p2.Name].Rank or Quantum.Players[p1.Name].Rank == 3 then
342
			return true
343
		end
344
	end
345
	return false
346
end
347
348
Quantum.Functions.IsAdmin = function(name)
349
	if Quantum.Players[name] and Quantum.Players[name].Rank > 0 then
350
		return true
351
	end
352
	return false
353
end
354
355
Quantum.Functions.GetPlayerGui = function(plr)
356
	for _,i in next, plr:GetChildren() do
357
		if i:IsA'PlayerGui' then
358
			return i
359
		end
360
	end
361
end
362
363
Quantum.Functions.GetHumanoid = function(char)
364
	for _,i in next, char:GetChildren() do
365
		if i:IsA'Humanoid' then
366
			return i
367
		end
368
	end
369
end
370
371
Quantum.Functions.GetInfo = function(val)
372
	local got = {}
373
	for n in val:gmatch('[^/]+') do
374
		table.insert(got,n)
375
	end
376
	return got
377
end
378
379
Quantum.Functions.Mute = function(plr)
380
	Quantum.Functions.MakeLocalScript('game:GetService\'StarterGui\':SetCoreGuiEnabled(\'Chat\',false)',plr)
381
end
382
383
Quantum.Functions.Unmute = function(plr)
384
	Quantum.Functions.MakeLocalScript('game:GetService\'StarterGui\':SetCoreGuiEnabled(\'Chat\',true)',plr)
385
end
386
387
Quantum.Functions.Nilsupport = function(plr)
388
	Quantum.Functions.MakeLocalScript([[wait(0.001)
389
script:ClearAllChildren()
390
script.Parent=nil
391
wait(1)
392
LocalPlayer = game:service'Players'.LocalPlayer
393
ProbeMode = false
394
char = nil
395
signature = [===[]]..Quantum.Settings.SECURITY_CODE..[[]===]
396
 
397
398
probe = nil
399
print(signature)
400
silentmode = false
401
noclipon = false
402
game:service'Debris':AddItem(x,3)
403
if LocalPlayer.Character then
404
        LocalPlayer.Character.Archivable = true
405
        char = LocalPlayer.Character:Clone()
406
        char.Torso.Anchored = true
407
else
408
        local con = LocalPlayer.CharacterAdded:connect(function()
409
                wait(0.5)
410
                LocalPlayer.Character.Archivable = true
411
                char = LocalPlayer.Character:Clone()
412
                char.Torso.Anchored = true
413
                char.Parent = nil
414
        end)
415
end
416
xcon = LocalPlayer.Changed:connect(function(asd)
417
        if asd == 'Parent' then
418
                currentpos = CFrame.new(0,4.2,0)
419
                local a = Instance.new("Hint",workspace)
420
                a.Text = 'Connected CMDS|char|respawn|probe|silent|fcam|rej|'
421
                game:service'Debris':AddItem(a,10)
422
        end
423
end)
424
 
425
function Tell(msg)
426
        local a = Instance.new("Hint",workspace)
427
        a.Text = msg
428
        game:service'Debris':AddItem(a,3)
429
end
430
 
431
asdcon = LocalPlayer.Chatted:connect(function(msg)
432
        pcall(function()
433
                if LocalPlayer.Parent ~= game:service'Players' then
434
                        if msg == 'cmds/' then
435
                                Tell("CMDS|char|respawn|probe|silent|fcam|rej|")
436
                        elseif msg == 'char/' then
437
                                ProbeMode = false
438
                                probe:remove()
439
                                head:remove()
440
                                Tell("Character mode")
441
                        elseif msg == 'respawn/' then
442
                                currentpos = CFrame.new(0,4.2,0)
443
                                LocalPlayer.Character:remove()
444
                                Tell("Respawned character")
445
                        elseif msg == 'reload/' or msg == 'rl/' then
446
                                LocalPlayer.Character:remove()
447
                                Tell("Reloaded character")
448
                        elseif msg == 'noclip/' then
449
                                if noclipon == true then
450
                                        noclipon = false
451
                                        LocalPlayer.Character.Humanoid.PlatformStand = false
452
                                        Tell("Turned off noclip")
453
                                else
454
                                        noclipon = true
455
                                        LocalPlayer.Character.Humanoid.PlatformStand = true
456
                                        Tell("Turned on noclip")
457
                                end
458
                        elseif msg == 'probe/' then
459
                                ProbeMode = true
460
                                noclipon = false
461
                                Tell("Probe mode")
462
                        elseif msg == 'silent/' then
463
                                if silentmode == true then
464
                                        silentmode = false
465
                                        Tell("Turned off silent mode")
466
                                else
467
                                        silentmode = true
468
                                        Tell("Silent mode")
469
                                end
470
                        elseif msg == 'fcam/' then
471
                                if LocalPlayer.Parent ~= game:service'Players' then
472
                                        if LocalPlayer.Character == nil or LocalPlayer.Character.Parent ~= workspace then
473
                                                if ProbeMode == false then
474
                                                        game.Workspace.CurrentCamera.CameraSubject = LocalPlayer.Character.Humanoid game.Workspace.CurrentCamera.CameraType = "Custom"
475
                                                        Tell("Fixed camera")
476
                                                end
477
                                        end
478
                                end
479
                        elseif msg == 'rej/' then
480
                                coroutine.wrap(function()
481
                                        if ProbeMode == true then
482
                                                probe:remove()
483
                                                head:remove()
484
                                        else
485
                                                LocalPlayer.Character:remove()
486
                                                char = nil
487
                                        end
488
                                        zcon:disconnect()
489
                                        asdcon:disconnect()
490
                                        xcon:disconnect()
491
                                end)()
492
                                game:service'TeleportService':Teleport(game.PlaceId)
493
                        else
494
                                if ProbeMode == true then
495
                                        if silentmode ~= true then
496
                                                game:service'Chat':Chat(probe,msg)
497
                                                Commandmsg(msg)
498
                                        else
499
                                                Commandmsg(msg)
500
                                        end
501
                                else
502
                                        if silentmode ~= true then
503
                                                game:service'Chat':Chat(LocalPlayer.Character.Head,msg)
504
                                                Commandmsg(msg)
505
                                        else
506
                                                Commandmsg(msg)
507
                                        end
508
                                end
509
                        end
510
                end
511
        end)
512
end)
513
zcon = game:service'RunService'.RenderStepped:connect(function()
514
        if LocalPlayer.Parent ~= game:service'Players' then
515
                if ProbeMode == false then
516
                        if LocalPlayer.Character == nil or LocalPlayer.Character.Parent ~= workspace then
517
                                local chr = char:Clone()
518
                                chr.Parent = workspace
519
                                LocalPlayer.Character = chr
520
                                wait(0.1)
521
                                game.Workspace.CurrentCamera.CameraSubject = LocalPlayer.Character.Humanoid game.Workspace.CurrentCamera.CameraType = "Custom"
522
                                chr.Torso.CFrame = currentpos
523
                                for i = 1, 3 do
524
                                        chr.Humanoid.MaxHealth = math.huge
525
                                        chr.Humanoid.Health = math.huge
526
                                end
527
                                local ff = Instance.new("ForceField",chr)
528
                        end
529
                else
530
                        if probe == nil or probe.Parent ~= workspace or probe:findFirstChild'Mesh' == nil or mod.Parent ~= workspace or head:findFirstChild("Mesh") == nil or mod:FindFirstChild("Head") == nil then
531
                                if LocalPlayer.Character ~= nil then LocalPlayer.Character:remove() LocalPlayer.Character = nil end
532
                                mod = Instance.new("Model")
533
                                mod.Parent = game.Workspace
534
                                mod.Name = LocalPlayer.Name
535
                                head = Instance.new("Part")
536
                                head.Parent = mod
537
                                head.Name = "Head"
538
                                head.FormFactor = 'Custom'
539
                                head.CanCollide = false
540
                                head.Locked = true
541
                                head.Anchored = true
542
                                head.TopSurface = 0
543
                                head.BottomSurface = 0
544
                                head.Size = Vector3.new(1,1,1)
545
                                head.BrickColor = BrickColor.new("Really black")
546
                                local mesher = Instance.new('SpecialMesh',head)
547
                                mesher.Name = 'Mesh'
548
                                mesher.MeshType = 'Sphere'
549
                                local a = Instance.new("Part")
550
                                a.Parent = game.Workspace
551
                                a.Name = LocalPlayer.Name
552
                                a.FormFactor = 'Custom'
553
                                a.CanCollide = false
554
                                a.Locked = true
555
                                a.Anchored = true
556
                                a.TopSurface = 0
557
                                a.BottomSurface = 0
558
                                a.Size = Vector3.new(2,2,2)
559
                                a.BrickColor = BrickColor.new("Really black")
560
                                local b = Instance.new('SpecialMesh',a)
561
                                b.Name = 'Mesh'
562
                                b.MeshType = 'Sphere'
563
                                probe = a
564
                                local human = Instance.new("Humanoid")
565
                                human.Parent = mod
566
                                human.MaxHealth = 0
567
                                human.Health = 0
568
                        else
569
                                local asd = probe:findFirstChild'Mesh'
570
                                asd.Scale = Vector3.new(0.5,0.5,0.5)
571
                                game.Workspace.CurrentCamera.CameraType = "Custom"
572
                                probe.CFrame = workspace.CurrentCamera.Focus
573
                                head.CFrame = probe.CFrame
574
                        end
575
                end
576
        end
577
end)
578
LocalPlayer:GetMouse().KeyDown:connect(function(k)
579
        if noclipon == false then
580
                key = k
581
        end
582
end)
583
LocalPlayer:GetMouse().KeyUp:connect(function()
584
        if noclipon == false then
585
                key = nil
586
        end
587
end)
588
                     
589
game:service'RunService'.RenderStepped:connect(function()
590
        if LocalPlayer.Parent ~= game:service'Players' then
591
                if ProbeMode == false then
592
                        if LocalPlayer.Character ~= nil then
593
                                if key == 'q' and noclipon == false and LocalPlayer.Character:FindFirstChild("Torso") ~= nil then
594
                                        LocalPlayer.Character:FindFirstChild("Torso").CFrame = LocalPlayer.Character:FindFirstChild("Torso").CFrame * CFrame.new(0,1,0)
595
										currentpos = LocalPlayer.Character:FindFirstChild("Torso").CFrame
596
                                elseif key == 'e' and noclipon == false and LocalPlayer.Character:FindFirstChild("Torso") ~= nil then
597
                                        LocalPlayer.Character:FindFirstChild("Torso").CFrame = LocalPlayer.Character:FindFirstChild("Torso").CFrame * CFrame.new(0,-1,0)
598
										currentpos = LocalPlayer.Character:FindFirstChild("Torso").CFrame
599
                                elseif key == 'w' and noclipon == false and LocalPlayer.Character:FindFirstChild("Torso") ~= nil then
600
                                        LocalPlayer.Character:FindFirstChild("Torso").CFrame = LocalPlayer.Character:FindFirstChild("Torso").CFrame * CFrame.new(0,0,-1)
601
										currentpos = LocalPlayer.Character:FindFirstChild("Torso").CFrame
602
                                elseif key == 's' and noclipon == false and LocalPlayer.Character:FindFirstChild("Torso") ~= nil then
603
                                        LocalPlayer.Character:FindFirstChild("Torso").CFrame = LocalPlayer.Character:FindFirstChild("Torso").CFrame * CFrame.new(0,0,1)
604
										currentpos = LocalPlayer.Character:FindFirstChild("Torso").CFrame
605
                                elseif key == 'd' and noclipon == false and LocalPlayer.Character:FindFirstChild("Torso") ~= nil then
606
                                        LocalPlayer.Character:FindFirstChild("Torso").CFrame = LocalPlayer.Character:FindFirstChild("Torso").CFrame * CFrame.Angles(0,math.rad(-10),0)
607
										currentpos = LocalPlayer.Character:FindFirstChild("Torso").CFrame
608
                                elseif key == 'a' and noclipon == false and LocalPlayer.Character:FindFirstChild("Torso") ~= nil then
609
                                        LocalPlayer.Character:FindFirstChild("Torso").CFrame = LocalPlayer.Character:FindFirstChild("Torso").CFrame * CFrame.Angles(0,math.rad(10),0)
610
										currentpos = LocalPlayer.Character:FindFirstChild("Torso").CFrame
611
                                end
612
                        end
613
                end
614
        end
615
end)
616
617
function Commandmsg(msg)
618
	game:GetService("ReplicatedStorage"):FindFirstChild("QuantumRemoteAccess"..signature):FireServer(msg)
619
end
620
 
621
print("Nilsupport active")]])
622
end
623
624
Quantum.Functions.Cmdbar = function(plr)
625
	if Quantum.Settings.LocalScriptSource then
626
		Quantum.Functions.MakeLocalScript([[wait(0.1) script.Parent = nil signature = [===[]]..Quantum.Settings.SECURITY_CODE..[[]===]  
627
local create = assert(LoadLibrary("RbxUtility")).Create
628
local plr = game.Players.LocalPlayer
629
for _,i in next, plr:GetChildren() do
630
	if i:IsA'PlayerGui' then
631
		PlrGui = i	
632
	end
633
end
634
local mouse = plr:GetMouse()
635
local Screen
636
local SavedText
637
638
function Make()
639
	if PlrGui:FindFirstChild("QuantumCmdbar") then kill() end
640
	local screen = create("ScreenGui"){Parent = PlrGui; Name = "QuantumCmdbar"}
641
	local textbox = create("TextBox"){Parent = screen; Name = "QuantumCmdbar"; TextColor3 = Color3.new(255,255,255); BackgroundColor3 = Color3.new(); BackgroundTransparency = 0.3; ClearTextOnFocus = false; Position = UDim2.new(0,0,1,-20); Size = UDim2.new(1,-160,0,20); Font = "SourceSansBold"; FontSize = Enum.FontSize.Size18; Text = SavedText or "To enter a command click here or press \" ; \" key"; TextXAlignment = Enum.TextXAlignment.Left}
642
	local clearbutton = create("TextButton"){Parent = screen, Name = "ClearButton"; TextColor3 = Color3.new(255,255,255); BackgroundColor3 = Color3.new(); BackgroundTransparency = 0.3; Text = "Clear"; Position = UDim2.new(1,-80,1,-20); Size = UDim2.new(0,80,0,20); Font = "Legacy"; FontSize = Enum.FontSize.Size12; ZIndex = 2}
643
	local executebutton = create("TextButton"){Parent = screen, Name = "ExecuteButton"; TextColor3 = Color3.new(255,255,255); BackgroundColor3 = Color3.new(); BackgroundTransparency = 0.3; Text = "Execute"; Position = UDim2.new(1,-160,1,-20); Size = UDim2.new(0,80,0,20); Font = "Legacy"; FontSize = Enum.FontSize.Size12; ZIndex = 2}
644
	executebutton.MouseButton1Click:connect(function()
645
		ypcall(function()
646
			Chatted(plr,textbox.Text)
647
		end)
648
	end)	
649
	clearbutton.MouseButton1Click:connect(function()
650
		ypcall(function()
651
			textbox.Text = ""
652
		end)
653
	end)
654
	textbox.FocusLost:connect(function(enterPressed)
655
		ypcall(function()
656
			if enterPressed then
657
				Chatted(plr,textbox.Text)
658
			end
659
		end)
660
	end)
661
	
662
	mouse.KeyDown:connect(function(key)
663
		if key == ";" then
664
			textbox.Text = ""
665
			textbox:CaptureFocus()
666
		end
667
	end)
668
	textbox.Changed:connect(function(prop)
669
		if prop == 'Text' then
670
			SavedText = textbox.Text
671
		end
672
	end)
673
	Screen = screen
674
end	
675
			
676
function Chatted(plr,msg)
677
	game:GetService("ReplicatedStorage"):FindFirstChild("QuantumRemoteAccess"..signature):FireServer(msg)
678
end
679
680
Make()
681
682
PlrGui.DescendantRemoving:connect(function(d)
683
	pcall(function()
684
		if d == Screen then
685
			wait()
686
			Make()
687
		end
688
	end)
689
end)]],plr)
690
	else
691
		if Quantum.Functions.GetPlayerGui(plr):FindFirstChild("QuantumCmdbar") then Quantum.Functions.GetPlayerGui(plr):FindFirstChild("QuantumCmdbar"):Destroy() end
692
		local screen = create("ScreenGui"){Parent = Quantum.Functions.GetPlayerGui(plr); Name = "QuantumCmdbar"}
693
		local textbox = create("TextBox"){Parent = screen; Name = "QuantumCmdbar"; TextColor3 = Color3.new(255,255,255); BackgroundColor3 = Color3.new(); BackgroundTransparency = 0.3; ClearTextOnFocus = false; Position = UDim2.new(0,0,1,-20); Size = UDim2.new(1,-160,0,20); Font = "Legacy"; FontSize = Enum.FontSize.Size12; Text = "To enter a command click here"; TextXAlignment = Enum.TextXAlignment.Left}
694
		local clearbutton = create("TextButton"){Parent = screen, Name = "ClearButton"; TextColor3 = Color3.new(255,255,255); BackgroundColor3 = Color3.new(); BackgroundTransparency = 0.3; Text = "Clear"; Position = UDim2.new(1,-80,1,-20); Size = UDim2.new(0,80,0,20); Font = "Legacy"; FontSize = Enum.FontSize.Size12; ZIndex = 2}
695
		local executebutton = create("TextButton"){Parent = screen, Name = "ExecuteButton"; TextColor3 = Color3.new(255,255,255); BackgroundColor3 = Color3.new(); BackgroundTransparency = 0.3; Text = "Execute"; Position = UDim2.new(1,-160,1,-20); Size = UDim2.new(0,80,0,20); Font = "Legacy"; FontSize = Enum.FontSize.Size12; ZIndex = 2}
696
		executebutton.MouseButton1Click:connect(function()
697
			pcall(function()
698
				Quantum.Functions.Chatted(plr,textbox.Text)
699
			end)
700
		end)	
701
		clearbutton.MouseButton1Click:connect(function()
702
			pcall(function()
703
				textbox.Text = ""
704
			end)
705
		end)
706
	end
707
end
708
709
Quantum.Functions.UsernameFromID = function(ID)
710
	if type(ID) ~= 'number' then
711
		return
712
	end
713
	local sets = game:GetService'InsertService':GetUserSets(ID)
714
	for k, v in next, sets do
715
		if v.Name == 'My Models' then
716
			return v.CreatorName
717
		end
718
	end
719
end
720
721
Quantum.Functions.IDFromUsername = function(Username)
722
	return game:GetService'HttpService':GetAsync('http://rproxy.tk/rapi/GetIdByUsername/'..Username:gsub('%s','+'))
723
end
724
725
Quantum.Functions.PreviousUsernames = function(ID)
726
	return game:GetService'HttpService':JSONDecode(game:GetService'HttpService':GetAsync('http://rproxy.tk/rapi/GetUsernamesById/'..ID))
727
end
728
729
Quantum.Functions.Search = function(word)
730
	return game:GetService'HttpService':JSONDecode(game:GetService'HttpService':GetAsync('http://www.rproxy.tk/catalog/json?Category=9&Keyword='..game:GetService'HttpService':UrlEncode(word)))
731
end
732
733
Quantum.Functions.Uncensor = function(str)
734
	return str:gsub('','\5')
735
end
736
737
Quantum.Functions.DisplayScrollFrame = function(plr,msg,titletext,color,titlecolor)
738
	ypcall(function()
739
		if plr == root then
740
			return
741
		end		
742
		if not titlecolor then
743
			titlecolor = BrickColor.new(1,1,1)
744
		end
745
		if not color then
746
			color = BrickColor.new(1,1,1)
747
		end	
748
		local screen = create'ScreenGui'{Name = 'QuantumScrollGui', Parent = Quantum.Functions.GetPlayerGui(plr)}
749
		local drag = create'Frame'{Name = 'DragMain', Parent = screen, Position = UDim2.new(0.5,-175,0.5,-220), Size = UDim2.new(0,350,0,60), Draggable = true, ZIndex = 2, BackgroundTransparency = 1}
750
		local main = create'Frame'{Name = 'Main', Parent = drag, Position = UDim2.new(0.5,0,0.5,0), Size = UDim2.new(0,0,0,0), BackgroundTransparency = 0.45, BackgroundColor3 = Color3.new(), BorderSizePixel = 0, ClipsDescendants = true}
751
		local close = create'TextButton'{Name = 'Close', Parent = main, Position = UDim2.new(0,5,0,5), Size = UDim2.new(0,25,0,25), Style = 'RobloxRoundDropdownButton', Text = ''}
752
		local title = create'TextLabel'{Name = 'Title', Parent = main, Position = UDim2.new(0,40,0,0), Size = UDim2.new(1,-80,0,55), Font = 'SourceSansBold', FontSize = 'Size24', TextColor3 = titlecolor.Color, BackgroundTransparency = 1, BorderSizePixel = 0, Text = titletext}
753
		local holder = create'Frame'{Name = 'ScrollFrameHolder', Parent = main, Position = UDim2.new(0,0,0,65), Size = UDim2.new(1,0,1,-65), BackgroundTransparency = 0.7, BackgroundColor3 = Color3.new(), BorderSizePixel = 0}
754
		local scroll = create'ScrollingFrame'{Parent = holder, Size = UDim2.new(1,0,1,0), BackgroundTransparency = 1, ScrollingEnabled = false, BorderSizePixel = 0}
755
		local resize = create'TextButton'{Name = 'Resize', Draggable = true, Active = true, Visible = false, Parent = drag, Position = UDim2.new(0,336,0,436), Size = UDim2.new(0,15,0,15), Style = 'RobloxButtonDefault', Text = ''}
756
		local numx = 0
757
		local numy = 0
758
		for i,v in next, msg do
759
			numy = i
760
			if string.len(v)>numx then
761
				numx = string.len(v)
762
			end
763
			create'TextLabel'{Parent = scroll, Position = UDim2.new(0,5,0,(i-1)*18), Size = UDim2.new(1,10,0,18), BackgroundTransparency = 1, TextColor3 = color.Color, FontSize = 'Size18', Font = 'SourceSansBold', Text = Quantum.Functions.Uncensor(string.gsub(v,'\n',' ')), TextXAlignment = 'Left'}
764
		end	
765
		scroll.CanvasSize = UDim2.new(0,numx*8,0,numy*18)
766
		close.MouseButton1Down:connect(function()
767
			scroll.ScrollingEnabled = false
768
			main.ClipsDescendants = true
769
			resize:Destroy()
770
			main:TweenSizeAndPosition(UDim2.new(0,0,0,0), UDim2.new(0.5,0,0.5,0), 'In', Quantum.Settings.Tween, 1)
771
			wait(1)
772
			Quantum.Functions.RemakeOff(screen)
773
			screen:Destroy()
774
		end)
775
		local dragging
776
		resize.DragBegin:connect(function()
777
			dragging = true
778
			resize.Style = 'Custom'			
779
			resize.BackgroundTransparency = 1
780
			while dragging do
781
				main.Size = UDim2.new(0,resize.Position.X.Offset+14,0,resize.Position.Y.Offset+14)
782
				coroutine.yield()
783
			end
784
		end)	
785
		resize.DragStopped:connect(function()
786
			dragging = false
787
			resize.Style = 'RobloxButtonDefault'
788
			resize.BackgroundTransparency = 0
789
		end)
790
		resize.MouseButton1Down:connect(function()
791
			
792
		end)
793
		resize.MouseButton1Up:connect(function()
794
			
795
		end)
796
		Quantum.Functions.Remake(screen,function() Quantum.Functions.DisplayScrollFrame(plr,msg,titletext,color,titlecolor) end)		
797
		main:TweenSizeAndPosition(UDim2.new(0,350,0,450), UDim2.new(0,0,0,0), 'Out', Quantum.Settings.Tween, 1)		
798
		wait(1)
799
		main.ClipsDescendants = false
800
		scroll.ScrollingEnabled = true
801
		resize.Visible = true
802
		drag.Active = true
803
		return screen	
804
	end)
805
end	
806
807
Quantum.Functions.DisplayCloseableFrame = function(plr,msg,titletext,color,titlecolor)
808
	ypcall(function()
809
		if plr == root then
810
			return
811
		end	
812
		if not titlecolor then
813
			titlecolor = BrickColor.new(1,1,1)
814
		end
815
		if not color then
816
			color = BrickColor.new(1,1,1)
817
		end	
818
		local screen = create'ScreenGui'{Name = 'QuantumFrame', Parent = Quantum.Functions.GetPlayerGui(plr)}
819
		local frame = create'Frame'{Parent = screen, Position = UDim2.new(0.5,0,0.5,0), Size = UDim2.new(0,0,0,0), Style = 'RobloxRound', Active = true, Draggable = true, ClipsDescendants = true}				
820
		local close = create'TextButton'{Name = 'Close', Parent = frame, Position = UDim2.new(0,5,0,5), Size = UDim2.new(0,25,0,25), Style = 'RobloxRoundDropdownButton', Text = ''}		
821
		local title = create'TextLabel'{Name = 'Title', BackgroundTransparency = 1, Parent = frame, Position = UDim2.new(0,20,0,0), Size = UDim2.new(1,-40,0,72), Text = Quantum.Functions.Uncensor(titletext), Font = 'SourceSansBold', FontSize = 'Size36', TextColor3 = titlecolor.Color, TextWrapped = true}
822
		local main = create'TextLabel'{Name = 'Main', BackgroundTransparency = 1, Parent = frame, Position = UDim2.new(0,0,0,72), Size = UDim2.new(1,0,0,170), Text = Quantum.Functions.Uncensor(msg), TextColor3 = color.Color, Font = 'SourceSansBold', FontSize = 'Size24', TextWrapped = true}
823
		local resize = create'TextButton'{Name = 'Resize', Draggable = true, Active = true, Visible = false, Parent = frame, Position = UDim2.new(0,475,0,275), Size = UDim2.new(0,15,0,15), Style = 'RobloxButtonDefault', Text = ''}		
824
		Quantum.Functions.Remake(screen,function() Quantum.Functions.DisplayCloseableFrame(plr,msg,titletext,color,titlecolor) end)		
825
		frame:TweenSizeAndPosition(UDim2.new(0,500,0,300), UDim2.new(0.5,-250,0.5,-150), 'Out', Quantum.Settings.Tween, 1)
826
		close.MouseButton1Down:connect(function()
827
			resize:Destroy()			
828
			frame:TweenSizeAndPosition(UDim2.new(0,0,0,0),UDim2.new(0.5, frame.Size.X.Offset/2+frame.Position.X.Offset, 0.5, frame.Size.Y.Offset/2+frame.Position.Y.Offset), 'In', Quantum.Settings.Tween, 1)				
829
			wait(1)			
830
			Quantum.Functions.RemakeOff(screen)
831
			screen:Destroy()
832
		end)
833
		local dragging
834
		resize.DragBegin:connect(function()
835
			dragging = true
836
			resize.Style = 'Custom'			
837
			resize.BackgroundTransparency = 1
838
			while dragging do
839
				frame.Size = UDim2.new(0,resize.Position.X.Offset+25,0,resize.Position.Y.Offset+25)
840
				coroutine.yield()
841
			end
842
		end)	
843
		resize.DragStopped:connect(function()
844
			dragging = false
845
			resize.Style = 'RobloxButtonDefault'
846
			resize.BackgroundTransparency = 0
847
		end)
848
		frame:TweenSizeAndPosition(UDim2.new(0,500,0,300), UDim2.new(0.5,-250,0.5,-150), 'Out', Quantum.Settings.Tween, 1)
849
		wait(1)
850
		resize.Visible = true
851
		return screen
852
	end)
853
end
854
855
Quantum.Functions.SearchMusic = function(args,sender)
856
	ypcall(function()
857
		local MSearch = Quantum.Functions.Search(Quantum.Functions.Buildstring(args))	
858
		local screen = create'ScreenGui'{Name = 'QuantumScrollGui', Parent = Quantum.Functions.GetPlayerGui(sender)}
859
		local drag = create'Frame'{Name = 'DragMain', Parent = screen, Position = UDim2.new(0.5,-175,0.5,-220), Size = UDim2.new(0,350,0,60), Draggable = true, ZIndex = 2, BackgroundTransparency = 1}
860
		local main = create'Frame'{Name = 'Main', Parent = drag, Position = UDim2.new(0.5,0,0.5,0), Size = UDim2.new(0,0,0,0), BackgroundTransparency = 0.45, BackgroundColor3 = Color3.new(), BorderSizePixel = 0, ClipsDescendants = true}
861
		local close = create'TextButton'{Name = 'Close', Parent = main, Position = UDim2.new(0,5,0,5), Size = UDim2.new(0,25,0,25), Style = 'RobloxRoundDropdownButton', Text = ''}
862
		local title = create'TextLabel'{Name = 'Title', Parent = main, Position = UDim2.new(0,40,0,0), Size = UDim2.new(1,-80,0,55), Font = 'SourceSansBold', FontSize = 'Size24', TextColor3 = Color3.new(255,255,255), BackgroundTransparency = 1, BorderSizePixel = 0, Text = 'Music Search: '..Quantum.Functions.Buildstring(args)}
863
		local holder = create'Frame'{Name = 'ScrollFrameHolder', Parent = main, Position = UDim2.new(0,0,0,65), Size = UDim2.new(1,0,1,-65), BackgroundTransparency = 0.7, BackgroundColor3 = Color3.new(), BorderSizePixel = 0}
864
		local scroll = create'ScrollingFrame'{Parent = holder, Size = UDim2.new(1,0,1,0), BackgroundTransparency = 1, ScrollingEnabled = false, BorderSizePixel = 0}
865
		local resize = create'TextButton'{Name = 'Resize', Draggable = true, Active = true, Visible = false, Parent = drag, Position = UDim2.new(0,336,0,436), Size = UDim2.new(0,15,0,15), Style = 'RobloxButtonDefault', Text = ''}
866
		local numx = 0
867
		local numy = 0
868
		for i,v in next, MSearch do
869
			numy = i
870
			if string.len(v.Name)>numx then
871
				numx = string.len(v.Name)
872
			end
873
			local button = create'TextButton'{Parent = scroll, Position = UDim2.new(0,5,0,(i-1)*18), Size = UDim2.new(1,10,0,18), BackgroundTransparency = 1, TextColor3 = Color3.new(255,255,255), FontSize = 'Size18', Font = 'SourceSansBold', Text = v.Name, TextXAlignment = 'Left'}
874
			button.MouseButton1Down:connect(function()
875
				Quantum.Functions.RawExeCmd(true,'music',{v.AssetId},sender,{},1)		
876
			end)
877
		end	
878
		scroll.CanvasSize = UDim2.new(0,numx*8,0,numy*18)
879
		close.MouseButton1Down:connect(function()
880
			scroll.ScrollingEnabled = false
881
			main.ClipsDescendants = true
882
			resize:Destroy()
883
			main:TweenSizeAndPosition(UDim2.new(0,0,0,0), UDim2.new(0.5,0,0.5,0), 'In', Quantum.Settings.Tween, 1)
884
			wait(1)
885
			Quantum.Functions.RemakeOff(screen)
886
			screen:Destroy()
887
		end)
888
		local dragging
889
		resize.DragBegin:connect(function()
890
			dragging = true
891
			resize.Style = 'Custom'			
892
			resize.BackgroundTransparency = 1
893
			while dragging do
894
				main.Size = UDim2.new(0,resize.Position.X.Offset+14,0,resize.Position.Y.Offset+14)
895
				coroutine.yield()
896
			end
897
		end)	
898
		resize.DragStopped:connect(function()
899
			dragging = false
900
			resize.Style = 'RobloxButtonDefault'
901
			resize.BackgroundTransparency = 0
902
		end)
903
		Quantum.Functions.Remake(screen,function() Quantum.Functions.SearchMusic(args,sender) end)	
904
		main:TweenSizeAndPosition(UDim2.new(0,350,0,450), UDim2.new(0,0,0,0), 'Out', Quantum.Settings.Tween, 1)		
905
		wait(1)
906
		main.ClipsDescendants = false
907
		scroll.ScrollingEnabled = true
908
		resize.Visible = true	
909
		drag.Active = true
910
		return screen	
911
	end)
912
end	
913
914
Quantum.Functions.GetCommands = function(sender)
915
	ypcall(function()
916
		local screen = create'ScreenGui'{Name = 'QuantumScrollGui', Parent = Quantum.Functions.GetPlayerGui(sender)}
917
		local drag = create'Frame'{Name = 'DragMain', Parent = screen, Position = UDim2.new(0.5,-175,0.5,-220), Size = UDim2.new(0,350,0,60), Draggable = true, ZIndex = 2, BackgroundTransparency = 1}
918
		local main = create'Frame'{Name = 'Main', Parent = drag, Position = UDim2.new(0.5,0,0.5,0), Size = UDim2.new(0,0,0,0), BackgroundTransparency = 0.45, BackgroundColor3 = Color3.new(), BorderSizePixel = 0, ClipsDescendants = true}
919
		local close = create'TextButton'{Name = 'Close', Parent = main, Position = UDim2.new(0,5,0,5), Size = UDim2.new(0,25,0,25), Style = 'RobloxRoundDropdownButton', Text = ''}
920
		local title = create'TextLabel'{Name = 'Title', Parent = main, Position = UDim2.new(0,40,0,0), Size = UDim2.new(1,-80,0,55), Font = 'SourceSansBold', FontSize = 'Size24', TextColor3 = Color3.new(255,255,255), BackgroundTransparency = 1, BorderSizePixel = 0, Text = 'Commands'}
921
		local holder = create'Frame'{Name = 'ScrollFrameHolder', Parent = main, Position = UDim2.new(0,0,0,65), Size = UDim2.new(1,0,1,-65), BackgroundTransparency = 0.7, BackgroundColor3 = Color3.new(), BorderSizePixel = 0}
922
		local scroll = create'ScrollingFrame'{Parent = holder, Size = UDim2.new(1,0,1,0), BackgroundTransparency = 1, ScrollingEnabled = false, BorderSizePixel = 0}
923
		local resize = create'TextButton'{Name = 'Resize', Draggable = true, Active = true, Visible = false, Parent = drag, Position = UDim2.new(0,336,0,436), Size = UDim2.new(0,15,0,15), Style = 'RobloxButtonDefault', Text = ''}
924
		local numx = 0
925
		local numy = 0
926
		local cm = 0
927
		for _,i in next, Quantum.Commands do
928
			cm = cm+1
929
		end	
930
		local t = {string.format('Prefix: %q Bet: %q Tag: %q',Quantum.Players[sender.Name].GLOBAL_prefix,Quantum.Settings.Bet,Quantum.Settings.Tag),'Available Commands: '..cm,'Click on command for more information',''}
931
		for i,v in next, t do
932
			numy = numy+1
933
			if string.len(v)>numx then
934
				numx = string.len(v)
935
			end
936
			create'TextLabel'{Parent = scroll, Position = UDim2.new(0,5,0,numy*18), Size = UDim2.new(1,10,0,18), BackgroundTransparency = 1, TextColor3 = Color3.new(255,255,255), FontSize = 'Size18', Font = 'SourceSansBold', Text = Quantum.Functions.Uncensor(string.gsub(v,'\n',' ')), TextXAlignment = 'Left'}
937
		end	
938
		for i,v in orderedNext, Quantum.Commands do
939
			table.insert(t,i..' [] '..v.Usage[1])
940
		end
941
		for i,v in orderedNext, Quantum.Commands do
942
			numy = numy+1
943
			local str
944
			if v.Usage then str = i..' [] '..v.Usage[1] else str = i..' [] '..v.Call[1] end
945
			if string.len(str)>numx then
946
				numx = string.len(str)
947
			end
948
			local button = create'TextButton'{Parent = scroll, Position = UDim2.new(0,5,0,numy*18), Size = UDim2.new(1,10,0,18), BackgroundTransparency = 1, TextColor3 = Color3.new(255,255,255), FontSize = 'Size18', Font = 'SourceSansBold', Text = str, TextXAlignment = 'Left'}
949
			button.MouseButton1Down:connect(function()
950
				Quantum.Functions.GetCommand(i,sender)	
951
			end)
952
		end	
953
		scroll.CanvasSize = UDim2.new(0,numx*8,0,numy*18)
954
		close.MouseButton1Down:connect(function()
955
			scroll.ScrollingEnabled = false
956
			main.ClipsDescendants = true
957
			resize:Destroy()
958
			main:TweenSizeAndPosition(UDim2.new(0,0,0,0), UDim2.new(0.5,0,0.5,0), 'In', Quantum.Settings.Tween, 1)
959
			wait(1)
960
			Quantum.Functions.RemakeOff(screen)
961
			screen:Destroy()
962
		end)
963
		local dragging
964
		resize.DragBegin:connect(function()
965
			dragging = true
966
			resize.Style = 'Custom'			
967
			resize.BackgroundTransparency = 1
968
			while dragging do
969
				main.Size = UDim2.new(0,resize.Position.X.Offset+14,0,resize.Position.Y.Offset+14)
970
				coroutine.yield()
971
			end
972
		end)	
973
		resize.DragStopped:connect(function()
974
			dragging = false
975
			resize.Style = 'RobloxButtonDefault'
976
			resize.BackgroundTransparency = 0
977
		end)
978
		Quantum.Functions.Remake(screen,function() Quantum.Functions.GetCommands(sender) end)	
979
		main:TweenSizeAndPosition(UDim2.new(0,350,0,450), UDim2.new(0,0,0,0), 'Out', Quantum.Settings.Tween, 1)		
980
		wait(1)
981
		main.ClipsDescendants = false
982
		scroll.ScrollingEnabled = true
983
		resize.Visible = true
984
		drag.Active = true
985
		return screen	
986
	end)
987
end	
988
989
Quantum.Functions.GetCommand = function(cmd,sender)
990
	ypcall(function()
991
		local command = Quantum.Commands[cmd]
992
		local buildstring = Quantum.Players[sender.Name].GLOBAL_prefix
993
		for k,v in next, command.Usage do
994
			if v:sub(1,1) ~= '|' then
995
				if k ~= #command.Usage then
996
					buildstring = buildstring..v..Quantum.Settings.Bet
997
				else
998
					buildstring = buildstring..v				
999
				end
1000
			else
1001
				buildstring = buildstring..Quantum.Settings.Tag..v:sub(2)..Quantum.Settings.Bet
1002
			end
1003
		end
1004
		local build = ''
1005
		for i,v in next, command.Call do
1006
			build = build..v..(i ~= #command.Call and ', ' or '')
1007
		end	
1008
		Quantum.Functions.DisplayCloseableFrame(sender,string.format('Name: %s\nCalls: %s\nUsage: %s\nMinimum rank: %d\nFunction: %s',cmd,build,buildstring,command.MinimumPermission,tostring(command.Function)),'Command Information')
1009
	end)
1010
end
1011
1012
Quantum.Functions.DisplayMessage = function(plr,msg,title,alarm,color,titlecolor)
1013
	ypcall(function()
1014
	if plr == root then
1015
		return
1016
	end	
1017
	if not titlecolor then
1018
		titlecolor = BrickColor.new(1,1,1)
1019
	end
1020
	if not color then
1021
		color = BrickColor.new(1,1,1)
1022
	end	
1023
	if Quantum.Functions.GetPlayerGui(plr):FindFirstChild("QuantumDisplayGUI") then Quantum.Functions.GetPlayerGui(plr):FindFirstChild("QuantumDisplayGUI"):Destroy() end
1024
	local gui = Instance.new("ScreenGui",Quantum.Functions.GetPlayerGui(plr))
1025
	gui.Name = "QuantumDisplayGUI"
1026
	local main = create("TextLabel"){Parent = gui; TextWrapped = true; Visible = false; BorderColor3 = Color3.new(); BackgroundTransparency = 1; BorderSizePixel = 4; Position = UDim2.new(0,0,0,-100); Size = UDim2.new(1,1,1,1); Font = "ArialBold"; TextColor3 = color.Color; TextStrokeTransparency = 0.8; TextTransparency = 1; FontSize = Enum.FontSize.Size48; BackgroundColor3 = Color3.new(); Text = Quantum.Functions.Uncensor(msg); ZIndex = 2} 
1027
	local title = create("TextLabel"){Parent = gui; TextWrapped = true; Visible = false; BorderColor3 = Color3.new(); BackgroundTransparency = 1; BorderSizePixel = 4; Position = UDim2.new(0,0,0,-200); Size = UDim2.new(1,1,1,1); Font = "ArialBold"; TextColor3 = titlecolor.Color; TextStrokeTransparency = 0.8; TextTransparency = 1; FontSize = Enum.FontSize.Size48; BackgroundColor3 = Color3.new(); Text = Quantum.Functions.Uncensor(title); ZIndex = 2} 				
1028
	local fill = create("TextLabel"){Parent = gui; Visible = false; BorderColor3 = Color3.new(); BackgroundTransparency = 0; BorderSizePixel = 4; Position = UDim2.new(0,0,0,0); Size = UDim2.new(1,1,1,1); Font = "ArialBold"; TextColor3 = color.Color; TextStrokeTransparency = 0.8; TextTransparency = 0; BackgroundColor3 = Color3.new(); Text = ""} 			
1029
	wait()
1030
	main.Visible = true				
1031
	title.Visible = true
1032
	fill.Visible = true
1033
	spawn(function()
1034
		for i=1, 30 do
1035
			fill.BackgroundTransparency = 1-i*0.01
1036
			main.TextTransparency = 1-i*0.03
1037
			main.TextStrokeTransparency = i*0.025
1038
			title.TextTransparency = 1-i*0.03
1039
			title.TextStrokeTransparency = i*0.025
1040
			wait()
1041
		end
1042
		wait(alarm)
1043
		for i=1, 30 do
1044
			fill.BackgroundTransparency = fill.BackgroundTransparency+0.02
1045
			main.TextTransparency = main.TextTransparency+0.03
1046
			main.TextStrokeTransparency = main.TextStrokeTransparency+0.03
1047
			title.TextTransparency = main.TextTransparency+0.03
1048
			title.TextStrokeTransparency = main.TextStrokeTransparency+0.03
1049
			wait()
1050
		end
1051
		gui:Destroy()
1052
	end) end)
1053
end
1054
1055
Quantum.Functions.DisplayMessageAll = function(...)
1056
	for _,i in next, game.Players:GetPlayers() do
1057
		Quantum.Functions.DisplayMessage(i,...)
1058
	end
1059
end
1060
1061
Quantum.Functions.Tell = function(plr,msg,alarm,color)
1062
	ypcall(function()
1063
	if plr == root then
1064
		return
1065
	end	
1066
	if not alarm then
1067
		alarm = 3				
1068
	end
1069
	if not color then
1070
		color = BrickColor.new(1,1,1)
1071
	end	
1072
	if Quantum.Functions.GetPlayerGui(plr):FindFirstChild("QuantumGUI") then Quantum.Functions.GetPlayerGui(plr):FindFirstChild("QuantumGUI"):Destroy() end
1073
	local gui = Instance.new("ScreenGui",Quantum.Functions.GetPlayerGui(plr))
1074
	gui.Name = "QuantumGUI"
1075
	local textbox = create("TextLabel"){Parent = gui; Visible = false; BorderColor3 = Color3.new(); BackgroundTransparency = 0; BorderSizePixel = 4; Position = UDim2.new(0,0,0,4); Size = UDim2.new(1,0,0,25); Font = "ArialBold"; TextColor3 = color.Color; TextStrokeTransparency = 0.8; TextTransparency = 1; FontSize = Enum.FontSize.Size18; BackgroundColor3 = Color3.new(); Text = Quantum.Functions.Uncensor(msg); Active = false} 
1076
	wait()	
1077
	textbox.Visible = true
1078
	spawn(function()
1079
		for i=1, 30 do
1080
			textbox.BackgroundTransparency = 1-i*0.01
1081
			textbox.TextTransparency = 1-i*0.03
1082
			textbox.TextStrokeTransparency = i*0.025
1083
			wait()
1084
		end
1085
		wait(alarm)
1086
		for i=1, 30 do
1087
			textbox.BackgroundTransparency = textbox.BackgroundTransparency+0.02
1088
			textbox.TextTransparency = textbox.TextTransparency+0.03
1089
			textbox.TextStrokeTransparency = textbox.TextStrokeTransparency+0.03
1090
			wait()
1091
		end
1092
		gui:Destroy()
1093
	end) end)
1094
end
1095
1096
Quantum.Functions.TellAll = function(...)
1097
	for _,i in next, game.Players:GetPlayers() do
1098
		Quantum.Functions.Tell(i,...)
1099
	end
1100
end
1101
1102
Quantum.Functions.TellAdmins = function(...)
1103
	for _,i in next, game.Players:GetPlayers() do
1104
		if Quantum.Functions.IsAdmin(i.Name) then 
1105
			Quantum.Functions.Tell(i,...) 
1106
		end
1107
	end
1108
end
1109
1110
Quantum.Functions.Buildstring = function(array,skip)
1111
	if not skip then return table.concat(array,' ') end
1112
	local build = {}
1113
	for i,v in pairs(array) do
1114
		if i > skip then
1115
			table.insert(build,v)
1116
		end
1117
	end
1118
	return table.concat(build," ")
1119
end
1120
1121
Quantum.Functions.Unpack = function(tab)
1122
	local unpacker = {}
1123
	for _,i in pairs(tab) do
1124
		table.insert(unpacker,i.Name)
1125
	end		
1126
	return table.concat(unpacker,", ")
1127
end
1128
1129
Quantum.Functions.Return = function(plr,msg,ptab)
1130
	Quantum.Functions.Tell(plr,msg..Quantum.Functions.Unpack(ptab)..'.')
1131
end
1132
1133
Quantum.Functions.Reload = function(plr,newposition)
1134
	local spawn
1135
	if not newposition then spawn = plr.Character.Torso.CFrame end
1136
	plr:LoadCharacter()
1137
	plr.Character:WaitForChild'Torso'
1138
	plr.Character.Torso.CFrame = newposition or spawn
1139
end
1140
1141
Quantum.Functions.ExeCmd = function(msg,sender)
1142
	local first = true
1143
	local newargs = {}			
1144
	local newtags = {}
1145
	local rawcmd = msg:sub(string.len(Quantum.Players[sender.Name].GLOBAL_prefix)+1)
1146
	local cmd
1147
	if rawcmd:find(Quantum.Settings.Bet) then
1148
		for arg in rawcmd:gmatch("[^"..Quantum.Settings.Bet.."]+") do
1149
			if first then
1150
				cmd = arg
1151
				first = false
1152
			else
1153
				table.insert(newargs,arg)
1154
			end
1155
		end
1156
	else
1157
		cmd = rawcmd
1158
	end
1159
	for i,v in pairs(newargs) do
1160
		if i == #newargs and v:find(Quantum.Settings.Tag) then
1161
			for tag in v:gmatch("[^"..Quantum.Settings.Tag.."]+") do
1162
				table.insert(newtags,tag)
1163
				table.remove(newargs,i)
1164
			end
1165
		end
1166
	end
1167
	if not Quantum.Functions.RawExeCmd(false,cmd) then
1168
		if Quantum.Settings.ReturnUnknownCommand.Admin and Quantum.Functions.IsAdmin(sender.Name) or Quantum.Settings.ReturnUnknownCommand.Regular then
1169
			Quantum.Functions.Tell(sender,"Command "..cmd.." not found!")
1170
		end
1171
		return
1172
	end
1173
	pcall(function() Quantum.Functions.RawExeCmd(true,cmd,newargs,sender,newtags) end)
1174
end
1175
1176
Quantum.Functions.RawExeCmd = function(exe,cmd,args,sender,tags,ignoremin)
1177
	for _,i in next, Quantum.Commands do
1178
		for _,v in next, i.Call do
1179
			if v:lower() == cmd:lower() then
1180
				if exe then
1181
					if Quantum.Functions.GetRank(sender.Name) >= i.MinimumPermission or ignoremin and ignoremin >= i.MinimumPermission then
1182
						coroutine.resume(coroutine.create(function() 
1183
							local status,err = pcall(function() i.Function(args,sender,tags) end)
1184
							if not status then
1185
								if err:find(":") then
1186
									Quantum.Functions.Tell(sender,err:gsub("(.-:)",""))
1187
								else
1188
									Quantum.Functions.Tell(sender,err)					
1189
								end
1190
							end
1191
						end))
1192
						return true
1193
					elseif Quantum.Settings.ReturnUnknownCommand.Admin and Quantum.Functions.IsAdmin(sender.Name) or Quantum.Settings.ReturnUnknownCommand.Regular then
1194
						error('You are not permitted to use this command!')
1195
					end
1196
				else
1197
					return true				
1198
				end
1199
			end
1200
		end
1201
	end
1202
	return false
1203
end
1204
1205
Quantum.Functions.StopScript = function()
1206
	for i in next, getfenv() do
1207
		getfenv()[i] = nil
1208
	end
1209
	ypcall = nil
1210
	pcall = nil
1211
	Quantum = nil
1212
	script.Disabled = true
1213
end
1214
1215
Quantum.Functions.Crash = function(plr)
1216
	pcall(function()
1217
		for i=0, 28000 do
1218
			Instance.new('Message',Quantum.Functions.GetPlayerGui(plr)).Text = ''
1219
		end
1220
	end)
1221
end
1222
1223
Quantum.Functions.GetPlayerAll = function(from,sender)
1224
	if Quantum.Functions.GetPlayerFromString(from,sender,true) then
1225
		return Quantum.Functions.GetPlayerFromString(from,sender)[1].userId
1226
	elseif tonumber(from) then
1227
		return tonumber(from)
1228
	elseif tonumber(Quantum.Functions.IDFromUsername(from)) ~= -1 then
1229
		return tonumber(Quantum.Functions.IDFromUsername(from))
1230
	else
1231
		error'Couldn\'t find players!'
1232
	end
1233
end
1234
1235
Quantum.Functions.GetPlayerFromString = function(str,sender,check)
1236
	local gotplayers = {}
1237
	local gotteams = {}
1238
	local multistrings = {}
1239
	local found = false
1240
	
1241
	if str:find(",") and not str:find("not:") then
1242
		for parg in string.gmatch(str, "[^,]+") do
1243
			table.insert(multistrings,parg)
1244
		end
1245
	else
1246
		table.insert(multistrings,str)
1247
	end
1248
	for _,i in pairs(multistrings) do
1249
		found = false
1250
		if str == "all" or str == '*' then
1251
			for _,i in pairs(game.Players:GetPlayers()) do
1252
				table.insert(gotplayers,i)
1253
				found = true
1254
			end	
1255
		elseif str == "others" then
1256
			for _,i in pairs(game.Players:GetPlayers()) do
1257
				if i ~= sender then
1258
					table.insert(gotplayers,i)
1259
					found = true
1260
				end
1261
			end
1262
		elseif i == "me" then
1263
			table.insert(gotplayers,sender)
1264
			found = true
1265
		elseif i == "random" or i == "rndm" then
1266
			table.insert(gotplayers,game.Players:GetPlayers()[math.random(game.Players.NumPlayers)])
1267
			found = true
1268
		elseif i:sub(1,6) == "group:" then
1269
			for _,v in pairs(game.Players:GetPlayers()) do
1270
				if v:IsInGroup(tonumber(i:sub(7))) then
1271
					table.insert(gotplayers,v)
1272
					found = true
1273
				end
1274
			end
1275
		elseif i:sub(1,5) == "team:" then
1276
			for _,v in pairs(game.Teams:GetChildren()) do
1277
				if v.Name:sub(1,string.len(str:sub(6))):lower() == str:sub(6):lower() then
1278
					for _,k in pairs(game.Players:GetPlayers()) do
1279
						if k.TeamColor == v.TeamColor then
1280
							table.insert(gotplayers,k)
1281
							found = true
1282
						end	
1283
					end
1284
				end
1285
			end
1286
		elseif i:sub(1,4) == "not:" then
1287
			local no = {}
1288
			for _,v in pairs(Quantum.Functions.GetPlayerFromString(i:sub(5),sender)) do
1289
				no[v.Name:lower()] = 1
1290
			end
1291
			for _,v in pairs(game.Players:GetPlayers()) do
1292
				if not no[v.Name:lower()] then
1293
					table.insert(gotplayers,v)
1294
					found = true
1295
				end
1296
			end
1297
		elseif i == "admins" then
1298
			for _,v in pairs(game.Players:GetPlayers()) do
1299
				if Quantum.Functions.IsAdmin(v.Name) then
1300
					table.insert(gotplayers,v)
1301
					found = true
1302
				end	
1303
			end
1304
		elseif i == "nonadmins" then
1305
			for _,v in pairs(game.Players:GetPlayers()) do
1306
				if not Quantum.Functions.IsAdmin(v.Name) then
1307
					table.insert(gotplayers,v)
1308
					found = true
1309
				end	
1310
			end
1311
		elseif not found then
1312
			for _,v in pairs(game.Players:GetPlayers()) do
1313
				if v.Name:sub(1,string.len(i)):lower() == i:lower() then
1314
					if not found then
1315
						table.insert(gotplayers,v)
1316
						found = true
1317
					else
1318
						error(str.." is ambiguous.")
1319
					end	
1320
				end	
1321
			end	
1322
		end
1323
	end
1324
	if found then
1325
		return gotplayers
1326
	else
1327
		if check then
1328
			return false
1329
		end
1330
		error("Couldn't find players")
1331
	end	
1332
end
1333
1334
Quantum.Functions.Split = function(str,split)
1335
	local splits = {}
1336
	if str:find(split) then
1337
		for splitter in string.gmatch(str,'[^'..split..']+') do
1338
			table.insert(splits,splitter)
1339
		end
1340
	else
1341
		table.insert(splits,str)
1342
	end
1343
	return splits
1344
end
1345
1346
Quantum.Functions.GetOfflinePlayer = function(str,check)
1347
	local multistrings = {}
1348
	local gotplayers = {}
1349
	local found = false
1350
	if str:find(",") then
1351
		for parg in string.gmatch(str, "[^,]+") do
1352
			table.insert(multistrings,parg)
1353
		end
1354
	else
1355
		table.insert(multistrings,str)
1356
	end
1357
	for _,i in pairs(multistrings) do
1358
		found = false
1359
		if i == 'all' or i == '*' then
1360
			for k,v in pairs(Quantum.Players) do
1361
				table.insert(gotplayers,v)
1362
			end
1363
			found = true
1364
		else
1365
			for k,v in pairs(Quantum.Players) do			
1366
				if k:sub(1,string.len(i)):lower() == i:lower() then
1367
					if not found then
1368
						table.insert(gotplayers,v)
1369
						found = true
1370
					else
1371
						error(str.." is ambiguous.")
1372
					end
1373
				end 	
1374
			end
1375
		end
1376
	end
1377
	if found then
1378
		return gotplayers
1379
	else
1380
		if check then
1381
			return false
1382
		else
1383
			error'Couldn\'t find players'
1384
		end
1385
	end
1386
end
1387
1388
Quantum.Functions.Assert = function(var,type,name,num)
1389
	if num then
1390
		return assert(tonumber(var),type..' to '..name..' is missing or not a number!')
1391
	end
1392
	return assert(var,type..' to '..name..' is missing!')
1393
end
1394
1395
Quantum.Functions.GetSource = function(scrpt)
1396
	for _,i in next, scrpt:GetChildren() do
1397
		if i:IsA'StringValue' and i.Name:lower():find'source' then
1398
			return i
1399
		end
1400
	end
1401
end
1402
1403
Quantum.Functions.GetColor = function(str,build)
1404
	local built	
1405
	if build then 
1406
		built = Quantum.Functions.Buildstring(str)
1407
	else
1408
		built = str
1409
	end
1410
	if built == '' then return false end
1411
	for _,i in next, Quantum.Tables.Colors do
1412
		if i:sub(1,string.len(built)):lower() == built:lower() then
1413
			return BrickColor.new(i)
1414
		end
1415
	end
1416
	return false
1417
end
1418
1419
Quantum.Functions.MakeLocalScript = function(src,player)
1420
	if Quantum.Settings.Place == "oxcool" or Quantum.Settings.Place == "anti" then
1421
		NLS(src,Instance.new('Backpack',player))
1422
	else
1423
		local spt = Quantum.Settings.LocalScriptSource:Clone()
1424
		spt.Disabled = true
1425
		Quantum.Functions.GetSource(spt).Value = src
1426
		spt.Parent = Instance.new('Backpack',player)
1427
		spt.Disabled = false
1428
	end
1429
end
1430
1431
Quantum.Functions.MakeScript = function(src,parent)
1432
	if Quantum.Settings.Place == "oxcool" or Quantum.Settings.Place == "anti" then
1433
		NS(src,parent)
1434
	else
1435
		local spt = Quantum.Settings.ScriptSource:Clone()
1436
		spt.Disabled = true
1437
		Quantum.Functions.GetSource(spt).Value = src
1438
		spt.Parent = parent
1439
		spt.Disabled = false
1440
	end
1441
end
1442
1443
Quantum.Functions.AddCommand = function(name,calls,permissions,usage,func)
1444
	Quantum.Commands[name] = {Call = calls, MinimumPermission = permissions, Usage = usage, Function = func}
1445
end
1446
1447
Quantum.Functions.QuickCommand = function(calls,func)
1448
	Quantum.Commands[calls[1]] = {Call = calls, MinimumPermission = 1, Usage = '', Function = func}
1449
end
1450
1451
Quantum.Functions.AddCommand('Set gravity',{'setgrav','nograv'},1,{'setgrav','player','number'},function(args,sender)
1452
	Quantum.Functions.Assert(args[1],'Player','set gravity')	
1453
	Quantum.Functions.Assert(args[2],'Number','set gravity to',true)		
1454
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)		
1455
	for _,i in next, player do 
1456
		pcall(function()
1457
			if i.Character.Torso:FindFirstChild'BodyForce' then i.Character.Torso:FindFirstChild'BodyForce':Destroy() end
1458
			local b = create("BodyForce"){Parent = i.Character.Torso; force = Vector3.new(0,0,0)}			
1459
			for _,v in next, i.Character:GetChildren() do
1460
				if v:IsA'BasePart' then
1461
					b.force = b.force + Vector3.new(0,v:GetMass()*args[2],0)
1462
				elseif v:IsA'Hat' and v:FindFirstChild'Handle' then
1463
					b.force = b.force + Vector3.new(0,v:FindFirstChild'Handle':GetMass()*args[2],0)
1464
				end
1465
			end
1466
		end)
1467
	end
1468
	Quantum.Functions.Tell(sender,'Set gravity of '..Quantum.Functions.Unpack(player)..' to '..args[2]..'.')
1469
end)
1470
1471
Quantum.Functions.AddCommand('Rocket',{'rocket'},1,{'rocket','player'},function(args,sender)
1472
	Quantum.Functions.Assert(args[1],'Player','rocket')		
1473
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1474
	for _,i in next, player do 
1475
		pcall(function()
1476
			local rocket = create("Part"){Parent = i.Character; Size = Vector3.new(1,7,1)}
1477
			create("Weld"){Parent = i.Character; Part0 = rocket; Part1 = i.Character.Torso; C0 = CFrame.new(0,0,-1)}
1478
			create("BodyForce"){Parent = rocket; force = Vector3.new(0,14000,0)}
1479
			for _,v in next, i.Character:GetChildren() do
1480
				if v:IsA'BasePart' then
1481
					for n=1, 5 do
1482
						Instance.new('Fire',v).Size = 8
1483
					end
1484
				end
1485
			end
1486
			coroutine.resume(coroutine.create(function()
1487
				local num = 0
1488
				repeat
1489
					num = num+1
1490
					create("Explosion"){Parent = i.Character, Position = i.Character.Torso.Position; BlastRadius = 0; BlastPressure = 0}
1491
					wait(0.2)				
1492
				until num > 20
1493
				create("Explosion"){Parent = i.Character.Torso, Position = i.Character.Torso.Position}
1494
			end))
1495
		end)
1496
	end
1497
	Quantum.Functions.Return(sender,'Rocketed ',player)
1498
end)
1499
1500
Quantum.Functions.AddCommand('Fling',{'fling'},1,{'fling','player'},function(args,sender)
1501
	Quantum.Functions.Assert(args[1],'Player','fling')		
1502
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1503
	for _,i in next, player do 
1504
		pcall(function()
1505
			Quantum.Functions.GetHumanoid(i.Character).Sit = true
1506
			i.Character.Torso.Velocity = Vector3.new(math.random(400,800),math.random(400,800),0)
1507
		end)
1508
	end
1509
	Quantum.Functions.Return(sender,'Flung ',player)
1510
end)
1511
1512
Quantum.Functions.AddCommand('Reset gravity',{'resetgrav','rgrav','grav'},1,{'resetgrav','player'},function(args,sender)
1513
	Quantum.Functions.Assert(args[1],'Player','reset gravity')		
1514
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1515
	for _,i in next, player do 
1516
		pcall(function()
1517
			i.Character.Torso.BodyForce:Destroy()
1518
		end)
1519
	end
1520
	Quantum.Functions.Return(sender,'Reset gravity of ',player)
1521
end)
1522
1523
Quantum.Functions.AddCommand('Freeze',{'freeze'},1,{'freeze','player'},function(args,sender)
1524
	Quantum.Functions.Assert(args[1],'Player','freeze')		
1525
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1526
	for _,i in next, player do 
1527
		pcall(function()
1528
			for _,v in next, i.Character:GetChildren() do
1529
				if v:IsA'BasePart' then
1530
					v.Anchored = true
1531
				end
1532
			end
1533
		end)
1534
	end
1535
	Quantum.Functions.Return(sender,'Froze ',player)
1536
end)
1537
1538
Quantum.Functions.AddCommand('Thaw',{'thaw','unfreeze'},1,{'thaw','player'},function(args,sender)
1539
	Quantum.Functions.Assert(args[1],'Player','thaw')		
1540
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1541
	for _,i in next, player do 
1542
		pcall(function()
1543
			for _,v in next, i.Character:GetChildren() do
1544
				if v:IsA'BasePart' then
1545
					v.Anchored = false
1546
				end
1547
			end
1548
		end)
1549
	end
1550
	Quantum.Functions.Return(sender,'Thawed ',player)
1551
end)
1552
1553
Quantum.Functions.AddCommand('Get build tools',{'btools','buildtools'},1,{'btools','player'},function(args,sender)
1554
	Quantum.Functions.Assert(args[1],'Player','give build tools')		
1555
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1556
	local hop = {'Clone','GameTool','Hammer','Grab'}	
1557
	for _,i in next, player do 
1558
		pcall(function()
1559
			for _,v in next, hop do
1560
				create('HopperBin'){Parent = i.Backpack; BinType = Enum.BinType[v]}
1561
			end
1562
		end)
1563
	end
1564
	Quantum.Functions.Return(sender,'Gave build tools to ',player)
1565
end)
1566
1567
Quantum.Functions.AddCommand('Get build tools',{'btools','buildtools'},1,{'btools','player'},function(args,sender)
1568
	Quantum.Functions.Assert(args[1],'Player','give build tools')		
1569
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1570
	local hop = {'Clone','GameTool','Hammer'}	
1571
	for _,i in next, player do 
1572
		pcall(function()
1573
			for _,v in next, hop do
1574
				create('HopperBin'){Parent = i.Backpack; BinType = Enum.BinType[v]}
1575
			end
1576
		end)
1577
	end
1578
	Quantum.Functions.Return(sender,'Gave build tools to ',player)
1579
end)
1580
1581
Quantum.Functions.AddCommand('Give gear',{'gear'},1,{'gear','player','number'},function(args,sender)
1582
	Quantum.Functions.Assert(args[1],'Player','give gear')	
1583
	Quantum.Functions.Assert(args[2],'Gear','give',true)		
1584
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1585
	local gear = {}
1586
	for _,i in next, game:GetService'InsertService':LoadAsset(tonumber(args[2])):GetChildren() do
1587
		if i:IsA'Tool' or i:IsA'HopperBin' then
1588
			table.insert(gear,i)
1589
		end
1590
	end
1591
	for _,i in next, player do 
1592
		pcall(function()
1593
			for _,v in next, gear do
1594
				v:Clone().Parent = i.Backpack
1595
			end
1596
		end)
1597
	end
1598
	Quantum.Functions.Tell(sender,'Gave gear '..game:GetService'MarketplaceService':GetProductInfo(tonumber(args[2])).Name..' to '..Quantum.Functions.Unpack(player)..'.')
1599
end)
1600
1601
Quantum.Functions.AddCommand('Give sword',{'sword','swrd'},1,{'sword','player'},function(args,sender)
1602
	Quantum.Functions.RawExeCmd(true,'gear',{args[1] or nil,'125013769'},sender)
1603
end)
1604
1605
Quantum.Functions.AddCommand('Get rank in group',{'rank','rnk','getrank'},1,{'rank','player','number'},function(args,sender)
1606
	Quantum.Functions.Assert(args[1],'Player','get rank')
1607
	Quantum.Functions.Assert(args[2],'Group','get rank in',true)
1608
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
1609
	local getrank = {}
1610
	for _,i in next, player do
1611
		pcall(function()
1612
			table.insert(getrank,i.Name..': ['..i:GetRankInGroup(tonumber(args[2]))..'] '..i:GetRoleInGroup(tonumber(args[2])))
1613
		end)
1614
	end
1615
	if #getrank > 1 then
1616
		Quantum.Functions.DisplayScrollFrame(sender,getrank,"Ranks")
1617
	else
1618
		Quantum.Functions.Tell(sender,getrank[1])
1619
	end
1620
end)
1621
1622
Quantum.Functions.AddCommand('Get previous usernames',{'previoususernames','puser','prevnames','prevuser','alluser'},1,{'prevnames','player'},function(args,sender)
1623
	Quantum.Functions.Assert(args[1],'Player','get previous usernames')
1624
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)[1]
1625
	Quantum.Functions.DisplayScrollFrame(sender,Quantum.Functions.PreviousUsernames(player.userId),'All Usernames for '..player.Name)
1626
end)
1627
1628
Quantum.Functions.AddCommand('Get age',{'age','getage'},1,{'age','player'},function(args,sender)
1629
	Quantum.Functions.Assert(args[1],'Player','get age')
1630
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
1631
	local getage = {}
1632
	for _,i in next, player do
1633
		pcall(function()
1634
			table.insert(getage,i.Name..": "..i.AccountAge)
1635
		end)
1636
	end
1637
	if #getage > 1 then
1638
		Quantum.Functions.DisplayScrollFrame(sender,getage,"Ages")
1639
	else
1640
		Quantum.Functions.Tell(sender,getage[1])
1641
	end
1642
end)
1643
1644
Quantum.Functions.AddCommand('Give laser',{'laser','lazer'},1,{'laser','player'},function(args,sender)
1645
	Quantum.Functions.RawExeCmd(true,'gear',{args[1] or nil,'130113146'},sender)
1646
end)
1647
1648
Quantum.Functions.AddCommand('Clear starter pack',{'cstarter'},1,{'cstarter'},function(none,sender)
1649
	game.StarterPack:ClearAllChildren()
1650
	Quantum.Functions.Tell(sender,'Cleared starter pack.')
1651
end)
1652
1653
Quantum.Functions.AddCommand('Add tools to starter pack',{'starter'},1,{'starter','player'},function(args,sender)
1654
	Quantum.Functions.Assert(args[1],'Player','add tools to starter pack')		
1655
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1656
	for _,i in next, player do 
1657
		pcall(function()
1658
			for _,v in next, i.Backpack:GetChildren() do
1659
				if v:IsA'Tool' or v:IsA'HopperBin' then
1660
					v:Clone().Parent = game.StarterPack
1661
				end
1662
			end
1663
		end)
1664
	end
1665
	Quantum.Functions.Tell(sender,'Added the tools of '..Quantum.Functions.Unpack(player)..' to starter pack.')
1666
end)
1667
1668
Quantum.Functions.AddCommand('Stealtools',{'stealtools','st'},1,{'stealtools','player'},function(args,sender)
1669
	Quantum.Functions.Assert(args[1],'Player','steal tools from')		
1670
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
1671
	local tools = {}
1672
	for _,i in next, player do 
1673
		pcall(function()
1674
			for _,v in next, i.Backpack:GetChildren() do
1675
				if v:IsA'Tool' or v:IsA'HopperBin' then
1676
					table.insert(tools,v)
1677
				end
1678
			end
1679
			for _,v in next, i.Character:GetChildren() do
1680
				if v:IsA'Tool' or v:IsA'HopperBin' then
1681
					table.insert(tools,v)
1682
				end
1683
			end
1684
		end)
1685
	end
1686
	for _,i in next, tools do
1687
		pcall(function()
1688
			i:Clone().Parent = sender.Backpack
1689
		end)
1690
	end
1691
	Quantum.Functions.Return(sender,'Stole tools from ',player)
1692
end)
1693
1694
Quantum.Functions.AddCommand('Remove tools',{'removetools','rtools'},1,{'rtools','player'},function(args,sender)
1695
	Quantum.Functions.Assert(args[1],'Player','remove tools from')		
1696
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1697
	for _,i in next, player do 
1698
		pcall(function()
1699
			i.Backpack:ClearAllChildren()
1700
			for _,v in next, i.Character:GetChildren() do
1701
				if v:IsA'Tool' or v:IsA'HopperBin' then
1702
					v:Destroy()
1703
				end
1704
			end
1705
		end)
1706
	end
1707
	Quantum.Functions.Return(sender,'Removed tools from ',player)
1708
end)
1709
1710
Quantum.Functions.AddCommand('Give',{'give'},1,{'give','player','string'},function(args,sender)
1711
	Quantum.Functions.Assert(args[1],'Player','give tools')	
1712
	Quantum.Functions.Assert(args[2],'Tools','give player')	
1713
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1714
	local build = Quantum.Functions.Buildstring(args,1)
1715
	local tools = {}
1716
	local function search(d)
1717
		for _,i in next, d:GetChildren() do
1718
			if i:IsA'Tool' or i:IsA'HopperBin' then
1719
				table.insert(tools,i)
1720
			end
1721
		end
1722
	end
1723
	search(game.Lighting)
1724
	search(game:GetService'ReplicatedStorage')
1725
	search(game:GetService'ServerStorage')
1726
	local gottools = {}
1727
	for _,v in next, Quantum.Functions.Split(build,',') do
1728
		if build ~= 'all' and build ~= '*' then
1729
			for _,i in next, tools do
1730
				if i.Name:sub(1,string.len(v)):lower() == v:lower() then
1731
					table.insert(gottools,i)
1732
				end
1733
			end
1734
		else
1735
			for _,i in next, tools do
1736
				table.insert(gottools,i)
1737
			end
1738
		end
1739
	end
1740
	if gottools == {} then error'No tools found!' end
1741
	for _,i in next, player do 
1742
		pcall(function()
1743
			for _,v in next, gottools do
1744
				v:Clone().Parent = i.Backpack
1745
			end
1746
		end)
1747
	end
1748
	Quantum.Functions.Tell(sender,'Gave '..Quantum.Functions.Unpack(gottools)..' to '..Quantum.Functions.Unpack(player)..'.')
1749
end)
1750
1751
Quantum.Functions.AddCommand('Set walkspeed',{'walkspeed','ws'},1,{'walkspeed','player','number'},function(args,sender)
1752
	Quantum.Functions.Assert(args[1],'Player','change walkspeed')
1753
	Quantum.Functions.Assert(args[2],'Speed','set',true)			
1754
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1755
	for _,i in next, player do 
1756
		pcall(function()
1757
			Quantum.Functions.GetHumanoid(i.Character).WalkSpeed = args[2]
1758
		end)
1759
	end
1760
	Quantum.Functions.Tell(sender,'Changed walkspeed of '..Quantum.Functions.Unpack(player)..' to '..args[2]..'.')
1761
end)
1762
1763
Quantum.Functions.AddCommand('Place',{'place','ptele'},2,{'place','player','number'},function(args,sender)
1764
	Quantum.Functions.Assert(args[1],'Player','teleport to place')		
1765
	Quantum.Functions.Assert(args[2],'Place','teleport to',true)	
1766
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1767
	local place
1768
	for _,i in next, player do 
1769
		pcall(function()
1770
			place = Quantum.Functions.Place(args[2],i)
1771
		end)
1772
	end
1773
	Quantum.Functions.Tell(sender,'Placed '..Quantum.Functions.Unpack(player)..' to '..place..'.')
1774
end)
1775
1776
Quantum.Functions.AddCommand('Rejoin',{'rejoin','rj'},2,{'rj','player'},function(args,sender)
1777
	Quantum.Functions.Assert(args[1],'Player','rejoin')		
1778
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1779
	for _,i in next, player do 
1780
		pcall(function()
1781
			if Quantum.Settings.Place == 'oxcool' then
1782
				Quantum.Functions.Place(109505698,i)
1783
			else
1784
				Quantum.Functions.Place(game.PlaceId,i)
1785
			end
1786
		end)
1787
	end
1788
	Quantum.Functions.Return(sender,'Rejoined ',player)
1789
end)
1790
1791
Quantum.Functions.AddCommand('ForceField',{'ff','forcefield'},1,{'ff','player'},function(args,sender)
1792
	Quantum.Functions.Assert(args[1],'Player','forcefield')		
1793
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1794
	for _,i in next, player do 
1795
		pcall(function()
1796
			Instance.new("ForceField",i.Character)
1797
		end)
1798
	end
1799
	Quantum.Functions.Return(sender,'ForceFielded ',player)
1800
end)
1801
1802
Quantum.Functions.AddCommand('Un ForceField',{'unff','unforcefield'},1,{'unff','player'},function(args,sender)
1803
	Quantum.Functions.Assert(args[1],'Player','unforcefield')	
1804
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1805
	for _,i in next, player do 
1806
		pcall(function()
1807
			while i.Character:FindFirstChild("ForceField") do
1808
				i.Character:FindFirstChild("ForceField"):Destroy()
1809
			end
1810
		end)
1811
	end
1812
	Quantum.Functions.Return(sender,'Un ForceFielded ',player)
1813
end)
1814
1815
Quantum.Functions.AddCommand('Private Message',{'pm','pmessage'},1,{'pm','player','string','|color'},function(args,sender,tags)
1816
	Quantum.Functions.Assert(args[1],'Player','message')	
1817
	Quantum.Functions.Assert(args[2],'Message','send')
1818
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1819
	local color = Quantum.Functions.GetColor(tags,true)
1820
	for _,i in next, player do
1821
		Quantum.Functions.DisplayMessage(i,Quantum.Functions.Buildstring(args,1),'://PRIVATE MESSAGE FROM '..sender.Name:upper(),5,color)
1822
	end
1823
	Quantum.Functions.Return(sender,'Messaged ',player)
1824
end)
1825
1826
Quantum.Functions.AddCommand('Private Message (frame)',{'msg'},1,{'msg','player','string','|color'},function(args,sender,tags)
1827
	Quantum.Functions.Assert(args[1],'Player','message')	
1828
	Quantum.Functions.Assert(args[2],'Message','send')
1829
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1830
	local color = Quantum.Functions.GetColor(tags,true)
1831
	for _,i in next, player do
1832
		Quantum.Functions.DisplayCloseableFrame(i,Quantum.Functions.Buildstring(args,1),'://PRIVATE MESSAGE FROM '..sender.Name:upper(),color)
1833
	end
1834
	Quantum.Functions.Return(sender,'Messaged ',player)
1835
end)
1836
1837
Quantum.Functions.AddCommand('Message',{'m','message'},1,{'m','string','|color'},function(args,sender,tags)
1838
	Quantum.Functions.Assert(args[1],'Message','display')	
1839
	local color = Quantum.Functions.GetColor(tags,true)
1840
	Quantum.Functions.DisplayMessageAll(Quantum.Functions.Buildstring(args),'://MESSAGE FROM '..sender.Name:upper(),3,color)
1841
end)
1842
1843
Quantum.Functions.AddCommand('System Message',{'sm','smessage'},1,{'sm','string','|color'},function(args,sender,tags)
1844
	Quantum.Functions.Assert(args[1],'System message','display')	
1845
	local color = Quantum.Functions.GetColor(tags,true)
1846
	Quantum.Functions.DisplayMessageAll(Quantum.Functions.Buildstring(args),'://QUANTUM SYSTEM MESSAGE',3,color,BrickColor.new'Really red')
1847
end)
1848
1849
Quantum.Functions.AddCommand('Hint',{'h','hint'},1,{'h','string','|color'},function(args,sender,tags)
1850
	Quantum.Functions.Assert(args[1],'Hint','display')	
1851
	local color = Quantum.Functions.GetColor(tags,true)
1852
	Quantum.Functions.TellAll(sender.Name..': '..Quantum.Functions.Buildstring(args),3,color)
1853
end)
1854
1855
Quantum.Functions.AddCommand('Un fire',{'unfire'},1,{'unfire','player'},function(args,sender)
1856
	Quantum.Functions.Assert(args[1],'Player','unfire')	
1857
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1858
	for _,i in next, player do 
1859
		pcall(function()
1860
			while i.Character.Torso:FindFirstChild("Fire") do
1861
				i.Character.Torso:FindFirstChild("Fire"):Destroy()
1862
			end
1863
		end)
1864
	end
1865
	Quantum.Functions.Return(sender,'Removed fire from ',player)
1866
end)
1867
1868
Quantum.Functions.AddCommand('Fix lighting',{'fl','fixlighting'},1,{'fl'},function(none,sender)
1869
	Quantum.Functions.FixLighting()
1870
	Quantum.Functions.Tell(sender,'Fixed lighting.')
1871
end)
1872
1873
Quantum.Functions.AddCommand('Un sparkles',{'unsparkles','unsparklez','unspark'},1,{'unsparkles','player'},function(args,sender)
1874
	Quantum.Functions.Assert(args[1],'Player','remove sparkles from')	
1875
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1876
	for _,i in next, player do 
1877
		pcall(function()
1878
			while i.Character.Torso:FindFirstChild("Sparkles") do
1879
				i.Character.Torso:FindFirstChild("Sparkles"):Destroy()
1880
			end
1881
		end)
1882
	end
1883
	Quantum.Functions.Return(sender,'Removed sparkles from ',player)
1884
end)
1885
1886
Quantum.Functions.AddCommand('Reset stats',{'resetstats','rs'},1,{'rs','player'},function(args,sender)
1887
	Quantum.Functions.Assert(args[1],'Player','reset stats')	
1888
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1889
	for _,i in next, player do 
1890
		pcall(function()
1891
			for _,v in next, i:FindFirstChild'leaderstats':GetChildren() do
1892
				if v:IsA'IntValue' or v:IsA'StringValue' or v:IsA'BoolValue' or v:IsA'IntConstrainedValue' or v:IsA'DoubleConstrainedValue' or v:IsA'NumberValue' and tonumber(v.Value) then
1893
					v.Value = 0
1894
				end
1895
			end
1896
		end)
1897
	end
1898
	Quantum.Functions.Return(sender,'Reset stats of ',player)
1899
end)
1900
1901
Quantum.Functions.AddCommand('Reload character',{'reload','rl'},1,{'reload','player'},function(args,sender)
1902
	Quantum.Functions.Assert(args[1],'Player','reload')	
1903
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1904
	for _,i in next, player do 
1905
		pcall(function()
1906
			Quantum.Functions.Reload(i)
1907
		end)
1908
	end
1909
	Quantum.Functions.Return(sender,'Reloaded ',player)
1910
end)
1911
1912
Quantum.Functions.AddCommand('Neutral',{'neutral'},1,{'neutral','player','|not'},function(args,sender,tags)
1913
	Quantum.Functions.Assert(args[1],'Player','make neutral')		
1914
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1915
	if tags and tags[1] == 'n' or tags[1] == 'not' then
1916
		for _,i in next, player do
1917
			pcall(function()
1918
				i.Neutral = false
1919
			end)
1920
		end
1921
	else	
1922
		for _,i in next, player do
1923
			ypcall(function()
1924
				i.Neutral = true
1925
			end)
1926
		end
1927
	end
1928
	Quantum.Functions.Tell(sender,'Made '..Quantum.Functions.Unpack(player)..' neutral.')
1929
end)
1930
1931
Quantum.Functions.AddCommand('Create team',{'cteam','createteam'},1,{'cteam','true/false(AutoAssignable)','name','|color'},function(args,sender,tags)
1932
	Quantum.Functions.Assert(args[1],'AutoAssignable setting','set')	
1933
	Quantum.Functions.Assert(args[2],'Team name','set')	
1934
	local color = Quantum.Functions.GetColor(tags,true)
1935
	local auto
1936
	local build = Quantum.Functions.Buildstring(args,1)
1937
	local team = create("Team"){Parent = game.Teams; Name = build; TeamColor = color or BrickColor.new(); AutoAssignable = toboolean(args[1])}
1938
	Quantum.Functions.Tell(sender,'Created team '..build..'.')
1939
end)
1940
1941
Quantum.Functions.AddCommand('Remove team',{'rteam','removeteam'},1,{'rteam','string'},function(args,sender)
1942
	Quantum.Functions.Assert(args[1],'Team','remove')
1943
	local foundteam
1944
	if args[1] == 'all' then
1945
		game.Teams:ClearAllChildren()
1946
		Quantum.Functions.Tell(sender,'Removed all teams.')
1947
		return
1948
	else
1949
		for _,i in next, game.Teams:GetTeams() do 
1950
			pcall(function()
1951
				if i.Name:sub(1,string.len(args[1])):lower() == args[1]:lower() then
1952
					if not foundteam then
1953
						foundteam = i
1954
					else
1955
						error(args[2]..' is ambiguous!')
1956
					end
1957
				end
1958
			end)
1959
		end
1960
	end
1961
	foundteam:Destroy()
1962
	Quantum.Functions.Tell(sender,'Removed team '..foundteam.Name..'.')
1963
end)
1964
1965
Quantum.Functions.AddCommand('Change team',{'team'},1,{'team','player','string'},function(args,sender)
1966
	Quantum.Functions.Assert(args[1],'Player','change team')	
1967
	Quantum.Functions.Assert(args[2],'Team','change player to')	
1968
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1969
	local foundteam
1970
	for _,i in next, game.Teams:GetTeams() do 
1971
		pcall(function()
1972
			if i.Name:sub(1,string.len(args[2])):lower() == args[2]:lower() then
1973
				if not foundteam then
1974
					foundteam = i
1975
				else
1976
					error(args[2]..' is ambiguous!')
1977
				end
1978
			end
1979
		end)
1980
	end
1981
	for _,i in next, player do
1982
		pcall(function()
1983
			i.Neutral = false
1984
			i.TeamColor = foundteam.TeamColor
1985
		end)
1986
	end
1987
	Quantum.Functions.Tell(sender,'Change the team of '..Quantum.Functions.Unpack(player)..' to '..foundteam.Name..'.')
1988
end)
1989
1990
Quantum.Functions.AddCommand('Change leaderboard stats',{'change'},1,{'change','player','string','string/number'},function(args,sender)
1991
	Quantum.Functions.Assert(args[1],'Player','change stats')	
1992
	Quantum.Functions.Assert(args[2],'Score','change')
1993
	Quantum.Functions.Assert(args[3],'Value','change stat to')		
1994
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
1995
	local found
1996
	for _,i in next, player do
1997
		pcall(function()
1998
			found = nil
1999
			for _,v in next, i:FindFirstChild'leaderstats':GetChildren() do
2000
				if v.Name:sub(1,string.len(args[2])):lower() == args[2]:lower() then
2001
					if not found then
2002
						found = v
2003
						v.Value = args[3]
2004
					else
2005
						error(args[2]..' is ambiguous!')
2006
					end
2007
				end
2008
			end
2009
		end)
2010
	end
2011
	if found then
2012
		Quantum.Functions.Tell(sender,'Changed the '..found.Name..' of '..Quantum.Functions.Unpack(player)..' to '..args[3]..'.')
2013
	else
2014
		Quantum.Functions.Tell(sender,'Couldn\'t find status!')
2015
	end
2016
end)
2017
2018
Quantum.Functions.AddCommand('Unlock player',{'unlock'},1,{'unlock','player'},function(args,sender)
2019
	Quantum.Functions.Assert(args[1],'Player','unlock')	
2020
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2021
	for _,i in next, player do 
2022
		pcall(function()
2023
			for _,v in next, i.Character:GetChildren() do
2024
				if v:IsA'Part' then
2025
					v.Locked = false
2026
				end
2027
			end
2028
		end)
2029
	end
2030
	Quantum.Functions.Return(sender,'Unlocked ',player)
2031
end)
2032
2033
Quantum.Functions.AddCommand('Lock player',{'lock'},1,{'lock','player'},function(args,sender)
2034
	Quantum.Functions.Assert(args[1],'Player','lock')	
2035
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2036
	for _,i in next, player do 
2037
		pcall(function()
2038
			for _,v in next, i.Character:GetChildren() do
2039
				if v:IsA'Part' then
2040
					v.Locked = true
2041
				end
2042
			end
2043
		end)
2044
	end
2045
	Quantum.Functions.Return(sender,'Locked ',player)
2046
end)
2047
2048
Quantum.Functions.AddCommand('Kill',{'kill','break','breakjoints'},1,{'kill','player'},function(args,sender)
2049
	Quantum.Functions.Assert(args[1],'Player','kill')	
2050
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2051
	for _,i in next, player do 
2052
		pcall(function()
2053
			i.Character:BreakJoints()
2054
		end)
2055
	end
2056
	Quantum.Functions.Return(sender,'Killed ',player)
2057
end)
2058
2059
Quantum.Functions.AddCommand('Sit',{'sit'},1,{'sit','player'},function(args,sender)
2060
	Quantum.Functions.Assert(args[1],'Player','sit')	
2061
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2062
	for _,i in next, player do 
2063
		pcall(function()
2064
			Quantum.Functions.GetHumanoid(i.Character).Sit = true
2065
		end)
2066
	end
2067
	Quantum.Functions.Return(sender,'Sat ',player)
2068
end)
2069
2070
Quantum.Functions.AddCommand('Ungod',{'ungod'},1,{'ungod','player'},function(args,sender)
2071
	Quantum.Functions.Assert(args[1],'Player','ungod')	
2072
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2073
	for _,i in next, player do 
2074
		pcall(function()
2075
			Quantum.Functions.GetHumanoid(i.Character).MaxHealth = 100
2076
			Quantum.Functions.GetHumanoid(i.Character).Health = 100
2077
		end)
2078
	end
2079
	Quantum.Functions.Return(sender,'Ungodded ',player)
2080
end)
2081
2082
Quantum.Functions.AddCommand('God',{'god'},1,{'god','player'},function(args,sender)
2083
	Quantum.Functions.Assert(args[1],'Player','god')	
2084
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2085
	for _,i in next, player do 
2086
		pcall(function()
2087
			Quantum.Functions.GetHumanoid(i.Character).MaxHealth = math.huge
2088
			Quantum.Functions.GetHumanoid(i.Character).Health = math.huge
2089
		end)
2090
	end
2091
	Quantum.Functions.Return(sender,'Godded ',player)
2092
end)
2093
2094
Quantum.Functions.AddCommand('Teleport',{'tp','teleport'},1,{'teleport','player','(player)','|to','|move'},function(args,sender,tags) 
2095
	if tags and tags[1] == 't' or tags[1] == 'to' then
2096
		Quantum.Functions.Assert(args[1],'Player','to teleport')	
2097
		local player = Quantum.Functions.GetPlayerFromString(args[1],sender)[1]
2098
		if tags[2] == 'm' or tags[2] == 'move' then
2099
			sender.Character:MoveTo(player.Character.Torso.Position)
2100
		else
2101
			sender.Character.Torso.CFrame = player.Character.Torso.CFrame		
2102
		end
2103
		Quantum.Functions.Tell(sender,'Teleported you to '..player.Name..'.')
2104
	else
2105
		Quantum.Functions.Assert(args[1],'Player','teleport')
2106
		Quantum.Functions.Assert(args[2],'Player','to teleport')
2107
		local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2108
		local playertarget = Quantum.Functions.GetPlayerFromString(args[2],sender)[1]
2109
		for _,i in next, player do
2110
			pcall(function()
2111
				if tags and tags[1] == 'm' or tags[1] == 'move' then
2112
					i.Character:MoveTo(playertarget.Character.Torso.Position)
2113
				else
2114
					i.Character.Torso.CFrame = playertarget.Character.Torso.CFrame
2115
				end
2116
			end)
2117
		end
2118
	end
2119
end)
2120
2121
Quantum.Functions.AddCommand('Respawn',{'respawn','resp','repsawn'},1,{'respawn','player'},function(args,sender)
2122
	Quantum.Functions.Assert(args[1],'Player','respawn')	
2123
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2124
	for _,i in next, player do 
2125
		pcall(function()
2126
			i:LoadCharacter()
2127
		end)
2128
	end
2129
	Quantum.Functions.Return(sender,'Respawned ',player)
2130
end)
2131
2132
Quantum.Functions.AddCommand('Show commands',{'cmds','commands','help'},1,{'cmds'},function(none,sender)
2133
	Quantum.Functions.GetCommands(sender)
2134
end)
2135
2136
Quantum.Functions.AddCommand('Explode',{'explode','expl','exp'},1,{'explode','player','(number)radius','(number)pressure'},function(args,sender)
2137
	Quantum.Functions.Assert(args[1],'Player','explode')	
2138
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2139
	for _,i in next, player do 
2140
		pcall(function()
2141
			create("Explosion"){Parent = i.Character, Position = i.Character.Torso.Position; BlastRadius = args[2] or 4;BlastPressure = args[3] or 500000}
2142
		end)
2143
	end
2144
	Quantum.Functions.Return(sender,'Exploded ',player)
2145
end)
2146
2147
Quantum.Functions.AddCommand('Clean workspace',{'clean'},1,{'clean'},function(none,sender)
2148
	for _,i in next, Quantum.Tables.Garbage do
2149
		pcall(function()
2150
			i:Destroy()
2151
		end)
2152
	end
2153
	Quantum.Tables.Garbage = {}
2154
	for _,i in next, workspace:GetChildren() do
2155
		if i:IsA'Hat' then
2156
			i:Destroy()
2157
		end
2158
	end
2159
	Quantum.Functions.Tell(sender,'Cleaned workspace!')
2160
end)
2161
2162
Quantum.Functions.AddCommand('Clone player',{'clone'},1,{'clone','player','|cframe'},function(args,sender,tags)
2163
	Quantum.Functions.Assert(args[1],'Player','clone')	
2164
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2165
	for _,i in next, player do
2166
		pcall(function()
2167
			local c
2168
			i.Character.Archivable = true
2169
			c = i.Character:Clone()
2170
			c.Parent = workspace
2171
			if not tags[1] or tags[1] and tags[1] ~= 'c' and tags[1] ~= 'cframe' then
2172
				c:MoveTo(i.Character.Torso.Position)			
2173
			end
2174
			table.insert(Quantum.Tables.Garbage,c)
2175
		end)
2176
	end
2177
	Quantum.Functions.Return(sender,'Cloned ',player)
2178
end)
2179
2180
Quantum.Functions.AddCommand('Setrank',{'setrank','setr'},2,{'setrank','player','number'},function(args,sender)
2181
	Quantum.Functions.Assert(args[1],'Player','setrank')	
2182
	Quantum.Functions.Assert(args[2],'Rank','set player',true)	
2183
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2184
	for _,i in next, player do 
2185
		pcall(function()
2186
			if Quantum.Functions.CompareRank(sender,i) then
2187
				if Quantum.Functions.GetRank(sender.Name) > tonumber(args[2]) or Quantum.Functions.GetRank(sender.Name) == 3 then
2188
					Quantum.Players[i.Name].Rank = tonumber(args[2])
2189
					Quantum.Functions.Tell(i,string.format('%s has changed your rank to %s.',sender.Name,args[2]))
2190
				end
2191
			else
2192
				player[_] = nil
2193
			end
2194
		end)
2195
	end
2196
	Quantum.Functions.Tell(sender,'Set rank of '..Quantum.Functions.Unpack(player)..' to '..args[2]..'.')
2197
end)
2198
2199
Quantum.Functions.AddCommand('Kick',{'kick','boot'},2,{'kick','player','|destroy'},function(args,sender,tags)
2200
	Quantum.Functions.Assert(args[1],'Player','kick')	
2201
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2202
	for _,i in next, player do 
2203
		pcall(function()
2204
			if Quantum.Functions.CompareRank(sender,i) then
2205
				if tags and tags[1] == "d" or tags[1] == "r" then
2206
					Quantum.Functions.Kick(i,true)			
2207
				else
2208
					Quantum.Functions.Kick(i)
2209
				end
2210
			else
2211
				player[_] = nil
2212
			end
2213
		end)
2214
	end
2215
	Quantum.Functions.Return(sender,'Kicked ',player)
2216
end)
2217
2218
Quantum.Functions.AddCommand('Ban',{'ban'},2,{'ban','player','|offline','|destroy'},function(args,sender,tags)
2219
	Quantum.Functions.Assert(args[1],'Player','ban')	
2220
	if tags and tags[1] == 'o' or tags[1] == 'offline' then
2221
		pcall(function()
2222
			if not Quantum.Functions.GetOfflinePlayer(args[1],true) then
2223
				for _,i in next, Quantum.Functions.Split(args[1],',') do
2224
					Quantum.Functions.AddPlayer(i,-1)
2225
				end
2226
				Quantum.Functions.Tell(sender,'Banned '..args[1]..'.')
2227
			else
2228
				local player = Quantum.Functions.GetOfflinePlayer(args[1])
2229
				for _,i in next, player do
2230
					if Quantum.Functions.CompareRank(sender,i) then
2231
						Quantum.Players[i.Name].Rank = -1
2232
					else
2233
						player[_] = nil
2234
					end
2235
				end
2236
				Quantum.Functions.Return(sender,'Banned ',player)
2237
			end
2238
		end)
2239
	else
2240
		pcall(function()
2241
			local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2242
			for _,i in next, player do
2243
				if Quantum.Functions.CompareRank(sender,i) then
2244
					if tags and tags[1] == 'd' or tags[1] == 'destroy' then
2245
						Quantum.Functions.Kick(i,true)
2246
					else
2247
						Quantum.Functions.Kick(i)
2248
					end
2249
					Quantum.Players[i.Name].Rank = -1
2250
				else
2251
					player[_] = nil
2252
				end
2253
				Quantum.Functions.Return(sender,'Banned ',player)
2254
			end
2255
		end)
2256
	end
2257
end)
2258
2259
Quantum.Functions.AddCommand('Crash ban',{'cban','cb','crashban'},2,{'cban','player','|offline'},function(args,sender,tags)
2260
	Quantum.Functions.Assert(args[1],'Player','crashban')	
2261
	if tags and tags[1] == 'o' or tags[1] == 'offline' then
2262
		pcall(function()
2263
			if not Quantum.Functions.GetOfflinePlayer(args[1],true) then
2264
				for _,i in next, Quantum.Functions.Split(args[1],',') do
2265
					Quantum.Functions.AddPlayer(i,-2)
2266
				end
2267
				Quantum.Functions.Tell(sender,'Crash banned '..args[1]..'.')
2268
			else
2269
				local player = Quantum.Functions.GetOfflinePlayer(args[1])
2270
				for _,i in next, player do
2271
					if Quantum.Functions.CompareRank(sender,i) then
2272
						Quantum.Functions.Crash(i)
2273
						Quantum.Players[i.Name].Rank = -2
2274
					else
2275
						player[_] = nil
2276
					end
2277
				end
2278
				Quantum.Functions.Return(sender,'Crash banned ',player)
2279
			end
2280
		end)
2281
	else
2282
		pcall(function()
2283
			local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2284
			for _,i in next, player do
2285
				if Quantum.Functions.CompareRank(sender,i) then
2286
					Quantum.Functions.Crash(i)
2287
					Quantum.Players[i.Name].Rank = -2
2288
				else
2289
					player[_] = nil
2290
				end
2291
			end
2292
			Quantum.Functions.Return(sender,'Crash banned ',player)
2293
		end)
2294
	end
2295
end)
2296
2297
Quantum.Functions.AddCommand('Search music',{'searchm','search','musicsearch','smusic'},1,{'searchm','string'},function(args,sender)
2298
	Quantum.Functions.SearchMusic(args,sender)
2299
end)
2300
2301
Quantum.Functions.AddCommand('Music',{'music','play'},1,{'music','(string/number)','|number(pitch)'},function(args,sender,tags)
2302
	local build = Quantum.Functions.Buildstring(args)
2303
	local found
2304
	if not args[1] and Quantum.Settings.Music and tags and tonumber(tags[1]) then
2305
		local change = (tonumber(tags[1])-Quantum.Settings.Music.Pitch)/30
2306
		for i=1, 30 do
2307
			Quantum.Settings.Music.Pitch = Quantum.Settings.Music.Pitch+change
2308
			wait(0.07)
2309
		end
2310
		Quantum.Settings.Music.Pitch = tonumber(tags[1])
2311
		Quantum.Functions.Tell(sender,'Changed pitch to '..tags[1]..'.')
2312
		return
2313
	end
2314
	if args[1] == 'stop' then
2315
		if Quantum.Settings.Music then
2316
			pcall(function()
2317
				Quantum.Settings.Music:Pause()
2318
			end)
2319
			Quantum.Functions.Tell(sender,'Stopped music!')
2320
		else
2321
			Quantum.Functions.Tell(sender,'No music is playing.')		
2322
		end
2323
	else
2324
		local soundid = nil
2325
		if tonumber(build) then
2326
			found = build
2327
		else
2328
			for i,v in next, Quantum.Tables.Music do
2329
				if i:sub(1,string.len(build)):lower() == build:lower() then
2330
					if not found then
2331
						found = v
2332
					else
2333
						error(build..' is ambiguous!')
2334
					end
2335
				end
2336
			end	
2337
		end
2338
		if not found then error'Couldn\'t find sound!' end
2339
		if Quantum.Settings.Music then
2340
			pcall(function()
2341
				Quantum.Settings.Music:Pause()
2342
			end)
2343
		end
2344
		Quantum.Settings.Music = create("Sound"){Parent = workspace, Name = 'QuantumSound', SoundId = 'http://roblox.com/asset/?id='..tostring(found), Volume = 1, Pitch = tonumber(tags[1]) or 1}
2345
		Quantum.Settings.Music:Play()
2346
		Quantum.Functions.TellAll('Now Playing - '..game:GetService'MarketplaceService':GetProductInfo(found).Name)
2347
	end
2348
end)
2349
2350
Quantum.Functions.AddCommand('Mute',{'mute'},2,{'mute','player','|offline'},function(args,sender,tags)
2351
	Quantum.Functions.Assert(args[1],'Player','mute')	
2352
	if tags and tags[1] == 'o' or tags[1] == 'offline' then
2353
		pcall(function()
2354
			if not Quantum.Functions.GetOfflinePlayer(args[1],true) then
2355
				for _,i in next, Quantum.Functions.Split(args[1],',') do
2356
					Quantum.Functions.AddPlayer(i,0,true)
2357
				end
2358
				Quantum.Functions.Tell(sender,'Muted '..args[1]..'.')
2359
			else
2360
				local player = Quantum.Functions.GetOfflinePlayer(args[1])
2361
				for _,i in next, player do
2362
					if Quantum.Functions.CompareRank(sender,i) then
2363
						Quantum.Functions.Mute(i)
2364
						Quantum.Players[i.Name].Muted = true
2365
					else
2366
						player[_] = nil
2367
					end
2368
				end
2369
				Quantum.Functions.Return(sender,'Muted ',player)
2370
			end
2371
		end)
2372
	else
2373
		pcall(function()
2374
			local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2375
			for _,i in next, player do
2376
				if Quantum.Functions.CompareRank(sender,i) then
2377
					Quantum.Functions.Mute(i)
2378
					Quantum.Players[i.Name].Muted = true
2379
				else
2380
					player[_] = nil
2381
				end
2382
				Quantum.Functions.Return(sender,'Muted ',player)
2383
			end
2384
		end)
2385
	end
2386
end)
2387
2388
Quantum.Functions.AddCommand('Unmute',{'unmute'},2,{'unmute','player'},function(args,sender)
2389
	Quantum.Functions.Assert(args[1],'Player','unmute')	
2390
	local player = Quantum.Functions.GetOfflinePlayer(args[1])	
2391
	for _,i in next, player do 
2392
		pcall(function()
2393
			if i.Muted then
2394
				i.Muted = false
2395
				if game:GetService'Players':FindFirstChild(i.Name) then
2396
					Quantum.Functions.Unmute(game:GetService'Players':FindFirstChild(i.Name))
2397
				end
2398
			elseif game:GetService'Players':FindFirstChild(i.Name) then
2399
				Quantum.Functions.Unmute(game:GetService'Players':FindFirstChild(i.Name))
2400
			end
2401
		end)
2402
	end
2403
	Quantum.Functions.Return(sender,'Unmuted ',player)
2404
end)
2405
2406
Quantum.Functions.AddCommand('Music list',{'mlist','musiclist'},1,{'mlist'},function(none,sender)
2407
	local got = {}
2408
	for i,v in orderedNext, Quantum.Tables.Music do
2409
		table.insert(got,i..' ('..v..')')
2410
	end
2411
	Quantum.Functions.DisplayScrollFrame(sender,got,'Music List')
2412
end)
2413
2414
Quantum.Functions.AddCommand('Get admins',{'admins'},1,{'admins'},function(none,sender)
2415
	local players = {'3 = Ultra Admin','2 = Super Admin','1 = Admin','\n'}
2416
	for i,v in orderedNext, Quantum.Players do
2417
		pcall(function()
2418
			if v.Rank > 0 and v.Muted == false then
2419
				table.insert(players,i..': '..v.Rank)
2420
			elseif v.Rank > 0 and v.Muted == true then
2421
				table.insert(players,i..': '..v.Rank..' (Muted)')
2422
			end
2423
		end)
2424
	end
2425
	Quantum.Functions.DisplayScrollFrame(sender,players,'Admins')
2426
end)
2427
2428
Quantum.Functions.AddCommand('Get banned',{'banned'},1,{'banned'},function(none,sender)
2429
	local players = {'-1 = Banned','-2 = Crash banned','\n'}
2430
	for i,v in orderedNext, Quantum.Players do
2431
		pcall(function()
2432
			if v.Rank < 0 and v.Muted == false then
2433
				table.insert(players,i..': '..v.Rank)
2434
			elseif v.Muted == true then
2435
				table.insert(players,i..': '..v.Rank..' (Muted)')
2436
			end
2437
		end)
2438
	end
2439
	Quantum.Functions.DisplayScrollFrame(sender,players,'Banned')
2440
end)
2441
2442
Quantum.Functions.AddCommand('Get ranked',{'ranked','getranked'},1,{'ranked','|all'},function(none,sender,tags)
2443
	local players = {'3 = Ultra Admin','2 = Super Admin','1 = Admin','0 = Regular','-1 = Banned','-2 = Crash banned','\n'}
2444
	if tags and tags[1] == 'a' or tags[1] == 'all' then
2445
		for i,v in orderedNext, Quantum.Players do
2446
			pcall(function()
2447
				if v.Muted == false then
2448
					table.insert(players,i..': '..v.Rank)
2449
				elseif v.Muted == true then
2450
					table.insert(players,i..': '..v.Rank..' (Muted)')
2451
				end
2452
			end)
2453
		end
2454
	else
2455
		for i,v in orderedNext, Quantum.Players do
2456
			pcall(function()
2457
				if v.Rank ~= 0 and v.Muted == false then
2458
					table.insert(players,i..': '..v.Rank)
2459
				elseif v.Muted == true then
2460
					table.insert(players,i..': '..v.Rank..' (Muted)')
2461
				end
2462
			end)
2463
		end
2464
	end
2465
	Quantum.Functions.DisplayScrollFrame(sender,players,'Ranked')
2466
end)
2467
2468
Quantum.Functions.AddCommand('Un crashban',{'uncban','uncb','uncrashban'},2,{'uncban','player'},function(args,sender)
2469
	Quantum.Functions.Assert(args[1],'Player','un crashban')	
2470
	local player = Quantum.Functions.GetOfflinePlayer(args[1])	
2471
	for _,i in next, player do 
2472
		pcall(function()
2473
			if i.Rank == -2 then
2474
				i.Rank = 0
2475
			else
2476
				player[_] = nil
2477
			end
2478
		end)
2479
	end
2480
	Quantum.Functions.Return(sender,'Un crashbanned ',player)
2481
end)
2482
2483
Quantum.Functions.AddCommand('Crash',{'crash'},2,{'crash','player'},function(args,sender)
2484
	Quantum.Functions.Assert(args[1],'Player','crash')	
2485
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2486
	for _,i in next, player do 
2487
		pcall(function()
2488
			Quantum.Functions.Crash(i)
2489
		end)
2490
	end
2491
	Quantum.Functions.Return(sender,'Crashed ',player)
2492
end)
2493
2494
Quantum.Functions.AddCommand('Destroy instances of type',{'rtype','removetype','destroy','dtype'},1,{'dtype','string'},function(args,sender)
2495
	Quantum.Functions.Assert(args[1],'Type of instance','destroy')		
2496
	for _,i in next, workspace:GetChildren() do 
2497
		pcall(function()
2498
			if i:IsA(args[1]) then
2499
				i:Destroy()
2500
			end
2501
		end)
2502
	end
2503
	Quantum.Functions.Tell(sender,'Destroyed all instances of type '..args[1]..'.')
2504
end)
2505
2506
Quantum.Functions.AddCommand('Unban',{'unban'},2,{'unban','player'},function(args,sender)
2507
	Quantum.Functions.Assert(args[1],'Player','unban')	
2508
	local player = Quantum.Functions.GetOfflinePlayer(args[1])	
2509
	for _,i in next, player do 
2510
		pcall(function()
2511
			if i.Rank == -1 then
2512
				i.Rank = 0
2513
			else
2514
				player[_] = nil
2515
			end
2516
		end)
2517
	end
2518
	Quantum.Functions.Return(sender,'Unbanned ',player)
2519
end)
2520
2521
Quantum.Functions.AddCommand('Damage',{'damage','dmg'},1,{'dmg','player','number'},function(args,sender)
2522
	Quantum.Functions.Assert(args[1],'Player','damage')	
2523
	Quantum.Functions.Assert(args[2],'Damage','deal',true)	
2524
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2525
	for _,i in next, player do 
2526
		pcall(function() 
2527
			Quantum.Functions.GetHumanoid(i.Character).Health = Quantum.Functions.GetHumanoid(i.Character).Health - args[2] 
2528
		end)
2529
	end
2530
	Quantum.Functions.Tell(sender,'Damaged '..Quantum.Functions.Unpack(player)..' by '..args[2]..'.')
2531
end)
2532
2533
Quantum.Functions.AddCommand('Shutdown',{'sd','shutdown'},2,{'shutdown'},function(none,sender)
2534
	Quantum.Functions.Tell(sender,'Shutting down...')
2535
	wait(0.5)
2536
	Quantum.Functions.Shutdown()
2537
end)
2538
2539
Quantum.Functions.AddCommand('Disable_G',{'disableg','dg','disable_g'},1,{'disableg'},function(none,sender)
2540
	setmetatable(_G,{__newindex = function() error("_G is disabled!") end})
2541
	Quantum.Functions.Tell(sender,'Disabled _G')
2542
end)
2543
2544
Quantum.Functions.AddCommand('Lock_G',{'lockg','lg','lock_g'},1,{'lockg'},function(none,sender)
2545
	setmetatable(_G, {__metatable = 'Locked'})
2546
	Quantum.Functions.Tell(sender,'Locked _G')
2547
end)
2548
2549
Quantum.Functions.AddCommand('Enable_G',{'enablg','eg','enable_g'},1,{'enableg'},function(none,sender)
2550
	setmetatable(_G,_G)
2551
	Quantum.Functions.Tell(sender,'Enabled _G')
2552
end)
2553
2554
Quantum.Functions.AddCommand('Clear_G',{'clearg','cg','clear_g'},1,{'clearg'},function(none,sender)
2555
	for i in next, _G do
2556
		_G[i] = nil
2557
	end
2558
	Quantum.Functions.Tell(sender,'Cleared _G')
2559
end)
2560
2561
Quantum.Functions.AddCommand('Get_G',{'getg','gg','get_g'},1,{'getg'},function(none,sender)
2562
	for i,v in next, _G do
2563
		print(i,v)
2564
	end
2565
	Quantum.Functions.Tell(sender,'Got _G')
2566
end)
2567
2568
Quantum.Functions.AddCommand('Set Health',{'health'},1,{'health','player','number'},function(args,sender)
2569
	Quantum.Functions.Assert(args[1],'Player','change health')	
2570
	Quantum.Functions.Assert(args[2],'Health','change to',true)	
2571
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2572
	for _,i in next, player do 
2573
		pcall(function() 
2574
			Quantum.Functions.GetHumanoid(i.Character).MaxHealth = args[2] Quantum.Functions.GetHumanoid(i.Character).Health = args[2] 
2575
		end) 
2576
	end
2577
	Quantum.Functions.Tell(sender,'Changed health of '..Quantum.Functions.Unpack(player)..' to '..args[2]..'.')
2578
end)
2579
2580
Quantum.Functions.AddCommand('Execute',{'exe'},3,{'exe','string'},function(args,sender)
2581
	Quantum.Functions.Assert(args[1],'String','execute')
2582
	local status,err = pcall(function() loadstring(Quantum.Functions.Buildstring(args))() end)
2583
	if status then
2584
		Quantum.Functions.Tell(sender,'Successfully executed!')
2585
	else
2586
		Quantum.Functions.Tell(sender,err)
2587
	end
2588
end)
2589
2590
Quantum.Functions.AddCommand('Stop all sounds',{'stopmusic','nosounds','nosound','soff','nos'},1,{'nosounds'},function(none,sender)
2591
	for _,i in next, Quantum.Tables.Sounds do
2592
		pcall(function()
2593
			i.Volume = 0
2594
		end)
2595
	end
2596
	Quantum.Tables.Sounds = {}
2597
	for _,i in next, Quantum.Functions.GetAllChildren(workspace) do
2598
		if i:IsA'Sound' then
2599
			pcall(function()
2600
				i.Volume = 0
2601
			end)
2602
		end
2603
	end
2604
	if Quantum.Settings.Music then pcall(function() Quantum.Settings.Music:Pause() end) end
2605
	Quantum.Functions.Tell(sender,'Stopped all sounds.')
2606
end)
2607
2608
Quantum.Functions.AddCommand('Prefix',{'prefix','pre','setprefix'},1,{'prefix','string'},function(args,sender)
2609
	Quantum.Functions.Assert(args[1],'Prefix','set')
2610
	local build = Quantum.Functions.Buildstring(args)
2611
	Quantum.Players[sender.Name].GLOBAL_prefix = build
2612
	Quantum.Functions.Tell(sender,string.format('Changed your prefix to %q.',build))
2613
end)
2614
2615
Quantum.Functions.AddCommand('Clear',{'clear','clr'},1,{'clear'},function(args,sender)
2616
	for _,i in next, workspace:GetChildren() do
2617
		pcall(function()
2618
			if not game.Players:GetPlayerFromCharacter(i) and not i:IsA'Terrain' then
2619
				i:Destroy()
2620
			end
2621
		end)
2622
	end
2623
	for _,i in next, Quantum.Tables.Sounds do
2624
		pcall(function()
2625
			i:Pause()
2626
		end)
2627
	end
2628
	Quantum.Tables.Sounds = {}
2629
	Quantum.Functions.FixLighting()
2630
	Quantum.Functions.Base()
2631
	workspace.Terrain:Clear()
2632
	Quantum.Functions.Tell(sender,'Cleared.')
2633
end)
2634
2635
Quantum.Functions.AddCommand('Change ambient',{'ambient','ambience','amb'},1,{'ambient','number','number','number'},function(args,sender)
2636
	Quantum.Functions.Assert(args[1],'First number','set')
2637
	Quantum.Functions.Assert(args[2],'Seconds number','set')
2638
	Quantum.Functions.Assert(args[3],'Third number','set')
2639
	game.Lighting.Ambient = Color3.new(args[1]/255,args[2]/255,args[3]/255)
2640
	Quantum.Functions.Tell(sender,string.format('Changed ambient to %s %s %s',args[1],args[2],args[3]))
2641
end)
2642
2643
Quantum.Functions.AddCommand('Create baseplate',{'base'},1,{'base'},function(none,sender)
2644
	Quantum.Functions.Base()
2645
	Quantum.Functions.Tell(sender,'Made baseplate.')
2646
end)
2647
2648
Quantum.Functions.AddCommand('Change unremovable baseplate',{'permbase','ubase'},1,{'permbase','|off'},function(none,sender,tags)
2649
	if tags and tags[1] == 'o' or tags[1] == 'off' then
2650
		Quantum.Functions.Removable(game.Workspace:FindFirstChild'Baseplate')
2651
		Quantum.Functions.Tell(sender,'Turned off permanent baseplate.')
2652
	else
2653
		local base = Quantum.Functions.Base()
2654
		Quantum.Functions.Unremovable(base)
2655
		Quantum.Functions.Tell(sender,'Turned on permanent baseplate.')
2656
	end
2657
end)
2658
2659
Quantum.Functions.AddCommand('Personal base',{'pbase','pb'},1,{'pbase','player'},function(args,sender)
2660
	Quantum.Functions.Assert(args[1],'Player','give personal base')	
2661
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2662
	for _,i in pairs(player) do
2663
		pcall(function()
2664
			local rndmpos = CFrame.new(math.random(1000,2000),math.random(1000,2000),math.random(1000,2000))
2665
			local base = Quantum.Functions.Base(rndmpos)
2666
			base.Name = i.Name..'-PERSONAL_BASEPLATE'	
2667
			i.Character:MoveTo(base.Position)
2668
			Quantum.Players[i.Name].Spawnlocation = i.Character.Torso.CFrame
2669
			Quantum.Functions.Unremovable(base)
2670
		end)
2671
	end
2672
	Quantum.Functions.Return(sender,'Gave personal base to ',player)
2673
end)
2674
2675
Quantum.Functions.AddCommand('Remove personal base',{'unpbase','unpb'},1,{'unpbase','player'},function(args,sender)
2676
	Quantum.Functions.Assert(args[1],'Player','remove personal base')	
2677
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2678
	for _,i in next, player do 
2679
		pcall(function()
2680
			local base = workspace:FindFirstChild(i.Name..'-PERSONAL_BASEPLATE')
2681
			Quantum.Players[i.Name].Spawnlocation = nil
2682
			Quantum.Functions.Removable(base)
2683
			i:LoadCharacter()
2684
		end)
2685
	end
2686
	Quantum.Functions.Return(sender,'Removed personal base from ',player)
2687
end)
2688
2689
Quantum.Functions.AddCommand('Set spawnpoint',{'setspawn','ss','setspawnpoint'},1,{'setspawn','player'},function(args,sender)
2690
	Quantum.Functions.Assert(args[1],'Player','setspawn')	
2691
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2692
	for _,i in next, player do 
2693
		pcall(function()
2694
			Quantum.Players[i.Name].Spawnlocation = i.Character.Torso.CFrame
2695
		end)
2696
	end
2697
	Quantum.Functions.Return(sender,'Set the spawn of ',player)
2698
end)
2699
2700
Quantum.Functions.AddCommand('Magic',{'magic'},1,{'magic','player'},function(args,sender)
2701
	Quantum.Functions.Assert(args[1],'Player','make magical')	
2702
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)	
2703
	local colors = {'Lime green','Really red','Toothpaste','Hot pink','Royal purple','New Yeller'}
2704
	for _,i in next, player do 
2705
		pcall(function()
2706
			for n=1, 100 do
2707
				for _,v in next, colors do
2708
					create("Sparkles"){Parent = i.Character.Torso, SparkleColor = BrickColor.new(v).Color}
2709
				end
2710
			end
2711
		end)
2712
	end
2713
	Quantum.Functions.Tell(sender,'Made '..Quantum.Functions.Unpack(player)..' magical.')
2714
end)
2715
2716
Quantum.Functions.AddCommand('Give sparkles',{'sparkles','sparklez','spark'},1,{'sparkles','player','|color'},function(args,sender,tags)
2717
	Quantum.Functions.Assert(args[1],'Player','give sparkles')	
2718
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2719
	local color = Quantum.Functions.GetColor(tags,true)
2720
	for _,i in next, player do
2721
		pcall(function()
2722
			create("Sparkles"){Parent = i.Character.Torso, SparkleColor = color.Color or nil}
2723
		end)
2724
	end	
2725
	Quantum.Functions.Return(sender,'Gave sparkles to ',player)
2726
end)
2727
2728
Quantum.Functions.AddCommand('Reset spawnpoint',{'rspawn','resetspawn','resetspawnpoint'},1,{'rspawn','player'},function(args,sender)
2729
	Quantum.Functions.Assert(args[1],'Player','reset spawnpoint')	
2730
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2731
	for _,i in next, player do
2732
		Quantum.Players[i.Name].Spawnlocation = nil
2733
	end	
2734
	Quantum.Functions.Return(sender,'Reset spawn of ',player)
2735
end)
2736
2737
Quantum.Functions.AddCommand('Give fire',{'fire'},1,{'fire','player','number','|color'},function(args,sender,tags)
2738
	Quantum.Functions.Assert(args[1],'Player','give fire')	
2739
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2740
	local color = Quantum.Functions.GetColor(tags,true)
2741
	for _,i in next, player do
2742
		pcall(function()
2743
			create("Fire"){Parent = i.Character.Torso, Color = (color and color.Color or nil), Size = args[2] or 5}
2744
		end)
2745
	end	
2746
	Quantum.Functions.Return(sender,'Gave fire to ',player)
2747
end)
2748
2749
Quantum.Functions.AddCommand('Give pointlight',{'pointlight','light'},1,{'light','player','number(brightness)','number(range)','|color'},function(args,sender,tags)
2750
	Quantum.Functions.Assert(args[1],'Player','give pointlight')	
2751
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2752
	local color = Quantum.Functions.GetColor(tags,true)
2753
	for _,i in next, player do
2754
		pcall(function()
2755
			create("PointLight"){Parent = i.Character.Torso, Color = (color and color.Color or nil), Brightness = args[2] or 1; Range = args[3] or 8}
2756
		end)
2757
	end	
2758
	Quantum.Functions.Return(sender,'Gave pointlight to ',player)
2759
end)
2760
2761
Quantum.Functions.AddCommand('Unlight',{'unlight','rlight'},1,{'unlight','player'},function(args,sender)
2762
	Quantum.Functions.Assert(args[1],'Player','unlight')	
2763
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2764
	for _,i in next, player do
2765
		pcall(function()
2766
			while i.Character.Torso:FindFirstChild("PointLight") do
2767
				i.Character.Torso:FindFirstChild("PointLight"):Destroy()
2768
			end
2769
		end)
2770
	end	
2771
	Quantum.Functions.Return(sender,'Removed pointlight from ',player)
2772
end)
2773
2774
Quantum.Functions.AddCommand('Give smoke',{'smoke'},1,{'smoke','player','number','|color'},function(args,sender,tags)
2775
	Quantum.Functions.Assert(args[1],'Player','give smoke')	
2776
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2777
	local color = Quantum.Functions.GetColor(tags,true)
2778
	for _,i in next, player do
2779
		pcall(function()
2780
			create("Smoke"){Parent = i.Character.Torso, Color = (color and color.Color or nil), Size = args[2] or 1}
2781
		end)
2782
	end	
2783
	Quantum.Functions.Return(sender,'Gave smoke to ',player)
2784
end)
2785
2786
Quantum.Functions.AddCommand('Get colors',{'colors','getcolors','getcolor'},1,{'colors'},function(none,sender)
2787
	Quantum.Functions.DisplayCloseableFrame(sender,table.concat(Quantum.Tables.Colors,' '),'Available Colors')
2788
end)
2789
2790
Quantum.Functions.AddCommand('Show chat log',{'superlogs','slogs','chatlogs'},1,{'superlogs','(player)','|clear','|post'},function(args,sender,tags)
2791
	if tags and tags[1] then
2792
		if tags[1] == 'p' or tags[1] == 'post' then
2793
			if args and args[1] then
2794
				local plrlogs = {}
2795
				local player
2796
				if not Quantum.Functions.GetPlayerFromString(args[1],sender,true) then
2797
					player = Quantum.Functions.GetOfflinePlayer(args[1])
2798
				else
2799
					player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2800
				end
2801
				for _,i in next, player do
2802
					for _,v in next, Quantum.Tables.Superlogs do
2803
						if v:sub(2,string.len(i.Name)+1) == i.Name then
2804
							table.insert(plrlogs,v:sub(string.len(i.Name)+4))
2805
						end
2806
					end
2807
				end
2808
				Quantum.Functions.DisplayCloseableFrame(sender,Quantum.Functions.Post(plrlogs),'')
2809
			else
2810
				Quantum.Functions.DisplayCloseableFrame(sender,Quantum.Functions.Post(Quantum.Tables.Logs),'')
2811
			end
2812
		elseif tags[1] == 'c' or tags[1] == 'clear' then
2813
			Quantum.Tables.Superlogs = {}
2814
			Quantum.Functions.Tell(sender,'Cleared chat log')
2815
		end
2816
	elseif args and args[1] then
2817
		local plrlogs = {}
2818
		local player
2819
		if not Quantum.Functions.GetPlayerFromString(args[1],sender,true) then
2820
			player = Quantum.Functions.GetOfflinePlayer(args[1])
2821
		else
2822
			player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2823
		end
2824
		for _,i in next, player do
2825
			for _,v in next, Quantum.Tables.Superlogs do
2826
				if v:sub(2,string.len(i.Name)+1) == i.Name then
2827
					table.insert(plrlogs,v:sub(string.len(i.Name)+4))
2828
				end
2829
			end
2830
		end
2831
		Quantum.Functions.DisplayScrollFrame(sender,plrlogs,'Chat logs for '..player[1].Name)
2832
	else
2833
		Quantum.Functions.DisplayScrollFrame(sender,Quantum.Tables.Superlogs,'Chat Logs')	
2834
	end
2835
end)
2836
2837
Quantum.Functions.AddCommand('Name player',{'name'},1,{'name','player','string','|off'},function(args,sender,tags)
2838
	Quantum.Functions.Assert(args[1],'Player','name')
2839
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2840
	local name = Quantum.Functions.Buildstring(args,1)
2841
	if tags and tags[1] == 'o' or tags[1] == 'off' then
2842
		for _,i in next, player do
2843
			pcall(function()
2844
				for _,v in next, i.Character:GetChildren() do
2845
					if v:IsA'Model' and v:FindFirstChild'FakeHumanoid' then
2846
						v:Destroy()
2847
					end
2848
				end
2849
				i.Character.Head.Transparency = 0
2850
			end)
2851
		end
2852
		Quantum.Functions.Return(sender,'Unnamed ',player)
2853
	else
2854
		for _,i in next, player do
2855
			ypcall(function()
2856
				i.Character:WaitForChild'Body Colors'
2857
				for _,v in next, i.Character:GetChildren() do
2858
					if v:IsA'Model' and v:FindFirstChild'FakeHumanoid' then
2859
						v:Destroy()
2860
					end
2861
				end
2862
				i.Character.Head.Transparency = 0
2863
				local new = i.Character.Head:Clone()
2864
				i.Character.Head.Transparency = 1
2865
				local model = Instance.new('Model',i.Character)
2866
				model.Name = name
2867
				new.Parent = model
2868
				local hum = Instance.new('Humanoid',model)
2869
				hum.Name = 'FakeHumanoid'
2870
				local w = Instance.new('Weld',i.Character)
2871
				w.Part0 = new
2872
				w.Part1 = i.Character.Head
2873
				local realhum = Quantum.Functions.GetHumanoid(i.Character)
2874
				realhum.Changed:connect(function(prop)
2875
					hum.MaxHealth = realhum.MaxHealth
2876
					hum.Health = realhum.Health
2877
					if realhum.MaxHealth == math.huge then hum.MaxHealth = 0 end
2878
				end)
2879
			end)
2880
		end
2881
		Quantum.Functions.Tell(sender,string.format('Named %s to %q.',Quantum.Functions.Unpack(player),name))
2882
	end
2883
end)
2884
2885
Quantum.Functions.AddCommand('Change character',{'char'},1,{'char','player','string/number','|off'},function(args,sender,tags)
2886
	Quantum.Functions.Assert(args[1],'Player','char')
2887
	local target = Quantum.Functions.GetPlayerFromString(args[1],sender)
2888
	if tags and tags[1] == 'o' or tags[1] == 'off' then
2889
		for _,i in next, target do
2890
			pcall(function()
2891
				i.CharacterAppearance = 'http://www.roblox.com/Asset/CharacterFetch.ashx?userId='..i.userId
2892
				Quantum.Functions.Reload(i)
2893
				Quantum.Functions.Return(sender,'Reset character of ',target)
2894
			end)
2895
		end
2896
		return
2897
	end
2898
	local player = Quantum.Functions.GetPlayerAll(args[2],sender)
2899
	for _,i in next, target do
2900
		pcall(function()
2901
			i.CharacterAppearance = 'http://www.roblox.com/Asset/CharacterFetch.ashx?userId='..player
2902
			Quantum.Functions.Reload(i)
2903
			Quantum.Functions.Tell(sender,string.format('Changed the character of %s to %s.',Quantum.Functions.Unpack(target),Quantum.Functions.UsernameFromID(player)))
2904
		end)
2905
	end
2906
end)
2907
2908
Quantum.Functions.AddCommand('Show command logs',{'logs','clogs','commandlogs'},1,{'logs','(player)','|clear','|post'},function(args,sender,tags)
2909
	if tags and tags[1] then
2910
		if tags[1] == 'p' or tags[1] == 'post' then
2911
			if args and args[1] then
2912
				local plrlogs = {}
2913
				local player
2914
				if not Quantum.Functions.GetPlayerFromString(args[1],sender,true) then
2915
					player = Quantum.Functions.GetOfflinePlayer(args[1])
2916
				else
2917
					player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2918
				end
2919
				for _,i in next, player do
2920
					for _,v in next, Quantum.Tables.Logs do
2921
						if v:sub(2,string.len(i.Name)+1) == i.Name then
2922
							table.insert(plrlogs,v:sub(string.len(i.Name)+4))
2923
						end
2924
					end
2925
				end
2926
				Quantum.Functions.DisplayCloseableFrame(sender,Quantum.Functions.Post(plrlogs),'')
2927
			else
2928
				Quantum.Functions.DisplayCloseableFrame(sender,Quantum.Functions.Post(Quantum.Tables.Logs),'')
2929
			end
2930
		elseif tags[1] == 'c' or tags[1] == 'clear' then
2931
			Quantum.Tables.Logs = {}
2932
			Quantum.Functions.Tell(sender,'Cleared command logs')
2933
		end
2934
	elseif args and args[1] then
2935
		local plrlogs = {}
2936
		local player
2937
		if not Quantum.Functions.GetPlayerFromString(args[1],sender,true) then
2938
			player = Quantum.Functions.GetOfflinePlayer(args[1])
2939
		else
2940
			player = Quantum.Functions.GetPlayerFromString(args[1],sender)
2941
		end
2942
		for _,i in next, player do
2943
			for _,v in next, Quantum.Tables.Logs do
2944
				if v:sub(2,string.len(i.Name)+1) == i.Name then
2945
					table.insert(plrlogs,v:sub(string.len(i.Name)+4))
2946
				end
2947
			end
2948
		end
2949
		Quantum.Functions.DisplayScrollFrame(sender,plrlogs,'Logs for '..player[1].Name)
2950
	else
2951
		Quantum.Functions.DisplayScrollFrame(sender,Quantum.Tables.Logs,'Command Logs')	
2952
	end
2953
end)
2954
2955
Quantum.Functions.AddCommand('Lock/unlock server',{'slock','lockdown','pri'},2,{'slock','|autoload','|kick','|off'},function(none,sender,tags)
2956
	if tags and tags[1] == 'o' or tags[1] == 'off' then
2957
		Quantum.Settings.PrivateServer.Regular = false
2958
		Quantum.Settings.PrivateServer.Auto = false
2959
		Quantum.Functions.Tell(sender,'Unlocked server!')
2960
	elseif tags and tags[1] == 'a' or tags[1] == 'autoload' then
2961
		Quantum.Settings.PrivateServer.Regular = false		
2962
		Quantum.Settings.PrivateServer.Auto = true
2963
		if tags and tags[2] == 'k' or tags[2] == 'kick' then
2964
			for _,i in next, game.Players:GetPlayers() do
2965
				if not Quantum.Functions.IsAdmin(i.Name) then
2966
					Quantum.Functions.Kick(i)
2967
				end
2968
			end
2969
		end
2970
	else
2971
		Quantum.Settings.PrivateServer.Auto = false
2972
		Quantum.Settings.Regular = true
2973
		if tags and tags[2] == 'k' or tags[2] == 'kick' then
2974
			for _,i in next, game.Players:GetPlayers() do
2975
				if not Quantum.Functions.IsAdmin(i.Name) then
2976
					Quantum.Functions.Kick(i)
2977
				end
2978
			end
2979
		end
2980
	end
2981
end)
2982
2983
Quantum.Functions.AddCommand('Update script',{'update','updt'},3,{'update'},function(none,sender)
2984
	Quantum.Functions.MakeScript("loadstring(game:GetService'HttpService':GetAsync'http://pastebin.com/raw.php?i=Hj6Mibe0')()",game:GetService'ServerScriptService')
2985
	Quantum.Functions.Tell(sender,'Updating script...')
2986
	Quantum.Functions.StopScript()
2987
end)
2988
2989
Quantum.Functions.AddCommand('Stop script',{'stop','stopscript','removescript'},3,{'stop'},function(none,sender)
2990
	Quantum.Functions.Tell(sender,'Stopping script...')
2991
	Quantum.Functions.StopScript()
2992
end)
2993
2994
Quantum.Functions.AddCommand('Make script',{'s','c','script'},2,{'s','string'},function(args,sender)
2995
	Quantum.Functions.Assert(args[1],'Script','execute')
2996
	local build = Quantum.Functions.Buildstring(args)
2997
	local status,err = loadstring(build)
2998
	if status then
2999
		Quantum.Functions.MakeScript(Quantum.Functions.Buildstring(args),workspace)
3000
		Quantum.Functions.Tell(sender,'Successfully made script!')
3001
	else
3002
		Quantum.Functions.DisplayCloseableFrame(sender,err,'Script Error')
3003
	end
3004
end)
3005
3006
Quantum.Functions.AddCommand('Make local script',{'ls','l','localscript'},2,{'ls','string','|player'},function(args,sender,tags)
3007
	Quantum.Functions.Assert(args[1],'Local script','execute')
3008
	if tags and tags[1] == "p" or tags[1] == "player" then
3009
		for _,i in next, Quantum.Functions.GetPlayerFromString(args[1],sender) do
3010
			Quantum.Functions.MakeLocalScript(Quantum.Functions.Buildstring(args,1),i)
3011
		end
3012
	else
3013
		Quantum.Functions.MakeLocalScript(Quantum.Functions.Buildstring(args),sender)
3014
	end
3015
end)
3016
3017
Quantum.Functions.AddCommand('Anti local',{'al','antilocal','antil'},1,{'antilocal','player','|off'},function(args,sender,tags)
3018
	Quantum.Functions.Assert(args[1],'Player','change antilocal status')	
3019
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
3020
	for _,i in next, player do
3021
		if tags and tags[1] == 'o' or tags[1] == 'off' then
3022
			Quantum.Players[i.Name].Antilocal = false
3023
			Quantum.Functions.Return(sender,'Turned antilocal off for ',player)
3024
		else
3025
			Quantum.Players[i.Name].Antilocal = true
3026
			Quantum.Functions.Return(sender,'Turned antilocal on for ',player)
3027
		end
3028
	end	
3029
end)
3030
3031
Quantum.Functions.AddCommand('Anti kill',{'ak','antikill','antik'},1,{'antikill','player','|off'},function(args,sender,tags)
3032
	Quantum.Functions.Assert(args[1],'Player','change antikill status')	
3033
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
3034
	if tags and tags[1] == 'o' or tags[1] == 'off' then
3035
		for _,i in next, player do
3036
			Quantum.Players[i.Name].Antikill.Enabled = false
3037
			Quantum.Players[i.Name].Spawnlocation = nil
3038
			if Quantum.Players[i.Name].Antikill.Humanoid then
3039
				Quantum.Functions.GetHumanoid(i.Character).Name = 'Humanoid'
3040
			end
3041
			Quantum.Players[i.Name].Antikill.Humanoid = false
3042
		end
3043
		Quantum.Functions.Return(sender,'Turned antikill off for ',player)
3044
	else
3045
		for _,i in next, player do
3046
			if not Quantum.Players[i.Name].Antikill.Enabled then
3047
				Quantum.Players[i.Name].Antikill.Enabled = true
3048
				Quantum.Players[i.Name].Ready = true
3049
				Quantum.Functions.GetAntikill(i)
3050
				if tags and tags[1] == 'h' or tags[1] == 'humanoid' then
3051
					Quantum.Players[i.Name].Antikill.Humanoid = true
3052
					Quantum.Functions.GetHumanoid(i.Character).Name = 'RHumanoid'
3053
				end
3054
				Quantum.Functions.GetHumanoid(i.Character).Died:connect(function()
3055
					pcall(function()
3056
						if Quantum.Players[i.Name].Antikill.Enabled then
3057
							i:LoadCharacter()
3058
						end
3059
					end)
3060
				end)
3061
				--[[i.Character.DescendantRemoving:connect(function(d)
3062
					pcall(function()
3063
						if d:IsA'Humanoid' and Quantum.Players[i.Name].Antikill.Enabled then
3064
							i:LoadCharacter()
3065
						end
3066
					end)
3067
				end)]]
3068
			end
3069
		end
3070
		Quantum.Functions.Return(sender,'Turned antikill on for ',player)
3071
	end
3072
end)
3073
3074
Quantum.Functions.AddCommand('Anti ban',{'ab','antiban','antib'},1,{'antiban','player','|off'},function(args,sender,tags)
3075
	Quantum.Functions.Assert(args[1],'Player','change antiban status')	
3076
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
3077
	for _,i in next, player do
3078
		if tags and tags[1] == 'o' or tags[1] == 'off' then
3079
			Quantum.Players[i.Name].Antiban = false
3080
			Quantum.Functions.Return(sender,'Turned antiban off for ',player)
3081
		else
3082
			Quantum.Players[i.Name].Antiban = true
3083
			Quantum.Functions.Return(sender,'Turned antiban on for ',player)
3084
		end
3085
	end	
3086
end)
3087
3088
Quantum.Functions.AddCommand('Fake player',{'fp','fplayer','fakeplayer'},1,{'fplayer','player','string/number','|off'},function(args,sender,tags)
3089
	Quantum.Functions.Assert(args[1],'Player','change antiban status')	
3090
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
3091
	if tags and tags[1] == 'o' or tags[1] == 'off' then
3092
		for _,i in next, player do
3093
			pcall(function()
3094
				Quantum.Players[i.Name].RespawnExe = {}
3095
				i.CharacterAppearance = 'http://www.roblox.com/Asset/CharacterFetch.ashx?userId='..i.userId
3096
				Quantum.Functions.Reload(i)
3097
			end)
3098
		end
3099
		Quantum.Functions.Return(sender,'Turned off fake player for ',player)
3100
	else
3101
		local id = Quantum.Functions.GetPlayerAll(Quantum.Functions.Buildstring(args,1))
3102
		local name = Quantum.Functions.UsernameFromID(id)
3103
		for _,i in next, player do
3104
			pcall(function()
3105
				table.insert(Quantum.Players[i.Name].RespawnExe,string.format('%sname%s|plr|%s%s',Quantum.Players[sender.Name].GLOBAL_prefix,Quantum.Settings.Bet,Quantum.Settings.Bet,name))
3106
				i.CharacterAppearance = 'http://www.roblox.com/Asset/CharacterFetch.ashx?userId='..id
3107
				Quantum.Functions.Reload(i)
3108
			end)
3109
		end	
3110
		Quantum.Functions.Tell(sender,string.format('Faked %s as %s.',Quantum.Functions.Unpack(player),name))
3111
	end
3112
end)
3113
3114
Quantum.Functions.AddCommand('Bubble chat all',{'bcall','bubbleall','bubblechatall'},1,{'bubblechatall','|off','|color(rgb)'},function(none,sender,tags)
3115
	if tags and tags[1] == 'o' or tags[1] == 'off' then
3116
		Quantum.Settings.BubblechatAll = false
3117
		Quantum.Functions.Tell(sender,'Turned off bubblechatall.')
3118
	elseif tags then
3119
		Quantum.Settings.BubblechatAll = true
3120
		if tags[1] == 'r' then
3121
			Quantum.Settings.BubblechatColor = 'Red'
3122
		elseif tags[1] == 'g' then
3123
			Quantum.Settings.BubblechatColor = 'Green'
3124
		elseif tags[1] == 'b' then
3125
			Quantum.Settings.BubblechatColor = 'Blue'
3126
		end
3127
		Quantum.Functions.Tell(sender,'Turned on bubblechatall.')
3128
	end	
3129
end)
3130
3131
Quantum.Functions.AddCommand('Bubble chat',{'bc','bubble','bubblechat'},1,{'bubblechat','player','|off','|color(rgb)'},function(args,sender,tags)
3132
	Quantum.Functions.Assert(args[1],'Player','change bubblechat status')	
3133
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
3134
	if tags and tags[1] == 'o' or tags[1] == 'off' then
3135
		for _,i in next, player do
3136
			pcall(function()
3137
				Quantum.Players[i.Name].Bubblechat = false
3138
			end)
3139
		end
3140
		Quantum.Functions.Return(sender,'Turned bubblechat off for ',player)
3141
	elseif tags then
3142
		for _,i in next, player do
3143
			pcall(function()
3144
				Quantum.Players[i.Name].Bubblechat = true
3145
				if tags[1] == 'r' then
3146
					Quantum.Players[i.Name].BubblechatColor = 'Red'
3147
				elseif tags[1] == 'g' then
3148
					Quantum.Players[i.Name].BubblechatColor = 'Green'
3149
				elseif tags[1] == 'b' then
3150
					Quantum.Players[i.Name].BubblechatColor = 'Blue'
3151
				end
3152
			end)
3153
		end
3154
		Quantum.Functions.Return(sender,'Turned bubblechat on for ',player)
3155
	end	
3156
end)
3157
3158
Quantum.Functions.AddCommand('Sudo (execute command as another player)',{'sudo'},2,{'sudo','player','command'},function(args,sender,tags)
3159
	Quantum.Functions.Assert(args[1],'Player','execute command on')
3160
	Quantum.Functions.Assert(args[2],'Command','execute')
3161
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
3162
	local newargs = {}
3163
	for i,v in next, args do
3164
		if i > 2 then
3165
			table.insert(newargs,v)
3166
		end
3167
	end
3168
	for _,i in next, player do
3169
		pcall(function()
3170
			if Quantum.Functions.CompareRank(sender,i) then
3171
				Quantum.Functions.RawExeCmd(true,args[2],newargs,i,tags,Quantum.Functions.GetRank(sender.Name))
3172
			else
3173
				player[_] = nil			
3174
			end
3175
		end)
3176
	end
3177
	Quantum.Functions.Return(sender,'Sudo executed as ',player)
3178
end)
3179
3180
Quantum.Functions.AddCommand('Loop command',{'loop'},1,{'loop','times(* for until stopped)','command'},function(args,sender,tags)
3181
	Quantum.Functions.Assert(args[1],'Times','loop')
3182
	Quantum.Functions.Assert(args[2],'Command','loop')
3183
	local num = 0
3184
	if args[1] ~= '*' then
3185
		if not tonumber(args[1]) then
3186
			error'Times to loop is not a number!'
3187
		end
3188
	end
3189
	local loopargs = {}
3190
	for i,v in next, args do
3191
		if i > 2 then
3192
			table.insert(loopargs,v)
3193
		end
3194
	end
3195
	coroutine.resume(coroutine.create(function()
3196
		while wait(Quantum.Settings.Looptime) do
3197
			if not Quantum.Settings.Stoploops then
3198
				if args[1] == '*' then
3199
					pcall(function() Quantum.Functions.RawExeCmd(true,args[2],loopargs,sender,tags) end)
3200
				else
3201
					pcall(function() Quantum.Functions.RawExeCmd(true,args[2],loopargs,sender,tags) end)
3202
					num = num+1
3203
					if num >= tonumber(args[1]) then
3204
						break
3205
					end		
3206
				end
3207
			else
3208
				break
3209
			end
3210
		end
3211
	end))
3212
end)
3213
3214
Quantum.Functions.AddCommand('Stop loops',{'stoploops','sloops'},1,{'stoploops'},function(none,sender)
3215
	Quantum.Functions.Tell(sender,'Stopping loops...')
3216
	Quantum.Settings.Stoploops = true
3217
	wait(Quantum.Settings.Looptime+0.1)
3218
	Quantum.Settings.Stoploops = false
3219
	Quantum.Functions.Tell(sender,'Stopped loops!')
3220
end)
3221
3222
Quantum.Functions.AddCommand('Execute on respawn',{'rexe','respawnexe','exer'},3,{'rexe','player','command ("|plr|" = player)','|clear'},function(args,sender,tags)
3223
	local player = Quantum.Functions.GetPlayerFromString(args[1],sender)
3224
	if tags and tags[1] == 'c' or tags[1] == 'clear' then
3225
		for _,i in next, player do
3226
			Quantum.Players[i.Name].RespawnExe = {}
3227
		end
3228
		Quantum.Functions.Return(sender,'Cleared respawn commands of ',player)
3229
	else
3230
		for _,i in next, player do
3231
			local newtags = {}
3232
			for _,v in next, tags do
3233
				table.insert(newtags,Quantum.Settings.Tag..v)
3234
			end
3235
			table.insert(Quantum.Players[i.Name].RespawnExe,Quantum.Settings.Prefix..Quantum.Functions.Buildstring(args,1)..Quantum.Settings.Bet..Quantum.Functions.Buildstring(newtags))
3236
		end
3237
		Quantum.Functions.Return(sender,'Changed auto respawn commands of ',player)
3238
	end	
3239
end)
3240
3241
Quantum.Functions.AddCommand('Execute on respawn all',{'rexeall','respawnexeall','exerall','autoexecuterespawn'},3,{'rexeall','command','|clear'},function(args,sender,tags)
3242
	if tags and tags[1] == 'c' or tags[1] == 'clear' then
3243
		Quantum.Tables.RespawnExe = {}
3244
		Quantum.Functions.Tell(sender,'Cleared auto respawn commands for all players.')
3245
	else
3246
		local newtags = {}
3247
		for _,v in next, tags do
3248
			table.insert(newtags,Quantum.Settings.Tag..v)
3249
		end
3250
		table.insert(Quantum.Tables.RespawnExe,Quantum.Settings.Prefix..Quantum.Functions.Buildstring(args)..Quantum.Settings.Bet..Quantum.Functions.Buildstring(newtags))
3251
		Quantum.Functions.Tell(sender,'Changed auto respawn commands for all players.')
3252
	end
3253
end)
3254
3255
Quantum.Connections.PlayerAdded = game.Players.ChildAdded:connect(function(plr)
3256
	ypcall(function()
3257
		Quantum.Functions.PlayerAdded(plr)
3258
	end)
3259
end)
3260
3261
Quantum.Connections.DescendantRemoving = game.DescendantRemoving:connect(function(descendant)
3262
	if Quantum.Tables.Unremovable[descendant] then
3263
		local clone = descendant:Clone()
3264
		clone.Parent = descendant.Parent
3265
		Quantum.Functions.Unremovable(clone)
3266
	end
3267
	if Quantum.Tables.Remake[descendant] and Quantum.Tables.Remake[descendant].Enabled then
3268
		wait()		
3269
		Quantum.Tables.Remake[descendant].Func()
3270
	end
3271
end)
3272
3273
Quantum.Connections.DescendantAdded = game.DescendantAdded:connect(function(d)
3274
	pcall(function()
3275
		if d:IsA'Sound' then
3276
			table.insert(Quantum.Tables.Sounds,d)
3277
		end
3278
	end)
3279
end)
3280
3281
Quantum.Connections.SourceScanner = game.DescendantAdded:connect(function(d)
3282
	ypcall(function()
3283
		if d:IsA'LocalScript' and not Quantum.Settings.LocalScriptSource then
3284
			Quantum.Settings.LocalScriptSource = d
3285
			Quantum.Functions.TellAdmins'Found LocalScript Source'
3286
			for _,i in next, game.Players:GetPlayers() do
3287
				if Quantum.Functions.IsAdmin(i.Name) then
3288
					Quantum.Functions.Cmdbar(i)
3289
					Quantum.Functions.Nilsupport(i)
3290
				end
3291
			end
3292
		elseif d:IsA'Script' and not Quantum.Settings.ScriptSource then
3293
			Quantum.Settings.ScriptSource = d
3294
			Quantum.Functions.TellAdmins'Found Script Source'
3295
		end
3296
		if Quantum.Settings.LocalScriptSource and Quantum.Settings.ScriptSource then
3297
			Quantum.Connections.SourceScanner:disconnect()
3298
		end
3299
	end)
3300
end)
3301
3302
Quantum.Connections.PlayerRemoving = game.Players.PlayerRemoving:connect(function(plr)
3303
	ypcall(function()
3304
		coroutine.resume(coroutine.create(function()
3305
			if Quantum.Players[plr.Name] and Quantum.Players[plr.Name].Antiban == true then
3306
				local start = tick()
3307
				local m = Instance.new('Message',workspace)
3308
				local h = Instance.new('Hint',workspace)
3309
				game:GetService'RunService'.Heartbeat:connect(function()
3310
					ypcall(function()
3311
						if m then
3312
							m.Text = string.format('[QUANTUM ANTIBAN] '..plr.Name..' was kicked or banned! Shutdown in %.2d seconds!',Quantum.Settings.Antitimer - (tick() - start))
3313
						else
3314
							m = Instance.new('Message',workspace)
3315
						end
3316
						if h then
3317
							h.Text = string.format('[QUANTUM ANTIBAN] '..plr.Name..' was kicked or banned! Shutdown in %.2d seconds!',Quantum.Settings.Antitimer - (tick() - start))
3318
						else
3319
							h = Instance.new('Hint',workspace)
3320
						end
3321
					end)
3322
				end)
3323
			end
3324
		end))
3325
		local t = {}
3326
		for i,v in next, Quantum.Players[plr.Name] do
3327
			if i:sub(1,7) == 'GLOBAL_' then
3328
				t[i] = v
3329
			end
3330
		end
3331
		Quantum.Functions.UpdateStorage(t,plr.Name)
3332
	end)
3333
end)
3334
3335
Quantum.Functions.PlayerAdded = function(plr)
3336
	ypcall(function()
3337
		if plr:IsA("Player") then
3338
			plr:WaitForDataReady()
3339
			if plr.AccountAge < Quantum.Settings.RestrictAge then
3340
				Quantum.Functions.Kick(plr)
3341
				Quantum.Functions.TellAdmins(plr.Name..' tried to join, but their age is too low.')
3342
			end
3343
			for _,i in next, Quantum.Tables.GroupRanked do
3344
				for k,v in next, i do
3345
					if plr:IsInGroup(k) and plr:GetRankInGroup(k) >= v.GroupRank then
3346
						if Quantum.Players[plr.Name] ~= nil and Quantum.Players[plr.Name].Rank < v.AdminRank then
3347
							Quantum.Players[plr.Name].Rank = v.AdminRank
3348
						elseif Quantum.Players[plr.Name] == nil then
3349
							Quantum.Functions.AddPlayer(plr.Name,v.AdminRank)
3350
						end
3351
					end
3352
				end
3353
			end
3354
			if Quantum.Functions.GetRank(plr.Name) then
3355
				if Quantum.Functions.GetStorage(plr.Name) then
3356
					for i,v in next, Quantum.Functions.GetStorage(plr.Name) do
3357
						Quantum.Players[plr.Name][i] = v
3358
					end
3359
				end
3360
			end
3361
			if not Quantum.Functions.GetRank(plr.Name) then
3362
				Quantum.Functions.AddPlayer(plr.Name)
3363
			elseif Quantum.Functions.GetRank(plr.Name) == -2 then
3364
				Quantum.Functions.Crash(plr)
3365
				Quantum.Functions.TellAdmins(plr.Name..' tried to join and is being crashed.')
3366
			elseif Quantum.Functions.GetRank(plr.Name) == -1 then
3367
				Quantum.Functions.Kick(plr)
3368
				Quantum.Functions.TellAdmins(plr.Name..' tried to join but is banned.')
3369
			elseif Quantum.Players[plr.Name].Muted == true then
3370
				Quantum.Functions.Mute(plr)
3371
				Quantum.Functions.TellAdmins(plr.Name..' joined and is muted.')
3372
			elseif Quantum.Functions.IsAdmin(plr.Name) then
3373
				Quantum.Functions.Tell(plr,'You\'re an admin! Your rank is '..Quantum.Functions.GetRank(plr.Name)..'. Your prefix is "'..Quantum.Players[plr.Name].GLOBAL_prefix..'", the bet is "'..Quantum.Settings.Bet..'" and the tag seperator is "'..Quantum.Settings.Tag..'".')	
3374
				if Quantum.Settings.AutoAntiban then
3375
					Quantum.Players[plr.Name].Antiban = true
3376
				end	
3377
				if Quantum.Settings.AutoAntilocal then
3378
					Quantum.Players[plr.Name].Antilocal = true
3379
					plr.Character.DescendantAdded:connect(function(descendant)
3380
						ypcall(function()
3381
							if descendant:IsA'LocalScript' and Quantum.Players[plr.Name].Antilocal then
3382
								if Quantum.Settings.Place == "oxcool" then
3383
									local info = descendant:FindFirstChild'Info'.Value
3384
									if not Quantum.Functions.IsAdmin(Quantum.Functions.GetInfo(info)[1]) then 
3385
										descendant.Disabled = true
3386
										wait()
3387
										descendant:Destroy()
3388
										print('Disabled script '..Quantum.Functions.GetInfo(info)[2]..' inserted by '..Quantum.Functions.GetInfo(info)[1]..' into Character.')
3389
									end
3390
								elseif Quantum.Settings.Place == "anti" then
3391
									local info = descendant:FindFirstChild'Owner'.Value.Name
3392
									if not Quantum.Functions.IsAdmin(info) then
3393
										descendant.Disabled = true
3394
										wait()
3395
										descendant:Destroy()
3396
										print('Disabled script '..descendant.Name..' inserted by '..info..' into Character.')
3397
									end
3398
								else
3399
									descendant.Disabled = true
3400
									wait()
3401
									descendant:Destroy()
3402
									print('Disabled script '..descendant.Name..' inserted into Character.')
3403
								end
3404
							end
3405
						end)
3406
					end)
3407
				end		
3408
				Quantum.Functions.Cmdbar(plr)
3409
				if Quantum.Settings.LocalScriptSource then
3410
					Quantum.Functions.Nilsupport(plr)
3411
				end
3412
			end
3413
			if Quantum.Settings.PrivateServer.Regular then
3414
				if not Quantum.Functions.IsAdmin(plr.Name) then
3415
					Quantum.Functions.Kick(plr)
3416
				end
3417
			end
3418
			if Quantum.Settings.PrivateServer.Auto then
3419
				if Quantum.Functions.IsAdmin(plr.Name) then
3420
					plr:LoadCharacter()
3421
				end
3422
			end
3423
			plr.Chatted:connect(function(msg)
3424
				ypcall(function()
3425
					Quantum.Functions.Chatted(plr,msg)
3426
					if msg:sub(1,3) ~= '/e ' and msg:sub(1,7) ~= '/emote ' then
3427
						if Quantum.Players[plr.Name].Bubblechat or Quantum.Settings.BubblechatAll then
3428
							if not Quantum.Players[plr.Name].Bubblechat then
3429
								game:GetService'Chat':Chat(plr.Character.Head,msg,Enum.ChatColor[Quantum.Settings.BubblechatColor])
3430
							else
3431
								game:GetService'Chat':Chat(plr.Character.Head,msg,Enum.ChatColor[Quantum.Players[plr.Name].BubblechatColor])
3432
							end
3433
						end
3434
					end
3435
				end)
3436
			end)
3437
			plr.CharacterAdded:connect(function(char)
3438
				ypcall(function()
3439
					Quantum.Functions.CharacterAdded(char)
3440
				end)
3441
			end)
3442
			plr.DescendantAdded:connect(function(descendant)
3443
				ypcall(function()
3444
					Quantum.Functions.DescendantAdded(descendant,plr)
3445
				end)
3446
			end)
3447
			if Quantum.Players[plr.Name].Antikill.Enabled then
3448
				ypcall(function()
3449
					plr.Character.Humanoid.Died:connect(function()
3450
						ypcall(function()
3451
							if Quantum.Players[plr.Name].Antikill.Enabled then
3452
								plr:LoadCharacter()
3453
							end
3454
						end)
3455
					end)
3456
					plr.Character.DescendantRemoving:connect(function(d)
3457
						ypcall(function()
3458
							if d:IsA'Humanoid' and Quantum.Players[plr.Name].Antikill.Enabled then
3459
								plr:LoadCharacter()
3460
							end
3461
						end)
3462
					end)
3463
					if Quantum.Players[plr.Name].Antikill.Humanoid then
3464
						Quantum.Functions.GetHumanoid(plr.Character).Name = 'RHumanoid'
3465
					end
3466
					pcall(function() Quantum.Players[plr.Name].Routine = nil end)
3467
					Quantum.Functions.GetAntikill(plr)
3468
				end)
3469
			end
3470
		end
3471
	end)
3472
end
3473
		
3474
Quantum.Functions.DescendantAdded = function(descendant,plr)
3475
	pcall(function()
3476
		if descendant:IsA'LocalScript' and Quantum.Players[plr.Name].Antilocal then
3477
			if Quantum.Settings.Place == "oxcool" then
3478
				local info = descendant:FindFirstChild'Info'.Value
3479
				if not Quantum.Functions.IsAdmin(Quantum.Functions.GetInfo(info)[1]) then 
3480
					descendant.Disabled = true
3481
					wait()
3482
					descendant:Destroy()
3483
					print('Disabled script '..Quantum.Functions.GetInfo(info)[2]..' inserted by '..Quantum.Functions.GetInfo(info)[1]..' into '..descendant.Parent.Name..'.')
3484
				end
3485
			elseif Quantum.Settings.Place == "anti" then
3486
				local info = descendant:FindFirstChild'Owner'.Value.Name
3487
				if not Quantum.Functions.IsAdmin(info) then
3488
					descendant.Disabled = true
3489
					wait()
3490
					descendant:Destroy()
3491
					print('Disabled script '..descendant.Name..' inserted by '..info..' into '..descendant.Parent.Name..'.')
3492
				end
3493
			else
3494
				descendant.Disabled = true
3495
				wait()
3496
				descendant:Destroy()
3497
				print('Disabled script '..descendant.Name..' inserted into '..descendant.Parent.Name..'.')
3498
			end
3499
		end
3500
	end)
3501
end	
3502
3503
Quantum.Functions.CharacterAdded = function(char)
3504
	ypcall(function()
3505
		local plr = game.Players:GetPlayerFromCharacter(char)
3506
		Quantum.Players[plr.Name].Ready = false
3507
		if Quantum.Players[plr.Name].Spawnlocation then
3508
			spawn(function()			
3509
				ypcall(function()
3510
					plr.Character:WaitForChild'Body Colors'
3511
					plr.Character.Torso.CFrame = Quantum.Players[plr.Name].Spawnlocation
3512
					Quantum.Players[plr.Name].Ready = true
3513
				end)
3514
			end)
3515
		end
3516
		if Quantum.Functions.IsAdmin(plr.Name) then
3517
			spawn(function()
3518
				wait()
3519
				if not Quantum.Functions.GetPlayerGui(plr):FindFirstChild'QuantumCmdbar' then
3520
					Quantum.Functions.Cmdbar(plr)
3521
				end
3522
			end)
3523
		end
3524
		char.DescendantAdded:connect(function(descendant)
3525
			ypcall(function()
3526
				if descendant:IsA'LocalScript' and Quantum.Players[plr.Name].Antilocal then
3527
					if Quantum.Settings.Place == "oxcool" then
3528
						local info = descendant:FindFirstChild'Info'.Value
3529
						if not Quantum.Functions.IsAdmin(Quantum.Functions.GetInfo(info)[1]) then 
3530
							descendant.Disabled = true
3531
							wait()
3532
							descendant:Destroy()
3533
							print('Disabled script '..Quantum.Functions.GetInfo(info)[2]..' inserted by '..Quantum.Functions.GetInfo(info)[1]..' into Character.')						
3534
						end
3535
					elseif Quantum.Settings.Place == "anti" then
3536
						local info = descendant:FindFirstChild'Owner'.Value.Name
3537
						if not Quantum.Functions.IsAdmin(info) then
3538
							descendant.Disabled = true
3539
							wait()
3540
							descendant:Destroy()
3541
							print('Disabled script '..descendant.Name..' inserted by '..info..' into Character.')
3542
						end
3543
					else
3544
						descendant.Disabled = true
3545
						wait()
3546
						descendant:Destroy()
3547
						print('Disabled script '..descendant.Name..' inserted into Character.')
3548
					end
3549
				end
3550
			end)
3551
		end)
3552
		--[[if Quantum.Players[plr.Name].Antikill.Enabled then
3553
			char.DescendantRemoving:connect(function(d)
3554
				ypcall(function()
3555
					if d:IsA'Humanoid' and Quantum.Players[plr.Name].Antikill.Enabled then
3556
						plr:LoadCharacter()
3557
					end
3558
				end)
3559
			end)
3560
		end]]
3561
		if Quantum.Players[plr.Name].Antikill.Enabled then
3562
			char.Humanoid.Died:connect(function()
3563
				ypcall(function()
3564
					if Quantum.Players[plr.Name].Antikill.Enabled then
3565
						plr:LoadCharacter()
3566
					end
3567
				end)
3568
			end)
3569
			wait(0.1)
3570
			if Quantum.Players[plr.Name].Antikill.Humanoid then
3571
				char.Humanoid.Name = 'RHumanoid'
3572
			end
3573
		end
3574
		wait()
3575
		if #Quantum.Players[plr.Name].RespawnExe > 0 then
3576
			for _,i in next, Quantum.Players[plr.Name].RespawnExe do
3577
				Quantum.Functions.ExeCmd(i:gsub('|plr|',plr.Name),root)
3578
			end
3579
		end
3580
		if #Quantum.Tables.RespawnExe > 0 then
3581
			for _,i in next, Quantum.Tables.RespawnExe do
3582
				Quantum.Functions.ExeCmd(i:gsub('|plr|',plr.Name),root)
3583
			end
3584
		end
3585
	end)
3586
end
3587
	
3588
Quantum.Functions.Chatted = function(plr,msg)
3589
	pcall(function()
3590
		for _,i in next, Quantum.Tables.Blacklist do
3591
			if msg:lower():find(i:lower()) then
3592
				Quantum.Functions.Kick(plr)
3593
				Quantum.Functions.TellAdmins(plr..' used blacklisted phrase and has been kicked.')
3594
			end
3595
		end
3596
		table.insert(Quantum.Tables.Superlogs,'['..plr.Name..'] '..msg)
3597
		if msg:sub(1,3) == '/e ' or msg:sub(1,7) == '/emote ' then
3598
			table.insert(Quantum.Tables.Logs,'['..plr.Name..'] '..msg)
3599
		end
3600
		if msg:sub(1,3) == '/e ' then
3601
			msg = msg:sub(4)
3602
		elseif msg:sub(1,7) == '/emote ' then
3603
			msg = msg:sub(8)
3604
		end
3605
		if msg:sub(1,string.len(Quantum.Players[plr.Name].GLOBAL_prefix)) == Quantum.Players[plr.Name].GLOBAL_prefix then
3606
			Quantum.Functions.ExeCmd(msg,plr)
3607
			table.insert(Quantum.Tables.Logs,'['..plr.Name..'] '..msg)
3608
		end
3609
	end)
3610
end
3611
3612
Quantum.Functions.PacketReceive = function(...)
3613
	local signal = {...}
3614
	pcall(function()
3615
		Quantum.Functions.Chatted(signal[1],signal[2])
3616
	end)
3617
end
3618
3619
Quantum.Functions.SendPacket = function(player,packet)
3620
	Quantum.Settings.Remote:FireClient(player,packet..'['..Quantum.Settings.SECURITY_CODE..']')
3621
end
3622
3623
Quantum.Functions.ConnectRemote = function()
3624
	pcall(function() Quantum.Settings.Remote:Destroy() end)
3625
	Quantum.Settings.Remote = Instance.new('RemoteEvent',game.ReplicatedStorage)
3626
	Quantum.Settings.Remote.Name = "QuantumRemoteAccess"..Quantum.Settings.SECURITY_CODE
3627
	game.ReplicatedStorage.ChildRemoved:connect(function(child)
3628
		pcall(function()
3629
			if child == Quantum.Settings.Remote then
3630
				Quantum.Functions.ConnectRemote()
3631
			end
3632
		end)
3633
	end)
3634
	Quantum.Settings.Remote.Changed:connect(function()
3635
		pcall(function()
3636
			Quantum.Functions.ConnectRemote()
3637
		end)
3638
	end)
3639
	Quantum.Settings.Remote.OnServerEvent:connect(function(...)
3640
		Quantum.Functions.PacketReceive(...)
3641
	end)
3642
end
3643
3644
Quantum.Functions.ConnectRemote()
3645
3646
for _,i in next, game.Players:GetPlayers() do
3647
	ypcall(function()
3648
		Quantum.Functions.PlayerAdded(i)
3649
	end)
3650
end
3651
3652
print'Quantum Loaded'