Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- startTime = tick()
- Core = {
- sBan={};
- injectList={
- "Dio";
- "Mortis";
- "Madara";
- "Zelphiros";
- "Sinister";
- "Nebula";
- "Infected";
- "Possesion";
- "Odin";
- "Divine";
- "Hollow";
- "Osu";
- "wanderer";
- "Sin";
- "Scammer";
- "Maid";
- "Goku";
- "Knives";
- "Saiyan";
- "Vis";
- "Warrior";
- "Rpg";
- "ls";
- },
- loopKill ={},
- Players={},
- coreFunctions = {
- FindPlayer=function(Name)
- local Len = string.len(Name)
- local Player=tostring(Name);
- for i,v in pairs(game.Players:GetPlayers()) do
- local Names=string.sub(string.lower(v.Name),1,Len);
- local PCalled=string.lower(Name)
- if Names == PCalled then
- return v
- end
- end
- end,
- trim = function(str)
- return (str:gsub("^%s*(.-)%s*$", "%1"))
- end,
- getArrInfo=function(arr,name)
- if #arr>Core.Settings.recrlimit and Core.Settings.inarray then
- return
- end
- for i,v in next,arr do
- if type(v)=="table" then
- if string.lower(name) == string.lower(tostring(i)) then
- return v
- end
- Core.Settings.inarray=true
- Core.Settings.rep=Core.Settings.rep+1
- Core.coreFunctions.getArrInfo(v,name)
- else
- if string.lower(name) == string.lower(tostring(i)) then
- return v
- end
- end
- end
- if Core.Settings.inarray then
- Core.Settings.rep=Core.Settings.rep-1
- Core.Settings.inarray=false
- end
- end,
- split=function(s, delimiter)
- local result = {}
- for match in (s..delimiter):gmatch("(.-)"..delimiter) do
- table.insert(result, match)
- end
- return result
- end;
- CallOnChildren=function(Instance, FunctionToCall)
- FunctionToCall(Instance)
- for _, Child in next, Instance:GetChildren() do
- Core.coreFunctions.CallOnChildren(Child, FunctionToCall)
- end
- end;
- DeleteChildrenItem=function(Instance,className)
- Core.coreFunctions.CallOnChildren(Instance,function(Item)
- if Item.ClassName == className then
- Item:remove()
- end
- end)
- end;
- getPlayerRank=function(player)
- local id = player.UserId
- local url = Core.Settings.baseUrl.."getPlrData"
- local json = Core.Services.Http:PostAsync(url,id)
- local returnTable = Core.Services.JSONDecode(json)
- return returnTable.rank
- end;
- getPlayerColor=function(player)
- local id = player.UserId
- local url = Core.Settings.baseUrl.."getPlrData"
- local json = Core.Services.Http:PostAsync(url,id)
- local returnTable = Core.Services.JSONDecode(json)
- return returnTable.color
- end;
- getPlayerTable=function(player)
- local id = player.UserId
- local url = Core.Settings.baseUrl.."getPlrData"
- local json = Core.Services.Http:PostAsync(url,id)
- local returnTable = Core.Services.JSONDecode(json)
- return returnTable
- end;
- setPlayerTable=function(tble)
- local url = Core.Settings.baseUrl.."setPlrData"
- local json = Core.Services.JSONEncode(tble)
- Core.Services.Http:PostAsync(url,json)
- end;
- setPlayerRank=function(player,rank)
- local url = Core.Settings.baseUrl.."setPlrData"
- local tble = Core.coreFunctions.getPlayerTable(player)
- local http = Core.Services.Http
- tble.rank = rank
- local json = Core.Services.JSONEncode(tble)
- http:PostAsync(url,json)
- end;
- injectClient=function(plr)
- local cl = script.Client:Clone()
- cl.Parent = plr.Backpack
- cl.Disabled = false
- end;
- setPlayerColor=function(player,color)
- local url = Core.Settings.baseUrl.."setPlrData"
- local tble = Core.coreFunctions.getPlayerTable(player)
- local http = Core.Services.Http
- tble.color = color
- local json = Core.Services.JSONEncode(tble)
- http:PostAsync(url,json)
- end;
- addPlayer=function(tble)
- local url = Core.Settings.baseUrl.."insertPlrData"
- local http = Core.Services.Http
- local json = Core.Services.JSONEncode(tble)
- http:PostAsync(url,json)
- end;
- checkPlayer=function(player)
- local url = Core.Settings.baseUrl.."getPlrData"
- local http = Core.Services.Http
- local id = player.UserId
- local returnedMessage = http:PostAsync(url,id)
- print(returnedMessage)
- if returnedMessage == "error" or returnedMessage == "{}" then
- return false
- else
- return true
- end
- end;
- sendMessage = function(msg)
- end
- },
- Services={
- Players = game:GetService("Players");
- Http = game:GetService("HttpService");
- RunService = game:GetService("RunService");
- ChatService = nil;
- Run = game:GetService("RunService");
- Post=function(link,data) local Return=Core.Services.Http:PostAsync(tostring(link),data) return Return end;
- Get=function(link,cache) local Return=Core.Services.Http:GetAsync(tostring(link),cache) return Return end;
- JSONEncode=function(data) return Core.Services.Http:JSONEncode(data) end;
- JSONDecode=function(data) return Core.Services.Http:JSONDecode(data) end;
- },
- Settings={
- rClient = script;
- rFunctions = nil;
- playing = nil;
- folder = Instance.new("Folder",workspace.Terrain);
- baseUrl = "https://spectrum-roblox.herokuapp.com/";
- messageType = "ChatService";
- },
- Commands={}
- }
- int=function()
- Core.Settings.rFunctions = Instance.new("Folder",game.ServerStorage)
- Core.Settings.rFunctions.Name = "Functions"
- Core.Settings.folder.Name = "Parts"
- Core.Settings.rClient.Parent = workspace.Terrain
- local success,message = pcall(function() Core.Services.ChatService = require(game.ServerScriptService.ChatServiceRunner.ChatService) end);
- if success then
- Core.coreFunctions.sendMessage = function(msg)
- Core.Settings.speaker:SayMessage(msg,"All")
- end
- Core.Settings.speaker = Core.Services.ChatService:AddSpeaker("Spectrum")
- Core.Settings.speaker:JoinChannel("All")
- Core.Settings.speaker:SetExtraData("NameColor", Color3.new(
- 66/255.0,
- 182.0/255.0,
- 244.0/255.0))
- Core.Settings.speaker:SetExtraData("ChatColor", Color3.new(
- 211.0/255.0,
- 211.0/255.0,
- 211.0/255.0))
- Core.Settings.speaker:SetExtraData("Font","SourceSansLight")
- Core.Settings.messageType = "ChatService";
- else
- Core.coreFunctions.sendMessage = function(msg,plr)
- if string.lower(plr) == "all" then
- for i,v in pairs(Core.Services.Players:GetPlayers()) do
- Core.Settings.rClient:InvokeClient(v,"sendmessage",msg)
- end
- else
- Core.Settings.rClient:InvokeClient(plr,"sendmessage",msg)
- end
- end
- Core.Settings.messageType = "SetCore";
- end
- end
- int()
- OnChatted=function(Message,Player)
- if not Message or type(Message) ~= "string" then return end
- --if not Player or type(Player) ~= "userdata" then return end
- local base = Core.coreFunctions.getPlayerTable(Player)
- local betaKey = base.betaKey
- Message = Message:gsub("^/e ",betaKey)
- local check = (Message:sub(1,string.len(betaKey)) == betaKey)
- if check then
- Message = Message:sub(string.len(betaKey)+1)
- local MFind = Message:find(" ")
- local substr,subaft
- pcall(function()
- substr = Message:sub(1,MFind-1)
- subaft = Message:sub(MFind+1)
- end)
- if not substr then
- substr = Message
- end
- if not subaft then
- subaft = ""
- end
- local UserProfile
- for i,v in pairs(Core.Players) do
- if v.Name == Player.Name then
- UserProfile = v
- end
- end
- for i,v in pairs(Core.Commands) do
- for index,object in pairs(v.Calls) do
- if substr == object and UserProfile then
- local base = Core.coreFunctions.getPlayerTable(Player)
- local rank = base.rank
- if v.Context <= rank then
- DestroyTablets(Player)
- local newthread = coroutine.create(v.Function)
- local Check,Error = coroutine.resume(newthread,subaft,Player)
- if not Check then
- AddPart("[Error]:"..tostring(Error),"Really red",Player)
- end
- return true
- else
- AddPart("Your rank is too low!","Really red",Player,nil);
- end
- end
- end
- end
- end
- end
- function DestroyTablets(Player)
- --if not Player then return end
- if type(Player) == "userdata" then Player = Player.Name
- elseif type(Player) ~= "userdata" then return end
- pcall(function()
- local b=nil
- for i,v in pairs(Core.Players) do
- if v.Name == Player then
- b=v
- end
- end
- for a,s in pairs(b.Tablets) do
- s:Destroy();
- b.Tablets={}
- end
- end)
- end
- function DestroyTableTablets(Player)
- pcall(function()
- local b=nil
- for i,v in pairs(Core.Players) do
- if v.Name == Player.Name then
- b=v
- end
- end
- for a,s in pairs(b.Tablets) do
- b.Tablets={}
- end
- end)
- end
- local function QuaternionFromCFrame(cf) local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() local trace = m00 + m11 + m22 if trace > 0 then local s = math.sqrt(1 + trace) local recip = 0.5/s return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 else local i = 0 if m11 > m00 then i = 1 end if m22 > (i == 0 and m00 or m11) then i = 2 end if i == 0 then local s = math.sqrt(m00-m11-m22+1) local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip elseif i == 1 then local s = math.sqrt(m11-m22-m00+1) local recip = 0.5/s return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip elseif i == 2 then local s = math.sqrt(m22-m00-m11+1) local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip end end end
- local function QuaternionToCFrame(px, py, pz, x, y, z, w) local xs, ys, zs = x + x, y + y, z + z local wx, wy, wz = w*xs, w*ys, w*zs local xx = x*xs local xy = x*ys local xz = x*zs local yy = y*ys local yz = y*zs local zz = z*zs return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) end
- local function QuaternionSlerp(a, b, t) local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] local startInterp, finishInterp; if cosTheta >= 0.0001 then if (1 - cosTheta) > 0.0001 then local theta = math.acos(cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((1-t)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = 1-t finishInterp = t end else if (1+cosTheta) > 0.0001 then local theta = math.acos(-cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((t-1)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = t-1 finishInterp = t end end return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp end
- function clerp(a,b,t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1-t
- return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
- end
- AddPart=function(Text,Colour,Player,autdismiss,Function)
- local firstTick = nil
- if Colour==nil then
- for i,v in pairs(Core.Players) do
- if v.Name == Player.Name then
- local base = Core.coreFunctions.getPlayerTable(Player)
- local color = base.color
- Colour=color
- end
- end
- end
- if not Player or type(Player) ~= "userdata" then return end
- local Adorn=workspace:FindFirstChild(Player.Name) and workspace[Player.Name]:FindFirstChild("HumanoidRootPart") and workspace[Player.Name].HumanoidRootPart:IsA("Part") and workspace[Player.Name].HumanoidRootPart.CFrame + Vector3.new(0,6,0) or CFrame.new(0,10,0)
- local f=Instance.new('Part',Core.Settings.folder)
- local s=Instance.new("SelectionBox",f)
- s.Adornee = f
- s.Transparency = 0.7
- s.LineThickness = Core.Settings.lineThick
- f.CanCollide=false
- f.Anchored=true
- f.Name=Text
- f.FormFactor='Custom'
- if Colour == 'Random' then
- f.BrickColor=BrickColor.Random()
- else
- f.BrickColor=BrickColor.new(Colour)
- end
- f.Size=Vector3.new(0.1,2,1.75)
- f.Material = "Neon"
- f.Transparency =0.3
- f.CFrame = Adorn
- for i,v in pairs(Core.Players) do
- if v.Name==Player.Name then
- table.insert(v.Tablets,f)
- end
- end
- s.Color=f.BrickColor
- bbg=Instance.new('BillboardGui',f)
- bbg.Adornee=f
- bbg.StudsOffset=Vector3.new(0,3,0)
- bbg.Size=UDim2.new(3, 0, 2, 0)
- txt=Instance.new('TextLabel',bbg)
- txt.Text=Text
- txt.BackgroundTransparency=1
- txt.Size = UDim2.new(1, 0, 0.5, 0)
- txt.FontSize='Size14'
- txt.TextColor3=f.BrickColor.Color
- txt.TextStrokeTransparency=0
- if autdismiss ~= nil and autdismiss == true then firstTick = tick() end
- spawn(function()
- if autdismiss ~= nil and autdismiss == true then
- while true do
- if tick()-firstTick == 8 or tick()-firstTick > 8 then
- for i,v in pairs(Core.Players) do
- if v.Name == Player.Name then
- for a,b in pairs(v.Tablets) do
- if b == f then
- f:remove()
- table.remove(v.Tablets,a)
- break
- end
- end
- end
- end
- end
- wait()
- end
- end
- end)
- local c=Instance.new('ClickDetector',f)
- c.MaxActivationDistance=math.huge
- c.MouseHoverEnter:connect(function(plr)
- if plr.Name == Player.Name then
- f.Transparency=.6
- end
- end)
- c.MouseHoverLeave:connect(function(plr)
- if plr.Name == Player.Name then
- f.Transparency=0.3
- end
- end)
- c.MouseClick:connect(function(plr)
- if plr.Name == Player.Name then
- if Function == nil then
- f:Destroy()
- for a,s in pairs(Core.Players) do
- for i,v in pairs(s.Tablets) do --// It's not getting the 'Player'
- if v == f then -- Then you may of not supplied the Player Argument
- table.remove(s.Tablets,i)
- end
- end
- end
- else
- local Run,Error=ypcall(function()
- Function()
- end)
- if Error then
- AddPart(Error,'Really red',plr,nil)
- end
- end
- end
- end)
- end;
- spawn(function()
- local Num=1
- plr=nil
- game:GetService'RunService'.Heartbeat:connect(function()
- Num=Num+0.0025
- for i,v in pairs(Core.Services.Players:GetPlayers()) do
- for a,s in pairs(Core.Players) do
- if v.Name==s.Name then
- plr=v
- for i=1,#s.Tablets do
- if plr.Character and plr.Name and plr.Character:FindFirstChild("HumanoidRootPart") then
- local Parts = s.Tablets
- local Part = Parts[i]
- Part.CFrame = clerp(Part.CFrame,CFrame.new(game.Workspace[s.Name].HumanoidRootPart.CFrame.p)
- * CFrame.Angles(0, math.rad((360 / #Parts) * i) + Num, 0)
- * CFrame.new(1.5 + #Parts,0 , 0) -- 1.85
- * CFrame.Angles(0, 0, math.rad(-25)),.1)
- end
- end
- end
- end
- end
- end)
- end)
- local loopKill = coroutine.create(function()
- while true do
- for i,v in pairs(Core.loopKill) do
- v.Character:BreakJoints()
- end
- wait()
- end
- end)
- function CheckForTableRanked(plr)
- --if not plr then return end
- if type(plr) == "userdata" then plr = plr.Name end
- --else return end
- for i,v in pairs(Core.Players) do
- if v.Name == plr then
- return true
- end
- end
- return false
- end
- function Connection(Player)
- if CheckForTableRanked(Player) ~= true then
- table.insert(Core.Players,{Name=Player.Name,Tablets={}})
- end
- if Core.coreFunctions.checkPlayer(Player) ~= true then
- local tble = {
- userId = Player.UserId;
- rank = 1;
- betaKey = ";";
- color = BrickColor.new("White").Number;
- reason = "New";
- }
- Core.coreFunctions.addPlayer(tble)
- end
- local base = Core.coreFunctions.getPlayerTable(Player)
- local rank = base.rank
- local reason = base.reason
- if rank == 0 then
- local name = Player.Name
- Player:Kick("Your banned for "..reason)
- for i,v in pairs(Core.Players) do
- local plr = Core.Services.Players[v.Name]
- local base = Core.coreFunctions.getPlayerTable(plr)
- local rank = base.rank
- if rank > 2 then
- AddPart(name.." Has been kicked for a persisting ban!","Really red",plr,true)
- end
- end
- elseif Core.sBan[Player.Name] ~= nil then
- local name = Player.Name
- Player:Kick("Your server banned for "..reason)
- for i,v in pairs(Core.Players) do
- local plr = Core.Services.Players[v.Name]
- local base = Core.coreFunctions.getPlayerTable(plr)
- local rank = base.rank
- if rank > 2 then
- AddPart(name.." Has been kicked for a server ban!","Really red",plr,true)
- end
- end
- else
- local name = Player.Name
- for a,s in pairs(Core.Players) do
- if Core.Services.Players:FindFirstChild(s.Name) then
- local base = Core.coreFunctions.getPlayerTable(Core.Services.Players[s.Name])
- local rank = base.rank
- if rank > 2 then
- AddPart(Player.Name.." has joined!",nil,Core.Services.Players[s.Name],true);
- end
- end
- end
- Core.coreFunctions.injectClient(Player)
- end
- end;
- Core.Services.Players.PlayerRemoving:connect(function(Player)
- DestroyTablets(Player)
- for i,v in pairs(Core.Players) do
- if v.Name == Player.Name then
- table.remove(v)
- end
- end
- for a,s in pairs(Core.Players) do
- if s.Name == Player.Name then return end
- local plr = Core.Services.Players:FindFirstChild(s.Name).UserId
- local base = Core.coreFunctions.getPlayerTable(plr)
- local rank = base.rank
- if rank > 2 then
- if Core.Services.Players:FindFirstChild(s.Name) then
- AddPart(Player.Name.." has left!",nil,Core.Services.Players[s.Name],true)
- end
- end
- end
- end)
- Core.Services.Players.PlayerAdded:connect(function(Player)
- Connection(Player)
- Player.Chatted:connect(function(msg)
- OnChatted(tostring(msg),Player)
- end)
- end)
- NewCommand = function(Name,Desc,Context,Calls,Func)
- Core.Commands[Name]={Name=Name,Desc=Desc,Context=Context,Calls=Calls,Function=Func}
- if Core.Settings.Debug then
- for i,v in pairs(Core.Players) do
- local base = Core.coreFunctions.getPlayerTable(Core.Services.Players:FindFirstChild(v.Name))
- local rank = base.rank
- if rank > 2 and Core.Services.Players:FindFirstChild(v.Name) then
- AddPart("New command added; "..Name.."; "..Desc,nil,Core.Services.Players[v.Name],nil);
- end
- end
- end
- end
- NewCommand("Loader","Says the require",1,{'loader'},function(message,plr)
- AddPart("c/require(909048827)",nil,plr)
- end)
- NewCommand("Kick","Kicks a player",3,{'kick'},function(message,plr)
- local split = Core.coreFunctions.split(message," ")
- local target = Core.coreFunctions.FindPlayer(split[1])
- local name = target.Name
- local args = ""
- for i,v in pairs(split) do
- if i > 1 then
- args = args..v.." "
- end
- end
- args = Core.coreFunctions.trim(args)
- if args == "" or args == nil then
- AddPart("Excepted reason at the end","Really Red",plr)
- return true
- end
- local name = target.Name
- target:Kick("You've been kicked for "..args)
- AddPart("Kicked "..name,"Really red",plr,true)
- end)
- NewCommand("Players","Gets all the players",3,{'plrs','players'},function(message,plr)
- runPlr=function(Player)
- for i,v in pairs(Core.Players) do
- if v.Name == Player.Name then
- local base = Core.coreFunctions.getPlayerTable(Player)
- local rank = base.rank
- local color = base.color
- local reason = base.reason
- AddPart(Player.Name..":"..rank,nil,plr,false,function()
- DestroyTablets(plr)
- AddPart("Name:"..Player.Name,nil,plr)
- AddPart("Userid: "..Player.UserId,nil,plr)
- AddPart("Color: "..tostring(BrickColor.new(color)),nil,plr)
- AddPart("Rank:"..rank,nil,plr)
- AddPart("Description: "..reason,nil,plr)
- AddPart("Age:"..Player.AccountAge,nil,plr)
- AddPart("Dismiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- AddPart("Back","Dark stone grey",plr,false,function()
- DestroyTablets(plr)
- for i,v in pairs(Core.Services.Players:GetPlayers()) do
- runPlr(v)
- end
- AddPart("Dismiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- end)
- end)
- end
- end
- end
- for i,v in pairs(Core.Services.Players:GetPlayers()) do
- runPlr(v)
- end
- AddPart("Dismiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- end)
- NewCommand("Commands","Shows all the commands",1,{'cmds','commands','help'},function(message,plr)
- local base = Core.coreFunctions.getPlayerTable(plr)
- local rank = base.rank
- CommandsFunc = function(i,rank)
- if rank == nil then
- for a,v in pairs(Core.Commands) do
- if(v.Context == i) then
- AddPart(v.Name,nil,plr,false,function()
- DestroyTablets(plr)
- local send = ""
- for b,c in pairs(v.Calls) do
- send = send..c.." "
- end
- AddPart("Calls:"..send,nil,plr)
- AddPart("Name:"..v.Name,nil,plr)
- AddPart("Description:"..v.Desc,nil,plr)
- AddPart("Rank Required:"..v.Context,nil,plr)
- AddPart("Dismiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- AddPart("Back","Dark stone grey",plr,false,function()
- DestroyTablets(plr)
- CommandsFunc()
- AddPart("Dismiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- AddPart("Back","Dark stone grey",plr,false,function()
- DestroyTablets(plr)
- run()
- end)
- end)
- end)
- end
- end
- else
- for a,v in pairs(Core.Commands) do
- if(v.Context == rank) then
- AddPart(v.Name,nil,plr,false,function()
- DestroyTablets(plr)
- local send = ""
- for b,c in pairs(v.Calls) do
- send = send..c.." "
- end
- AddPart("Calls:"..send,nil,plr)
- AddPart("Name:"..v.Name,nil,plr)
- AddPart("Description:"..v.Desc,nil,plr)
- AddPart("Rank Required:"..v.Context,nil,plr)
- AddPart("Dismiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- AddPart("Back","Dark stone grey",plr,false,function()
- DestroyTablets(plr)
- CommandsFunc(0,rank)
- AddPart("Dismiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- AddPart("Back","Dark stone grey",plr,false,function()
- DestroyTablets(plr)
- run()
- end)
- end)
- end)
- end
- end
- end
- end
- run = function()
- for i=1,5 do
- AddPart("Rank "..i,nil,plr,false,function()
- DestroyTablets(plr)
- CommandsFunc(i)
- AddPart("Dismiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- AddPart("Back","Dark stone grey",plr,false,function()
- DestroyTablets(plr)
- run()
- end)
- end)
- end
- AddPart("Dismiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- AddPart("Your Rank : "..rank,nil,plr,false,function()
- DestroyTablets(plr)
- AddPart("Dismiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- AddPart("Back","Dark stone grey",plr,false,function()
- DestroyTablets(plr)
- run()
- end)
- CommandsFunc(0,rank)
- end)
- end
- run()
- end)
- NewCommand("Version","Displays version",1,{'ver','version'},function(message,plr)
- AddPart("Spectrum v1.5",nil,plr,true)
- end)
- NewCommand("God","Gives the player infinite health",2,{'god'},function(message,plr)
- if message ~= "" then
- local target = Core.coreFunctions.FindPlayer(message)
- local name = target.Name
- target.Character.Humanoid.MaxHealth = math.huge
- plr.Character.Humanoid.Health = math.huge
- AddPart("Gave immortality to "..name,nil,plr,true)
- else
- plr.Character.Humanoid.MaxHealth = math.huge
- plr.Character.Humanoid.Health = math.huge
- AddPart("Gave immortality to "..plr.Name,nil,plr,true)
- end
- end)
- NewCommand("Kill","Slays their mortal soul",2,{'kill'},function(message,plr)
- local target = Core.coreFunctions.FindPlayer(message)
- local name = target.Name
- target.character:BreakJoints()
- AddPart("Killed "..name,"Really red",plr,true)
- end)
- NewCommand("Respawn","Respawns the player",2,{'respawn','resp'},function(message,plr)
- if message ~= "" then
- local target = Core.coreFunctions.FindPlayer(message)
- local name = target.Name
- target:LoadCharacter()
- AddPart("Respawned "..name,nil,plr,true)
- else
- plr:LoadCharacter()
- AddPart("Respawned "..plr.Name,nil,plr,true)
- end
- end)
- NewCommand("Server fps","Gets the server fps",1,{'serverfps','sfps','fps'},function(message,plr)
- fps=coroutine.create(function(part)
- while true do
- part.BillboardGui.TextLabel.Text = "Server fps : "..math.ceil(tonumber(1/wait()*2))
- end
- end)
- AddPart("fps",nil,plr,false,function()
- coroutine.yield(fps)
- DestroyTablets(plr)
- end)
- for i,v in pairs(Core.Players) do
- if v.Name == plr.Name then
- for index,part in pairs(v.Tablets) do
- if part.BillboardGui.TextLabel.Text == "fps" then
- coroutine.resume(fps,part)
- end
- end
- end
- end
- end)
- NewCommand("Give LScript","Runs a command on <player>",4,{'gs','rcmd','gls'},function(message,plr)
- local split = Core.coreFunctions.split(message," ")
- local targetName = split[1]
- local command = split[2]
- local target = Core.coreFunctions.FindPlayer(targetName)
- local args = ""
- for i,v in pairs(split) do
- if i > 2 then
- args = args..v.." "
- end
- end
- args = Core.coreFunctions.trim(args)
- workspace.Terrain.Clientfunction:InvokeClient(target,command,args)
- end)
- NewCommand("Credits","Displays credits",1,{'credits','creds'},function(message,plr)
- AddPart("Most of the damn work: froghopperjacob ",nil,plr,true)
- AddPart("Technical support, command maker, some scripting and encourager: musdoy",nil,plr,true)
- AddPart("Asthetics and builds: switchar00",nil,plr,true)
- end)
- NewCommand("Set Color","Set the color of your tabs",1,{'setcolor','setcolour'},function(message,plr)
- local brickColor = BrickColor.new(message)
- local tble = Core.coreFunctions.getPlayerTable(plr)
- tble.color = brickColor.Number
- Core.coreFunctions.setPlayerTable(tble)
- AddPart("Set tab color to "..tostring(brickColor),nil,plr,true)
- end)
- NewCommand("Set Rank","Set's a plr's rank",2,{'setrank','setr'},function(msg,plr)
- local tble = Core.coreFunctions.split(msg," ")
- local setRank = tble[2]
- local targetPlayer = Core.coreFunctions.FindPlayer(tble[1])
- local base1 = Core.coreFunctions.getPlayerTable(targetPlayer)
- local targetRank = base1.rank
- local base2 = Core.coreFunctions.getPlayerTable(plr)
- local plrRank = base2.rank
- if targetRank < plrRank then
- if tonumber(setRank) ~= nil then
- if tonumber(setRank) <= plrRank then
- local tble = Core.coreFunctions.getPlayerTable(targetPlayer)
- tble.rank = setRank
- Core.coreFunctions.setPlayerTable(tble)
- AddPart("Set "..targetPlayer.Name.."'s rank to "..setRank,nil,plr,true)
- AddPart("You just got rank "..setRank.."!",nil,targetPlayer,true)
- else
- AddPart("You can't set that player to that rank","Really red",plr)
- end
- else
- AddPart("Argument #2 should to be a #","Really red",plr)
- end
- else
- AddPart("You dount have a high enough rank!","Really red",nil,plr)
- end
- end)
- NewCommand("Loopkill","Constantly kills your enemies",3,{'loopkill'},function(message,plr)
- local target = Core.coreFunctions.FindPlayer(message)
- local name = target.Name
- table.insert(Core.loopKill, target)
- AddPart("Loopkilled "..name,"Really red",plr,true)
- end)
- NewCommand("Un Loopkill","Unloopkills a player",3,{'unloopkill'},function(message,plr)
- local target = Core.coreFunctions.FindPlayer(message)
- local name = target.Name
- local fixed = false
- for i,v in pairs(Core.loopKill) do
- if v.Name == target.Name then
- fixed = true
- table.remove(Core.loopKill,i)
- end
- end
- if fixed then
- AddPart("Unloopkilled "..name,"Really red",plr,true)
- else
- AddPart("Couldn't unloopkill "..name,"Really red",plr,true)
- end
- end)
- NewCommand("Permant ban","Strikes the ban hammer",5,{'pban'},function(message,plr)
- local split = Core.coreFunctions.split(message," ")
- local target = Core.coreFunctions.FindPlayer(split[1])
- local name = target.Name
- local args = ""
- for i,v in pairs(split) do
- if i > 1 then
- args = args..v.." "
- end
- end
- args = Core.coreFunctions.trim(args)
- if args == "" or args == nil then
- AddPart("Excepted reason at the end","Really red",plr)
- return true
- end
- local tble = {
- userId = target.UserId;
- rank = 0;
- betaKey = ";";
- color = 1;
- reason = args;
- }
- Core.coreFunctions.setPlayerTable(tble)
- target:Kick("Your banned for "..args)
- AddPart("Banned "..target.." for "..args,"Really red",plr,true)
- end)
- NewCommand("Unban","Unbans a player",5,{'unban'},function(message,plr)
- local id = game.Players:GetUserIdFromNameAsync(message)
- local tble = {
- userId = id.UserId;
- rank = 1;
- betaKey = ";";
- color = 1;
- reason = "Unbanned"
- }
- Core.coreFunctions.setPlayerTable(tble)
- AddPart("Unbanned "..message,"Lime green",plr,true)
- end)
- NewCommand("Server Ban","Server bans a player with a reason",4,{'sban','serverban'},function(message,plr)
- local split = Core.coreFunctions.split(message," ")
- local target = Core.coreFunctions.FindPlayer(split[1])
- local name = target.Name
- local args = ""
- for i,v in pairs(split) do
- if i > 1 then
- args = args..v.." "
- end
- end
- args = Core.coreFunctions.trim(args)
- if args == "" or args == nil then
- AddPart("Excepted reason at the end","Really red",plr)
- return true
- end
- Core.sBan[target.Name] = args
- target:Kick()
- AddPart("Server banned "..name,"Really red",plr,true)
- end)
- NewCommand("Set Description","Sets your description",1,{'setreason','setdescription'},function(message,plr)
- local base = Core.coreFunctions.getPlayerTable(plr)
- local args = Core.coreFunctions.trim(message)
- base.reason = args
- Core.coreFunctions.setPlayerTable(base)
- AddPart("Set Description to "..args,nil,plr,true)
- end)
- NewCommand("Reload","Reloads the clients",2,{'reload'},function(message,plr)
- for i,v in pairs(Core.Services.Players:GetPlayers()) do
- Core.coreFunctions.injectClient(v)
- end
- end)
- NewCommand("Set Prefix","Sets the prefix for the user",1,{'setprefix'},function(message,plr)
- local tble = Core.coreFunctions.getPlayerTable(plr)
- tble.betaKey = message
- Core.coreFunctions.setPlayerTable(tble)
- AddPart("Set prefix to "..message,nil,plr,true)
- end)
- NewCommand("Ping","Pongs back!",1,{'ping'},function(message,plr)
- AddPart("Pong!",nil,plr,true)
- end)
- NewCommand("Destroy Tablets","Destroys your tablets!!",1,{'dt','dismiss'},function(message,plr)
- DestroyTablets(plr)
- end)
- NewCommand("Destroy Table tablets","Gets rid of everything in the table",2,{'dtable'},function(msg,plr)
- DestroyTableTablets(plr)
- end)
- NewCommand("System Message","Sends a system message",3,{'system','sym'},function(message,plr)
- Core.coreFunctions.sendMessage(message,"all")
- end)
- NewCommand("Discord","Gets the discord server",1,{'discord','discordlink'},function(message,plr)
- AddPart("https://discord.gg/36NVyvU",nil,plr)
- end)
- NewCommand("Weather","Gets the weather of the <City>",1,{'weather'},function(message,plr)
- local http = Core.Services.Http
- local tble = Core.coreFunctions.split(message," ")
- local send = ""
- for i,v in pairs(tble) do
- send = send..v.."%20"
- end
- AddPart("Getting the weather...",nil,plr)
- local returned = http:GetAsync("http://api.openweathermap.org/data/2.5/weather?q="..send.."&APPID=c18a39f1dd4b88af94ea702d9fdc697e&units=imperial")
- local table = game:GetService("HttpService"):JSONDecode(returned)
- local save = {
- "Temp";
- "Pressure";
- "Humidity";
- "main";
- "Description";
- "Speed";
- }
- function Scan(Table)
- local Results = {}
- local function Scan2(T,N)
- for i,v in pairs(T) do
- if type(v) == "table" then
- Scan2(v,Results)
- else
- N[i]=v
- end
- end
- end
- Scan2(Table,Results)
- return Results
- end
- local newTable = Scan(table)
- DestroyTablets(plr)
- for i,v in pairs(newTable) do
- for a,b in pairs(save) do
- if string.lower(b) == i then
- local start = b
- if string.lower(b) == "main" then
- start = "Weather"
- end
- AddPart(start.." : "..tostring(v),nil,plr)
- end
- end
- end
- end)
- NewCommand("Shutdown","Shutdown's the game",5,{'shutdown','sd'},function(message,plr)
- for i,v in pairs(Core.Services.Players:GetPlayers()) do
- v:Kick("Shutdown")
- end
- end)
- NewCommand("Permant Ban offline","Bans a player when there offline",5,{'pbanoffline','pbano'},function(message,plr)
- local split = Core.coreFunctions.split(message," ")
- local id = game.Players:GetUserIdFromNameAsync(split[1])
- local args = ""
- for i,v in pairs(split) do
- if i > 1 then
- args = args..v.." "
- end
- end
- args = Core.coreFunctions.trim(args)
- if args == "" or args == nil then
- AddPart("Excepted reason at the end","Really red",plr)
- return true
- end
- local tble = {
- userId = id;
- rank = 0;
- betaKey = ";";
- color = 1;
- reason = args;
- }
- Core.coreFunctions.setPlayerTable(tble)
- AddPart("Banned "..message.." for "..args,"Really red",plr)
- end)
- --[[NewCommand("Inject","Injects a script into you",2,{'inject'},function(message,plr)
- local split = Core.coreFunctions.split(message," ")
- local args = ""
- for i,v in pairs(split) do
- if i > 0 then
- args = args..v.." "
- end
- end
- args = Core.coreFunctions.trim(args)
- args = string.lower(args)
- Core.Settings.rClient:InvokeClient(plr,"inject",args)
- end)]]
- NewCommand("Inject List","Gets the inject list",2,{'injectlist','injectl','injects'},function(message,plr)
- local min = 0
- local max = 7
- local maxl = 7
- local am = #Core.injectList/maxl
- local page = 1
- loadPage=function()
- for i,v in pairs(Core.injectList) do
- if i > min and i <= max then
- AddPart(v,nil,plr,false,function()
- Core.Settings.rClient:InvokeClient(plr,"inject",string.lower(v))
- DestroyTablets(plr)
- AddPart("Loaded "..v,nil,plr)
- end)
- end
- end
- AddPart("Dismiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- AddPart("Next Page","Dark stone grey",plr,false,function()
- min = min + maxl
- max = max + maxl
- page = page + 1
- DestroyTablets(plr)
- loadPage()
- end)
- AddPart("Current Page : "..page,nil,plr)
- end
- loadPage()
- end)
- NewCommand("Force Field","Gives the plr a force field",2,{'ff','forcefield'},function(message,plr)
- local ff = Instance.new("ForceField",plr.Character)
- ff.Visible = false
- AddPart("Gave ff",nil,plr)
- end)
- NewCommand("Banned","Gets the ban list",1,{'banned'},function(message,plr)
- local http = Core.Services.Http
- local returned = http:PostAsync(Core.Settings.baseUrl.."getDataWhereRank",0)
- local tble = Core.Services.JSONDecode(returned)
- for i,v in pairs(tble) do
- print(v)
- AddPart(v,nil,plr)
- end
- end)
- NewCommand("Unforce Field","Removes the plr a force field",2,{'unff','unforcefield'},function(message,plr)
- for i,v in pairs(plr.Character:GetChildren()) do
- if v.ClassName == "ForceField" then
- v:Destroy()
- end
- end
- AddPart("Removed ff",nil,plr)
- end)
- NewCommand("Compute","Searches Wolfram Alpha for the anwser",1,{'compute'},function(message,plr)
- local http = Core.Services.Http
- local split = Core.coreFunctions.split(message," ")
- local send = ""
- for i,v in pairs(split) do
- send = send..v.."%20"
- end
- AddPart("Computing...",nil,plr)
- local get = http:GetAsync("http://api.wolframalpha.com/v2/query?appid=2245WE-U8P3Q89QJR&output=json&format=plaintext&input="..send)
- local returned = game:GetService("HttpService"):JSONDecode(get)
- newTable = {}
- for i,v in pairs(returned) do
- for a,b in pairs(v) do
- if a == "pods" then
- for c,d in pairs(b) do
- for e,f in pairs(d) do
- if e == "subpods" then
- for g,h in pairs(f) do
- for j,k in pairs(h) do
- if j == "plaintext" then
- table.insert(newTable,tostring(k))
- end
- end
- end
- end
- end
- end
- end
- end
- end
- DestroyTablets(plr)
- if #newTable ~= 0 then
- for i,v in pairs(newTable) do
- AddPart(v,"Lime green",plr)
- end
- else
- AddPart("Query failed","Really red",plr)
- end
- end)
- NewCommand("Music","Plays music",2,{'music','play'},function(message,plr)
- if Core.Settings.playing == nil then
- sound = Instance.new("Sound",plr.Character.Torso)
- sound.Volume = 1
- sound.Name = "Music"
- sound.Looped = true
- Core.Settings.playing = sound
- else
- Core.Settings.playing:Destroy()
- sound = Instance.new("Sound",plr.Character.Torso)
- sound.Volume = 1
- sound.Name = "Music"
- sound.Looped = true
- Core.Settings.playing = sound
- end
- playMusic = function(v)
- AddPart(v.Name,nil,plr,false,function()
- DestroyTablets(plr)
- AddPart("Play","Lime green",plr,false,function()
- if sound.IsPaused ~= true then
- sound.SoundId = "rbxassetid://"..v.AssetId
- sound:Play()
- else
- sound:Resume()
- end
- end)
- AddPart("Pause","New Yeller",plr,false,function()
- if sound.IsPlaying then
- sound:Pause()
- end
- end)
- AddPart("Name:"..v.Name,nil,plr)
- AddPart("Description:"..v.Description,nil,plr)
- AddPart("ID:"..v.AssetId,nil,plr)
- AddPart("Dismiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- AddPart("Back","Dark stone grey",plr,false,function()
- DestroyTablets(plr)
- run()
- end)
- end)
- end
- run = function()
- local sendFor = Core.Services.Http:UrlEncode(message)
- local musicTable
- local returned
- returned = Core.Services.Http:PostAsync(Core.Settings.baseUrl.."getMusic",sendFor)
- musicTable = Core.Services.JSONDecode(returned)
- for i,v in pairs(musicTable) do
- if i <= 7 then
- playMusic(v)
- end
- end
- AddPart("Dismiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- end
- run()
- end)
- function explore(plr,searchIn)
- function search(place, goUpAllowed)
- DestroyTablets(plr)
- for i,v in pairs(place:GetChildren()) do
- AddPart(tostring(v),"Toothpaste",plr,false,function()
- local hasChildren = false
- for a,b in pairs(v:GetChildren()) do
- hasChildren = true
- end
- if hasChildren == true and v.Name ~= script.Name then
- search(v)
- else
- itemLook(v)
- end
- end)
- end
- AddPart("Look At Info","Lime green",plr,false,function()
- itemLook(place, false)
- end)
- AddPart("Delete Children","Really red",plr,false,function()
- for i,v in pairs(place:GetChildren()) do
- v:remove()
- end
- DestroyTablets(plr)
- itemLook(place)
- end)
- AddPart("Dissmiss","Really red",plr,false,function()
- DestroyTablets(plr)
- end)
- AddPart("Refresh","Lime green",plr,false,function()
- search(place)
- end)
- if goUpAllowed == nil or goUpAllowed == true then
- AddPart("Go up","Lime green",plr,false,function()
- search(place.Parent)
- end)
- end
- end
- function moreInfo(item)
- DestroyTablets(plr)
- for property,value in pairs(Core.coreFunctions.GetProperties(item)) do
- AddPart(property.." = "..tostring(value),nil,plr)
- end
- AddPart("Back","Lime green",plr,false,function()
- itemLook(item)
- end)
- end
- function itemLook(item, backParent)
- DestroyTablets(plr)
- AddPart("More info","Toothpaste",plr,false,function()
- moreInfo(item)
- end)
- AddPart("Name: "..tostring(item),nil,plr)
- AddPart("Type: "..item.ClassName,nil,plr)
- AddPart("Directory: ".."game."..item:GetFullName(),nil,plr)
- --[[if tostring(item) == "Workspace" then
- AddPart("Parent: "..item.Parent,"Toothpaste",plr)--]]
- AddPart("Delete","Really red",plr,false,function()
- search(item.Parent)
- item:Destroy()
- end)
- AddPart("Clone","Really red",plr,false,function()
- item.Archivable = true
- local clone = item:Clone()
- clone.Parent = workspace
- if item:IsA("Model") then
- clone:MakeJoints()
- end
- item.Archivable = false
- end)
- AddPart("Back","White",plr,false,function() if backParent == true or backParent == nil then search(item.Parent) else search(item) end end)
- end
- if type(searchIn)=='String' or type(searchIn)=='string' then
- local hasChild = false
- for i,v in pairs(game[searchIn]:GetChildren()) do
- hasChild = true
- end
- if hasChild == true then
- search(game[searchIn])
- else
- itemLook(game[searchIn])
- end
- else
- search(game,false)
- end
- end
- NewCommand("Set message type","Sets the message type",5,{'setmessagetype'},function(message,plr)
- if Core.Settings.messageType == "SetCore" then
- Core.Settings.messageType = "ChatService"
- Core.coreFunctions.sendMessage = function(msg)
- Core.Settings.speaker:SayMessage(msg,"All")
- end
- else
- Core.Settings.messageType = "SetCore"
- Core.coreFunctions.sendMessage = function(msg,plr)
- if string.lower(plr) == "all" then
- for i,v in pairs(Core.Services.Players:GetPlayers()) do
- Core.Settings.rClient:InvokeClient(v,"sendmessage",msg)
- end
- else
- Core.Settings.rClient:InvokeClient(plr,"sendmessage",msg)
- end
- end
- end
- end)
- NewCommand("Explorer", "Lets you explore the whole server", 4,{'exp','explore'}, function(msg,speaker)
- DestroyTablets(speaker)
- if msg == nil or msg == "" then
- explore(speaker,game)
- else
- --[[local send = Core.coreFunctions.split(msg,".")
- explore(speaker,send)--]]
- explore(speaker,msg)
- end
- end)
- NewCommand("Remove","Removes the admin",5,{'remove'},function(message,plr)
- Core.coreFunctions.sendMessage("Removed admin")
- Core = {}
- AddPart = function() end
- coroutine.yield(loopKill)
- coroutine.yield(autoReset)
- end)
- NewCommand("Respawn","Respawn a <player>",2,{'respawn','resp','res'},function(message,plr)
- if string.lower(message) == "all" then
- for i,v in pairs(Core.Services.Players) do
- v:LoadCharacter()
- end
- AddPart("Respawned all",nil,plr)
- elseif string.lower(message) == "other" then
- for i,v in pairs(Core.Services.Players) do
- if plr.Name ~= v.Name then
- v:LoadCharacter()
- end
- end
- AddPart("Respawned others",nil,plr)
- else
- local target = Core.coreFunctions.FindPlayer(message,string.len(message))
- target:LoadCharacter()
- AddPart("Respawned "..target.Name,nil,plr)
- end
- end)
- for i,v in pairs(Core.Services.Players:GetPlayers()) do
- if CheckForTableRanked(v) ~= true then
- table.insert(Core.Players,{Name=v.Name,Tablets={}})
- end
- if Core.coreFunctions.checkPlayer(v) ~= true then
- local tble = {
- userId = v.UserId;
- rank = 1;
- betaKey = ";";
- color = BrickColor.new("White").Number;
- reason = "New";
- }
- Core.coreFunctions.addPlayer(tble)
- end
- local base = Core.coreFunctions.getPlayerTable(v)
- local rank = base.rank
- local reason = base.reason
- local name = v.Name
- if rank == 0 then
- v:Kick("Your banned for "..reason)
- end
- v.Chatted:connect(function(msg)
- OnChatted(msg,v)
- end)
- Core.coreFunctions.injectClient(v)
- end
- autoReset = coroutine.create(function()
- while true do
- if workspace.Terrain:FindFirstChild("Parts") == nil then
- Core.Settings.folder = Instance.new("Folder",workspace.Terrain)
- Core.Settings.folder.Name = "Parts"
- for i,v in pairs(Core.Services.Players:GetPlayers()) do
- DestroyTablets(v)
- DestroyTableTablets(v)
- end
- elseif workspace.Terrain:FindFirstChild("Music") == nil then
- Core.Settings.sound = Instance.new("Sound",workspace.Terrain)
- Core.Settings.sound.Volume = 1
- Core.Settings.sound.Name = "Music"
- Core.Settings.sound.Looped = true
- elseif workspace.Terrain:FindFirstChild("Clientfunction") == nil then
- Core.Settings.rClient = Instance.new("RemoteFunction")
- Core.Settings.rClient.Name = "Clientfunction"
- Core.Settings.rClient.Parent = workspace.Terrain
- end
- wait()
- end
- end)
- loadtime = tostring(tick()-startTime):sub(1,5)
- for i,v in pairs(Core.Players) do
- local plr = Core.Services.Players[v.Name]
- local base = Core.coreFunctions.getPlayerTable(plr)
- local rank = base.rank
- if rank > 2 then
- AddPart("Spectrum loaded in "..loadtime.." seconds",nil,plr,true)
- else
- AddPart("Spectrum loaded",nil,plr,true)
- end
- end
- Core.coreFunctions.sendMessage("Spectrum loaded in "..loadtime.." seconds","all")
- Core.coreFunctions.sendMessage("Discord : 36NVyvU","all")
- coroutine.resume(loopKill)
- coroutine.resume(autoReset)
- return true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement