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