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