View difference between Paste ID: pxtijsjt and FKkKP3uz
SHOW: | | - or go back to the newest paste.
1
ScreenGui0 = Instance.new("ScreenGui")
2
TextLabel1 = Instance.new("TextLabel")
3
TextLabel2 = Instance.new("TextLabel")
4
ScreenGui0.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
5
TextLabel1.Parent = ScreenGui0
6
TextLabel1.Name = "msg"
7
TextLabel1.Position = UDim2.new(1.1, 0,1, -150)
8
TextLabel1.Size = UDim2.new(0, 272, 0, 150)
9
TextLabel1.BackgroundColor = BrickColor.new("Cyan")
10
TextLabel1.BackgroundColor3 = Color3.new(0, 0.666667, 1)
11
TextLabel1.BorderColor = BrickColor.new("Cyan")
12
TextLabel1.BorderColor3 = Color3.new(0, 0.666667, 1)
13
TextLabel1.BorderSizePixel = 5
14
TextLabel1.Font = Enum.Font.SourceSansLight
15
TextLabel1.FontSize = Enum.FontSize.Size28
16
TextLabel1.Text = "Sapphire is now loaded."
17
TextLabel1.TextColor = BrickColor.new("Institutional white")
18
TextLabel1.TextColor3 = Color3.new(1, 1, 1)
19
TextLabel1.TextSize = 25
20
TextLabel1.TextWrap = true
21
TextLabel1.TextWrapped = true
22
TextLabel1.TextYAlignment = Enum.TextYAlignment.Top
23
TextLabel2.Parent = TextLabel1
24
TextLabel2.Position = UDim2.new(-0.0551470518, 0, 0, 0)
25
TextLabel2.Size = UDim2.new(0, 10, 1, 0)
26
TextLabel2.BackgroundColor = BrickColor.new("Toothpaste")
27
TextLabel2.BackgroundColor3 = Color3.new(0, 1, 1)
28
TextLabel2.BorderColor = BrickColor.new("Toothpaste")
29
TextLabel2.BorderColor3 = Color3.new(0, 1, 1)
30
TextLabel2.BorderSizePixel = 5
31
TextLabel2.Font = Enum.Font.SourceSansLight
32
TextLabel2.FontSize = Enum.FontSize.Size18
33
TextLabel2.Text = "SAPPHIRE"
34
TextLabel2.TextColor = BrickColor.new("Really black")
35
TextLabel2.TextColor3 = Color3.new(0, 0, 0)
36
TextLabel2.TextSize = 18
37
TextLabel2.TextWrap = true
38
TextLabel2.TextWrapped = true
39
function SayMessage(player,text)
40
  spawn(function()
41
	local a = ScreenGui0:Clone()
42
	local msg = a:WaitForChild("msg")
43
	msg.Text = text
44
  msg:WaitForChild("TextLabel").Text = "SAPPHIRE"
45
	a.Parent = player.PlayerGui
46
	msg:TweenPosition(UDim2.new(1, -272, 1, -150), "Out", "Linear", 0.5 ,true)
47
	wait(5)
48
	msg:TweenPosition(UDim2.new(1.1, 0,1, -150), "Out", "Linear", 0.5 , true, function()
49
		a:Remove()
50
	end)
51
  end)
52
	end
53
	SayMessage(owner, "Sapphire has successfully loaded.")
54
55
--[[ 
56
	Sapphire by Lethox & KCROL 
57
	Fixed by [pdnghiaqoi]
58
  Place 1 Version by [pdnghiaqoi]
59
]]--
60
61
local UpdateFound = false;
62
local SaveLeave = false;
63
local Waves = true
64
local tabDesign = "Neon"
65
local BackTab = true
66
local Override = "a"
67
--// Variables
68
local Ranks = {
69
    {Rank = 0, Desc = "Guest"};
70
    {Rank = 1, Desc = "Player"};
71
    {Rank = 2, Desc = "Trusted"};
72
    {Rank = 3, Desc = "Moderator"};
73
    {Rank = 4, Desc = "Admin"};
74
    {Rank = 5, Desc = "Head Admin"};
75
    {Rank = 6, Desc = "Co-Owner"};
76
    {Rank = 7, Desc =  "Developer"};
77
};
78
local Ranked = {
79
    {['Name'] = 'pdnghiaqoi', ['Rank'] = 7, ['Reason'] = 'a', ['Color'] = 'Bright yellow', ['Suffix'] = '/'};
80
    };
81
    
82
local Tablets = {};
83
local Commands = {};
84
local Banned = {};
85
--local bannedscripts = {""}
86
local Splitkey = '/'
87
--// Functions
88
89
function Convert(color)
90
return BrickColor.new(color).Color
91
end
92
93
--[[function AgeLimitBan(plr)
94
	if plr.AccountAge < AgeLimit then
95
		plr:kick('[Sapphire]: Your account age is below 150 days. You can join in '..AgeLimit - plr.AccountAge..' days.')
96
	end
97
end]]--
98
99
--Message--
100
101
function Message(msg, plr)
102
for i,v in pairs(game:GetService("Players"):GetPlayers()) do
103
coroutine.wrap(function()
104
	-- Objects
105
106
local ScreenGui = Instance.new("ScreenGui")
107
local Frame = Instance.new("Frame")
108
local TextLabel = Instance.new("TextLabel")
109
local TextLabel_2 = Instance.new("TextLabel")
110
111
-- Properties
112
113
ScreenGui.Parent = v.PlayerGui
114
115
Frame.Parent = ScreenGui
116
Frame.BackgroundColor3 = Color3.new(0, 0, 0)
117
Frame.BackgroundTransparency = 0.5
118
Frame.Position = UDim2.new(0.5, -150, 0.5, -800)
119
Frame.Size = UDim2.new(0, 300, 0, 300)
120
Frame.Visible = true
121
122
TextLabel.Parent = Frame
123
TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
124
TextLabel.BackgroundTransparency = 1
125
TextLabel.Position = UDim2.new(0.5, -150, 0, 0)
126
TextLabel.Size = UDim2.new(0, 300, 0, 50)
127
TextLabel.Font = Enum.Font.Highway
128
TextLabel.FontSize = Enum.FontSize.Size32
129
TextLabel.Text = "Sapphire MESSAGE"
130
TextLabel.TextColor3 = Color3.new(1, 1, 1)
131
TextLabel.TextSize = 32
132
133
TextLabel_2.Parent = Frame
134
TextLabel_2.BackgroundColor3 = Color3.new(1, 1, 1)
135
TextLabel_2.BackgroundTransparency = 1
136
TextLabel_2.Position = UDim2.new(0.5, -100, 0, 100)
137
TextLabel_2.Size = UDim2.new(0, 200, 0, 100)
138
TextLabel_2.Font = Enum.Font.SourceSansItalic
139
TextLabel_2.FontSize = Enum.FontSize.Size14
140
TextLabel_2.Text = tostring(msg)
141
TextLabel_2.TextColor3 = Color3.new(1, 1, 1)
142
TextLabel_2.TextScaled = true
143
TextLabel_2.TextSize = 14
144
TextLabel_2.TextWrapped = true
145
146
Frame:TweenPosition(UDim2.new(0.5,-150,0.5,-150), "Out", "Back", 3)
147
wait(6)
148
Frame:TweenPosition(UDim2.new(0.5,-1400,0.5,-150), "Out", 6, 3)
149
wait(5)
150
ScreenGui:remove()
151
        end)()
152
	end
153
end 
154
155
local ang=0
156
game:GetService("RunService").Stepped:connect(function()
157
                ypcall(function()
158
                        for _,Player in pairs(game:GetService("Players"):GetPlayers()) do
159
                                local PlayerTablets = {}
160
                                for i,v in pairs(Tablets) do
161
                                        if v.Tab1.Parent ~= nil and v.Tab2.Parent ~= nil and v.Player == Player then
162
                                                table.insert(PlayerTablets, v)
163
                                        end
164
                                end
165
                                for i = 1, #PlayerTablets do
166
                                        ypcall(function()
167
                                                local tab = PlayerTablets[i].Tab1
168
                                                local tab2 = PlayerTablets[i].Tab2
169
                                                local pos = nil
170
                                                ypcall(function()
171
	if Player.Character ~= nil then
172
	local found = Player.Character:FindFirstChild("HumanoidRootPart")
173
	if found then
174
	                                                          
175
	pos = Player.Character:WaitForChild("HumanoidRootPart").CFrame 
176
	else if not found then 
177
		local found2 = Player.Character:FindFirstChild("Torso")
178
		if found2 then
179
	pos = Player.Character:WaitForChild("Torso").CFrame 
180
		elseif not found2 then
181
			local found3 = Player.Character:FindFirstChild("UpperTorso")
182
			if found3 then
183
				pos = Player.Character:WaitForChild("UpperTorso").CFrame
184
			else if not found3 then
185
		Player:LoadCharacter() wait(0.1) pos = Player.Character:WaitForChild("HumanoidRootPart").CFrame
186
	else pos = CFrame.new(0,0,0)
187
	end
188
	end   end end end  else pos = CFrame.new(0,0,0) end                      
189
                                                end)
190
                                                local x = math.sin(time()/#PlayerTablets + (math.pi*2)/#PlayerTablets*i) * (#PlayerTablets+1)
191
                                                local y = math.sin(i + tick()*3.4)
192
                                                local z = math.cos(time()/#PlayerTablets + (math.pi*2)/#PlayerTablets*i) * (#PlayerTablets+1)
193
                                                local cPos = tab.Position
194
                                                local ePos = Vector3.new(x, y, z) + (pos.p or Vector3.new(0, -5, 0))
195
                                                local nPos = (ePos-cPos)*.10
196
                                          cPos = cPos + nPos
197
                                                local t = (tick() - tick()) % 360
198
                                                local change = 0.0025
199
                                                                                                ang=ang+change
200
tab.CFrame = CFrame.new(cPos, (pos.p or Vector3.new(0, -5, 0))) * CFrame.Angles(math.rad(-8.25), 0, 0) * CFrame.Angles(math.rad(.55), 0, 0) * CFrame.Angles(0, math.rad((360 / #PlayerTablets) * i) + ang, 0) * CFrame.Angles(math.rad(ang), math.rad(ang), math.rad(ang))
201
tab2.CFrame = CFrame.new(cPos, (pos.p or Vector3.new(0, 5, 0))) * CFrame.Angles(math.rad(8.25), 0, 0) * CFrame.Angles(math.rad(-.55), 0, 0) * CFrame.Angles(0, math.rad((360 / #PlayerTablets) * i) + ang, 0) * CFrame.Angles(math.rad(0.00001), math.rad(0.00001), math.rad(0.00001))
202
203
                                        end)
204
                                end
205
                        end
206
                end)
207
end)
208
209
function Output(player,name,color,func)
210
        if name==nil then name='Error!' end
211
        if color==nil then color=tostring('Institutional white') end
212
        if player==nil then return false end
213
        local Tab = Instance.new('Part',workspace.Terrain)
214
        Tab.Anchored,Tab.Locked,Tab.CanCollide,Tab.BottomSurface,Tab.TopSurface=true,true,false,0,0
215
        Tab.Transparency = 0
216
        Tab.Size = Vector3.new(2,2,2)
217
        Tab.BrickColor = BrickColor.new(tostring(color))
218
        Tab.Position = player.Character.Head.Position
219
        local Tabb = Instance.new('Part',workspace.Terrain)
220
        Tabb.Anchored,Tabb.Locked,Tabb.CanCollide,Tabb.BottomSurface,Tabb.TopSurface=true,true,false,0,0
221
        Tabb.Transparency = 0
222
        Tabb.Size = Vector3.new(1.3,1.3,1.3)
223
        Tabb.BrickColor = BrickColor.new(tostring(color))
224
        Tabb.Position = player.Character.Head.Position
225
        
226
        local Gui=Instance.new("BillboardGui", Tab)
227
    Gui.Adornee=Tab;
228
    Gui.StudsOffset = Vector3.new(0, 1.3, 0)
229
    Gui.Size = UDim2.new(8, 0, 7.5,0)
230
231
    local Label=Instance.new("TextLabel", Gui)
232
    Label.Font = "SciFi"
233
    Label.TextColor3=Convert(tostring(color))
234
    Label.BackgroundTransparency=1
235
    Label.FontSize = "Size24"
236
    Label.Font = "SourceSansBold"
237
    Label.TextStrokeTransparency=1
238
    Label.Text = tostring(name)
239
    Label.TextStrokeColor3=Convert(tostring(color))
240
    Label.Size = UDim2.new(1, 0, 0.5, 0)
241
242
local CLICK=Instance.new("ClickDetector", Tab)
243
CLICK.MaxActivationDistance=math.huge
244
245
CLICK.MouseClick:connect(function(p)
246
if p.userId == player.userId or GetRank(p) > GetRank(player) then
247
if func == nil then
248
for i = 1, 5 do
249
Tab.Transparency=Tab.Transparency + .1 
250
Tab.Size=Tab.Size - Vector3.new(.01,.01,.01) 
251
wait()
252
end
253
Tab:Destroy()
254
Tabb:Destroy()
255
else
256
for i = 1, 5 do
257
Tab.Transparency=Tab.Transparency + .1 
258
Tab.Size=Tab.Size - Vector3.new(.010,.010,.010) 
259
wait()
260
end
261
Tab:Destroy()
262
Tabb:Destroy()
263
func = func
264
func()
265
end
266
end
267
CLICK.MouseHoverEnter:connect(function(p)
268
        if p.Name == player.Name or GetRank(p) > GetRank(player) then
269
                for i = 1, 1 do
270
                        Tab.Transparency = .7
271
                        Tab.Size = Tab.Size + Vector3.new(.1,.1,.1)
272
                end
273
        end
274
end)
275
CLICK.MouseHoverLeave:connect(function(p)
276
        if p.Name == player.Name or GetRank(p) > GetRank(player) then
277
                Tab.Transparency = .3
278
                Tab.Size = Vector3.new(2,2,2)
279
        end
280
end)
281
end)
282
283
if tabDesign == "Double" then
284
	Tab.Size = Vector3.new(2,2,2)
285
	Tabb.Size = Vector3.new(.7,.7,.7)
286
	for i,v in pairs(Tab:children()) do if v:IsA("SelectionBox") then v:remove() end end
287
	for i,v in pairs(Tab:children()) do if v:IsA("SpecialMesh") then v:remove() end end
288
	Tabb.Transparency = 0
289
	Tab.Transparency = 0.3
290
elseif tabDesign == "Plain" then
291
	Tab.Size = Vector3.new(2,2,2)
292
    for i,v in pairs(Tab:children()) do if v:IsA("SelectionBox") then v:remove() end end
293
    for i,v in pairs(Tab:children()) do if v:IsA("SpecialMesh") then v:remove() end end
294
	Tabb.Transparency = 1
295
	Tab.Transparency = 0
296
elseif tabDesign == "SelectionBox" then
297
	Tab.Size = Vector3.new(2,2,2)
298
	for i,v in pairs(Tab:children()) do if v:IsA("SpecialMesh") then v:remove() end end
299
	local sel = Instance.new('SelectionBox',Tab)
300
	sel.Color = Tab.BrickColor
301
	sel.LineThickness = 0.01
302
	sel.Adornee = Tab
303
	Tab.Transparency = 0.3
304
	Tabb.Transparency = 1
305
elseif tabDesign == "DoubledSel" then
306
	Tab.Size = Vector3.new(2,2,2)
307
	Tabb.Size = Vector3.new(.7,.7,.7)
308
	for i,v in pairs(Tab:children()) do if v:IsA("SpecialMesh") then v:remove() end end
309
	local sel = Instance.new('SelectionBox',Tab)
310
	sel.Color = Tab.BrickColor
311
	sel.LineThickness = 0.01
312
	sel.Adornee = Tab
313
	Tab.Transparency = 0.3
314
	Tabb.Transparency = 0
315
elseif tabDesign == "Orb" then
316
	Tab.Size = Vector3.new(2,2,2)
317
	Tabb.Transparency = 1
318
	Tab.Transparency = 0
319
	local m = Instance.new('SpecialMesh',Tab)
320
	m.MeshType = "Sphere"
321
	m.Scale = Vector3.new(1,1,1)
322
elseif tabDesign == "DoubleOrb" then
323
	Tab.Size = Vector3.new(2,2,2)
324
	Tabb.Size = Vector3.new(1.3,1.3,1.3)
325
	Tab.Transparency = 0.3
326
	local m = Instance.new('SpecialMesh',Tab)
327
	m.MeshType = "Sphere"
328
	m.Scale = Vector3.new(1,1,1)
329
	local m = Instance.new('SpecialMesh',Tabb)
330
	m.MeshType = "Sphere"
331
	m.Scale = Vector3.new(.6,.6,.6)
332
elseif tabDesign == "Flat" then
333
	Tab.Size = Vector3.new(3,4,0.2)
334
	Tab.Transparency = 0
335
	Tabb.Transparency = 1
336
	for i,v in pairs(Tab:children()) do if v:IsA("SelectionBox") then v:remove() end end
337
	for i,v in pairs(Tab:children()) do if v:IsA("SpecialMesh") then v:remove() end end
338
elseif tabDesign == "DoubleFlat" then
339
	Tab.Size = Vector3.new(3,4,0.4)
340
	Tab.Transparency = .3
341
	Tabb.Transparency = 0
342
	Tabb.Size = Vector3.new(2,3,0.2)
343
	for i,v in pairs(Tab:children()) do if v:IsA("SelectionBox") then v:remove() end end
344
	for i,v in pairs(Tab:children()) do if v:IsA("SpecialMesh") then v:remove() end end
345
elseif tabDesign == "Neon" then
346
	for i,v in pairs(Tab:children()) do if v:IsA("SelectionBox") then v:remove() end end
347
	for i,v in pairs(Tab:children()) do if v:IsA("SpecialMesh") then v:remove() end end
348
	Tab.Material = "Neon"
349
	Tab.Size = Vector3.new(2,2,2)
350
	Tab.Transparency=0
351
	Tabb.Size = Vector3.new(.7,.7,.7)
352
	Tabb.Transparency = 1
353
end
354
355
table.insert(Tablets, {Tab1 = Tab, Tab2 = Tabb, Player = player})
356
end
357
358
359
360
AddRank = function(Name, Rank, Reason, Color, Trans, SelBox, Suffix)
361
	if type(Name) == 'userdata' then Name = Name.Name end
362
	table.insert(Ranked, {['Name'] = Name, ['Rank'] = Rank, ['Reason'] = Reason, ['Color'] = Color, ['Transparency'] = Trans, ['SelBox'] = SelBox, ['Suffix'] = Suffix})
363
end
364
365
SetRank = function(player, rank)
366
	if type(player) == 'userdata' then player = player.Name end
367
	for _,plr in next,Ranked do
368
		if plr.Name == player then
369
			plr.Rank = rank
370
		end
371
	end
372
	
373
AddRank(player, rank, "A normal player", "Toothpaste", .3, false, '~')
374
end
375
376
function getRanked(player)
377
	Dismiss(player)
378
	Output(player, 'Getting ranked table, please wait...', 'Institutional white')
379
	wait(3)
380
	Dismiss(player)
381
	Output(player, 'Dismiss', 'Really red', function() Dismiss(player) end)
382
	for _,plr in next,Ranked do
383
		Output(player, plr.Name, 'Institutional white', function()
384
			Dismiss(player)
385
			Output(player, 'Name: '..plr.Name, 'Institutional white')
386
			Output(player, 'Rank: '..add(GetRank(player)), 'Lime green')
387
			Output(player, 'Description: '..GetDesc(plr), 'Deep orange')
388
			Output(player, 'Suffix: '..GetSuffix(plr), 'Cyan')
389
			Output(player, 'Dismiss', 'Really red', function() Dismiss(player) end)
390
		end)
391
	end
392
end
393
394
function GetRank(plr)
395
        if type(plr) == 'userdata' then
396
                plr=tostring(plr)
397
        elseif type(plr) == 'string' then
398
                plr=plr.Name
399
        else
400
                plr=plr
401
        end
402
        
403
        for _,data in pairs(Ranked) do
404
                if data['Name'] == plr then
405
                        local rnk = data['Rank']
406
                        return rnk --If plr is on the rank list their rank is here
407
                end
408
        end
409
        
410
        return 0 --Player's rank will be 0 if not on the list
411
end
412
413
function GetSuffix(plr)
414
        if type(plr) == 'userdata' then
415
                plr=tostring(plr)
416
        elseif type(plr) == 'string' then
417
                plr=plr.Name
418
        else
419
                plr=plr
420
        end
421
        
422
        for _,data in pairs(Ranked) do
423
                if data['Name'] == plr then
424
                        local suffix = data['Suffix']
425
                        return suffix --If plr is on the rank list their rank is here
426
                end
427
        end
428
        
429
        return '!' --Player's suffix is ! if not ranked.
430
end
431
432
function GetDesc(plr)
433
        if type(plr) == 'userdata' then
434
                plr=tostring(plr)
435
        elseif type(plr) == 'string' then
436
                plr=plr.Name
437
        else
438
                plr=plr
439
        end
440
        
441
        for _,data in pairs(Ranked) do
442
                if data['Name'] == plr then
443
                        local reason = data['Reason']
444
                        return reason
445
                end
446
        end
447
        
448
        return 'A normal player!'
449
end
450
451
function GetColor(plr)
452
        if type(plr) == 'userdata' then
453
                plr=tostring(plr)
454
        elseif type(plr) == 'string' then
455
                plr=plr.Name
456
        else
457
                plr=plr
458
        end
459
        
460
        for _,data in pairs(Ranked) do
461
                if data['Name'] == plr then
462
                        local clr = data['Color']
463
                        return clr --If plr is on the rank list their color here
464
                end
465
        end
466
        
467
        return 'Cyan' --Player's color is Cyan if not ranked.
468
end
469
470
function Dismiss(plr)
471
pcall(function()
472
for _,tablets in pairs(Tablets) do
473
if tablets.Player == plr then
474
local T = coroutine.create(function()
475
repeat
476
game:GetService("RunService").Heartbeat:wait(0.000000000000000000000001)
477
tablets.Tab1.Size=Vector3.new(tablets.Tab1.Size.X-0.1,tablets.Tab1.Size.Y-0.1,tablets.Tab1.Size.Z-0.1)
478
tablets.Tab2.Size=Vector3.new(tablets.Tab2.Size.X-0.1,tablets.Tab2.Size.Y-0.1,tablets.Tab2.Size.Z-0.1)
479
until tablets.Tab1.Size.X<0.3;
480
tablets.Tab1:Destroy()
481
tablets.Tab2:Destroy()
482
end)
483
coroutine.resume(T)
484
end
485
end
486
end)
487
end
488
function add(n)
489
    local b = ""
490
    if n == 0 then return "-" end
491
    for i = 1,tonumber(n) do
492
      b = b.."I"
493
      end
494
    return b
495
end
496
Commands_E = function(player)
497
Dismiss(player)
498
for i = 0, 7 do
499
local a = add(i)
500
Output(player, "Rank "..a.."", GetColor(player), function()
501
GetCommands(player, i)
502
end)
503
end
504
Output(player, 'Your rank is '..add(GetRank(player)),'Bright green')
505
end
506
 
507
 
508
GetCommands = function(player, rank)
509
Dismiss(player)
510
for _, CMDS in pairs(Commands) do
511
if CMDS['Rank'] <= rank then
512
Output(player, CMDS['Name'], GetColor(player), function()
513
Dismiss(player)
514
Output(player, 'Description: '..CMDS['Desc'], 'Lime green')
515
Output(player, 'Usage (For you): '..CMDS['Say']..''..GetSuffix(player),'Bright red')
516
Output(player, 'Rank Needed: '..CMDS['Rank'], 'Cyan')
517
Output(player, 'Name: '..CMDS['Name'], 'Toothpaste')
518
Output(player, 'Back', 'Navy blue', function() GetCommands(player, rank) end)
519
Output(player, 'Dismiss', 'Really red', function() Dismiss(player) end)
520
if GetRank(player) < CMDS['Rank'] then
521
    Output(player, "You can't use this command!","Really red")
522
else
523
    Output(player, 'You can use this command!','Lime green')
524
end
525
end)
526
end
527
end
528
end
529
530
531
function getPlayers(plr)
532
	Dismiss(plr)
533
	Output(plr, 'Dismiss', 'Really red', function() Dismiss(plr) end)
534
	for _,player in pairs(game:GetService("Players"):GetPlayers()) do
535
		Output(plr, player.Name..' [RANK '..add(GetRank(player))..']', 'Institutional white',function()
536
			Dismiss(plr)
537
			Output(plr, 'Dismiss', 'Really red', function() Dismiss(plr) end)
538
			Output(plr, 'Name: '..player.Name..'','Institutional white')
539
			Output(plr, 'Rank: '..add(GetRank(player))..'', 'Lime green')
540
			Output(plr, 'Account Age: '..player.AccountAge..'', 'Cyan')
541
			Output(plr, 'Builders Club Type: '..player.MembershipType.Name..'', 'Deep orange')
542
			Output(plr, 'Description: '..GetDesc(player), 'Really black')
543
			Output(plr, 'Suffix: '..GetSuffix(player), 'Bright red')
544
			Output(plr, 'Color: '..GetColor(player), GetColor(player))
545
		end)
546
	end
547
end
548
549
550
551
Chatted = function(speaker, message)
552
if message:sub(1, 2) == '/e' then
553
if #message > 3 then
554
message = message:sub(4)
555
end
556
elseif message:sub(1, 1) == '*' then
557
if #message > 2 then
558
message = message:sub(2)
559
end
560
elseif message:sub(1, 1) == '>' then
561
        if #message > 2 then
562
                message = message:sub(2)
563
        end
564
end
565
566
567
local command=message
568
for _, CMDS in pairs(Commands) do
569
if command:sub(1, #CMDS['Say']+#GetSuffix(speaker)) == CMDS['Say']..GetSuffix(speaker) then
570
if GetRank(speaker) >= CMDS['Rank'] then
571
local msg = command:sub(#CMDS["Say"]+#GetSuffix(speaker)+1)
572
a,b = ypcall(function()
573
                                        CMDS["Func"](speaker, msg)
574
        end)
575
        if not a then warn(b) Output(speaker, 'ERROR: '..b, 'Really red') end
576
        else
577
        Output(speaker, 'You need rank '..CMDS['Rank']..' to use this command!', 'Really red')
578
end
579
end 
580
end
581
end
582
583
584
585
586
function NewCommand(name, usage, rank, desc, func)
587
      table.insert(Commands, {['Name'] = name, ['Say'] = usage, ['Rank'] = rank, ['Desc'] = desc, ['Func'] = func})
588
end
589
590
--[[function SBChat(title,msg)
591
	pcall(function()
592
		for i,v in pairs(game.Players:GetPlayers()) do
593
			local value = Instance.new('StringValue',v)
594
			value.Name = "SB_Chat"
595
			value.Value = tostring(title)..'/'..msg
596
			game.Debris:AddItem(value,.1)
597
		end
598
	end)
599
end
600
601
function SBChatAll(name, cht)
602
    for _,plr in pairs(game.Players:GetPlayers()) do
603
        SBChat(plr, name, cht)
604
    end
605
end]]--
606
607
GetPlayers = function(plr, msg)
608
    local plrs = {}
609
    if msg:match("^!") then
610
        return FindPlayers(plr, msg:sub(2), true)
611
    elseif msg == "me" then
612
        table.insert(plrs, plr)
613
    elseif msg == "all" then FindPlayers = function(plr, msg)
614
    local plrs = {}
615
    if msg:match("^!") then
616
        return FindPlayers(plr, msg:sub(2), true)
617
    elseif msg == "me" then
618
        table.insert(plrs, plr)
619
    elseif msg == "all" then
620
        for _,v in pairs(game:service'Players':players()) do
621
            table.insert(plrs, v)
622
        end
623
    elseif msg == "others" then
624
        for _,v in pairs(game:service'Players':players()) do
625
            if v ~= plr then
626
                table.insert(plrs, v)
627
            end
628
        end
629
    else
630
        for _,v in pairs(game:service'Players':players()) do
631
            if v.Name:lower():sub(1,#msg) == msg:lower() then
632
                table.insert(plrs, v)
633
            end
634
        end
635
    end
636
    return plrs
637
end
638
        for _,v in pairs(game:service'Players':players()) do
639
            table.insert(plrs, v)
640
        end
641
    elseif msg == "others" then
642
        for _,v in pairs(game:service'Players':players()) do
643
            if v ~= plr then
644
                table.insert(plrs, v)
645
            end        end
646
    else        for _,v in pairs(game:service'Players':players()) do
647
648
            if v.Name:lower():sub(1,#msg) == msg:lower() then
649
                table.insert(plrs, v)
650
            end
651
        end
652
    end
653
    return plrs
654
end
655
656
game:GetService("Players").PlayerAdded:connect(function(plr)
657
     plr.Chatted:connect(function(m)
658
           Chatted(plr, m)
659
   end)
660
661
end)
662
663
664
--// Moving on from functions 
665
666
NewCommand("ForceField", 'ff',3,'Give a player a forcefield',function(player,message)
667
for _,plr in next,GetPlayers(player,message) do
668
Instance.new('ForceField',plr.Character)
669
end
670
end)
671
672
NewCommand('Commands', 'cmds',0,'Show the commands',function(player,message)
673
Commands_E(player)
674
end)
675
676
NewCommand('Dismiss','dt',0,'Dismisses tablets',function(player,message)
677
Dismiss(player)
678
end)
679
680
NewCommand('Kill','kill',3,'Kill a player',function(player,message)
681
for _,plr in next,GetPlayers(player,message) do
682
plr.Character.Humanoid.Health = 0
683
end
684
end)
685
686
NewCommand('Annoymous Direct Message','adm',4,'Send an annoymous-direct-message to a player.',function(player,message)
687
	local Split = message:find(Splitkey)
688
    local PreSplit = message:sub(1, Split - 1)
689
    local AfterSplit = message:sub(Split + 1)
690
    for _,plr in next,GetPlayers(player,PreSplit) do      
691
      SayMessage(plr, AfterSplit) 
692
end
693
end)
694
695
696
NewCommand('Rank','rank',7,'Set a players rank',function(player,message)
697
	local Split = message:find(Splitkey)
698
    local PreSplit = message:sub(1, Split - 1)
699
    local AfterSplit = message:sub(Split + 1)
700
    for _,plr in next,GetPlayers(player,PreSplit) do
701
	  SetRank(plr, tonumber(AfterSplit))
702
   end
703
end)
704
705
NewCommand('God','god',3,'God a player',function(player,message)
706
	for _,plr in next,GetPlayers(player,message) do
707
		plr.Character.Humanoid.MaxHealth = math.huge
708
	end
709
end)
710
711
NewCommand('UnGod','ungod',3,'Remove a players god mode',function(player,message)
712
	for _,plr in next,GetPlayers(player,message) do
713
		plr.Character.Humanoid.MaxHealth = 100
714
	end
715
end)
716
717
NewCommand('Execute','exe',5,'Execute a script',function(player,message)
718
	local success,errored = loadstring(message)
719
	if success and not errored then
720
		success()
721
	else
722
		Output(player, 'Sapphire - Error: '..errored,'Really red')
723
	end
724
end)
725
726
NewCommand('UnFF','unff',3,'Remove someones forcefield',function(player,message)
727
	for _,plr in next,GetPlayers(player,message) do
728
		for i,v in pairs(plr.Character:children()) do
729
			if v:IsA("ForceField") or v.ClassName == "ForceField" then
730
				v:remove()
731
			end
732
		end
733
	end
734
end)
735
736
NewCommand('Message','msg',3,'Send a server message',function(player,message)
737
	Message(message)
738
end)
739
740
NewCommand("Set Bass","bass",4,"Set the bass of every sound on ROBLOX",function(player,message)
741
	Output(player, 'Set the bass to '..tonumber(message),GetColor(player))
742
	game:GetService("SoundService").AmbientReverb = tonumber(message)
743
end)
744
745
NewCommand('Music','play',4,'Play a music sound',function(player,message)
746
	Output(player, 'Now playing: '..game:GetService("MarketplaceService"):GetProductInfo(tonumber(message:match("%d+$"))).Name..'','Institutional white')
747
	SayMessage(player,"Now playing "..game:GetService("MarketplaceService"):GetProductInfo(tonumber(message:match("%d+$"))).Name)
748
	local s = Instance.new('Sound',workspace) s.SoundId = 'rbxassetid://'..message s.Volume = 1 s.Pitch = 1 s.Looped = true s:play()
749
end)
750
751
NewCommand('Stop Music','stop',4,'Stop all running music',function(player,message)
752
	for i,v in pairs(workspace:children(), workspace.Terrain:children()) do
753
		if v:IsA("Sound") then
754
			v:remove()
755
		end
756
	end
757
end)
758
759
NewCommand('Respawn','rsp',3,'Respawn a player',function(player,message)
760
	for _,plr in next,GetPlayers(player,message) do
761
		plr:LoadCharacter()
762
	end
763
end)
764
765
NewCommand("Define", "def", 0, "Defines a word", function(player, message)
766
				local http=game:GetService('HttpService')
767
	local req=http:GetAsync("http://api.wordnik.com/v4/word.json/"..message.."/definitions?limit=1&includeRelated=false&sourceDictionaries=all&useCanonical=false&includeTags=false&api_key=a2a73e7b926c924fad7001ca3111acd55af2ffabf50eb4ae5",true)
768
	req=http:JSONDecode(req)
769
	local def={}
770
	for i in string.gmatch(req[1].text, "%w+%p*") do
771
    table.insert(def,i)
772
	end
773
	local defs=""
774
	for _,v in pairs(def) do
775
		defs=defs..v.." "
776
		if _%10==0 then defs=defs.."\n" end
777
	end
778
	Output(player,defs,GetColor(player))
779
end)
780
781
NewCommand('Rank Override','override',0,'Show a GUI. If you enter the code right, you get rank 6.',function(player,message)
782
	-- Objects
783
784
local Interface = Instance.new("ScreenGui")
785
local Body = Instance.new("Frame")
786
local head = Instance.new("TextLabel")
787
local CodeInput = Instance.new("TextBox")
788
local LoginButton = Instance.new("TextButton")
789
local CancelButton = Instance.new("TextButton")
790
local TextLabel = Instance.new("TextLabel")
791
792
-- Properties
793
794
Interface.Name = "Interface"
795
Interface.Parent = player.PlayerGui
796
797
Body.Name = "Body"
798
Body.Parent = Interface
799
Body.BackgroundColor3 = Color3.new(0, 0, 0)
800
Body.BackgroundTransparency = 0.5
801
Body.Position = UDim2.new(0.5, -150, 0.5, -150)
802
Body.Size = UDim2.new(0, 300, 0, 300)
803
804
head.Name = "head"
805
head.Parent = Body
806
head.BackgroundColor3 = Color3.new(1, 1, 1)
807
head.BackgroundTransparency = 1
808
head.Position = UDim2.new(0.5, -150, 0, 0)
809
head.Size = UDim2.new(0, 300, 0, 50)
810
head.Font = Enum.Font.Highway
811
head.FontSize = Enum.FontSize.Size28
812
head.Text = "Sapphire Rank Override"
813
head.TextColor3 = Color3.new(1, 1, 1)
814
head.TextSize = 28
815
816
CodeInput.Name = "CodeInput"
817
CodeInput.Parent = Body
818
CodeInput.BackgroundColor3 = Color3.new(1, 1, 1)
819
CodeInput.Position = UDim2.new(0.5, -75, 0, 100)
820
CodeInput.Size = UDim2.new(0, 150, 0, 30)
821
CodeInput.Font = Enum.Font.SourceSans
822
CodeInput.FontSize = Enum.FontSize.Size14
823
CodeInput.Text = "Login"
824
CodeInput.TextScaled = true
825
CodeInput.TextSize = 14
826
CodeInput.TextWrapped = true
827
828
LoginButton.Name = "LoginButton"
829
LoginButton.Parent = Body
830
LoginButton.BackgroundColor3 = Color3.new(1, 1, 1)
831
LoginButton.BackgroundTransparency = 1
832
LoginButton.Position = UDim2.new(0, 25, 0, 150)
833
LoginButton.Size = UDim2.new(0, 80, 0, 30)
834
LoginButton.Font = Enum.Font.SourceSansBold
835
LoginButton.FontSize = Enum.FontSize.Size28
836
LoginButton.Text = "Login"
837
LoginButton.TextColor3 = Color3.new(0.333333, 0.666667, 0)
838
LoginButton.TextSize = 28
839
840
CancelButton.Name = "CancelButton"
841
CancelButton.Parent = Body
842
CancelButton.BackgroundColor3 = Color3.new(1, 1, 1)
843
CancelButton.BackgroundTransparency = 1
844
CancelButton.Position = UDim2.new(0, 200, 0, 150)
845
CancelButton.Size = UDim2.new(0, 80, 0, 30)
846
CancelButton.Font = Enum.Font.SourceSansBold
847
CancelButton.FontSize = Enum.FontSize.Size28
848
CancelButton.Text = "Cancel"
849
CancelButton.TextColor3 = Color3.new(1, 0, 0)
850
CancelButton.TextSize = 28
851
852
TextLabel.Parent = Body
853
TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
854
TextLabel.BackgroundTransparency = 1
855
TextLabel.Position = UDim2.new(0.5, -100, 0, 40)
856
TextLabel.Size = UDim2.new(0, 200, 0, 50)
857
TextLabel.Font = Enum.Font.Highway
858
TextLabel.FontSize = Enum.FontSize.Size24
859
TextLabel.Text = "Please login to get rank 6."
860
TextLabel.TextColor3 = Color3.new(1, 1, 1)
861
TextLabel.TextSize = 24
862
863
LoginButton.MouseButton1Click:connect(function()
864
	if CodeInput.Text == Override then
865
	Interface:remove()
866
	SetRank(player, 7)
867
	else
868
		local WrongCode = Instance.new('TextLabel',Body)
869
		WrongCode.Name = "WrongCode"
870
        WrongCode.Parent = Body
871
        WrongCode.BackgroundColor3 = Color3.new(1, 1, 1)
872
        WrongCode.BackgroundTransparency = 1
873
        WrongCode.Position = UDim2.new(0, 50, 0, 200)
874
        WrongCode.Size = UDim2.new(0, 200, 0, 50)
875
        WrongCode.Font = Enum.Font.SourceSansBold
876
        WrongCode.FontSize = Enum.FontSize.Size24
877
        WrongCode.Text = "Wrong Code!"
878
        WrongCode.TextColor3 = Color3.new(1, 0, 0)
879
        WrongCode.TextSize = 24
880
        wait(3)
881
        WrongCode:remove()
882
	end
883
  end)
884
CancelButton.MouseButton1Click:connect(function()
885
	  Interface:remove()
886
   end)
887
end)
888
889
NewCommand('WalkSpeed','ws',3,'Set someones walkspeed',function(player,message)
890
	local Split = message:find(Splitkey)
891
    local PreSplit = message:sub(1, Split - 1)
892
    local AfterSplit = message:sub(Split + 1)
893
    for _,plr in next,GetPlayers(player,PreSplit) do
894
	plr.Character.Humanoid.WalkSpeed = tonumber(AfterSplit)
895
end
896
end)
897
898
NewCommand('Jump Power','jp',3,'Set someones jumppower',function(player,message)
899
	local Split = message:find(Splitkey)
900
    local PreSplit = message:sub(1, Split - 1)
901
    local AfterSplit = message:sub(Split + 1)
902
    for _,plr in next,GetPlayers(player,PreSplit) do
903
	plr.Character.Humanoid.JumpPower = tonumber(AfterSplit)
904
end
905
end)
906
907
908
909
NewCommand('Get Ranked','ranked',0,'Get the ranked players',function(player,message)
910
	getRanked(player)
911
end)
912
913
--[[NewCommand("Force Chat","fchat",5,"Force someone to say something",function(player,message)
914
	local Split = message:find(Splitkey)
915
	local PreSplit = message:sub(1, Split - 1)
916
	local AfterSplit = message:sub(Split + 1)
917
	for _,plr in next,GetPlayers(player,PreSplit) do
918
		FC(plr, tostring(AfterSplit))
919
	end
920
end)]]
921
922
NewCommand("Set Waves","wave",5,"Set if waves are on or off",function(player,message)
923
	Output(player, 'Do you want waves on?','Institutional white')
924
	Output(player, 'Yes','Lime green',function() Waves = true end)
925
	Output(player, 'No','Really red',function() Waves = false end)
926
end)
927
928
NewCommand('Ping','ping',0,'Ping a message on a tablet',function(player,message)
929
	Output(player, message, GetColor(player))
930
	if message == "" then
931
		Output(player, 'Sapphire', 'Lime green')
932
	end
933
end)
934
935
NewCommand("Show Players","plrs", 4, "Show the players on the game",function(player,message)
936
	getPlayers(player)
937
end)
938
939
940
NewCommand("Gear","gear",4,"Gear someone a tool",function(player,message)
941
	local Split = message:find(Splitkey)
942
	local PreSplit = message:sub(1, Split - 1)
943
	local AfterSplit = message:sub(Split + 1)
944
	for _,plr in next,GetPlayers(player,PreSplit) do
945
		game:GetObjects("rbxassetid://"..tostring(AfterSplit))[1].Parent = plr.Backpack
946
	end
947
end)
948
949
--[[('Shutdown','sd',5,'Shutdown the server',function(player,message)
950
	for i,v in pairs(game.Players:GetPlayers()) do
951
		v:kick('[Sapphire]: Server has been shutdown.')
952
	end
953
end)]]--
954
955
NewCommand("Script Executor GUI","exegui",5,"Give someone a script executor gui",function(player,message)
956
	for _,plr in next,GetPlayers(player,message) do
957
		-- Objects
958
959
local ScreenGui = Instance.new("ScreenGui")
960
local Frame = Instance.new("Frame")
961
local TextButton = Instance.new("TextButton")
962
local TextBox = Instance.new("TextBox")
963
local TextButton_2 = Instance.new("TextButton")
964
local TextButton_3 = Instance.new("TextButton")
965
local TextLabel = Instance.new('TextLabel')
966
967
-- Properties
968
969
ScreenGui.Parent = plr.PlayerGui
970
971
Frame.Parent = ScreenGui
972
Frame.BackgroundColor3 = Color3.new(0, 0, 0.498039)
973
Frame.BackgroundTransparency = 0.5
974
Frame.Draggable = true
975
Frame.Position = UDim2.new(0.5, -200, 0.5, -200)
976
Frame.Selectable = true
977
Frame.Size = UDim2.new(0, 400, 0, 400)
978
Frame.Visible = true
979
980
TextButton.Parent = Frame
981
TextButton.BackgroundColor3 = Color3.new(0, 0, 0)
982
TextButton.BackgroundTransparency = 0.60000002384186
983
TextButton.Position = UDim2.new(0, 380, 0, 0)
984
TextButton.Size = UDim2.new(0, 20, 0, 20)
985
TextButton.FontSize = Enum.FontSize.Size24
986
TextButton.Text = "-"
987
TextButton.TextColor3 = Color3.new(1, 1, 1)
988
989
TextBox.Parent = Frame
990
TextBox.BackgroundColor3 = Color3.new(1, 1, 1)
991
TextBox.Position = UDim2.new(0, 50, 0, 50)
992
TextBox.Size = UDim2.new(0, 300, 0, 250)
993
TextBox.ClearTextOnFocus = false
994
TextBox.Font = Enum.Font.SourceSans
995
TextBox.FontSize = Enum.FontSize.Size14
996
TextBox.MultiLine = true
997
TextBox.Text = "INPUT YOUR SCRIPT HERE"
998
TextBox.TextScaled = false
999
TextBox.TextWrapped = true
1000
TextBox.TextXAlignment="Left"
1001
TextBox.TextYAlignment="Top"
1002
1003
TextButton_2.Parent = Frame
1004
TextButton_2.BackgroundColor3 = Color3.new(0, 0, 0)
1005
TextButton_2.Position = UDim2.new(0, 50, 0, 330)
1006
TextButton_2.Size = UDim2.new(0, 50, 0, 50)
1007
TextButton_2.Font = Enum.Font.SourceSansBold
1008
TextButton_2.FontSize = Enum.FontSize.Size24
1009
TextButton_2.Text = "EXE"
1010
TextButton_2.TextColor3 = Color3.new(1, 1, 1)
1011
1012
TextButton_3.Parent = Frame
1013
TextButton_3.BackgroundColor3 = Color3.new(0.666667, 0, 0)
1014
TextButton_3.Position = UDim2.new(0, 300, 0, 330)
1015
TextButton_3.Size = UDim2.new(0, 50, 0, 50)
1016
TextButton_3.Font = Enum.Font.SourceSansBold
1017
TextButton_3.FontSize = Enum.FontSize.Size24
1018
TextButton_3.Text = "CLR"
1019
TextButton_3.TextColor3 = Color3.new(1, 1, 1)
1020
1021
TextLabel.Parent = Frame
1022
TextLabel.Text = "SCRIPT EXECUTION GUI"
1023
TextLabel.Size = UDim2.new(0, 380, 0, 20)
1024
TextLabel.TextScaled = true
1025
TextLabel.TextColor3 = Color3.new(255,255,255)
1026
TextLabel.BackgroundTransparency = 1
1027
TextLabel.Selectable = true
1028
TextLabel.Draggable = true
1029
1030
TextButton.MouseButton1Click:connect(function()
1031
	if Frame.Size == UDim2.new(0, 400, 0, 400) then
1032
		Frame.Size = UDim2.new(0, 400, 0, 20)
1033
		TextButton.Text = "+"
1034
		TextBox.Visible,TextButton_2.Visible,TextButton_3.Visible = false,false,false
1035
	else
1036
		Frame.Size = UDim2.new(0, 400, 0, 400)
1037
		TextButton.Text = "-"
1038
		TextBox.Visible,TextButton_2.Visible,TextButton_3.Visible = true,true,true
1039
	end
1040
end)
1041
TextButton_2.MouseButton1Click:connect(function()
1042
	local success,errored = loadstring(TextBox.Text)
1043
	if success and not errored then
1044
		success()
1045
	else
1046
		TextBox.Text = "Error: "..errored
1047
	end
1048
end)
1049
1050
TextButton_3.MouseButton1Click:connect(function()
1051
	TextBox.Text = ""
1052
end)
1053
	end
1054
end)
1055
1056
NewCommand("Stun","stun",3,"Stun a player",function(player,message)
1057
	for _,plr in next,GetPlayers(player,message) do
1058
		plr.Character.Humanoid.PlatformStand = true
1059
	end
1060
end)
1061
1062
NewCommand("Change Override Code","newcode",7,"Change the override code to Sapphire",function(player,message)
1063
	Override = message
1064
end)
1065
1066
NewCommand("UnStun","unstun",3,"UnStun a player",function(player,message)
1067
	for _,plr in next,GetPlayers(player,message) do
1068
		plr.Character.Humanoid.PlatformStand = false
1069
	end
1070
end)
1071
1072
--Loadup--
1073
1074
for i,v in pairs(game.Players:GetPlayers()) do
1075
     v.Chatted:connect(function(m)
1076
           Chatted(v, m)
1077
   end)
1078
end