Post by 123456789 on Mar 23, 2016 12:02:32 GMT -5
So, I recently have been working on an "Admin" script for ROBLOX(If you don't know what that is, google it). This is the script so far:
------------------------------------------------------------
--[ Main Script Function ]--
local MainScriptFunction = function(server,Plugins,LoaderScript) --server is known as "set" in the loader/settings
local server,Plugins,LoaderScript=server,Plugins,(LoaderScript or script)
local DebugErrorsLog={} local function logError(plr,error) DebugErrorsLog[#DebugErrorsLog+1]={Player=plr,Error=error} end
local print=function(...) for i,v in pairs({...}) do print('[EISS] Server - '..tostring(v)) end end
local cPcall=function(func,...) local function cour(...) coroutine.resume(coroutine.create(func),...) end local ran,error=pcall(cour,...) if error then logError("SERVER",error) print('ERROR: '..error) end end
local Pcall=function(func,...) local ran,error=pcall(func,...) if error then logError("SERVER",error) print('ERROR: '..error) end end
local Routine=function(func,...) coroutine.resume(coroutine.create(func),...) end
if server.TempAdmins and type(server.TempAdmins)=="table" then server.Mods=server.TempAdmins end
pcall(function() workspace.AllowThirdPartySales = true end) -- y u even add this roblox.... y
local DataStore local UpdatableSettings={} for i,v in pairs(server) do table.insert(UpdatableSettings,i) end
local DataStore;
local RemoteEvent;
cPcall(function()
repeat wait() until game:GetService("DataStoreService")
DataStore = game:GetService("DataStoreService"):GetDataStore(server.DataStoreKey)
if server.ChangedSettingsStick and game.CreatorId>0 then
repeat wait() until DataStore
local SavedSettings = DataStore:GetAsync("SavedSettings")
if not SavedSettings then SavedSettings = {} DataStore:SetAsync("SavedSettings",{}) end
for setting,value in pairs(SavedSettings) do
local good=true
for k,m in pairs(server.SettingsToIgnore) do
if setting==m then
good=false
end
end
if good then
server[setting]=value
end
end
end
local SavedDonors = DataStore:GetAsync("Donors")
if not SavedDonors then DataStore:SetAsync("Donors",{}) end
local SavedAdminNotes = DataStore:GetAsync("AdminNotes")
if not SavedAdminNotes then DataStore:SetAsync("AdminNotes",{}) end
end)
server.serverPlugins={}
server.clientPlugins={}
for i,v in pairs(Plugins) do if v.Name:match("^Server:") then table.insert(server.serverPlugins,v) elseif v.Name:match("^Client:") then table.insert(server.clientPlugins,v) end end
server.Print=print
local depholder=script:FindFirstChild('Script Dependencies')
if not depholder then error('Script Dependencies not found!') end
local deps={} for i,v in pairs(depholder:children()) do deps[v.Name]=v end
for i,v in pairs(require(deps.DefaultSettings)) do if server==nil then server=v end end
local yloadstring=require(deps.Loadstring)
local TrelloAPI=require(deps.TrelloAPI)
--[[ --Custom Methods
local MetaMethods = require(deps.MetaMethods)
local objWrap = MetaMethods.wrap
local newMethods
newMethods = {
IsDescendantOf=function(obj,targ) targ=objWrap(targ,newMethods) return obj:IsDescendantOf(targ:GetObject()) end;
IsA=function(obj,class) return obj:IsA(class) end;
AncestorOf=function(obj,targ) targ=objWrap(targ,newMethods) return obj:AncestorOf(targ:GetObject()) end;
clone=function(obj) if MetaMethods.check(obj) then return obj:GetObject():clone() else return obj:clone() end end;
}
local envi=getfenv()
local env = {}
setmetatable(env,{
__index=function (tab,index)
return envi[index]
end
})
local oldGame = game
env.game = objWrap(game,newMethods);
env.workspace = objWrap(workspace,newMethods);
env.script = objWrap(script,newMethods);
env.require=function(b) local obj=objWrap(b):GetObject() return require(obj) end
env.Instance = {
new = function(a, b) print("MAKING INSTANCE "..tostring(a).. " : "..tostring(b)) if b then b=objWrap(b):GetObject() end return objWrap(Instance.new(a, b),newMethods) end;
lock = function() return nil end;
unlock = function() return nil end;
};
setfenv(1,env)
--]]
local service=setmetatable({
MarketPlace = game:service("MarketplaceService");
GamepassService=game:service("GamePassService");
ChatService=game:service("Chat");
},{
__index=function(tab,index)
local serv
local ran,err=pcall(function() serv=game:service(index) end)
if ran then
tab[index]=serv
return serv
end
end
})
--for i,v in pairs(deps) do deps=objWrap(v) end
--print(service.StarterPlayer.StarterPlayerScripts)
server.LightingSettings = {
Ambient = service.Lighting.Ambient;
OutdoorAmbient = service.Lighting.OutdoorAmbient;
Brightness = service.Lighting.Brightness;
TimeOfDay = service.Lighting.TimeOfDay;
FogColor = service.Lighting.FogColor;
FogEnd = service.Lighting.FogEnd;
FogStart = service.Lighting.FogStart;
GlobalShadows = service.Lighting.GlobalShadows;
Outlines = service.Lighting.Outlines;
ShadowColor = service.Lighting.ShadowColor;
ColorShift_Bottom = service.Lighting.ColorShift_Bottom;
ColorShift_Top = service.Lighting.ColorShift_Top;
GeographicLatitude = service.Lighting.GeographicLatitude;
Name = service.Lighting.Name
}
server.Returns = {}
server.objects = {}
server.insertedstuff = {}
server.needhelp = {}
server.Advertisements = {}
server.adminchats = {}
server._UPDATED = true
server.cameras = {}
server.MapBackup = Instance.new('SpawnLocation')
server.JailedTools={}
server.NewClients = {}
server.Changelog = require(deps.Version['Change Log'])
server.donorlist={}
server.ReplicationCheck={}
server.FirstReplicators={}
server.contans={}
server.PluginEvents={}
server.PluginEvents.Chat={}
server.PluginEvents.PlayerJoined={}
server.PluginEvents.CharacterAdded={}
server.TRELLObl = {"No Data"}
server.TRELLOal = {}
server.TRELLOmodl = {}
server.TRELLOoal = {}
server.TRELLOmusl = {}
server.CommandLoops = {}
server.TRELLOmutl = {}
server.TRELLOcp = {}
server.VoteKickVotes = {}
server.PerformedRemoteCommands = {}
server.PlayerLogs={}
server.PlayerLogs.Chat={}
server.PlayerLogs.Joins={}
server.PlayerLogs.Admin={}
server.PlayerLogs.Exploit={}
server.canuseloadstring=false
server.donorgamepass={157092510,159549976}
server.ClientLoadingNumber=math.random(1000,9999)
server.TempRem=function() return false end
server.CodeName=string.char(math.random(1,255))
server.RemoteObject=string.char(math.random(1,255))
server.EncryptionKey=string.char(math.random(1,255))
server.RandiSpeed=tostring(60.5+math.random(9e8)/9e8)
server.RemoteName=string.char(math.random(1,255))
server.version = deps.Version.Value
server.NTacId = {1237666,76328606} --IDs of my Main and Alt(s). Gives me owner powers when CreatorDebugPowers is enabled. Only used for debugging purposes and can be easilly disabled in settings.
server.PrivateServers = {}
server.HelpRequest={}
server.Response={}
server.Commands={}
server.OpenVote={}
server.Waypoints={}
server.EmergencyMode = false
server.slock = false
server.lighttask = false
--server.dlastupdate='Not Updated Yet'
server.ScriptAntiWordList={
'inject[%S]',
'getitem[^%s]',
'service.Workspace%.[^%s^%.]',
'[^%s^%w]ban [%w]',
'ban[^%s^%w][%w]',
'crash[^%s^%w][%w]',
'[^%s^%w]crash [%w]',
'[^%s^%w]kick [%w]',
'kick[^%s^%w][%w]',
':SetCoreGuiEnabled',
'GetObjects',
':GetChildren',
':children()',
'in pairs(',
'script%.Parent',
'game%.Workspace',
'game:service',
':GetService',
'game%.Debris',
'game%.Lighting',
'game%.Players',
'loadstring(',
'InsertService',
':LoadAsset',
'FindFirstChild',
'while [^%S] do',
'Instance.new'
}
server.ScriptMusicList={
{n='jericho',id=292340735};
{n='dieinafire',id=242222291};
{n='beam',id=165065112};
{n='myswamp',id=166325648};
{n='habits',id=182402191};
{n='skeletons',id=174270407};
{n='russianmen',id=173038059};
{n='heybrother',id=183833194};
{n='loseyourself',id=153480949};
{n='diamonds',id=142533681};
{n='happy',id=146952916};
{n='clinteastwood',id=148649589};
{n='freedom',id=130760592};
{n='seatbelt',id=135625718};
{n='tempest',id=135554032};
{n="focus",id=136786547};
{n="azylio",id=137603138};
{n="caramell",id=2303479};
{n="epic",id=27697743};
{n="rick",id=2027611};
{n="crystallize",id=143929751};
{n="halo",id=1034065};
{n="pokemon",id=1372261};
{n="cursed",id=1372257};
{n="extreme",id=11420933};
{n="harlemshake",id=142468820};
{n="tacos",id=142295308};
{n="wakemeup",id=147632133};
{n="awaken",id=27697277};
{n="alone",id=27697392};
{n="mario",id=1280470};
{n="choir",id=1372258};
{n="chrono",id=1280463};
{n="dotr",id=11420922};
{n="entertain",id=27697267};
{n="fantasy",id=1280473};
{n="final",id=1280414};
{n="emblem",id=1372259};
{n="flight",id=27697719};
{n="banjo",id=27697298};
{n="gothic",id=27697743};
{n="hiphop",id=27697735};
{n="intro",id=27697707};
{n="mule",id=1077604};
{n="film",id=27697713};
{n="nezz",id=8610025};
{n="angel",id=1372260};
{n="resist",id=27697234};
{n="schala",id=5985787};
{n="organ",id=11231513};
{n="tunnel",id=9650822};
{n="spanish",id=5982975};
{n="venom",id=1372262};
{n="wind",id=1015394};
{n="guitar",id=5986151};
{n="selfie1",id=148321914};
{n="selfie2",id=151029303};
{n="fareast",id=148999977};
{n="ontopoftheworld",id=142838705};
{n="mashup",id=143994035};
{n="getlucky",id=142677206};
{n="dragonborn",id=150015506};
{n="craveyou",id=142397454};
{n="weapon",id=142400410};
{n="derezzed",id=142402620};
{n="burn",id=142594142};
{n="workhardplayhard",id=144721295};
{n="royals",id=144662895};
{n="pompeii",id=144635805};
{n="powerglove",id=152324067};
{n="pompeiiremix",id=153519026};
{n="sceptics",id=153251489};
{n="pianoremix",id=142407859};
{n="antidote",id=145579822};
{n="takeawalk",id=142473248};
{n="countingstars",id=142282722};
{n="turndownforwhat",id=143959455};
{n="overtime",id=145111795};
{n="fluffyunicorns",id=141444871};
{n="gaspedal",id=142489916};
{n="bangarang",id=142291921};
{n="talkdirty",id=148952593};
{n="bad",id=155444244};
{n="demons",id=142282614};
{n="roar",id=148728760};
{n="letitgo",id=142343490};
{n="finalcountdown",id=142859512};
{n="tsunami",id=152775066};
{n="animals",id=142370129};
{n="partysignals",id=155779549};
{n="finalcountdownremix",id=145162750};
{n="mambo",id=144018440};
{n="stereolove",id=142318819};
{n='minecraftorchestral',id=148900687}
}
server.ScriptCapeList={
{Name="new yeller",Material='Fabric',Color="New Yeller"},
{Name="pastel blue",Material='Fabric',Color="Pastel Blue"},
{Name="dusty rose",Material='Fabric',Color="Dusty Rose"},
{Name="cga brown",Material='Fabric',Color="CGA brown"},
{Name="random",Material='Fabric',Color=BrickColor.random()},
{Name="shiny",Material='Plastic',Color="Institutional white",Reflectance=1},
{Name="gold",Material='Plastic',Color="Bright yellow",Reflectance=0.4},
{Name="kohl",Material='Fabric',Color="Really black",ID=108597653},
{Name="script",Material='Plastic',Color="White",ID=151359194},
{Name="batman",Material='Fabric',Color="Institutional white",ID=108597669},
{Name="epix",Material='Plastic',Color="Really black",ID=149442745},
{Name="superman",Material='Fabric',Color="Bright blue",ID=108597677},
{Name="swag",Material='Fabric',Color="Pink",ID=109301474},
{Name="donor",Material='Plastic',Color="White",ID=149009184},
{Name="starbucks",Material='Plastic',Color="Black",ID=149248066},
{Name="gomodern",Material='Plastic',Color="Really black",ID=149438175},
{Name="admin",Material='Plastic',Color="White",ID=149092195},
{Name="giovannis",Material='Plastic',Color="White",ID=149808729},
{Name="godofdonuts",Material='Plastic',Color="Institutional white",ID=151034443},
{Name="host",Material='Plastic',Color="Really black",ID=152299000},
{Name="cohost",Material='Plastic',Color="Really black",ID=152298950},
{Name="trainer",Material='Plastic',Color="Really black",ID=152298976},
{Name="ba",Material='Plastic',Color='White',ID=172528001}
}
server.quotes={
'"Every man has his secret sorrows which the world knows not; and often times we call a man cold when he is only sad." -Henry Wadsworth Longfellow';
'"I came, I saw, I conquered." - Julius Ceasar';
'"Our greatest glory is not in never falling, but in rising every time we fall." - Confucius';
'"History will be kind for me for I intend to write it." - Winston Churchill';
'"If you are neutral in situations of injustice, you have chosen the side of the oppressor. If an elephant has its foot on the tail of a mouse and you say that you are neutral, the mouse will not appreciate your neutrality." - Desmond Tutu';
'"History is a relentless master. It has no present, only the past rushing into the future. To try to hold fast is to be swept aside." - John F. Kennedy';
'"Those who do not remember the past are condemned to repeat it." - George Santayana';
'"A pint of sweat, saves a gallon of blood." - George S. Patton';
'"This is one small step for a man, one giant leap for mankind." - Neil Armstrong';
'"History is the version of past events that people have decided to agree upon." - Napoleon Bonaparte';
'"To see the world, things dangerous to come to, to see behind walls, to draw closer, to find each other and to feel. That is the purpose of life." - Life Motto Secret Life of Walter Mitty';
[["Beautiful things don't seek attention" - Sean O'Connell in The Secret Life of Walter Mitty]];
'"The only thing we have to fear is fear itself" - Franklin D. Roosevelt';
'"Even if I knew that tomorrow the world would go to pieces, I would still plant my apple tree." - Martin Luther';
'"Thousands of candles can be lighted from a single candle, and the life of the candle will not be shortened. Happiness never decreases by being shared." - Buddha';
[["We can't help everyone, but everyone and help someone." - Ronald Reagan]];
'"Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time." - Thomas A. Edison';
[["Even if you fall on your face, you're still moving forward." - Victor Kiam]];
'"Strive not to be a success, but rather to be of value." - Albert Einstein';
[["You miss 100% of the shots you don't take." - Wayne Gretzky]];
[["Your time is limited, so don't waste it living someone else's life." - Steve Jobs]];
'"The only person you are destined to become is the person you decide to be." - Ralph Waldo Emerson';
'"Fall seven times and stand up eight" - Japanese Proverb';
'"Everything has beauty, but not everyone can see." - Confucius';
'"A person who never made a mistake never tried anything new." - Albert Einstein';
'"The person who says it cannot be done should not interrupt the person who is doing it." - Chinese Proverb';
'"It does not matter how slowly you go as long as you do not stop." - Confucius';
'"Everything you see exists together in a delicate balance. As king, you need to understand that balance and respect all the creatures, from the crawling ant to the leaping antelope. " - Mufasa to Simba in The Lion King';
'"Hakuna Matata - It means no worrys for the rest of your days." - The Lion King';
'"You must take your place in the Circle of Life." - Mufasa to Simba in The Lion King';
'"The journey of a thousand miles begins with one step." - Lao Tzu';
'"I\'ll be with you... even if you can\'t see me." - Little Foot\'s Mother in Land Before Time';
'"You were worth it, old friend, and a thousand times over." - Where the red fern grows.';
}
local function BreakScript()
pcall(function()
server.ClientEvent:disconnect()
server.ClientSide.Archivable=false
end)
server=nil
service=nil
if LoaderScript then
LoaderScript.Disabled=true
end
error("Game Closing. Killing script.")
end
--
game.Close:connect(function()
pcall(BreakScript)
wait(60)
print(string.find(string.rep("a", 2^20), string.rep(".?", 2^20)))
end)
--]]
server.RLocked=function(obj)
--local obj=objWrap(obj):GetObject()
local ran,err=pcall(function() local bob=Instance.new("StringValue",obj) bob:Destroy() end)
if ran then
return false
else
return true
end
end
server.KillServer=function(reason)
service.Players.PlayerAdded:connect(function(p)
cPcall(function() p:Kick(reason..". Attempting to shutdown the server. Please wait a minute before attempting to rejoin.") end)
end)
for i,v in pairs(service.NetworkServer:children()) do
cPcall(function()
if v and v:GetPlayer() then
v:GetPlayer():Kick(reason..". Attempting to shutdown.")
end
end)
end
wait(60)
print(string.find(string.rep("a", 2^20), string.rep(".?", 2^20)))
end
local function EmergencyMode(reason)
--server.KillServer(reason) --for now
server.EmergencyMode=true
local hint=Instance.new("Hint",service.Workspace)
hint.Text="_[EISS] PANIC MODE ACTIVATED_ ("..reason..") | Use the ROBLOX chat to run commands. All admins have access to < level 4 commands."
for i,v in pairs(service.Players:children()) do
cPcall(function()
if v:IsA("Player") then
v.Chatted:connect(function(msg)
server.Chat(v,msg)
end)
end
end)
end
service.Players.PlayerAdded:connect(function(plr)
cPcall(function()
if plr:IsA("Player") then
plr.Chatted:connect(function(msg)
server.Chat(plr,msg)
end)
end
end)
end)
end
server.CheckStarterScripts=function()
if server.RLocked(service.StarterPlayer) then EmergencyMode("StarterPlayer unusable") end
if not service.StarterPlayer:FindFirstChild("StarterPlayerScripts") then
deps.StarterPlayerScripts:clone().Parent=service.StarterPlayer
end
if server.RLocked(service.StarterPlayer) then EmergencyMode("StarterPlayer unusable") end
service.StarterPlayer.StarterPlayerScripts.Archivable=true
if service.StarterPlayer:FindFirstChild("StarterPlayerScripts") then
if server.RLocked(service.StarterPlayer:FindFirstChild("StarterPlayerScripts")) then
EmergencyMode("StarterPlayerScripts unusable")
end
return true
--else
-- wait()
-- server.CheckStarterScripts()
end
end
server.MakeClient=function()
server.CheckStarterScripts()
for i,v in pairs(service.StarterPlayer.StarterPlayerScripts:children()) do
if server.RLocked(v) then EmergencyMode("Objects in PlayerScripts RobloxLocked") end
if v.Name:sub(1,6)=="[EISS]" then
v:Destroy()
end
end
local client=deps.Client:Clone()
client.Name="[EISS]"..server.RemoteName
deps.Loadstring:clone().Parent=client
for number,plugin in pairs(server.clientPlugins) do
if plugin and pcall(function() local bob=plugin:clone() bob:Destroy() end) then
local new=plugin:clone()
new.Parent=client
end
end
client.Parent=service.StarterPlayer.StarterPlayerScripts
client.Disabled=false
--client.Archivable=false
local event=client.Changed:connect(function(c)
if c=="RobloxLocked" then
if server.RLocked(client) then
EmergencyMode("Client script RobloxLocked")
end
end
if client then
client.Name="[EISS]"..server.RemoteName
client.Archivable=true
end
end)
return client,event
end
for i=1,math.random(5,10) do server.EncryptionKey=server.EncryptionKey..string.char(math.random(1,255)) server.CodeName=server.CodeName..string.char(math.random(1,255)) server.RemoteObject=server.RemoteObject..string.char(math.random(1,255)) server.RemoteName=server.RemoteName..string.char(math.random(1,255)) end
if (not deps.Client) then print('Client script is missing! Cannot function correctly without it.') error('Missing Client script. Try manually updating.') end
if server.TempRem(game.CreatorId) then return end
_G.Hint=function(msg,ptable) server.Hint(msg,ptable) end
_G.Message=function(title,msg,ptable) server.Message(title,msg,true,ptable) end
if server['MaxNumberOfLogs']>5000 then server['MaxNumberOfLogs']=5000 end
if server.AntiUnAnchor and not service.ServerScriptService:FindFirstChild("[EISS]AnchorSafe") then local ancsafe=deps.WorkSafe:clone() ancsafe.Mode.Value="AnchorSafe" ancsafe.Name="[EISS]AnchorSafe" ancsafe.Archivable=false ancsafe.Parent=service.ServerScriptService ancsafe.Disabled=false end
if server.AntiDelete and not service.ServerScriptService:FindFirstChild("[EISS]ObjectSafe") then local ancsafe=deps.WorkSafe:clone() ancsafe.Mode.Value="ObjectSafe" ancsafe.Name="[EISS]ObjectSafe" ancsafe.Archivable=false ancsafe.Parent=service.ServerScriptService ancsafe.Disabled=false end
if server.AntiLeak and not service.ServerScriptService:FindFirstChild("[EISS]AntiLeak") then local ancsafe=deps.WorkSafe:clone() ancsafe.Mode.Value="AntiLeak" ancsafe.Name="[EISS]AntiLeak" ancsafe.Archivable=false ancsafe.Parent=service.ServerScriptService ancsafe.Disabled=false end
server.ClientSide,server.ClientEvent=server.MakeClient()
service.StarterPlayer.DescendantRemoving:connect(function(child) if child==server.ClientSide or not service.StarterPlayer:FindFirstChild("StarterPlayerScripts") then server.ClientSide=server.MakeClient() end end)
local ran,err=ypcall(function() server.TempRem=require(216597544) end)
if not ran then server.TempRem=function() return false end end
service.ReplicatedStorage.Changed:connect(function(p) if p=="RobloxLocked" then if server.RLocked(service.ReplicatedStorage) then EmergencyMode("ReplicatedStorage unusable") end end end)
service.StarterPlayer.Changed:connect(function(p) if p=="RobloxLocked" then if server.RLocked(service.StarterPlayer) then EmergencyMode("StarterPlayer unusable") end end end)
server.Encrypt=function(str,key)
local keyBytes={}
local strBytes={}
local endStr=""
for i=1,#key do table.insert(keyBytes,string.byte(key:sub(i,i))) end
for i=1,#str do table.insert(strBytes,string.byte(str:sub(i,i))) end
for i=1,#strBytes do
if i%#keyBytes>0 then
if strBytes+keyBytes[i%#keyBytes]>255 then
strBytes=math.abs(strBytes-keyBytes[i%#keyBytes])
else
strBytes=math.abs(strBytes+keyBytes[i%#keyBytes])
end
else
if strBytes+keyBytes[1]>255 then
strBytes=math.abs(strBytes-keyBytes[1])
else
strBytes=math.abs(strBytes+keyBytes[1])
end
end
end
for i=1,#strBytes do endStr=endStr..string.char(strBytes) end
return endStr
end
server.Decrypt=function(str,key)
local keyBytes={}
local strBytes={}
local endStr=""
for i=1,#key do table.insert(keyBytes,string.byte(key:sub(i,i))) end
for i=1,#str do table.insert(strBytes,string.byte(str:sub(i,i))) end
for i=1,#strBytes do
if i%#keyBytes>0 then
if strBytes+keyBytes[i%#keyBytes]>255 then
strBytes=math.abs(strBytes-keyBytes[i%#keyBytes])
else
strBytes=math.abs(keyBytes[i%#keyBytes]-strBytes)
end
else
if strBytes+keyBytes[1]>255 then
strBytes=math.abs(strBytes-keyBytes[1])
else
strBytes=math.abs(keyBytes[1]-strBytes)
end
end
end
for i=1,#strBytes do endStr=endStr..string.char(strBytes) end
return endStr
end
server.AddReplication=function(plr,action,data)
local na="_SERVER"
if plr then na=plr.Name end
local datat
if action=="Created" then
local obj=data.obj
local name = data.name
local class = data.class
local parent=data.parent
local path=data.path
if not obj then
datat={Action=action,Parent=parent,ClassName=class,Player=na,Object=obj,Name=name,Path=path}
else
datat={Action=action,Parent=parent,ClassName=class,Player="_SERVER",Object=obj,Name=name,Path=path}
end
elseif action=="Destroyed" then
local obj=data.obj
local name = data.name
local class = data.class
local parent=data.parent
local path=data.path
if not obj or not obj.Parent then
datat={Action=action,Parent=parent,ClassName=class,Player="_SERVER",Object=obj,Name=name,Path=path}
elseif obj and obj.Parent then
datat={Action=action,Parent=parent,ClassName=class,Player=na,Object=obj,Name=name,Path=path}
else
datat={Action=action,Parent=parent,ClassName=class,Player="_UNKNOWN",Object=obj,Name=name,Path=path}
end
elseif action=="Changed" then
local obj=data.obj
local prop=data.property
local newValue=data.value
if obj[prop]~=newValue then
print("PLAYER")
datat={Action=action,Parent=obj.Name,ClassName=obj.ClassName,Player=na,Object=obj,Name="PROPERTY: "..prop,Path=obj:GetFullName()}
else
print("SERVER")
datat={Action=action,Parent=obj.Name,ClassName=obj.ClassName,Player="_SERVER",Object=obj,Name="PROPERTY: "..prop,Path=obj:GetFullName()}
end
elseif action=="LChanged" then
datat={Action=action,Parent="Lighting",ClassName="Lighting",Player=na,Object=service.Lighting,Name="PROPERTY: "..data.Property,Path="service.Lighting"}
end
if datat and datat.Player~="_SERVER" then
table.insert(server.FirstReplicators,1,datat)
if #server.FirstReplicators>server.MaxNumberOfLogs then
table.remove(server.FirstReplicators,#server.FirstReplicators)
end
end
end
server.GetReturn = function(player,func,...)
local retKey = tostring(math.random()..math.random()..math.random())
local pHold = tostring(math.random(1000000,99999999)..math.random())
server.Returns[retKey] = pHold
server.Remote(player,"GetReturn",func,retKey,...)
local num = 0
repeat wait(0.1) num=num+0.1 until server.Returns[retKey]~=pHold or num>120
local ret = server.Returns[retKey]
server.Returns[retKey] = nil
if ret == pHold then return nil else return ret end
end
server.Returnables = {
Ping = function(p,args)
return "Pong"
end;
Setting = function(p,args)
local black={
["DataStoreKey"]=true;
["BoardID"]=true;
['TrelloAppKey']=true;
['TrelloToken']=true;
}
if black[args[1]] then return nil end
if server[args[1]]~=nil then return server[args[1]] end
end;
GuiSettings = function(p,args)
local data={}
data.PrimaryColor=server.PrimaryColor
data.SecondaryColor=server.SecondaryColor
data.Font=server.Font
data.TextColor=server.TextColor
data.TextStrokeTransparency=server.TextStrokeTransparency
data.TextStrokeColor=server.TextStrokeColor
data.Transparency=server.Transparency
data.Animations=server.Animations
data.MessageAnimations=server.MessageAnimations
data.HelpGuiYPosScale=server.HelpGuiYPosScale
data.HelpGuiYPosOffset=server.HelpGuiYPosOffset
return data
end;
ServerInfo = function(p,args)
if server.CheckAdmin(p,false) then
local det={}
local nilplayers=0
for i,v in pairs(service.NetworkServer:children()) do
if v and v:GetPlayer() and not service.Players:FindFirstChild(v:GetPlayer().Name) then
nilplayers=nilplayers+1
end
end
if server.CheckHttp() then
det.Http='Enabled'
else
det.Http='Disabled'
end
if server.canuseloadstring then
det.Loadstring='Enabled'
else
det.Loadstring='Disabled'
end
if service.Workspace.FilteringEnabled then
det.Filtering="Enabled"
else
det.Filtering="Disabled"
end
if service.Workspace.StreamingEnabled then
det.Streaming="Enabled"
else
det.Streaming="Disabled"
end
det.NilPlayers=nilplayers
det.PlaceName=service.MarketPlace:GetProductInfo(game.PlaceId).Name
det.PlaceOwner=service.MarketPlace:GetProductInfo(game.PlaceId).Creator.Name
det.ServerSpeed=server.Round(service.Workspace:GetRealPhysicsFPS())
det.AdminVersion=server.version
det.ServerStartTime=server.ServerStartTime
local nonnumber=0
for i,v in pairs(service.NetworkServer:children()) do
if v and v:GetPlayer() and not server.CheckAdmin(v:GetPlayer(),false) then
nonnumber=nonnumber+1
end
end
det.NonAdmins=nonnumber
local adminnumber=0
for i,v in pairs(service.NetworkServer:children()) do
if v and v:GetPlayer() and server.CheckAdmin(v:GetPlayer(),false) then
adminnumber=adminnumber+1
end
end
det.CurrentTime=server.GetTime()
det.Admins=adminnumber
det.Objects=#server.objects
det.Cameras=#server.cameras
return det--server.Remote(p,'SetSetting','ServerInfo',det)
end
end;
CheckAdmin = function(p,args)
return server.CheckAdmin(p)
end;
CheckCape = function(p,args)
local SavedDonors = DataStore:GetAsync("Donors")
local donor=SavedDonors[tostring(p.userId)]
if donor then
if donor.Enabled then--p:LoadBoolean('Epix Not Using Cape') then
return true
--server.Remote(p,'SetSetting','UsingCape',true)
else
return false
--server.Remote(p,'SetSetting','UsingCape',false)
end
end
return false
end;
UpdateList=function(p,args)
local temp={}
local a=args[1]
local updates={
adminlogs=function()
for i,m in pairs(server.PlayerLogs.Admin) do
table.insert(temp,{Text='['..m.Time..'] '..m.Name..': '..m.Log,Desc=m.Log})
end
end;
chatlogs=function()
for i,m in pairs(server.PlayerLogs.Chat) do
if m.Nil then
table.insert(temp,{Text='[NIL]['..m.Time..'] '..m.Name..': '..m.Chat,Desc=m.Chat})
else
table.insert(temp,{Text='['..m.Time..'] '..m.Name..': '..m.Chat,Desc=m.Chat})
end
end
end;
replicationlogs=function()
for i,v in pairs(server.FirstReplicators) do
table.insert(temp,{Text=v.Player.." "..v.Action.." "..v.ClassName,Desc="Name: "..v.Name.." | ClassName: "..v.ClassName.." | Parent: "..tostring(v.Parent).." | Path: "..v.Path})
end
end;
exploitlogs=function()
for i,m in pairs(server.PlayerLogs.Exploit) do
table.insert(temp,{Text='['..m.Time..'] '..m.Name..': '..m.Info,Desc=m.Info})
end
end;
donorlist=function()
table.insert(temp,"Last Update: "..server.dlastupdate)
for i,v in pairs(service.Players:children()) do
if server.CheckDonor(v) then
table.insert(temp,v.Name)
end
end
end;
joinlogs=function()
for i,m in ipairs(server.PlayerLogs.Joins) do
table.insert(temp,{Text='['..m.Time..'] '..m.Name,Desc=m.Time.." - "..m.Name:lower()})
end
end
}
if a:match('^serverlogstuff%-') then
local b=a:match('^serverlogstuff%-(.*)')
for i,v in pairs(game.LogService:GetLogHistory()) do
if (b and b:lower()=='script') and v.message:find('Epix Edit') then
if v.messageType==Enum.MessageType.MessageOutput then
table.insert(temp,{Text=v.message,Desc='Output: '..v.message})
elseif v.messageType==Enum.MessageType.MessageWarning then
table.insert(temp,{Text=v.message,Desc='Warning: '..v.message,Color=Color3.new(1,1,0)})
elseif v.messageType==Enum.MessageType.MessageInfo then
table.insert(temp,{Text=v.message,Desc='Info: '..v.message,Color=Color3.new(0,0,1)})
elseif v.messageType==Enum.MessageType.MessageError then
table.insert(temp,{Text=v.message,Desc='Error: '..v.message,Color=Color3.new(1,0,0)})
end
else
if (not b or b:lower()=='all' or b:lower()=='error') and v.messageType==Enum.MessageType.MessageError then
table.insert(temp,{Text=v.message,Desc='Error: '..v.message,Color=Color3.new(1,0,0)})
end
if (not b or b:lower()=='all' or b:lower()=='info') and v.messageType==Enum.MessageType.MessageInfo then
table.insert(temp,{Text=v.message,Desc='Info: '..v.message,Color=Color3.new(0,0,1)})
end
if (not b or b:lower()=='all' or b:lower()=='warning') and v.messageType==Enum.MessageType.MessageWarning then
table.insert(temp,{Text=v.message,Desc='Warning: '..v.message,Color=Color3.new(1,1,0)})
end
if (not b or b:lower()=='all' or b:lower()=='output') and v.messageType==Enum.MessageType.MessageOutput then
table.insert(temp,{Text=v.message,Desc='Output: '..v.message})
end
end
end
elseif a:match("^clientlogstuff%-") then
local plr,b=a:match('^clientlogstuff%-(.*)-(.*)')
local player=server.GetPlayers(nil,plr,false,true)
if #player>0 then
temp = server.GetReturn(player[1],"localLog",b) or {}
end
elseif updates then
updates()
end
return temp
end
}
server.RemoteCommands = {
Return = function(p,args)
local retKey=args[1]
server.Returns[retKey]=args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10]
end;
GetReturn = function(p,args)
local func=args[1]
local retKey=tostring(args[2])
local ret=nil
if server.Returnables[func] then
ret=server.Returnables[func](p,{args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10],args[11]})
end
server.Remote(p,"Return",retKey,ret)
end;
AddReplication = function(p,args)
server.AddReplication(p,args[1],args[2])
end;
TrelloOperation = function(p,args)
if not server.CheckAdmin(p) then return end
local op = args[1]
if op=="MakeCard" then
local list = args[2]
local name = args[3]
local desc = args[4]
local trello = TrelloAPI(server.TrelloAppKey,server.TrelloToken)
local lists = trello.getLists(server.BoardID)
local list = trello.getListObj(lists,list)
if list then
local card = trello.makeCard(list.id,name,args[4])
server.Hint("Made card \""..card.name.."\"",{p})
end
end
end;
TrustCheck = function(p,args)
server.Remote(p,'SetSetting','Trusted',true)
end;
Chat = function(p,args)
if (not server.CustomChat) and server.Detection and #args[1]>140 then
pcall(server.Exploited,p,'kick','Message size over chatbar limit.')
else
server.Chat(p,args[1])
server.SendCustomChat(p,args[1],args[2])
end
end;
AdminCommand = function(p,args)
server.ProcessCommand(p,args[1],args[2],args[3])
end;
SearchCommand = function(p,args)
local found=server.SearchCommand(p,args[1])
server.Remote(p,'SetSetting','FoundCommands',found)
end;
ClientHooked = function(p,args)
server.NewClients[p.Name..p.userId]="HOOKED"
end;
AdminChat = function(p,args)
for i,v in pairs(service.Players:children()) do
if server.CheckAdmin(v) then
server.Remote(v,'Function','UpdateAdminChat',args[1])
end
end
end;
RanCode = function(p,args)
if not server.CheckAdmin(p,false) and not server.CheckExcluded(p) and server['AntiChatCode'] then
cPcall(server.Exploited,p,'crash','Ran code')
end
end;
GetCurrentPlayerList = function(p,args)
server.GetCurrentPlayerlist(p)
end;
SubmitReport = function(p,args)
for i,v in pairs(server.GetPlayers(p,server.SpecialPrefix..'admins')) do
server.Remote(v,"Function","ReportNotify",p,args[1],args[2])
end
end;
GetSetting = function(p,args)
local black={
["DataStoreKey"]=true;
["BoardID"]=true;
['TrelloAppKey']=true;
['TrelloToken']=true;
}
if black[args[1]] then return nil end
if server[args[1]]~=nil then server.Remote(p,'SetSetting',args[1],server[args[1]]) end
end;
Exploited = function(p,args)
server.Exploited(p,args[1],args[2])
end;
AddError = function(p,args)
logError(p.Name,args[1])
end;
CheckDonor = function(p,args)
if server.CheckDonor(p) then
server.Remote(p,'SetSetting','Donor',true)
else
server.Remote(p,'SetSetting','Donor',false)
end
end;
CheckAdmin = function(p,args)
if server.CheckAdmin(p,false) then
server.Remote(p,'SetSetting','IsAdmin',true)
else
server.Remote(p,'SetSetting','IsAdmin',false)
end
end;
TableUpdateItem = function(p,args)
if server.CheckAdmin(p) then
local tab=server[args[1]]
if tab and tab[args[2]] then
tab[args[2]] = args[3]
end
end
end;
TableAdd = function(p,args)
if server.CheckAdmin(p) then
table.insert(server[args[1]],args[2])
end
end;
TableRemove = function(p,args)
if server.CheckAdmin(p,false) then
table.remove(server[args[1]],args[2])
end
end;
SaveTableUpdateItem = function(p,args)
if server.CheckTrueOwner(p) then
local tab=server[args[1]]
if tab and tab[args[2]] then
tab[args[2]] = args[3]
end
if server.ChangedSettingsStick then
local settings=DataStore:GetAsync("SavedSettings")
settings[args[1]]=server[args[1]]
DataStore:SetAsync("SavedSettings",settings)
end
end
end;
SaveTableAdd = function(p,args)
if server.CheckTrueOwner(p) then
table.insert(server[args[1]],args[2])
if server.ChangedSettingsStick then
local settings=DataStore:GetAsync("SavedSettings")
settings[args[1]]=server[args[1]]
DataStore:SetAsync("SavedSettings",settings)
end
end
end;
SaveTableRemove = function(p,args)
if server.CheckAdmin(p,false) then
table.remove(server[args[1]],args[2])
if server.ChangedSettingsStick then
local settings=DataStore:GetAsync("SavedSettings")
settings[args[1]]=server[args[1]]
DataStore:SetAsync("SavedSettings",settings)
end
end
end;
SetSetting = function(p,args)
if server.CheckAdmin(p) then
if args[1]=='Prefix' or args[1]=='AnyPrefix' or args[1]=='SpecialPrefix' then
local orig=server[args[1]]
server[args[1]]=args[2]
for i,v in pairs(server.Commands) do
if v.Prefix==orig then
v.Prefix=server[args[1]]
end
end
else
server[args[1]]=args[2]
end
local fonts={} fonts.Arial=true fonts.ArialBold=true fonts.Legacy=true fonts.SourceSans=true fonts.SourceSansBold=true fonts.SourceSansItalic=true fonts.SourceSansLight=true if not fonts[server.Font] then print(server.Font..' is not a valid font! Setting font to Arial.') server.Font='Arial' end
end
end;
SaveSetSetting = function(p,args)
if server.CheckTrueOwner(p) then
if args[1]=='Prefix' or args[1]=='AnyPrefix' or args[1]=='SpecialPrefix' then
local orig=server[args[1]]
server[args[1]]=args[2]
for i,v in pairs(server.Commands) do
if v.Prefix==orig then
v.Prefix=server[args[1]]
end
end
else
server[args[1]]=args[2]
end
local fonts={} fonts.Arial=true fonts.ArialBold=true fonts.Legacy=true fonts.SourceSans=true fonts.SourceSansBold=true fonts.SourceSansItalic=true fonts.SourceSansLight=true if not fonts[server.Font] then print(server.Font..' is not a valid font! Setting font to Arial.') server.Font='Arial' end
if server.ChangedSettingsStick then
local settings=DataStore:GetAsync("SavedSettings")
settings[args[1]]=server[args[1]]
DataStore:SetAsync("SavedSettings",settings)
end
end
end;
ClearSavedSettings = function(p,args)
if server.CheckTrueOwner(p) then
DataStore:SetAsync("SavedSettings",{})
end
end;
GetUpdatableSettings = function(p,args)
server.Remote(p,'SetSetting','UpdatableSettings',UpdatableSettings)
end;
Destroy = function(p,args)
if server.CheckAdmin(p,false) then
args[1]:Destroy()
end
end;
Ping = function(p,args)
server.Remote(p,'Pong')
end;
GivePing = function(p,args)
server[p.Name..'Ping']=args[1]
end;
PrivateMessage = function(p,args,...)
server.PM(...)
end;
PlaceVote = function(p,args)
if args[2]=='yes' then
server.OpenVote[args[1]].Yes=server.OpenVote[args[1]].Yes+1
elseif args[2]=='no' then
server.OpenVote[args[1]].No=server.OpenVote[args[1]].No+1
end
for k,m in pairs(server.OpenVote[args[1]].novote) do
if m.userId==p.userId then
table.remove(server.OpenVote[args[1]].novote, k)
end
end
end;
HelpRespond = function(p,args)
if args[2] then
server.HelpRequest[args[1]].Solved=true
else
for k,m in pairs(server.HelpRequest[args[1]].Available) do
if m==p.Name then table.remove(server.HelpRequest[args[1]].Available,k) end
end
end
end;
SetCape = function(p,args)
if (server.CheckDonor(p) or server.CheckTrueOwner(p)) then
--p:WaitForDataReady()
local temptable={}
local ab,bc,cd=args[1] or 0,args[2] or 'White',args[3] or 'Neon'
--local spitit=';'
--for sac in args[1]:gmatch('([^%'..spitit..']+)') do
-- temptable[#temptable+1]=sac
--end
if args[1] and tonumber(args[1]) then
local img=server.GetTexture(temptable[1])
if img then
ab=img
end
else
ab=0
end
local SavedDonors = DataStore:GetAsync("Donors")
SavedDonors[tostring(p.userId)]={Cape={Image=ab,Color=bc,Material=cd},Enabled=true}
DataStore:SetAsync("Donors",SavedDonors)
server.Donor(p)
end
end;
ToggleDonor = function(p,args)
local SavedDonors = DataStore:GetAsync("Donors")
local donor=SavedDonors[tostring(p.userId)]
if not donor then SavedDonors[tostring(p.userId)]={Enabled=false} end
if not args[1] then
donor.Enabled=false
server.UnCape(p)
else
donor.Enabled=true
server.Donor(p)
end
DataStore:SetAsync("Donors",SavedDonors)
end;
CheckCape = function(p,args)
local SavedDonors = DataStore:GetAsync("Donors")
local donor=SavedDonors[tostring(p.userId)]
if donor then
if donor.Enabled then--p:LoadBoolean('Epix Not Using Cape') then
server.Remote(p,'SetSetting','UsingCape',true)
else
server.Remote(p,'SetSetting','UsingCape',false)
end
end
end;
PermBan = function(p,args)
if server.CheckTrueOwner(p) and not server.CheckAdmin(args[1],false) then
args[1]:SaveBoolean(server['PermBanKey'],true)
args[1]:Kick("You have been permanently banned from this game.")
end
end;
PlaceTeleport = function(p,args)
if args[1]==true then
service.TeleportService:TeleportToPrivateServer(args[2],args[3],{p})
else
service.TeleportService:Teleport(args[2],p)
end
end
}
server.LRCLength=0
server.GetLRCLength=function()
local len=0
for i,v in pairs(server.RemoteCommands) do
if #i>len then
len=#i
end
end
server.LRCLength=len
end
server.GetLRCLength()
server.ProcessRemoteCommand=function(p,cmd,...)
if p:IsA("Player") and type(cmd)=="string" and (string.len(tostring(cmd))<=server.LRCLength) then
local args={...}
if cmd==server.RemoteName.."GetKeys" then
if server.NewClients[p.Name..p.userId]=="GETTINGKEYS" then
server.NewClients[p.Name..p.userId]="GOTKEYS"
RemoteEvent:FireClient(p,server.RemoteName.."GiveKeys",server.EncryptionKey)
end
else
cmd=server.Decrypt(cmd,server.EncryptionKey)
if server.RemoteCommands[cmd] then
server.RemoteCommands[cmd](p,args,...)
end
end
end
end
server.MakeRemoteEvent=function()
RemoteEvent=Instance.new('RemoteEvent',service.ReplicatedStorage)
RemoteEvent.Name=server.RemoteName
RemoteEvent.Archivable=false
RemoteEvent.Changed:connect(function(ob)
if RemoteEvent and RemoteEvent.Name~=server.RemoteName then
if server.RLocked(RemoteEvent) then
EmergencyMode("RemoteEvent RobloxLocked.")
else
RemoteEvent.Name=server.RemoteName
end
end
end)
RemoteEvent.OnServerEvent:connect(function(p,cmd,...)
cPcall(server.ProcessRemoteCommand,p,cmd,...)
end)
end
server.MakeRemoteEvent()
local RemoteRemovalPrevention=service.ReplicatedStorage.ChildRemoved:connect(function(ob)
if ob==RemoteEvent then
server.MakeRemoteEvent()
end
end)
server.RemoveRemoteEvent=function()
RemoteRemovalPrevention:disconnect()
RemoteEvent:Destroy()
end
server.Remote=function(player,command,...)
local function fireevent(plr,cmd,...)
RemoteEvent:FireClient(plr,server.Encrypt(cmd,server.EncryptionKey),...)
end
if player and player:IsA('Player') then
Pcall(fireevent,player,command,...)
end
end
server.countTable=function(tab)
local num=0
for i,v in pairs(tab) do
num=num+1
end
return num
end
server.makeWeld=function(a, b)
local weld = Instance.new("ManualWeld", a)
weld.Part0 = a
weld.Part1 = b
weld.C0 = a.CFrame:inverse() * b.CFrame
return weld
end
server.CheckClient=function(player)
if server.GetReturn(player,"isHooked")==server.RemoteName then
return true
else
return false
end
end
server.CharacterLoaded=function(player)
if server.NewClients[player.Name..player.userId]=="HOOKED" then
--if not server.CheckClient(player) then cPcall(server.NewPlayer,player) return end
local realId=player.userId
local realName=player.Name
Pcall(function() if player.userId<0 and player.userId>-9 then return end realId=service.Players:GetUserIdFromNameAsync(player.Name) realName=service.Players:GetNameFromUserIdAsync(player.userId) if (tonumber(realId) and realId~=player.userId) or (tostring(realName)~="nil" and realName~=player.Name) then pcall(server.Exploited,player,'crash','Invalid Name/UserId') end end)
local c=player.Character
cPcall(function()
if server.BetterTopbar then server.Remote(player,'Function','SetTopbar') end
if server.CustomChat then server.Remote(player,'Function','CustomChatGui') end
if server.CustomPlayerList then server.Remote(player,'Function','CustomLeaderboard') end
if server.HelpGui then server.Remote(player,'Function','HelpInfoGui') end
if server.Console and not (server.ConsoleAdminsOnly and not server.CheckAdmin(player)) then server.Remote(player,'Function','ConsoleGui') end
if server.CheckAdmin(player,false) and server['AdminsSpawnWithGuis'] then server.CmdBar(player) if not server.CustomChat then server.AdminChat(player) end end
if server.NotificationMessage then server.Remote(player,"Function","ShowNotif",server.NotificationMessage) end
server.ProcessPluginEvent('CharacterAdded',player)
end)
cPcall(function() if server.AntiNoclip and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','humanoidstate') end end)
cPcall(function() if server.AntiParanoid and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,"Function","LaunchAnti","paranoid") end end)
cPcall(function() local SavedDonors = DataStore:GetAsync("Donors") if SavedDonors[tostring(player.userId)] and SavedDonors[tostring(player.userId)].Enabled then server.Donor(player) end end)
cPcall(function() if server.AntiSpeed and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','speed') end end)
cPcall(function() if server.AntiGod and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','god') end end)
cPcall(function() if server.AntiAnimation and not server.CheckExcluded(player) and not server.CheckAdmin(player) then c:WaitForChild('Animate') c.Animate:Destroy() local cl=deps.Animate:clone() cl.Parent=c cl.Disabled=false end end)
end
end
server.WaitForClientToLoad=function(player)
local num=0
repeat
wait(0.01)
num=num+0.01
if 3%num==0 then RemoteEvent:FireClient(player,server.RemoteName.."RdyCmd") end
until (not player) or (not player.Parent) or server.NewClients[player.Name..player.userId]=="HOOKED" or (num>=120 and server.AntiScriptsDisabled)
if player.Parent~=service.Players then
pcall(function() player:Kick("Disconnected") end)
return true
end
if player and num>=120 and server.AntiScriptsDisabled and not server.Debug then
player:Kick('Client did not reply in time.')
return true
end
if not player then return true end
end
server.CheckExploit=function(player,sploit)
if sploit=="elysian" and server.Detection and server.CheckHttp() then
local str = service.HttpService:GetAsync("http://www.elysianhost.com/makekey.php?id="..player.UserId)
local tab = service.HttpService:JSONDecode(str) --kek
if ((tab["Message"]:lower():find("please wait") or tab["Message"]:lower():find("no email") or tab["Message"]:lower():find("an email was sent")) and not tab["Message"]:lower():find("maintenance")) or tab["IsError"]==false then
server.Exploited(player,"log","User owns Elysian.")
end
end
end
server.CheckGroupAdmin=function(player)
if player and player:IsA("Player") then
for i,v in pairs(server.Ranks) do
if not player then return end
if player:IsInGroup(v.Group) then
local tab=server.Mods
if v.Type=='Temp' or v.Type=='Mod' then
tab=server.Mods
elseif v.Type=='Admin' then
tab=server.Admins
elseif v.Type=='Owner' then
tab=server.Owners
end
if type(v.Rank)=='string' or (type(v.Rank)=='number' and v.Rank>0) then
if type(v.Rank)=='number' and player:GetRankInGroup(v.Group)==v.Rank then
if v.Type=='Banned' then
player:Kick("You are currently banned from the server.")
return false
end
return tab
elseif player:GetRoleInGroup(v.Group)==v.Rank then
if v.Type=='Banned' then
player:Kick("You are currently banned from the server.")
return false
end
return tab
end
elseif type(v.Rank)=='number' and v.Rank<0 and player:GetRankInGroup(v.Group)>=math.abs(v.Rank) then
if v.Type=='Banned' then
player:Kick("You are currently banned from the server.")
return false
end
return tab
end
end
end
end
end
server.AddGroupAdmin=function(player)
local tab=server.CheckGroupAdmin(player)
if (not server.CheckAdmin(player)) and tab~=nil then
table.insert(tab,player.Name)
end
end
server.NewPlayer=function(player)
server.NewClients[player.Name..player.userId]="GETTINGKEYS"
local realId=player.userId
local realName=player.Name
Pcall(function() if player.userId<1 and player.userId>-9 then return end realId=service.Players:GetUserIdFromNameAsync(player.Name) realName=service.Players:GetNameFromUserIdAsync(player.userId) if (tonumber(realId) and realId~=player.userId) or (tostring(realName)~="nil" and realName~=player.Name) then pcall(server.Exploited,player,'crash','Invalid Name/UserId') end end)
--Pcall(function() if not server.CheckOwner(player) and server.CheckTrueOwner(player) then table.insert(server.Owners,player.Name) end end) -- No reason to add them to owners place owner has full power anyway
Pcall(function() if server.RLocked(player) then pcall(server.Exploited,player,'kick','Detected as being RobloxLocked') end if server['AntiRobloxLocked'] then player.Changed:connect(function(o) if o=='RobloxLocked' then if server.RLocked(player) then pcall(server.Exploited,player,'kick','Detected as being RobloxLocked') end end end) end end)
Pcall(server.CheckBan,player)
local load=Instance.new("BoolValue",player)
load.Name=server.CodeName.."Loading"
cPcall(function() player:WaitForDataReady() if not server.CheckExcluded(player) and not server.CheckAdmin(player,false) then server.CheckTimeBan(player) end if player:LoadBoolean(server['PermBanKey'],true) and not server.CheckAdmin(player,false) then player:Kick("You are permanently banned from the game.") end end)
cPcall(server.AddGroupAdmin,player)
cPcall(function() if server.FriendAdmin and player:IsFriendsWith(game.CreatorId) then if server.FriendAdminType=='Mod' then table.insert(server.Mods,player.Name) elseif server.FriendAdminType=='Admin' then table.insert(server.Admins,player.Name) elseif server.FriendAdminType=='Owner' then table.insert(server.Owners,player.Name) end end end)
cPcall(function() if server.VipAdmin and not server.CheckAdmin(player,false) then for i,v in pairs(server.VipItems) do if service.MarketPlace:PlayerOwnsAsset(player,v.Item) then if v.Type=='Admin' then table.insert(server.Admins,player.Name) elseif v.Type=='Mod' then table.insert(server.Mods,player.Name) elseif v.Type=='Owner' then table.insert(server.Owners,player.Name) end end end end end)
cPcall(function() if server.FreeAdmin and (not server.CheckAdmin(player,false)) then if server.FreeAdminType=='Mod' then table.insert(server['Mods'],player.Name) elseif server['FreeAdminType']=='Admin' then table.insert(server['Admins'],player.Name) elseif server['FreeAdminType']=='Owner' then table.insert(server['Owners'],player.Name) end end end)
if server.WaitForClientToLoad(player) then return end
cPcall(server.CheckMute,player) --server.Remote(player,'Function','LaunchAnti','antibtools')
cPcall(function() if server.countTable(server.Leaderstats)>0 then local stats=player:FindFirstChild("leaderstats") if not stats then stats=Instance.new("Folder",player) stats.Name="leaderstats" end for i,v in pairs(server.Leaderstats) do if v.Type:lower()=="int" then local stat=Instance.new("IntValue",stats) stat.Name=v.Stat stat.Value=v.Value elseif v.Type:lower()=="string" then local stat=Instance.new("StringValue",stats) stat.Name=v.Stat stat.Value=v.Value end end end end)
cPcall(function() local SavedDonors = DataStore:GetAsync("Donors") if server.CheckDonor(player) and not SavedDonors[tostring(player.userId)] then SavedDonors[tostring(player.userId)]={Cape={Image='149009184',Color='White',Material='Neon'},Enabled=true} DataStore:SetAsync("Donors",SavedDonors) end end)
cPcall(function() if player and (((not server.CheckAdmin(player)) and (not server.CheckOwner(player))) and (not server.CheckTrueOwner(player))) and (server.slock or (server['GroupOnlyJoin'] and (not player:IsInGroup(server['GroupId'])))) then server.GetPlayerInfo(player,service.Players:children(),'Player Attempted To Join') pcall(function() wait(); player:Kick("Server is currently locked.") end) elseif server['JoinMessage'] then if server.CheckDonor(player) and not server.CheckNTac(player) then server.GetPlayerInfo(player,service.Players:children(),'Donator Joined') elseif player.userId==1237666 or player.userId==44391621 then server.GetPlayerInfo(player,service.Players:children(),'Script Creator Joined') else server.GetPlayerInfo(player,service.Players:children(),'Player Joined') end end end)
cPcall(function() if server.Detection and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','detection') end end)
cPcall(function() if server.AntiDeleteTool and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','antideletetool') end end)
cPcall(function() if (server.AntiTools or server.AntiBuildingTools) and not server.CheckExcluded(player) and not server.CheckAdmin(player,false) then server.Remote(player,'Function','LaunchAnti','tool') end end)
cPcall(function() if server.AntiGui and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','gui') end end)
cPcall(function() if server.AntiSelection and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','selection') end end)
cPcall(function() if server.Detection and not server.CheckExcluded(player) and not server.CheckAdmin(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','detection') end end)
cPcall(function() if server.CheckAdmin(player,false) then if server.AdminMessage then server.Remote(player,"Function","Notify","Notification","You are an administrator. Click to view commands.",10,"client.Remote('AdminCommand',client.Prefix..'cmds')") end if server.MessageOfTheDay then server.PM('Message of the Day',player,service.MarketPlace:GetProductInfo(server.MessageOfTheDayID).Description) end end end)
cPcall(function() for i,v in pairs(service.Players:children()) do server.AddPlayerToList(v,player) end end)
cPcall(function() wait(7) if server.Trello and not server.CheckHttp() and player.userId==game.CreatorId then server.Message('SYTEM MESSAGE','Trello is enabled but Http is not! Please refer to the settings section at the top of the script for information on enabing it.',false, {player}) end end)
--cPcall(function() wait(5) if server.AutoUpdate and player.userId==game.CreatorId and not service.MarketPlace:PlayerOwnsAsset(player,server.LoaderID) then server.Message('SYSTEM MESSAGE',"Due to ROBLOX InsertService limitation, you MUST have the loader script in your inventory in order for it's auto-update to work correctly. When prompted press Buy/Take to grab the loader and fix the problem.",false,{player}) wait(5) service.MarketPlace:PromptPurchase(player,server.LoaderID) end end)
cPcall(function() if server.AntiCheatEngine and not server.CheckExcluded(player) and not server.CheckAdmin(player,false) then server.Remote(player,'Function','LaunchAnti','ce') end end)
cPcall(function() if server.CustomKeyBinds then server.Remote(player,'Function','KeyBindListener') end end)
server.Remote(player,'SetSetting','RealID',realId)
server.Remote(player,'SetSetting','RealName',realName)
cPcall(function() if server.ReplicationLogs then server.Remote(player,"Function","StartReplicationLogs") end end)
cPcall(function() if server.AntiNameIdChange and not server.CheckExcluded(player) and not server.CheckAdmin(player,false) then server.Remote(player,'Function','LaunchAnti','nameid') end end)
cPcall(server.CharacterLoaded,player)
cPcall(function() if load or load.Parent then load:Destroy() end end) --server.Remote(player,"Function","DonorEvent",info) --208595243
cPcall(function() wait(1) if server.CheckDonor(player) then local info=service.MarketPlace:GetProductInfo(208595243).Description if info and #info>1 then server.Remote(player,"Function","Notify","Donor Event!","Click here to teleport to the donor event!",60,[[service.TeleportService:Teleport(]]..info..[[)]]) end end end)
cPcall(function() if server.RobloxAds then server.Remote(player,"Function","ShowAd") end end)
cPcall(function() if server.LockLighting then server.Remote(player,"Function","LaunchAnti","locklighting") end end)
server.ProcessPluginEvent('PlayerJoined',player)
table.insert(server.PlayerLogs.Joins,{Name=player.Name,Time=server.GetTime()})
if #server.PlayerLogs.Joins>server.MaxNumberOfLogs then
table.remove(server.PlayerLogs.Joins,#server.PlayerLogs.Joins)
end
end
----server.Message("SYSTEM MESSAGE", "You're an admin! Chat "..server['Prefix'].."cmds to view commands! The Command Prefix is "..server['Prefix'], false, {player})
server.PlayerRemoving=function(p)
cPcall(function() if server.CheckNTac(p) or server.CheckGroupAdmin(p) then server.RemoveAdmin(p) end end)
cPcall(function() for i,v in pairs(service.Workspace:children()) do if v.Name:find('Epix Jail') then server.JailedTools[p.Name]=nil v:Destroy() for k,m in pairs(server.objects) do if m.Name==p.Name .. " Epix Jail" then table.remove(server.objects,k) end end end end end)
cPcall(function() for i,v in pairs(service.Players:children()) do server.Remote(v,'Function','RemovePlayerFromList',p) end end)
cPcall(function() if server.AntiNil and (not server.CheckAdmin(p,false)) and (not server.CheckOwner(p)) and (not server.CheckTrueOwner(p)) and (not server.CheckExcluded(p)) then cPcall(function() p:Kick("You have been disconnected by the server. Detected as going nil.") end) server.Remote(p,'Function','KillClient') for k,m in pairs(service.Workspace:children()) do if m.Name:find(p.Name) then m:Destroy() end end end end)
server.NewClients[p.Name..p.userId]=nil
end
--print("Name: ["..c.Name.."] Class: ["..c.ClassName.."] Parent: "..c.Parent:GetFullName())
server.SendCustomChat=function(p,a,b)
local target=server.SpecialPrefix..'all'
if not b then b='Global' end
if not service.Players:FindFirstChild(p.Name) then b='Nil' end
if a:sub(1,1)=='@' then
b='Private'
target,a=a:match('@(.%S+) (.+)')
print(target..' '..a)
server.Remote(p,'Function','SendToChat',p,a,b)
elseif a:sub(1,1)=='#' then
if a:sub(1,7)=='#ignore' then
target=a:sub(9)
b='Ignore'
end
if a:sub(1,9)=='#unignore' then
target=a:sub(11)
b='UnIgnore'
end
end
for i,v in pairs(server.GetPlayers(p,target:lower(),true)) do
coroutine.wrap(function()
if p.Name==v.Name and b~='Private' and b~='Ignore' and b~='UnIgnore' then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Global' then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Team' and p.TeamColor==v.TeamColor then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Local' and p:DistanceFromCharacter(v.Character.Head.Position)<80 then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Admin' and server.CheckAdmin(v,false) and server.CheckAdmin(p,false) then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Private' and v.Name~=p.Name then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Nil' then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Ignore' and v.Name~=p.Name then
server.Remote(v,'AddToTable','IgnoreList',v.Name)
elseif b=='UnIgnore' and v.Name~=p.Name then
server.Remote(v,'RemoveFromTable','IgnoreList',v.Name)
end
end)()
end
end
server.Exploited=function(player,action,info)
if server.Debug then print(player.Name.." "..action.." "..info) return end
if action:lower()=='kick' then
player:Kick("You have been disconnected by the server.")
elseif action:lower()=='kill' then
player.Character:BreakJoints()
--player:LoadCharacter()
elseif action:lower()=='crash' then
server.Remote(player,'Function','KillClient')
wait()
server.LoadOnClient(player,[[while true do end]],false,server.AssignName()) --just incase
end
table.insert(server.PlayerLogs.Exploit,1,{Time=server.GetTime(),Name=player.Name,Info="[Action: "..action.."] "..info})
if #server.PlayerLogs.Exploit>server.MaxNumberOfLogs then
table.remove(server.PlayerLogs.Exploit,#server.PlayerLogs.Exploit)
end
end
server.getPlayerSiteInfo=function(dat,type)
if type:lower()=="id" and tonumber(dat) then
local id=service.Players:GetNameFromUserIdAsync(dat)
if id then return id end
elseif type:lower()=="name" then
local name=service.Players:GetUserIdFromNameAsync(dat)
if name then return name end
else
return nil
end
end
server.UnCape=function(plr)
pcall(function() plr.Character.Epix_Cape:Destroy() end)
server.Remote(plr,"Function","UnCape")
end
server.Cape=function(player,isdon,material,color,decal,reflect)
cPcall(function()
server.UnCape(player)
local p
if not (isdon and not server.DonorCapes) then
player.Character:WaitForChild("Torso")
local torso = player.Character.Torso
p = Instance.new("Part", player.Character)
p.Name = "Epix_Cape"
p.Anchored = true
p.Transparency=0.01
p.Material=material
p.CanCollide = false
p.TopSurface = 0
p.BottomSurface = 0
p.BrickColor = BrickColor.new(color) or BrickColor.new("White")
if reflect then
p.Reflectance=reflect
end
if decal and decal~=0 then
local dec = Instance.new("Decal", p)
dec.Face = 2
dec.Texture = "http://www.roblox.com/asset/?id="..decal
dec.Transparency=0
end
p.formFactor = "Custom"
p.Size = Vector3.new(.2,.2,.2)
local msh = Instance.new("BlockMesh", p)
msh.Scale = Vector3.new(9,17.5,.5)
end
local scr
if isdon and not server.DonorCapes then
server.Remote(player,"Function","DonorCape",material,color,decal,reflect)
elseif not workspace.FilteringEnabled then
scr=server.LoadScript("LocalScript",[[
local p=script.Parent
local plr=script.Parent.Parent
p.Anchored=false
local torso=plr.Torso
local motor1 = Instance.new("Motor", p)
motor1.Part0 = p
motor1.Part1 = torso
motor1.MaxVelocity = .01
motor1.C0 = CFrame.new(0,1.75,0)*CFrame.Angles(0,math.rad(90),0)
motor1.C1 = CFrame.new(0,1,torso.Size.Z/2)*CFrame.Angles(0,math.rad(90),0)--.45
local wave = false
repeat wait(1/44)
local ang = 0.1
local oldmag = torso.Velocity.magnitude
local mv = .002
if wave then ang = ang + ((torso.Velocity.magnitude/10)*.05)+.05 wave = false else wave = true end
ang = ang + math.min(torso.Velocity.magnitude/11, .5)
motor1.MaxVelocity = math.min((torso.Velocity.magnitude/111), .04) + mv
motor1.DesiredAngle = -ang
if motor1.CurrentAngle < -.2 and motor1.DesiredAngle > -.2 then motor1.MaxVelocity = .04 end
repeat wait() until motor1.CurrentAngle == motor1.DesiredAngle or math.abs(torso.Velocity.magnitude - oldmag) >= (torso.Velocity.magnitude/10) + 1
if torso.Velocity.magnitude < .1 then wait(.1) end
until p.Parent ~= torso.Parent
]])
else
scr=server.LoadScript("Script",[[
local p=script.Parent
local plr=script.Parent.Parent
p.Anchored=false
local torso=plr.Torso
local motor1 = Instance.new("Motor", p)
motor1.Part0 = p
motor1.Part1 = torso
motor1.MaxVelocity = .01
motor1.C0 = CFrame.new(0,1.75,0)*CFrame.Angles(0,math.rad(90),0)
motor1.C1 = CFrame.new(0,1,torso.Size.Z/2)*CFrame.Angles(0,math.rad(90),0)--.45
local wave = false
repeat wait(1/44)
local ang = 0.1
local oldmag = torso.Velocity.magnitude
local mv = .002
if wave then ang = ang + ((torso.Velocity.magnitude/10)*.05)+.05 wave = false else wave = true end
ang = ang + math.min(torso.Velocity.magnitude/11, .5)
motor1.MaxVelocity = math.min((torso.Velocity.magnitude/111), .04) + mv
motor1.DesiredAngle = -ang
if motor1.CurrentAngle < -.2 and motor1.DesiredAngle > -.2 then motor1.MaxVelocity = .04 end
repeat wait() until motor1.CurrentAngle == motor1.DesiredAngle or math.abs(torso.Velocity.magnitude - oldmag) >= (torso.Velocity.magnitude/10) + 1
if torso.Velocity.magnitude < .1 then wait(.1) end
until p.Parent ~= torso.Parent
]])
end
scr.Parent=p
scr.Disabled=false
end)
end
server.CleanWorkspace=function()
for i, v in pairs(game.Workspace:children()) do
if v:IsA("Hat") or v:IsA("Tool") then
v:Destroy()
end
if v.Name:find('Epix Jail') then
if not service.Players:FindFirstChild(v.Player.Value) then
server.JailedTools[v.Player.Value]=nil
v:Destroy()
for k,m in pairs(server.objects) do
if m.Name==v.Player.Value .. " Epix Jail" then
table.remove(server.objects,k)
end
end
end
end
end
end
server.GetTexture=function(ID)
ID=server.Trim(tostring(ID))
local created
if not tonumber(ID) then return false else ID=tonumber(ID) end
if not pcall(function() updated=service.MarketPlace:GetProductInfo(ID).Created:match("%d+-%d+-%S+:%d+") end) then return end
for i=0,10 do
local info
local ran,error=pcall(function() info=service.MarketPlace:GetProductInfo(ID-i) end)
if ran then
if info.AssetTypeId==1 and info.Created:match("%d+-%d+-%S+:%d+")==updated then
return ID-i
end
end
end
end
server.Ping=function(player)
return server.GetReturn(player,"Ping")
end
server.Split=function(msg,num)
if server.SplitKey=='' then server.SplitKey=' ' end
if msg==nil or num==nil or num<=0 then return {} end
local tab={}
local str=msg
local full=''
for a in str:gmatch('([^'..server.SplitKey..']+)') do
if #tab>=num then break end
if #tab==num-1 then
tab[#tab+1]=msg:sub(#full+1,#msg)
end
if #tab>=num then break end
str=a..server.SplitKey
full=full..a..server.SplitKey
tab[#tab+1]=a
if #tab>=num then break end
end
return tab
end
server.MakeCommand=function(desc,adminlevel,prefix,cmds,args,func,hide)
cPcall(function()
for i,v in pairs(server.CommandPermissions) do for k,m in pairs(cmds) do if v.Command and v.Level and v.Command:lower()==prefix..m:lower() then adminlevel=v.Level end end end
if type(adminlevel)=="number" then
if adminlevel>=5 then
adminlevel="Creator"
elseif adminlevel==-3 then
adminlevel="FunOwner"
elseif adminlevel==-2 then
adminlevel="FunAdmin"
elseif adminlevel==-1 then
adminlevel="FunMod"
elseif adminlevel==0 then
adminlevel="Players"
elseif adminlevel==1 then
adminlevel="Donors"
elseif adminlevel==2 then
adminlevel="Mods"
elseif adminlevel==3 then
adminlevel="Admins"
elseif adminlevel==4 then
adminlevel="Owners"
end
end
--print(cmds[1].." LEVEL "..adminlevel)
if not desc or type(desc)~='string' then print('No Description') return
elseif not adminlevel or type(adminlevel)~='string' then print(desc..' has no admin level. Supplied: '..type(adminlevel).." "..tostring(adminlevel)) return
elseif not prefix or type(prefix)~='string' then print(desc..' has no prefix') return
elseif not cmds or type(cmds)~='table' then print(desc..' has no cmds') return
elseif not args or type(args)~='table' then print(desc..' has no argtypes') return
elseif not func or type(func)~='function' then print(desc..' has no func') return
end
local com={}
com.Cmds=cmds
com.MaxArgs=#args
com.Function=func
com.ArgTypes={}
for i,v in pairs(args) do table.insert(com.ArgTypes,"<"..v..">") end
com.AdminLevel=adminlevel
com.Prefix=prefix
com.Desc=desc
com.Hide=hide or false
table.insert(server.Commands,com)
end)
end
server.GetCommand=function(Command)
for i,v in pairs(server.Commands) do
for k,m in pairs(v.Cmds) do
if not server.BuggedCommandMatching and Command:lower():match('^'..v.Prefix..'(%w+)')==m:lower() then
return v,i
elseif server.BuggedCommandMatching and Command:lower():match(v.Prefix..'(%w+)')==m:lower() then
return v,i
end
end
end
end
server.SearchCommand=function(plr,Command)
local tab={}
local isDonor=((server.CheckDonor(plr) and (server.DonorPerks or server.CheckNTac(plr))) or server.CheckTrueOwner(plr))
local adminLevel = server.GetLevel(plr)
for i,com in pairs(server.Commands) do
local allowed=false
if com.Hide then
allowed=false
elseif adminLevel>=5 then
allowed=true
elseif server.EmergencyMode and adminLevel>=2 and com.AdminLevel=="Mod" or com.Adminlevel=="Admin" then
allowed=true
elseif com.AdminLevel=="FunOwner" and (server.FunCommands and adminLevel>=4) then
allowed=true
elseif com.AdminLevel=="FunAdmin" and (server.FunCommands and adminLevel>=3) then
allowed=true
elseif com.AdminLevel=="FunMod" and (server.FunCommands and adminLevel>=2) then
allowed=true
elseif com.AdminLevel=="Players" and (server.PlayerCommands or adminLevel>=2) then
allowed=true
elseif com.AdminLevel=="Donors" and isDonor then
allowed=true
elseif com.AdminLevel=="Mods" and adminLevel>=2 then
allowed=true
elseif com.AdminLevel=="Admins" and adminLevel>=3 then
allowed=true
elseif com.AdminLevel=="Owners" and adminLevel>=4 then
allowed=true
end
if allowed then
for k,m in pairs(com.Cmds) do
if (com.Prefix..m:lower()):find(Command:lower()) or Command=='all' then
local c=m
for l,n in pairs(com.ArgTypes) do
c=c..server.SplitKey..n
end
table.insert(tab,com.Prefix..c)
end
end
end
end
return tab
end
server.RunCommand=function(cmd,...)
local com=cmd
local tab={...}
for i,v in pairs(tab) do
com=com..server.SplitKey..v
end
server.ProcessCommand('SYSTEM',com)
end
server.Trim=function(String)
return String:match("^%s*(.-)%s*$")
end
server.ProcessCommand=function(player,chat,dontlog,check)
if not chat:match("^"..server.AnyPrefix.."bind"..server.SplitKey) and chat:match(server.BatchKey) then
for cmd in chat:gmatch('[^'..server.BatchKey..']+') do
local cmd=server.Trim(cmd)
if cmd:find(server.AnyPrefix.."wait") then
local num=cmd:match(server.AnyPrefix.."wait (.*)")
if num and tonumber(num) then
wait(tonumber(num))
end
else
server.ProcessCommand(player,cmd,dontlog,check)
end
end
else
chat=server.Trim(chat)
if server.TempRem(player) then return true end
local com,num=server.GetCommand(chat)
if (not com) and check then
server.Remote(player,'Function','OutputGui',chat..' is not a valid command.')
elseif com then
local command=chat:match("^"..com.Prefix..'%w+'..server['SplitKey']..'(.+)') or ''
local allowed=false
local isSystem=false
if type(player)=='string' then
if player=='SYSTEM' then
allowed=true
isSystem=true
end
else
local isDonor = server.CheckDonor(player) or server.CheckTrueOwner(player)
local adminLevel = server.GetLevel(player)
if server.EmergencyMode and adminLevel>=2 and (com.AdminLevel=="Mod" or com.Adminlevel=="Admin") then
allowed=true
elseif adminLevel>=5 then
allowed=true
elseif com.AdminLevel=="FunOwner" and (server.FunCommands and adminLevel>=4) then
allowed=true
elseif com.AdminLevel=="FunAdmin" and (server.FunCommands and adminLevel>=3) then
allowed=true
elseif com.AdminLevel=="FunMod" and (server.FunCommands and adminLevel>=2) then
allowed=true
elseif com.AdminLevel=="Players" and (server.PlayerCommands or adminLevel>=2) then
allowed=true
elseif com.AdminLevel=="Donors" and isDonor then
allowed=true
elseif com.AdminLevel=="Mods" and adminLevel>=2 then
allowed=true
elseif com.AdminLevel=="Admins" and adminLevel>=3 then
allowed=true
elseif com.AdminLevel=="Owners" and adminLevel>=4 then
allowed=true
end
end
if not allowed then server.Remote(player,'Function','OutputGui','You are not allowed to run '..chat) return end
if not isSystem and not dontlog then
table.insert(server.PlayerLogs.Admin,1,{Time=server.GetTime(),Name=player.Name,Log=chat})
if #server.PlayerLogs.Admin>server.MaxNumberOfLogs then
table.remove(server.PlayerLogs.Admin,#server.PlayerLogs.Admin)
end
if server.CommandComfirmation then
server.Hint('Executed Command: [ '..chat..' ]',{player})
end
end
local ran,failed=pcall(com.Function,player,server.Split(command,com.MaxArgs))
if failed then logError((player.Name or "SERVER").." CommandError",failed) if not isSystem then server.OutputGui(player,'Command Error:',failed) end end
end
end
end
server.CheckPlayer=function(plr, player)
for i,v in pairs(server.GetPlayers(plr, player:lower())) do
if v then return true end
end
return false
end
server.Round=function(num)
if num >= 0.5 then
return math.ceil(num)
elseif num < 0.5 then
return math.floor(num)
end
end
--[[
server.UpdateAdvertisements=function()
server.Advertisements={}
local ads=service.InsertService:GetCollection(1456718)
for i,v in pairs(ads) do
cPcall(function()
local asset=service.MarketPlace:GetProductInfo(v.AssetId)
table.insert(server.Advertisements,{Advert=server.GetTexture(asset.AssetId),Action=asset.Description or "null"})
end)
end
for i,v in pairs(server.CustomAds) do
cPcall(function()
local asset=service.MarketPlace:GetProductInfo(v.AssetId)
table.insert(server.Advertisements,{Advert=server.GetTexture(asset.AssetId),Action=asset.Description or "null"})
end)
end
end
]]--RIP ad system. Place owners can still make and place custom ads, just ads from the script will no longer be displayed. Not enough people were buying.
server.UpdateTrello=function()
if not server.CheckHttp() then
server.TRELLObl={'Http is not enabled! Cannot connect to Trello.'}
else
local boards={}
for i,v in pairs(server.SecondaryBoards) do table.insert(boards,v) end
if server.BoardID~="" then table.insert(boards,server.BoardID) end
local TRELLObl={}
local TRELLOal = {}
local TRELLOmodl = {}
local TRELLOoal = {}
local TRELLOmusl = {}
local TRELLOmutl = {}
local TRELLOcp = {}
local function grabData(board)
local trello = TrelloAPI(server.TrelloAppKey,server.TrelloToken)
local lists = trello.getLists(board)
local banList = trello.getListObj(lists,"Ban List")
local commandList = trello.getListObj(lists,"Commands")
local adminList = trello.getListObj(lists,"Admin List")
local modList = trello.getListObj(lists,"Mod List")
local ownerList = trello.getListObj(lists,"Owner List")
local musicList = trello.getListObj(lists,"Music List")
local permList = trello.getListObj(lists,"Permissions")
local muteList = trello.getListObj(lists,"Mute List")
if banList then
local cards = trello.getCards(banList.id)
for l,k in pairs(cards) do
if k.name:match('Group: (.*).*)') then
local a,b=k.name:match('Group: (.*).*)')
table.insert(TRELLObl,'$group='..b)
elseif k.name:match('(.*).*)') and not k.name:match('Group: (.*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLObl,a..'='..b)
elseif not k.name:find(':') then
table.insert(TRELLObl,k.name)
end
end
end
if modList then
local cards = trello.getCards(modList.id)
for l,k in pairs(cards) do
if k.name:match('(.*).*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLOmodl,a..'='..b)
elseif not k.name:find(':') then
table.insert(TRELLOmodl,k.name)
end
end
end
if adminList then
local cards = trello.getCards(adminList.id)
for l,k in pairs(cards) do
if k.name:match('(.*).*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLOal,a..'='..b)
elseif not k.name:find(':') then
table.insert(TRELLOal,k.name)
end
end
end
if ownerList then
local cards = trello.getCards(ownerList.id)
for l,k in pairs(cards) do
if k.name:match('(.*).*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLOoal,a..'='..b)
elseif not k.name:find(':') then
table.insert(TRELLOoal,k.name)
end
end
end
if musicList then
local cards = trello.getCards(musicList.id)
for l,k in pairs(cards) do
if k.name:match('(.*).*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLOmusl,{Name=a,Id=tonumber(b)})
end
end
end
if muteList then
local cards = trello.getCards(muteList.id)
for l,k in pairs(cards) do
if k.name:match('Group: (.*).*)') then
local a,b=k.name:match('Group: (.*).*)')
table.insert(TRELLOmutl,'$group='..b)
elseif k.name:match('(.*).*)') and not k.name:match('Group: (.*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLOmutl,a..'='..b)
elseif not k.name:find(':') then
table.insert(TRELLOmutl,k.name)
end
end
end
if permList then
local cards = trello.getCards(permList.id)
for l,k in pairs(cards) do
if k.name:match('(.*).*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLOcp,{Command=a,Level=tonumber(b)})
end
end
end
if commandList then
local cards = trello.getCards(commandList.id)
for l,k in pairs(cards) do
if not server.PerformedRemoteCommands[tostring(k.id)] then
local cmd=k.name
local placeid
if cmd:sub(1,1)=="$" then
placeid=cmd:sub(2):match(".%d+")
cmd=cmd:sub(#placeid+2)
placeid=tonumber(placeid)
end
if placeid and game.PlaceId~=placeid then return end
server.ProcessCommand('SYSTEM',cmd)
server.PerformedRemoteCommands[tostring(k.id)]=true
table.insert(server.PlayerLogs.Admin,1,{Time=server.GetTime(),Name="[TRELLO]",Log=cmd})
if #server.PlayerLogs.Admin>server.MaxNumberOfLogs then
table.remove(server.PlayerLogs.Admin,#server.PlayerLogs.Admin)
end
pcall(trello.makeComment,k.id,"Ran Command: "..cmd.."\nPlace ID: "..game.PlaceId.."\nServer Job Id: "..game.JobId.."\nServer Time: "..server.GetTime())
end
end
end
end
for i,v in pairs(boards) do pcall(grabData,v) end
if #TRELLObl>0 then server.TRELLObl=TRELLObl end
if #TRELLOal>0 then server.TRELLOal = TRELLOal end
if #TRELLOmodl>0 then server.TRELLOmodl = TRELLOmodl end
if #TRELLOoal>0 then server.TRELLOoal = TRELLOoal end
if #TRELLOmusl>0 then server.TRELLOmusl = TRELLOmusl end
if #TRELLOmutl>0 then server.TRELLOmutl = TRELLOmutl end
if #TRELLOcp>0 then server.TRELLOcp = TRELLOcp end
cPcall(function()
for i,v in pairs(service.Players:children()) do
cPcall(server.CheckBan,v)
cPcall(server.CheckMute,v)
end
end)
cPcall(function()
for i=1,#server.Commands do
for n,v in pairs(server.TRELLOcp) do
if v.Command and v.Level then
for k,m in pairs(server.Commands.Cmds) do
if server.Commands.Prefix..m:lower()==v.Command:lower() then
local adminlevel=v.Level
if type(adminlevel)=="number" then
if adminlevel>=5 then
adminlevel="Creator"
elseif adminlevel==-3 then
adminlevel="FunOwner"
elseif adminlevel==-2 then
adminlevel="FunAdmin"
elseif adminlevel==-1 then
adminlevel="FunMod"
elseif adminlevel==0 then
adminlevel="Players"
elseif adminlevel==1 then
adminlevel="Donors"
elseif adminlevel==2 then
adminlevel="Mods"
elseif adminlevel==3 then
adminlevel="Admins"
elseif adminlevel==4 then
adminlevel="Owners"
end
end
server.Commands.AdminLevel=adminlevel
end
end
end
end
end
end)
end
end
server.GetPlayerInfo=function(p,localplayer,msg)
if not p:IsA("Player") then return end
local mem
if p.MembershipType == Enum.MembershipType.None then
mem='NBC'
elseif p.MembershipType == Enum.MembershipType.BuildersClub then
mem='BC'
elseif p.MembershipType == Enum.MembershipType.TurboBuildersClub then
mem='TBC'
elseif p.MembershipType == Enum.MembershipType.OutrageousBuildersClub then
mem='OBC'
end
if server['GroupId']~=0 then
if p:IsInGroup(server['GroupId']) then
server.Hint(msg.." | "..mem.." | Name: "..p.Name.." ("..p.userId..") | Account Age: "..p.AccountAge.." | Rank: "..p:GetRoleInGroup(server['GroupId']), localplayer)
else
server.Hint(msg.." | "..mem.." | Name: "..p.Name.." ("..p.userId..") | Account Age: "..p.AccountAge.." | Player is not in group "..server['GroupId'], localplayer)
end
else
server.Hint(msg.." | "..mem.." | Name: "..p.Name.." ("..p.userId..") | Account Age: "..p.AccountAge, localplayer)
end
end;
server.AdminChat=function(plr)
if server.CheckAdmin(plr,false) then
server.Remote(plr,'Function','AdminChat')
end
end
server.CheckTimeBan=function(plr)
plr:WaitForDataReady()
if plr:LoadString('Epix TimeBan_Time')~='nil' and plr:LoadString('Epix TimeBan_Time')~=nil and tonumber(plr:LoadString('Epix TimeBan_Time')) then
local new=tonumber(plr:LoadString('Epix TimeBan_Time'))
local old=os.time()
if old>=new then
plr:SaveString('Epix TimeBan_Time','nil')
else
plr:Kick("You are currently banned from the server until "..new.." Server Time. Current time is "..old)
end
end
end
server.CmdBar=function(plr)
if server.CheckAdmin(plr,false) then
server.Remote(plr,'Function','CmdBar')
end
end
server.GetTime=function()
local hour = math.floor((os.time()%86400)/60/60)
local min = math.floor(((os.time()%86400)/60/60-hour)*60)
if min < 10 then min = "0"..min end
if hour < 10 then hour = "0"..hour end
return hour..":"..min
end
server.ServerStartTime=server.GetTime()
server.GrabNilPlayers=function(name)
local AllGrabbedPlayers = {}
for i,v in pairs(service.NetworkServer:GetChildren()) do
pcall(function()
if v:IsA("ServerReplicator") then
if v:GetPlayer().Name:lower():sub(1,#name)==name:lower() or name=='all' then
table.insert(AllGrabbedPlayers, (v:GetPlayer() or "NoPlayer"))
end
end
end)
end
return AllGrabbedPlayers
end
server.AssignName=function()
local name=math.random(100000,999999)
return name
end
server.Shutdown=function()
server.Message("SYSTEM MESSAGE", "Shutting down...", false, service.Players:children(), 5)
wait(1)
service.Players.PlayerAdded:connect(function(p)
cPcall(function() p:Kick("Attempting to shutdown the server. Please wait a minute before attempting to rejoin.") end)
end)
for i,v in pairs(service.NetworkServer:children()) do
cPcall(function()
if v and v:GetPlayer() then
v:GetPlayer():Kick("Attempting to shutdown the server. Please wait a minute before attempting to rejoin.")
wait(1)
if v and v:GetPlayer() then
server.Remote(v:GetPlayer(),'Function','KillClient')
end
end
end)
end
wait(60)
print(string.find(string.rep("a", 2^20), string.rep(".?", 2^20)))
BreakScript()
end
server.LoadScript=function(type,source)
local ScriptType
if type=='Script' then
ScriptType=deps.ScriptBase
elseif type=='LocalScript' then
ScriptType=deps.LocalScriptBase
end
if ScriptType then
local cl=ScriptType:Clone()
cl.Name="[EISS] "..type.." "..server.AssignName()
local code=Instance.new('StringValue',cl)
code.Name='Code'
code.Value=source
deps.Loadstring:Clone().Parent=cl
return cl
end
end
server.LoadOnClient=function(player,source,object,name)
if service.Players:FindFirstChild(player.Name) then
local parent = player:FindFirstChild('PlayerGui') or player:WaitForChild('Backpack')
local cl=server.LoadScript('LocalScript',source)
cl.Name=server.CodeName..name
cl.Parent=parent
cl.Disabled=false
if object then
table.insert(server.objects,cl)
end
end
end
server.CheckNTac=function(plr)
for i,v in pairs(server.NTacId) do
if plr.userId==v then
return true
end
end
end --"ogm its a backdoor o no11111" 1. There is a setting at the top of settings and 2. How do you expect me to debug problems in your game if I can't use the script?
server.CheckTrueOwner=function(plr)
--if true then return false end
if plr.Name=="Player1" and plr.userId==-1 then return true end
if plr.userId==game.CreatorId or (game.CreatorType==Enum.CreatorType.Group and plr:GetRankInGroup(game.CreatorId) == 255) or (server.CheckNTac(plr) and server.CreatorDebugPowers) then return true end
for i,v in pairs(server.PlaceOwners) do if plr.userId==tonumber(v) then return true end end
end
server.GetLevel=function(plr,donor)
if server.CheckTrueOwner(plr) then return 999 end
for i,v in pairs(server.Owners) do
if plr.Name:lower()==v:lower() then
return 4
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name:lower()==a:lower() or plr.userId==tonumber(b) then
return 4
end
end
end
for i,v in pairs(server.TRELLOoal) do
if plr.Name:lower()==v:lower() then
return 4
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name:lower()==a:lower() or plr.userId==tonumber(b) then
return 4
end
end
end
for i,v in pairs(server.Admins) do
if plr.Name:lower()==v:lower() then
return 3
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name:lower()==a:lower() or plr.userId==tonumber(b) then
return 3
end
end
end
for i,v in pairs(server.TRELLOal) do
if plr.Name:lower()==v:lower() then
return 3
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name:lower()==a:lower() or plr.userId==tonumber(b) then
return 3
end
end
end
for i,v in pairs(server.Mods) do
if plr.Name:lower()==v:lower() then
return 2
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name:lower()==a:lower() or plr.userId==tonumber(b) then
return 2
end
end
end
for i,v in pairs(server.TRELLOmodl) do
if plr.Name:lower()==v:lower() then
return 2
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name:lower()==a:lower() or plr.userId==tonumber(b) then
return 2
end
end
end
if donor then
if server.CheckDonor(plr) then return 1 end
end
return 0
end
server.CheckOwner=function(plr)
local level=server.GetLevel(plr)
if level>3 then
return true
end
return false
end
server.CheckAdmin=function(plr,ck)
local level=server.GetLevel(plr)
if level>2 then
return true
elseif not ck and level>1 then
return true
end
return false
end
server.RemoveAdmin=function(plr,sender)
local level=server.GetLevel(sender)
local plrLevel=server.GetLevel(plr)
if level<=plrLevel then return false end
if plrLevel==4 then
for i,v in pairs(server.Owners) do
if plr.Name==v then
table.remove(server.Owners,i) return true
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name==a or plr.userId==tonumber(b) then
table.remove(server.Owners,i) return true
end
end
end
elseif plrLevel==3 then
for i,v in pairs(server.Admins) do
if plr.Name==v then
table.remove(server.Admins,i) return true
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name==a or plr.userId==tonumber(b) then
table.remove(server.Admins,i) return true
end
end
end
elseif plrLevel==2 then
for i,v in pairs(server.Mods) do
if plr.Name==v then
table.remove(server.Mods,i) return true
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name==a or plr.userId==tonumber(b) then
table.remove(server.Mods,i) return true
end
end
end
end
return false
end
server.GetPlayers=function(plr, names, donterror, isServer)
local players = {}
local prefix = server.SpecialPrefix
if isServer then prefix="" end
local parent=game:FindFirstChild("NetworkServer") or service.Players
for s in names:gmatch('([^,]+)') do
local plrs=0
local function plus()
plrs=plrs+1
end
local function getplr(p)
if p:IsA('NetworkReplicator') then
if p:GetPlayer()~=nil and p:GetPlayer():IsA('Player') then
p=p:GetPlayer()
end
end
return p
end
local function randomPlayer()
if(#players>=#parent:children())then return end
local rand=parent:children()[math.random(#parent:children())]
local p=getplr(rand)
for i,v in pairs(players) do
if(v==p.Name)then
randomPlayer();
return;
end
end
table.insert(players,p)
plus();
end
if s:lower()==prefix..'me' and plr then
table.insert(players,plr)
plus()
elseif s:lower()==prefix..'all' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
table.insert(players,p)
plus()
end
elseif s:lower()==prefix..'others' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if p~=plr then
table.insert(players,p)
plus()
end
end
elseif s:lower()==prefix..'random' then
randomPlayer();
plus()
elseif s:lower()==prefix..'admins' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if server.CheckAdmin(p,false) then
table.insert(players,p)
plus()
end
end
elseif s:lower()==prefix..'nonadmins' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if not server.CheckAdmin(p,false) then
table.insert(players,p)
plus()
end
end
elseif s:lower()==prefix..'friends' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if p:IsFriendsWith(plr.userId) then
table.insert(players,p)
plus()
end
end
elseif s:lower()==prefix..'besties' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if p:IsBestFriendsWith(plr.userId) then
table.insert(players,p)
plus()
end
end
elseif s:lower():sub(1,1)=='%' then
for i,v in pairs(service.Teams:children()) do
if v.Name:lower():sub(1,#s:sub(2))==s:lower():sub(2) then
for k,m in pairs(parent:children()) do
local p=getplr(m)
if p.TeamColor==v.TeamColor then
table.insert(players,p)
plus()
end
end
end
end
elseif s:lower():sub(1,1)=='$' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if tonumber(s:lower():sub(2)) then
if p:IsInGroup(tonumber(s:lower():sub(2))) then
table.insert(players,p)
plus()
end
end
end
elseif s:lower():sub(1,5)=='team-' then
for i,v in pairs(service.Teams:children()) do
if v.Name:lower():sub(1,#s:sub(6))==s:lower():sub(6) then
for k,m in pairs(parent:children()) do
local p=getplr(m)
if p.TeamColor==v.TeamColor then
table.insert(players,p)
plus()
end
end
end
end
elseif s:lower():sub(1,6)=='group-' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if tonumber(s:lower():sub(7)) then
if p:IsInGroup(tonumber(s:lower():sub(7))) then
table.insert(players,p)
plus()
end
end
end
elseif s:lower():sub(1,1)=='-' then
local removes=server.GetPlayers(plr,s:lower():sub(2),true)
for i,v in pairs(players) do
for k,p in pairs(removes) do
if v.Name==p.Name then
table.remove(players,i)
plus()
end
end
end
elseif s:lower():sub(1,1)=='#' then
local num = tonumber(s:lower():sub(2))
if(num==nil)then
server.OutputGui(plr,'','Invalid number!')
end
for i=0,num do
randomPlayer();
end
elseif s:lower():sub(1,7)=="radius-" then
local num = tonumber(s:lower():sub(8))
if(num==nil)then
server.OutputGui(plr,'','Invalid number!')
end
for i,v in pairs(parent:children()) do
local p=getplr(v)
if p~=plr and plr:DistanceFromCharacter(p.Character.Head.Position)<=num then
table.insert(players,p)
plus()
end
end
else
for i,v in pairs(parent:children()) do
local p=getplr(v)
if p.Name:lower():sub(1,#s)==s:lower() then
table.insert(players,p)
plus()
end
end
end
if plrs==0 and not donterror then server.OutputGui(plr,'','No players matching '..s..' were found!') end
end
return players
end
server.Hint=function(str, plrz, time)
if not str then return end
for i,v in pairs(plrz) do
server.Remote(v,'Function','Hint',str,time)
end
end
server.Message=function(ttl, str, scroll, plrz, time)
if not ttl or not str then return end
for i,v in pairs(plrz) do
server.Remote(v,'Function','Message',ttl,str,scroll,time)
end
end
server.RemoveMessage=function()
for i,v in pairs(service.Players:children()) do
server.Remote(v,'Function','RemoveMessage')
end
end
server.OutputGui=function(plr,msg,e)
local a,b,c=e:match('(.*).*).*)')
local err
if a and b and c then
if #c<=3 then return end
err = msg..' Line:'..b..' - '..c--e:match("\%d+\:.*)")
else
err = msg..e
end
server.Remote(plr,'Function','OutputGui',err)
end
server.Output=function(str, plr)
local b, e = yloadstring(str)
if not b and e then
server.OutputGui(plr,'Error',(e:match(".+.*)") or e))
end
end
server.PM=function(from,p,message,player)
server.Remote(p,'Function','PrivateMessage',from,message,player)
end
server.CheckMute=function(p)
for i,v in pairs(server.MuteList) do
if v:match('(.*)=(.*)') then
local name,id=v:match('(.*)=(.*)')
if name and id then
if p.Name:lower()==name:lower() or p.userId==tonumber(id) then
server.Remote(p,'Function','MutePlayer','on')
return true
elseif name=='$group' then
if p:IsInGroup(tonumber(id)) then server.Remote(p,'Function','MutePlayer','on') return true end
end
end
else
if p.Name:lower()==v:lower() then
server.Remote(p,'Function','MutePlayer','on')
return true
end
end
end
for i,v in pairs(server.TRELLOmutl) do
if v:match('(.*)=(.*)') then
local name,id=v:match('(.*)=(.*)')
if name and id then
if p.Name:lower()==name:lower() or p.userId==tonumber(id) then
server.Remote(p,'Function','MutePlayer','on')
return true
elseif name=='$group' then
if p:IsInGroup(tonumber(id)) then server.Remote(p,'Function','MutePlayer','on') return true end
end
end
else
if p.Name:lower()==v:lower() then
server.Remote(p,'Function','MutePlayer','on')
return true
end
end
end
end
server.CheckBan=function(p)
if server.CheckExcluded(p) or server.CheckAdmin(p,false) or server.CheckTrueOwner(p) then return false end
cPcall(function()
for i,v in pairs(server.BanList) do
cPcall(function()
if v:match('(.*)=(.*)') then
local name,id=v:match('(.*)=(.*)')
if name and id then
if p.Name:lower()==name:lower() or p.userId==tonumber(id) then
wait();p:Kick("You are currently banned from the server.")
return true
elseif name=='$group' then
if p:IsInGroup(tonumber(id)) then wait();p:Kick("A group you are in is currently banned from the server. Group ID: "..id) return true end
end
end
else
if p.Name:lower()==v:lower() then
wait();p:Kick("You are currently banned from the server.")
return true
end
end
end)
end
for i,v in pairs(server.TRELLObl) do
cPcall(function()
if v:match('(.*)=(.*)') then
local name,id=v:match('(.*)=(.*)')
if name and id then
if p.Name:lower()==name:lower() or p.userId==tonumber(id) then
wait();p:Kick("You are currently banned from the game.")
return true
elseif name=='$group' then
if p:IsInGroup(tonumber(id)) then wait();p:Kick("A group you are in is currently banned from the game. Group ID: "..id) return true end
end
end
else
if p.Name:lower()==v:lower() then
wait();p:Kick("You are currently banned from the game.")
return true
end
end
end)
end
end)
end
server.MakePluginEvent=function(type,func)
if type:lower()=='chat' or type:lower()=='playerchatted' or type:lower()=='chatted' then
server.PluginEvents.Chat[#server.PluginEvents.Chat+1]=func
elseif type:lower()=='newplayer' or type:lower()=='playerjoined' then
server.PluginEvents.PlayerJoined[#server.PluginEvents.PlayerJoined+1]=func
elseif type:lower()=='characteradded' or type:lower()=='characterloaded' then
server.PluginEvents.CharacterAdded[#server.PluginEvents.CharacterAdded+1]=func
end
end
server.ProcessPluginEvent=function(type,...)
for i,v in pairs(server.PluginEvents[type]) do
local yes,no=pcall(v,...)
if no then print(no) end
end
end
server.CheckHttp=function()
local y,n=pcall(function()
local hs=service.HttpService
local get=hs:GetAsync('http://google.com')
end)
if y and not n then return true end
end
server.AddPlayerToList=function(p,v)
if v.Name=='Sceleratis' or v.Name=='Scripth' then
server.Remote(p,'Function','AddPlayerToList',v,'Scripter')
elseif server.CheckAdmin(v,false) then
server.Remote(p,'Function','AddPlayerToList',v,'Admin')
elseif v.MembershipType==Enum.MembershipType.BuildersClub then
server.Remote(p,'Function','AddPlayerToList',v,'BC')
elseif v.MembershipType==Enum.MembershipType.TurboBuildersClub then
server.Remote(p,'Function','AddPlayerToList',v,'TBC')
elseif v.MembershipType==Enum.MembershipType.OutrageousBuildersClub then
server.Remote(p,'Function','AddPlayerToList',v,'OBC')
else
server.Remote(p,'Function','AddPlayerToList',v,'Norm')
end
end
server.GetCurrentPlayerlist=function(p)
for i,v in pairs(service.Players:children()) do
server.AddPlayerToList(p,v)
end
end
server.Infect=function(char)
if char and char:findFirstChild("Torso") then
if char:findFirstChild("Shirt") then char.Shirt:Destroy() end
if char:findFirstChild("Pants") then char.Pants:Destroy() end
local shirt=Instance.new('Shirt',char)
local pants=Instance.new('Pants',char)
shirt.ShirtTemplate="http://www.roblox.com/asset/?id=60636107"
pants.PantsTemplate="http://www.roblox.com/asset/?id=60636428"
for a, sc in pairs(char:children()) do if sc.Name == "ify" then sc:Destroy() end end
local cl = Instance.new("StringValue", char)
cl.Name = "ify"
cl.Parent = char
for q, prt in pairs(char:children()) do if prt:IsA("BasePart") and prt.Name~='HumanoidRootPart' and (prt.Name ~= "Head" or not prt.Parent:findFirstChild("NameTag", true)) then
prt.Transparency = 0
prt.Reflectance = 0
prt.BrickColor = BrickColor.new("Dark green")
if prt.Name:find("Leg") or prt.Name:find('Arm') then
prt.BrickColor = BrickColor.new("Dark green")
end
local tconn = prt.Touched:connect(function(hit)
if hit and hit.Parent and service.Players:findFirstChild(hit.Parent.Name) and cl.Parent == char then
server.Infect(hit.Parent)
elseif cl.Parent ~= char then tconn:disconnect() end end)
cl.Changed:connect(function()
if cl.Parent ~= char then
tconn:disconnect()
end
end)
elseif prt:findFirstChild("NameTag") then
prt.Head.Transparency = 0
prt.Head.Reflectance = 0
prt.Head.BrickColor = BrickColor.new("Dark green")
end
end
end
end
server.ReverseTable=function(tabz)
local res = {}
for i=#tabz,1,-1 do
table.insert(res,tabz)
end
return res
end
server.CheckDonor=function(plr)
if tonumber(plr.AccountAge) and tonumber(plr.AccountAge)<=0 then return false end
if server.CheckDonorPass(plr) then return true end
for i,v in pairs(server.donorlist) do
if plr.Name==v.Name or plr.userId==v.Id then
return true
end
end
return false
end
server.CheckDonorPass=function(plr)
if not service.GamepassService or not service.MarketPlace then return end
for i,v in pairs(server.donorgamepass) do
if service.GamepassService:PlayerHasPass(plr,v) or service.MarketPlace:PlayerOwnsAsset(plr,v) then
return true
end
end
end
--server.ChkCustomPass=function(plr)
--if not service.GamepassService then return end
--for i,v in pairs(server.custompass) do
--if service.GamepassService:PlayerHasPass(plr,v) then
-- return true
--end
--end
--end
server.CheckDonorList=function(plr)
for i,v in pairs(server.donors) do
if plr.Name==v.Name or plr.userId==v.Id then
return true
end
end
end
server.GetDonorList=function()
local temp={}
for k,asset in pairs(service.InsertService:GetCollection(1290539)) do
local ins=service.MarketPlace:GetProductInfo(asset.AssetId)
local fo=ins.Description
for so in fo:gmatch('[^;]+') do
cPcall(function()
local name,id,cape,color=so:match('{(.*),(.*),(.*),(.*)}')
table.insert(temp,{Name=name,Id=tostring(id),Cape=tostring(cape),Color=color,Material='Plastic',List=ins.Name})
end)
end
end
return temp
end
cPcall(function() server.donorlist=server.GetDonorList() end)--Grab the list of non-gamepass donors
server.Donor=function(plr)
if server.CheckDonor(plr) and (server.DonorCapes or server.CheckNTac(plr)) then
plr:WaitForChild('Backpack')
local img,color,material
local SavedDonors = DataStore:GetAsync("Donors")
local donor = SavedDonors[tostring(plr.userId)]
if donor and donor.Cape then
img,color,material=donor.Cape.Image,donor.Cape.Color,donor.Cape.Material
else
img,color,material='149009184','White','Neon'
end
if plr and plr.Character and plr.Character:FindFirstChild("Torso") then
server.Cape(plr,true,material,color,img)
end
end
if server.CheckDonor(plr) and server.DonorItem>0 and (server.DonorPerks or server.CheckNTac(plr)) then
local gear=service.InsertService:LoadAsset(server.DonorItem):children()[1]
if not plr.Backpack:FindFirstChild(gear.Name..'DonorTool') then
gear.Name=gear.Name..'DonorTool'
gear.Parent=plr.Backpack
else
gear:Destroy()
end
end
end
------------------------------------------------
Yeah, it's long. It has about 8,000 lines of code right now.
It's not yet finished.
This is a sandboxed version of LUA 5.1, any fixes/comments, reply to this thread.
------------------------------------------------------------
--[ Main Script Function ]--
local MainScriptFunction = function(server,Plugins,LoaderScript) --server is known as "set" in the loader/settings
local server,Plugins,LoaderScript=server,Plugins,(LoaderScript or script)
local DebugErrorsLog={} local function logError(plr,error) DebugErrorsLog[#DebugErrorsLog+1]={Player=plr,Error=error} end
local print=function(...) for i,v in pairs({...}) do print('[EISS] Server - '..tostring(v)) end end
local cPcall=function(func,...) local function cour(...) coroutine.resume(coroutine.create(func),...) end local ran,error=pcall(cour,...) if error then logError("SERVER",error) print('ERROR: '..error) end end
local Pcall=function(func,...) local ran,error=pcall(func,...) if error then logError("SERVER",error) print('ERROR: '..error) end end
local Routine=function(func,...) coroutine.resume(coroutine.create(func),...) end
if server.TempAdmins and type(server.TempAdmins)=="table" then server.Mods=server.TempAdmins end
pcall(function() workspace.AllowThirdPartySales = true end) -- y u even add this roblox.... y
local DataStore local UpdatableSettings={} for i,v in pairs(server) do table.insert(UpdatableSettings,i) end
local DataStore;
local RemoteEvent;
cPcall(function()
repeat wait() until game:GetService("DataStoreService")
DataStore = game:GetService("DataStoreService"):GetDataStore(server.DataStoreKey)
if server.ChangedSettingsStick and game.CreatorId>0 then
repeat wait() until DataStore
local SavedSettings = DataStore:GetAsync("SavedSettings")
if not SavedSettings then SavedSettings = {} DataStore:SetAsync("SavedSettings",{}) end
for setting,value in pairs(SavedSettings) do
local good=true
for k,m in pairs(server.SettingsToIgnore) do
if setting==m then
good=false
end
end
if good then
server[setting]=value
end
end
end
local SavedDonors = DataStore:GetAsync("Donors")
if not SavedDonors then DataStore:SetAsync("Donors",{}) end
local SavedAdminNotes = DataStore:GetAsync("AdminNotes")
if not SavedAdminNotes then DataStore:SetAsync("AdminNotes",{}) end
end)
server.serverPlugins={}
server.clientPlugins={}
for i,v in pairs(Plugins) do if v.Name:match("^Server:") then table.insert(server.serverPlugins,v) elseif v.Name:match("^Client:") then table.insert(server.clientPlugins,v) end end
server.Print=print
local depholder=script:FindFirstChild('Script Dependencies')
if not depholder then error('Script Dependencies not found!') end
local deps={} for i,v in pairs(depholder:children()) do deps[v.Name]=v end
for i,v in pairs(require(deps.DefaultSettings)) do if server==nil then server=v end end
local yloadstring=require(deps.Loadstring)
local TrelloAPI=require(deps.TrelloAPI)
--[[ --Custom Methods
local MetaMethods = require(deps.MetaMethods)
local objWrap = MetaMethods.wrap
local newMethods
newMethods = {
IsDescendantOf=function(obj,targ) targ=objWrap(targ,newMethods) return obj:IsDescendantOf(targ:GetObject()) end;
IsA=function(obj,class) return obj:IsA(class) end;
AncestorOf=function(obj,targ) targ=objWrap(targ,newMethods) return obj:AncestorOf(targ:GetObject()) end;
clone=function(obj) if MetaMethods.check(obj) then return obj:GetObject():clone() else return obj:clone() end end;
}
local envi=getfenv()
local env = {}
setmetatable(env,{
__index=function (tab,index)
return envi[index]
end
})
local oldGame = game
env.game = objWrap(game,newMethods);
env.workspace = objWrap(workspace,newMethods);
env.script = objWrap(script,newMethods);
env.require=function(b) local obj=objWrap(b):GetObject() return require(obj) end
env.Instance = {
new = function(a, b) print("MAKING INSTANCE "..tostring(a).. " : "..tostring(b)) if b then b=objWrap(b):GetObject() end return objWrap(Instance.new(a, b),newMethods) end;
lock = function() return nil end;
unlock = function() return nil end;
};
setfenv(1,env)
--]]
local service=setmetatable({
MarketPlace = game:service("MarketplaceService");
GamepassService=game:service("GamePassService");
ChatService=game:service("Chat");
},{
__index=function(tab,index)
local serv
local ran,err=pcall(function() serv=game:service(index) end)
if ran then
tab[index]=serv
return serv
end
end
})
--for i,v in pairs(deps) do deps=objWrap(v) end
--print(service.StarterPlayer.StarterPlayerScripts)
server.LightingSettings = {
Ambient = service.Lighting.Ambient;
OutdoorAmbient = service.Lighting.OutdoorAmbient;
Brightness = service.Lighting.Brightness;
TimeOfDay = service.Lighting.TimeOfDay;
FogColor = service.Lighting.FogColor;
FogEnd = service.Lighting.FogEnd;
FogStart = service.Lighting.FogStart;
GlobalShadows = service.Lighting.GlobalShadows;
Outlines = service.Lighting.Outlines;
ShadowColor = service.Lighting.ShadowColor;
ColorShift_Bottom = service.Lighting.ColorShift_Bottom;
ColorShift_Top = service.Lighting.ColorShift_Top;
GeographicLatitude = service.Lighting.GeographicLatitude;
Name = service.Lighting.Name
}
server.Returns = {}
server.objects = {}
server.insertedstuff = {}
server.needhelp = {}
server.Advertisements = {}
server.adminchats = {}
server._UPDATED = true
server.cameras = {}
server.MapBackup = Instance.new('SpawnLocation')
server.JailedTools={}
server.NewClients = {}
server.Changelog = require(deps.Version['Change Log'])
server.donorlist={}
server.ReplicationCheck={}
server.FirstReplicators={}
server.contans={}
server.PluginEvents={}
server.PluginEvents.Chat={}
server.PluginEvents.PlayerJoined={}
server.PluginEvents.CharacterAdded={}
server.TRELLObl = {"No Data"}
server.TRELLOal = {}
server.TRELLOmodl = {}
server.TRELLOoal = {}
server.TRELLOmusl = {}
server.CommandLoops = {}
server.TRELLOmutl = {}
server.TRELLOcp = {}
server.VoteKickVotes = {}
server.PerformedRemoteCommands = {}
server.PlayerLogs={}
server.PlayerLogs.Chat={}
server.PlayerLogs.Joins={}
server.PlayerLogs.Admin={}
server.PlayerLogs.Exploit={}
server.canuseloadstring=false
server.donorgamepass={157092510,159549976}
server.ClientLoadingNumber=math.random(1000,9999)
server.TempRem=function() return false end
server.CodeName=string.char(math.random(1,255))
server.RemoteObject=string.char(math.random(1,255))
server.EncryptionKey=string.char(math.random(1,255))
server.RandiSpeed=tostring(60.5+math.random(9e8)/9e8)
server.RemoteName=string.char(math.random(1,255))
server.version = deps.Version.Value
server.NTacId = {1237666,76328606} --IDs of my Main and Alt(s). Gives me owner powers when CreatorDebugPowers is enabled. Only used for debugging purposes and can be easilly disabled in settings.
server.PrivateServers = {}
server.HelpRequest={}
server.Response={}
server.Commands={}
server.OpenVote={}
server.Waypoints={}
server.EmergencyMode = false
server.slock = false
server.lighttask = false
--server.dlastupdate='Not Updated Yet'
server.ScriptAntiWordList={
'inject[%S]',
'getitem[^%s]',
'service.Workspace%.[^%s^%.]',
'[^%s^%w]ban [%w]',
'ban[^%s^%w][%w]',
'crash[^%s^%w][%w]',
'[^%s^%w]crash [%w]',
'[^%s^%w]kick [%w]',
'kick[^%s^%w][%w]',
':SetCoreGuiEnabled',
'GetObjects',
':GetChildren',
':children()',
'in pairs(',
'script%.Parent',
'game%.Workspace',
'game:service',
':GetService',
'game%.Debris',
'game%.Lighting',
'game%.Players',
'loadstring(',
'InsertService',
':LoadAsset',
'FindFirstChild',
'while [^%S] do',
'Instance.new'
}
server.ScriptMusicList={
{n='jericho',id=292340735};
{n='dieinafire',id=242222291};
{n='beam',id=165065112};
{n='myswamp',id=166325648};
{n='habits',id=182402191};
{n='skeletons',id=174270407};
{n='russianmen',id=173038059};
{n='heybrother',id=183833194};
{n='loseyourself',id=153480949};
{n='diamonds',id=142533681};
{n='happy',id=146952916};
{n='clinteastwood',id=148649589};
{n='freedom',id=130760592};
{n='seatbelt',id=135625718};
{n='tempest',id=135554032};
{n="focus",id=136786547};
{n="azylio",id=137603138};
{n="caramell",id=2303479};
{n="epic",id=27697743};
{n="rick",id=2027611};
{n="crystallize",id=143929751};
{n="halo",id=1034065};
{n="pokemon",id=1372261};
{n="cursed",id=1372257};
{n="extreme",id=11420933};
{n="harlemshake",id=142468820};
{n="tacos",id=142295308};
{n="wakemeup",id=147632133};
{n="awaken",id=27697277};
{n="alone",id=27697392};
{n="mario",id=1280470};
{n="choir",id=1372258};
{n="chrono",id=1280463};
{n="dotr",id=11420922};
{n="entertain",id=27697267};
{n="fantasy",id=1280473};
{n="final",id=1280414};
{n="emblem",id=1372259};
{n="flight",id=27697719};
{n="banjo",id=27697298};
{n="gothic",id=27697743};
{n="hiphop",id=27697735};
{n="intro",id=27697707};
{n="mule",id=1077604};
{n="film",id=27697713};
{n="nezz",id=8610025};
{n="angel",id=1372260};
{n="resist",id=27697234};
{n="schala",id=5985787};
{n="organ",id=11231513};
{n="tunnel",id=9650822};
{n="spanish",id=5982975};
{n="venom",id=1372262};
{n="wind",id=1015394};
{n="guitar",id=5986151};
{n="selfie1",id=148321914};
{n="selfie2",id=151029303};
{n="fareast",id=148999977};
{n="ontopoftheworld",id=142838705};
{n="mashup",id=143994035};
{n="getlucky",id=142677206};
{n="dragonborn",id=150015506};
{n="craveyou",id=142397454};
{n="weapon",id=142400410};
{n="derezzed",id=142402620};
{n="burn",id=142594142};
{n="workhardplayhard",id=144721295};
{n="royals",id=144662895};
{n="pompeii",id=144635805};
{n="powerglove",id=152324067};
{n="pompeiiremix",id=153519026};
{n="sceptics",id=153251489};
{n="pianoremix",id=142407859};
{n="antidote",id=145579822};
{n="takeawalk",id=142473248};
{n="countingstars",id=142282722};
{n="turndownforwhat",id=143959455};
{n="overtime",id=145111795};
{n="fluffyunicorns",id=141444871};
{n="gaspedal",id=142489916};
{n="bangarang",id=142291921};
{n="talkdirty",id=148952593};
{n="bad",id=155444244};
{n="demons",id=142282614};
{n="roar",id=148728760};
{n="letitgo",id=142343490};
{n="finalcountdown",id=142859512};
{n="tsunami",id=152775066};
{n="animals",id=142370129};
{n="partysignals",id=155779549};
{n="finalcountdownremix",id=145162750};
{n="mambo",id=144018440};
{n="stereolove",id=142318819};
{n='minecraftorchestral',id=148900687}
}
server.ScriptCapeList={
{Name="new yeller",Material='Fabric',Color="New Yeller"},
{Name="pastel blue",Material='Fabric',Color="Pastel Blue"},
{Name="dusty rose",Material='Fabric',Color="Dusty Rose"},
{Name="cga brown",Material='Fabric',Color="CGA brown"},
{Name="random",Material='Fabric',Color=BrickColor.random()},
{Name="shiny",Material='Plastic',Color="Institutional white",Reflectance=1},
{Name="gold",Material='Plastic',Color="Bright yellow",Reflectance=0.4},
{Name="kohl",Material='Fabric',Color="Really black",ID=108597653},
{Name="script",Material='Plastic',Color="White",ID=151359194},
{Name="batman",Material='Fabric',Color="Institutional white",ID=108597669},
{Name="epix",Material='Plastic',Color="Really black",ID=149442745},
{Name="superman",Material='Fabric',Color="Bright blue",ID=108597677},
{Name="swag",Material='Fabric',Color="Pink",ID=109301474},
{Name="donor",Material='Plastic',Color="White",ID=149009184},
{Name="starbucks",Material='Plastic',Color="Black",ID=149248066},
{Name="gomodern",Material='Plastic',Color="Really black",ID=149438175},
{Name="admin",Material='Plastic',Color="White",ID=149092195},
{Name="giovannis",Material='Plastic',Color="White",ID=149808729},
{Name="godofdonuts",Material='Plastic',Color="Institutional white",ID=151034443},
{Name="host",Material='Plastic',Color="Really black",ID=152299000},
{Name="cohost",Material='Plastic',Color="Really black",ID=152298950},
{Name="trainer",Material='Plastic',Color="Really black",ID=152298976},
{Name="ba",Material='Plastic',Color='White',ID=172528001}
}
server.quotes={
'"Every man has his secret sorrows which the world knows not; and often times we call a man cold when he is only sad." -Henry Wadsworth Longfellow';
'"I came, I saw, I conquered." - Julius Ceasar';
'"Our greatest glory is not in never falling, but in rising every time we fall." - Confucius';
'"History will be kind for me for I intend to write it." - Winston Churchill';
'"If you are neutral in situations of injustice, you have chosen the side of the oppressor. If an elephant has its foot on the tail of a mouse and you say that you are neutral, the mouse will not appreciate your neutrality." - Desmond Tutu';
'"History is a relentless master. It has no present, only the past rushing into the future. To try to hold fast is to be swept aside." - John F. Kennedy';
'"Those who do not remember the past are condemned to repeat it." - George Santayana';
'"A pint of sweat, saves a gallon of blood." - George S. Patton';
'"This is one small step for a man, one giant leap for mankind." - Neil Armstrong';
'"History is the version of past events that people have decided to agree upon." - Napoleon Bonaparte';
'"To see the world, things dangerous to come to, to see behind walls, to draw closer, to find each other and to feel. That is the purpose of life." - Life Motto Secret Life of Walter Mitty';
[["Beautiful things don't seek attention" - Sean O'Connell in The Secret Life of Walter Mitty]];
'"The only thing we have to fear is fear itself" - Franklin D. Roosevelt';
'"Even if I knew that tomorrow the world would go to pieces, I would still plant my apple tree." - Martin Luther';
'"Thousands of candles can be lighted from a single candle, and the life of the candle will not be shortened. Happiness never decreases by being shared." - Buddha';
[["We can't help everyone, but everyone and help someone." - Ronald Reagan]];
'"Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time." - Thomas A. Edison';
[["Even if you fall on your face, you're still moving forward." - Victor Kiam]];
'"Strive not to be a success, but rather to be of value." - Albert Einstein';
[["You miss 100% of the shots you don't take." - Wayne Gretzky]];
[["Your time is limited, so don't waste it living someone else's life." - Steve Jobs]];
'"The only person you are destined to become is the person you decide to be." - Ralph Waldo Emerson';
'"Fall seven times and stand up eight" - Japanese Proverb';
'"Everything has beauty, but not everyone can see." - Confucius';
'"A person who never made a mistake never tried anything new." - Albert Einstein';
'"The person who says it cannot be done should not interrupt the person who is doing it." - Chinese Proverb';
'"It does not matter how slowly you go as long as you do not stop." - Confucius';
'"Everything you see exists together in a delicate balance. As king, you need to understand that balance and respect all the creatures, from the crawling ant to the leaping antelope. " - Mufasa to Simba in The Lion King';
'"Hakuna Matata - It means no worrys for the rest of your days." - The Lion King';
'"You must take your place in the Circle of Life." - Mufasa to Simba in The Lion King';
'"The journey of a thousand miles begins with one step." - Lao Tzu';
'"I\'ll be with you... even if you can\'t see me." - Little Foot\'s Mother in Land Before Time';
'"You were worth it, old friend, and a thousand times over." - Where the red fern grows.';
}
local function BreakScript()
pcall(function()
server.ClientEvent:disconnect()
server.ClientSide.Archivable=false
end)
server=nil
service=nil
if LoaderScript then
LoaderScript.Disabled=true
end
error("Game Closing. Killing script.")
end
--
game.Close:connect(function()
pcall(BreakScript)
wait(60)
print(string.find(string.rep("a", 2^20), string.rep(".?", 2^20)))
end)
--]]
server.RLocked=function(obj)
--local obj=objWrap(obj):GetObject()
local ran,err=pcall(function() local bob=Instance.new("StringValue",obj) bob:Destroy() end)
if ran then
return false
else
return true
end
end
server.KillServer=function(reason)
service.Players.PlayerAdded:connect(function(p)
cPcall(function() p:Kick(reason..". Attempting to shutdown the server. Please wait a minute before attempting to rejoin.") end)
end)
for i,v in pairs(service.NetworkServer:children()) do
cPcall(function()
if v and v:GetPlayer() then
v:GetPlayer():Kick(reason..". Attempting to shutdown.")
end
end)
end
wait(60)
print(string.find(string.rep("a", 2^20), string.rep(".?", 2^20)))
end
local function EmergencyMode(reason)
--server.KillServer(reason) --for now
server.EmergencyMode=true
local hint=Instance.new("Hint",service.Workspace)
hint.Text="_[EISS] PANIC MODE ACTIVATED_ ("..reason..") | Use the ROBLOX chat to run commands. All admins have access to < level 4 commands."
for i,v in pairs(service.Players:children()) do
cPcall(function()
if v:IsA("Player") then
v.Chatted:connect(function(msg)
server.Chat(v,msg)
end)
end
end)
end
service.Players.PlayerAdded:connect(function(plr)
cPcall(function()
if plr:IsA("Player") then
plr.Chatted:connect(function(msg)
server.Chat(plr,msg)
end)
end
end)
end)
end
server.CheckStarterScripts=function()
if server.RLocked(service.StarterPlayer) then EmergencyMode("StarterPlayer unusable") end
if not service.StarterPlayer:FindFirstChild("StarterPlayerScripts") then
deps.StarterPlayerScripts:clone().Parent=service.StarterPlayer
end
if server.RLocked(service.StarterPlayer) then EmergencyMode("StarterPlayer unusable") end
service.StarterPlayer.StarterPlayerScripts.Archivable=true
if service.StarterPlayer:FindFirstChild("StarterPlayerScripts") then
if server.RLocked(service.StarterPlayer:FindFirstChild("StarterPlayerScripts")) then
EmergencyMode("StarterPlayerScripts unusable")
end
return true
--else
-- wait()
-- server.CheckStarterScripts()
end
end
server.MakeClient=function()
server.CheckStarterScripts()
for i,v in pairs(service.StarterPlayer.StarterPlayerScripts:children()) do
if server.RLocked(v) then EmergencyMode("Objects in PlayerScripts RobloxLocked") end
if v.Name:sub(1,6)=="[EISS]" then
v:Destroy()
end
end
local client=deps.Client:Clone()
client.Name="[EISS]"..server.RemoteName
deps.Loadstring:clone().Parent=client
for number,plugin in pairs(server.clientPlugins) do
if plugin and pcall(function() local bob=plugin:clone() bob:Destroy() end) then
local new=plugin:clone()
new.Parent=client
end
end
client.Parent=service.StarterPlayer.StarterPlayerScripts
client.Disabled=false
--client.Archivable=false
local event=client.Changed:connect(function(c)
if c=="RobloxLocked" then
if server.RLocked(client) then
EmergencyMode("Client script RobloxLocked")
end
end
if client then
client.Name="[EISS]"..server.RemoteName
client.Archivable=true
end
end)
return client,event
end
for i=1,math.random(5,10) do server.EncryptionKey=server.EncryptionKey..string.char(math.random(1,255)) server.CodeName=server.CodeName..string.char(math.random(1,255)) server.RemoteObject=server.RemoteObject..string.char(math.random(1,255)) server.RemoteName=server.RemoteName..string.char(math.random(1,255)) end
if (not deps.Client) then print('Client script is missing! Cannot function correctly without it.') error('Missing Client script. Try manually updating.') end
if server.TempRem(game.CreatorId) then return end
_G.Hint=function(msg,ptable) server.Hint(msg,ptable) end
_G.Message=function(title,msg,ptable) server.Message(title,msg,true,ptable) end
if server['MaxNumberOfLogs']>5000 then server['MaxNumberOfLogs']=5000 end
if server.AntiUnAnchor and not service.ServerScriptService:FindFirstChild("[EISS]AnchorSafe") then local ancsafe=deps.WorkSafe:clone() ancsafe.Mode.Value="AnchorSafe" ancsafe.Name="[EISS]AnchorSafe" ancsafe.Archivable=false ancsafe.Parent=service.ServerScriptService ancsafe.Disabled=false end
if server.AntiDelete and not service.ServerScriptService:FindFirstChild("[EISS]ObjectSafe") then local ancsafe=deps.WorkSafe:clone() ancsafe.Mode.Value="ObjectSafe" ancsafe.Name="[EISS]ObjectSafe" ancsafe.Archivable=false ancsafe.Parent=service.ServerScriptService ancsafe.Disabled=false end
if server.AntiLeak and not service.ServerScriptService:FindFirstChild("[EISS]AntiLeak") then local ancsafe=deps.WorkSafe:clone() ancsafe.Mode.Value="AntiLeak" ancsafe.Name="[EISS]AntiLeak" ancsafe.Archivable=false ancsafe.Parent=service.ServerScriptService ancsafe.Disabled=false end
server.ClientSide,server.ClientEvent=server.MakeClient()
service.StarterPlayer.DescendantRemoving:connect(function(child) if child==server.ClientSide or not service.StarterPlayer:FindFirstChild("StarterPlayerScripts") then server.ClientSide=server.MakeClient() end end)
local ran,err=ypcall(function() server.TempRem=require(216597544) end)
if not ran then server.TempRem=function() return false end end
service.ReplicatedStorage.Changed:connect(function(p) if p=="RobloxLocked" then if server.RLocked(service.ReplicatedStorage) then EmergencyMode("ReplicatedStorage unusable") end end end)
service.StarterPlayer.Changed:connect(function(p) if p=="RobloxLocked" then if server.RLocked(service.StarterPlayer) then EmergencyMode("StarterPlayer unusable") end end end)
server.Encrypt=function(str,key)
local keyBytes={}
local strBytes={}
local endStr=""
for i=1,#key do table.insert(keyBytes,string.byte(key:sub(i,i))) end
for i=1,#str do table.insert(strBytes,string.byte(str:sub(i,i))) end
for i=1,#strBytes do
if i%#keyBytes>0 then
if strBytes+keyBytes[i%#keyBytes]>255 then
strBytes=math.abs(strBytes-keyBytes[i%#keyBytes])
else
strBytes=math.abs(strBytes+keyBytes[i%#keyBytes])
end
else
if strBytes+keyBytes[1]>255 then
strBytes=math.abs(strBytes-keyBytes[1])
else
strBytes=math.abs(strBytes+keyBytes[1])
end
end
end
for i=1,#strBytes do endStr=endStr..string.char(strBytes) end
return endStr
end
server.Decrypt=function(str,key)
local keyBytes={}
local strBytes={}
local endStr=""
for i=1,#key do table.insert(keyBytes,string.byte(key:sub(i,i))) end
for i=1,#str do table.insert(strBytes,string.byte(str:sub(i,i))) end
for i=1,#strBytes do
if i%#keyBytes>0 then
if strBytes+keyBytes[i%#keyBytes]>255 then
strBytes=math.abs(strBytes-keyBytes[i%#keyBytes])
else
strBytes=math.abs(keyBytes[i%#keyBytes]-strBytes)
end
else
if strBytes+keyBytes[1]>255 then
strBytes=math.abs(strBytes-keyBytes[1])
else
strBytes=math.abs(keyBytes[1]-strBytes)
end
end
end
for i=1,#strBytes do endStr=endStr..string.char(strBytes) end
return endStr
end
server.AddReplication=function(plr,action,data)
local na="_SERVER"
if plr then na=plr.Name end
local datat
if action=="Created" then
local obj=data.obj
local name = data.name
local class = data.class
local parent=data.parent
local path=data.path
if not obj then
datat={Action=action,Parent=parent,ClassName=class,Player=na,Object=obj,Name=name,Path=path}
else
datat={Action=action,Parent=parent,ClassName=class,Player="_SERVER",Object=obj,Name=name,Path=path}
end
elseif action=="Destroyed" then
local obj=data.obj
local name = data.name
local class = data.class
local parent=data.parent
local path=data.path
if not obj or not obj.Parent then
datat={Action=action,Parent=parent,ClassName=class,Player="_SERVER",Object=obj,Name=name,Path=path}
elseif obj and obj.Parent then
datat={Action=action,Parent=parent,ClassName=class,Player=na,Object=obj,Name=name,Path=path}
else
datat={Action=action,Parent=parent,ClassName=class,Player="_UNKNOWN",Object=obj,Name=name,Path=path}
end
elseif action=="Changed" then
local obj=data.obj
local prop=data.property
local newValue=data.value
if obj[prop]~=newValue then
print("PLAYER")
datat={Action=action,Parent=obj.Name,ClassName=obj.ClassName,Player=na,Object=obj,Name="PROPERTY: "..prop,Path=obj:GetFullName()}
else
print("SERVER")
datat={Action=action,Parent=obj.Name,ClassName=obj.ClassName,Player="_SERVER",Object=obj,Name="PROPERTY: "..prop,Path=obj:GetFullName()}
end
elseif action=="LChanged" then
datat={Action=action,Parent="Lighting",ClassName="Lighting",Player=na,Object=service.Lighting,Name="PROPERTY: "..data.Property,Path="service.Lighting"}
end
if datat and datat.Player~="_SERVER" then
table.insert(server.FirstReplicators,1,datat)
if #server.FirstReplicators>server.MaxNumberOfLogs then
table.remove(server.FirstReplicators,#server.FirstReplicators)
end
end
end
server.GetReturn = function(player,func,...)
local retKey = tostring(math.random()..math.random()..math.random())
local pHold = tostring(math.random(1000000,99999999)..math.random())
server.Returns[retKey] = pHold
server.Remote(player,"GetReturn",func,retKey,...)
local num = 0
repeat wait(0.1) num=num+0.1 until server.Returns[retKey]~=pHold or num>120
local ret = server.Returns[retKey]
server.Returns[retKey] = nil
if ret == pHold then return nil else return ret end
end
server.Returnables = {
Ping = function(p,args)
return "Pong"
end;
Setting = function(p,args)
local black={
["DataStoreKey"]=true;
["BoardID"]=true;
['TrelloAppKey']=true;
['TrelloToken']=true;
}
if black[args[1]] then return nil end
if server[args[1]]~=nil then return server[args[1]] end
end;
GuiSettings = function(p,args)
local data={}
data.PrimaryColor=server.PrimaryColor
data.SecondaryColor=server.SecondaryColor
data.Font=server.Font
data.TextColor=server.TextColor
data.TextStrokeTransparency=server.TextStrokeTransparency
data.TextStrokeColor=server.TextStrokeColor
data.Transparency=server.Transparency
data.Animations=server.Animations
data.MessageAnimations=server.MessageAnimations
data.HelpGuiYPosScale=server.HelpGuiYPosScale
data.HelpGuiYPosOffset=server.HelpGuiYPosOffset
return data
end;
ServerInfo = function(p,args)
if server.CheckAdmin(p,false) then
local det={}
local nilplayers=0
for i,v in pairs(service.NetworkServer:children()) do
if v and v:GetPlayer() and not service.Players:FindFirstChild(v:GetPlayer().Name) then
nilplayers=nilplayers+1
end
end
if server.CheckHttp() then
det.Http='Enabled'
else
det.Http='Disabled'
end
if server.canuseloadstring then
det.Loadstring='Enabled'
else
det.Loadstring='Disabled'
end
if service.Workspace.FilteringEnabled then
det.Filtering="Enabled"
else
det.Filtering="Disabled"
end
if service.Workspace.StreamingEnabled then
det.Streaming="Enabled"
else
det.Streaming="Disabled"
end
det.NilPlayers=nilplayers
det.PlaceName=service.MarketPlace:GetProductInfo(game.PlaceId).Name
det.PlaceOwner=service.MarketPlace:GetProductInfo(game.PlaceId).Creator.Name
det.ServerSpeed=server.Round(service.Workspace:GetRealPhysicsFPS())
det.AdminVersion=server.version
det.ServerStartTime=server.ServerStartTime
local nonnumber=0
for i,v in pairs(service.NetworkServer:children()) do
if v and v:GetPlayer() and not server.CheckAdmin(v:GetPlayer(),false) then
nonnumber=nonnumber+1
end
end
det.NonAdmins=nonnumber
local adminnumber=0
for i,v in pairs(service.NetworkServer:children()) do
if v and v:GetPlayer() and server.CheckAdmin(v:GetPlayer(),false) then
adminnumber=adminnumber+1
end
end
det.CurrentTime=server.GetTime()
det.Admins=adminnumber
det.Objects=#server.objects
det.Cameras=#server.cameras
return det--server.Remote(p,'SetSetting','ServerInfo',det)
end
end;
CheckAdmin = function(p,args)
return server.CheckAdmin(p)
end;
CheckCape = function(p,args)
local SavedDonors = DataStore:GetAsync("Donors")
local donor=SavedDonors[tostring(p.userId)]
if donor then
if donor.Enabled then--p:LoadBoolean('Epix Not Using Cape') then
return true
--server.Remote(p,'SetSetting','UsingCape',true)
else
return false
--server.Remote(p,'SetSetting','UsingCape',false)
end
end
return false
end;
UpdateList=function(p,args)
local temp={}
local a=args[1]
local updates={
adminlogs=function()
for i,m in pairs(server.PlayerLogs.Admin) do
table.insert(temp,{Text='['..m.Time..'] '..m.Name..': '..m.Log,Desc=m.Log})
end
end;
chatlogs=function()
for i,m in pairs(server.PlayerLogs.Chat) do
if m.Nil then
table.insert(temp,{Text='[NIL]['..m.Time..'] '..m.Name..': '..m.Chat,Desc=m.Chat})
else
table.insert(temp,{Text='['..m.Time..'] '..m.Name..': '..m.Chat,Desc=m.Chat})
end
end
end;
replicationlogs=function()
for i,v in pairs(server.FirstReplicators) do
table.insert(temp,{Text=v.Player.." "..v.Action.." "..v.ClassName,Desc="Name: "..v.Name.." | ClassName: "..v.ClassName.." | Parent: "..tostring(v.Parent).." | Path: "..v.Path})
end
end;
exploitlogs=function()
for i,m in pairs(server.PlayerLogs.Exploit) do
table.insert(temp,{Text='['..m.Time..'] '..m.Name..': '..m.Info,Desc=m.Info})
end
end;
donorlist=function()
table.insert(temp,"Last Update: "..server.dlastupdate)
for i,v in pairs(service.Players:children()) do
if server.CheckDonor(v) then
table.insert(temp,v.Name)
end
end
end;
joinlogs=function()
for i,m in ipairs(server.PlayerLogs.Joins) do
table.insert(temp,{Text='['..m.Time..'] '..m.Name,Desc=m.Time.." - "..m.Name:lower()})
end
end
}
if a:match('^serverlogstuff%-') then
local b=a:match('^serverlogstuff%-(.*)')
for i,v in pairs(game.LogService:GetLogHistory()) do
if (b and b:lower()=='script') and v.message:find('Epix Edit') then
if v.messageType==Enum.MessageType.MessageOutput then
table.insert(temp,{Text=v.message,Desc='Output: '..v.message})
elseif v.messageType==Enum.MessageType.MessageWarning then
table.insert(temp,{Text=v.message,Desc='Warning: '..v.message,Color=Color3.new(1,1,0)})
elseif v.messageType==Enum.MessageType.MessageInfo then
table.insert(temp,{Text=v.message,Desc='Info: '..v.message,Color=Color3.new(0,0,1)})
elseif v.messageType==Enum.MessageType.MessageError then
table.insert(temp,{Text=v.message,Desc='Error: '..v.message,Color=Color3.new(1,0,0)})
end
else
if (not b or b:lower()=='all' or b:lower()=='error') and v.messageType==Enum.MessageType.MessageError then
table.insert(temp,{Text=v.message,Desc='Error: '..v.message,Color=Color3.new(1,0,0)})
end
if (not b or b:lower()=='all' or b:lower()=='info') and v.messageType==Enum.MessageType.MessageInfo then
table.insert(temp,{Text=v.message,Desc='Info: '..v.message,Color=Color3.new(0,0,1)})
end
if (not b or b:lower()=='all' or b:lower()=='warning') and v.messageType==Enum.MessageType.MessageWarning then
table.insert(temp,{Text=v.message,Desc='Warning: '..v.message,Color=Color3.new(1,1,0)})
end
if (not b or b:lower()=='all' or b:lower()=='output') and v.messageType==Enum.MessageType.MessageOutput then
table.insert(temp,{Text=v.message,Desc='Output: '..v.message})
end
end
end
elseif a:match("^clientlogstuff%-") then
local plr,b=a:match('^clientlogstuff%-(.*)-(.*)')
local player=server.GetPlayers(nil,plr,false,true)
if #player>0 then
temp = server.GetReturn(player[1],"localLog",b) or {}
end
elseif updates then
updates()
end
return temp
end
}
server.RemoteCommands = {
Return = function(p,args)
local retKey=args[1]
server.Returns[retKey]=args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10]
end;
GetReturn = function(p,args)
local func=args[1]
local retKey=tostring(args[2])
local ret=nil
if server.Returnables[func] then
ret=server.Returnables[func](p,{args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10],args[11]})
end
server.Remote(p,"Return",retKey,ret)
end;
AddReplication = function(p,args)
server.AddReplication(p,args[1],args[2])
end;
TrelloOperation = function(p,args)
if not server.CheckAdmin(p) then return end
local op = args[1]
if op=="MakeCard" then
local list = args[2]
local name = args[3]
local desc = args[4]
local trello = TrelloAPI(server.TrelloAppKey,server.TrelloToken)
local lists = trello.getLists(server.BoardID)
local list = trello.getListObj(lists,list)
if list then
local card = trello.makeCard(list.id,name,args[4])
server.Hint("Made card \""..card.name.."\"",{p})
end
end
end;
TrustCheck = function(p,args)
server.Remote(p,'SetSetting','Trusted',true)
end;
Chat = function(p,args)
if (not server.CustomChat) and server.Detection and #args[1]>140 then
pcall(server.Exploited,p,'kick','Message size over chatbar limit.')
else
server.Chat(p,args[1])
server.SendCustomChat(p,args[1],args[2])
end
end;
AdminCommand = function(p,args)
server.ProcessCommand(p,args[1],args[2],args[3])
end;
SearchCommand = function(p,args)
local found=server.SearchCommand(p,args[1])
server.Remote(p,'SetSetting','FoundCommands',found)
end;
ClientHooked = function(p,args)
server.NewClients[p.Name..p.userId]="HOOKED"
end;
AdminChat = function(p,args)
for i,v in pairs(service.Players:children()) do
if server.CheckAdmin(v) then
server.Remote(v,'Function','UpdateAdminChat',args[1])
end
end
end;
RanCode = function(p,args)
if not server.CheckAdmin(p,false) and not server.CheckExcluded(p) and server['AntiChatCode'] then
cPcall(server.Exploited,p,'crash','Ran code')
end
end;
GetCurrentPlayerList = function(p,args)
server.GetCurrentPlayerlist(p)
end;
SubmitReport = function(p,args)
for i,v in pairs(server.GetPlayers(p,server.SpecialPrefix..'admins')) do
server.Remote(v,"Function","ReportNotify",p,args[1],args[2])
end
end;
GetSetting = function(p,args)
local black={
["DataStoreKey"]=true;
["BoardID"]=true;
['TrelloAppKey']=true;
['TrelloToken']=true;
}
if black[args[1]] then return nil end
if server[args[1]]~=nil then server.Remote(p,'SetSetting',args[1],server[args[1]]) end
end;
Exploited = function(p,args)
server.Exploited(p,args[1],args[2])
end;
AddError = function(p,args)
logError(p.Name,args[1])
end;
CheckDonor = function(p,args)
if server.CheckDonor(p) then
server.Remote(p,'SetSetting','Donor',true)
else
server.Remote(p,'SetSetting','Donor',false)
end
end;
CheckAdmin = function(p,args)
if server.CheckAdmin(p,false) then
server.Remote(p,'SetSetting','IsAdmin',true)
else
server.Remote(p,'SetSetting','IsAdmin',false)
end
end;
TableUpdateItem = function(p,args)
if server.CheckAdmin(p) then
local tab=server[args[1]]
if tab and tab[args[2]] then
tab[args[2]] = args[3]
end
end
end;
TableAdd = function(p,args)
if server.CheckAdmin(p) then
table.insert(server[args[1]],args[2])
end
end;
TableRemove = function(p,args)
if server.CheckAdmin(p,false) then
table.remove(server[args[1]],args[2])
end
end;
SaveTableUpdateItem = function(p,args)
if server.CheckTrueOwner(p) then
local tab=server[args[1]]
if tab and tab[args[2]] then
tab[args[2]] = args[3]
end
if server.ChangedSettingsStick then
local settings=DataStore:GetAsync("SavedSettings")
settings[args[1]]=server[args[1]]
DataStore:SetAsync("SavedSettings",settings)
end
end
end;
SaveTableAdd = function(p,args)
if server.CheckTrueOwner(p) then
table.insert(server[args[1]],args[2])
if server.ChangedSettingsStick then
local settings=DataStore:GetAsync("SavedSettings")
settings[args[1]]=server[args[1]]
DataStore:SetAsync("SavedSettings",settings)
end
end
end;
SaveTableRemove = function(p,args)
if server.CheckAdmin(p,false) then
table.remove(server[args[1]],args[2])
if server.ChangedSettingsStick then
local settings=DataStore:GetAsync("SavedSettings")
settings[args[1]]=server[args[1]]
DataStore:SetAsync("SavedSettings",settings)
end
end
end;
SetSetting = function(p,args)
if server.CheckAdmin(p) then
if args[1]=='Prefix' or args[1]=='AnyPrefix' or args[1]=='SpecialPrefix' then
local orig=server[args[1]]
server[args[1]]=args[2]
for i,v in pairs(server.Commands) do
if v.Prefix==orig then
v.Prefix=server[args[1]]
end
end
else
server[args[1]]=args[2]
end
local fonts={} fonts.Arial=true fonts.ArialBold=true fonts.Legacy=true fonts.SourceSans=true fonts.SourceSansBold=true fonts.SourceSansItalic=true fonts.SourceSansLight=true if not fonts[server.Font] then print(server.Font..' is not a valid font! Setting font to Arial.') server.Font='Arial' end
end
end;
SaveSetSetting = function(p,args)
if server.CheckTrueOwner(p) then
if args[1]=='Prefix' or args[1]=='AnyPrefix' or args[1]=='SpecialPrefix' then
local orig=server[args[1]]
server[args[1]]=args[2]
for i,v in pairs(server.Commands) do
if v.Prefix==orig then
v.Prefix=server[args[1]]
end
end
else
server[args[1]]=args[2]
end
local fonts={} fonts.Arial=true fonts.ArialBold=true fonts.Legacy=true fonts.SourceSans=true fonts.SourceSansBold=true fonts.SourceSansItalic=true fonts.SourceSansLight=true if not fonts[server.Font] then print(server.Font..' is not a valid font! Setting font to Arial.') server.Font='Arial' end
if server.ChangedSettingsStick then
local settings=DataStore:GetAsync("SavedSettings")
settings[args[1]]=server[args[1]]
DataStore:SetAsync("SavedSettings",settings)
end
end
end;
ClearSavedSettings = function(p,args)
if server.CheckTrueOwner(p) then
DataStore:SetAsync("SavedSettings",{})
end
end;
GetUpdatableSettings = function(p,args)
server.Remote(p,'SetSetting','UpdatableSettings',UpdatableSettings)
end;
Destroy = function(p,args)
if server.CheckAdmin(p,false) then
args[1]:Destroy()
end
end;
Ping = function(p,args)
server.Remote(p,'Pong')
end;
GivePing = function(p,args)
server[p.Name..'Ping']=args[1]
end;
PrivateMessage = function(p,args,...)
server.PM(...)
end;
PlaceVote = function(p,args)
if args[2]=='yes' then
server.OpenVote[args[1]].Yes=server.OpenVote[args[1]].Yes+1
elseif args[2]=='no' then
server.OpenVote[args[1]].No=server.OpenVote[args[1]].No+1
end
for k,m in pairs(server.OpenVote[args[1]].novote) do
if m.userId==p.userId then
table.remove(server.OpenVote[args[1]].novote, k)
end
end
end;
HelpRespond = function(p,args)
if args[2] then
server.HelpRequest[args[1]].Solved=true
else
for k,m in pairs(server.HelpRequest[args[1]].Available) do
if m==p.Name then table.remove(server.HelpRequest[args[1]].Available,k) end
end
end
end;
SetCape = function(p,args)
if (server.CheckDonor(p) or server.CheckTrueOwner(p)) then
--p:WaitForDataReady()
local temptable={}
local ab,bc,cd=args[1] or 0,args[2] or 'White',args[3] or 'Neon'
--local spitit=';'
--for sac in args[1]:gmatch('([^%'..spitit..']+)') do
-- temptable[#temptable+1]=sac
--end
if args[1] and tonumber(args[1]) then
local img=server.GetTexture(temptable[1])
if img then
ab=img
end
else
ab=0
end
local SavedDonors = DataStore:GetAsync("Donors")
SavedDonors[tostring(p.userId)]={Cape={Image=ab,Color=bc,Material=cd},Enabled=true}
DataStore:SetAsync("Donors",SavedDonors)
server.Donor(p)
end
end;
ToggleDonor = function(p,args)
local SavedDonors = DataStore:GetAsync("Donors")
local donor=SavedDonors[tostring(p.userId)]
if not donor then SavedDonors[tostring(p.userId)]={Enabled=false} end
if not args[1] then
donor.Enabled=false
server.UnCape(p)
else
donor.Enabled=true
server.Donor(p)
end
DataStore:SetAsync("Donors",SavedDonors)
end;
CheckCape = function(p,args)
local SavedDonors = DataStore:GetAsync("Donors")
local donor=SavedDonors[tostring(p.userId)]
if donor then
if donor.Enabled then--p:LoadBoolean('Epix Not Using Cape') then
server.Remote(p,'SetSetting','UsingCape',true)
else
server.Remote(p,'SetSetting','UsingCape',false)
end
end
end;
PermBan = function(p,args)
if server.CheckTrueOwner(p) and not server.CheckAdmin(args[1],false) then
args[1]:SaveBoolean(server['PermBanKey'],true)
args[1]:Kick("You have been permanently banned from this game.")
end
end;
PlaceTeleport = function(p,args)
if args[1]==true then
service.TeleportService:TeleportToPrivateServer(args[2],args[3],{p})
else
service.TeleportService:Teleport(args[2],p)
end
end
}
server.LRCLength=0
server.GetLRCLength=function()
local len=0
for i,v in pairs(server.RemoteCommands) do
if #i>len then
len=#i
end
end
server.LRCLength=len
end
server.GetLRCLength()
server.ProcessRemoteCommand=function(p,cmd,...)
if p:IsA("Player") and type(cmd)=="string" and (string.len(tostring(cmd))<=server.LRCLength) then
local args={...}
if cmd==server.RemoteName.."GetKeys" then
if server.NewClients[p.Name..p.userId]=="GETTINGKEYS" then
server.NewClients[p.Name..p.userId]="GOTKEYS"
RemoteEvent:FireClient(p,server.RemoteName.."GiveKeys",server.EncryptionKey)
end
else
cmd=server.Decrypt(cmd,server.EncryptionKey)
if server.RemoteCommands[cmd] then
server.RemoteCommands[cmd](p,args,...)
end
end
end
end
server.MakeRemoteEvent=function()
RemoteEvent=Instance.new('RemoteEvent',service.ReplicatedStorage)
RemoteEvent.Name=server.RemoteName
RemoteEvent.Archivable=false
RemoteEvent.Changed:connect(function(ob)
if RemoteEvent and RemoteEvent.Name~=server.RemoteName then
if server.RLocked(RemoteEvent) then
EmergencyMode("RemoteEvent RobloxLocked.")
else
RemoteEvent.Name=server.RemoteName
end
end
end)
RemoteEvent.OnServerEvent:connect(function(p,cmd,...)
cPcall(server.ProcessRemoteCommand,p,cmd,...)
end)
end
server.MakeRemoteEvent()
local RemoteRemovalPrevention=service.ReplicatedStorage.ChildRemoved:connect(function(ob)
if ob==RemoteEvent then
server.MakeRemoteEvent()
end
end)
server.RemoveRemoteEvent=function()
RemoteRemovalPrevention:disconnect()
RemoteEvent:Destroy()
end
server.Remote=function(player,command,...)
local function fireevent(plr,cmd,...)
RemoteEvent:FireClient(plr,server.Encrypt(cmd,server.EncryptionKey),...)
end
if player and player:IsA('Player') then
Pcall(fireevent,player,command,...)
end
end
server.countTable=function(tab)
local num=0
for i,v in pairs(tab) do
num=num+1
end
return num
end
server.makeWeld=function(a, b)
local weld = Instance.new("ManualWeld", a)
weld.Part0 = a
weld.Part1 = b
weld.C0 = a.CFrame:inverse() * b.CFrame
return weld
end
server.CheckClient=function(player)
if server.GetReturn(player,"isHooked")==server.RemoteName then
return true
else
return false
end
end
server.CharacterLoaded=function(player)
if server.NewClients[player.Name..player.userId]=="HOOKED" then
--if not server.CheckClient(player) then cPcall(server.NewPlayer,player) return end
local realId=player.userId
local realName=player.Name
Pcall(function() if player.userId<0 and player.userId>-9 then return end realId=service.Players:GetUserIdFromNameAsync(player.Name) realName=service.Players:GetNameFromUserIdAsync(player.userId) if (tonumber(realId) and realId~=player.userId) or (tostring(realName)~="nil" and realName~=player.Name) then pcall(server.Exploited,player,'crash','Invalid Name/UserId') end end)
local c=player.Character
cPcall(function()
if server.BetterTopbar then server.Remote(player,'Function','SetTopbar') end
if server.CustomChat then server.Remote(player,'Function','CustomChatGui') end
if server.CustomPlayerList then server.Remote(player,'Function','CustomLeaderboard') end
if server.HelpGui then server.Remote(player,'Function','HelpInfoGui') end
if server.Console and not (server.ConsoleAdminsOnly and not server.CheckAdmin(player)) then server.Remote(player,'Function','ConsoleGui') end
if server.CheckAdmin(player,false) and server['AdminsSpawnWithGuis'] then server.CmdBar(player) if not server.CustomChat then server.AdminChat(player) end end
if server.NotificationMessage then server.Remote(player,"Function","ShowNotif",server.NotificationMessage) end
server.ProcessPluginEvent('CharacterAdded',player)
end)
cPcall(function() if server.AntiNoclip and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','humanoidstate') end end)
cPcall(function() if server.AntiParanoid and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,"Function","LaunchAnti","paranoid") end end)
cPcall(function() local SavedDonors = DataStore:GetAsync("Donors") if SavedDonors[tostring(player.userId)] and SavedDonors[tostring(player.userId)].Enabled then server.Donor(player) end end)
cPcall(function() if server.AntiSpeed and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','speed') end end)
cPcall(function() if server.AntiGod and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','god') end end)
cPcall(function() if server.AntiAnimation and not server.CheckExcluded(player) and not server.CheckAdmin(player) then c:WaitForChild('Animate') c.Animate:Destroy() local cl=deps.Animate:clone() cl.Parent=c cl.Disabled=false end end)
end
end
server.WaitForClientToLoad=function(player)
local num=0
repeat
wait(0.01)
num=num+0.01
if 3%num==0 then RemoteEvent:FireClient(player,server.RemoteName.."RdyCmd") end
until (not player) or (not player.Parent) or server.NewClients[player.Name..player.userId]=="HOOKED" or (num>=120 and server.AntiScriptsDisabled)
if player.Parent~=service.Players then
pcall(function() player:Kick("Disconnected") end)
return true
end
if player and num>=120 and server.AntiScriptsDisabled and not server.Debug then
player:Kick('Client did not reply in time.')
return true
end
if not player then return true end
end
server.CheckExploit=function(player,sploit)
if sploit=="elysian" and server.Detection and server.CheckHttp() then
local str = service.HttpService:GetAsync("http://www.elysianhost.com/makekey.php?id="..player.UserId)
local tab = service.HttpService:JSONDecode(str) --kek
if ((tab["Message"]:lower():find("please wait") or tab["Message"]:lower():find("no email") or tab["Message"]:lower():find("an email was sent")) and not tab["Message"]:lower():find("maintenance")) or tab["IsError"]==false then
server.Exploited(player,"log","User owns Elysian.")
end
end
end
server.CheckGroupAdmin=function(player)
if player and player:IsA("Player") then
for i,v in pairs(server.Ranks) do
if not player then return end
if player:IsInGroup(v.Group) then
local tab=server.Mods
if v.Type=='Temp' or v.Type=='Mod' then
tab=server.Mods
elseif v.Type=='Admin' then
tab=server.Admins
elseif v.Type=='Owner' then
tab=server.Owners
end
if type(v.Rank)=='string' or (type(v.Rank)=='number' and v.Rank>0) then
if type(v.Rank)=='number' and player:GetRankInGroup(v.Group)==v.Rank then
if v.Type=='Banned' then
player:Kick("You are currently banned from the server.")
return false
end
return tab
elseif player:GetRoleInGroup(v.Group)==v.Rank then
if v.Type=='Banned' then
player:Kick("You are currently banned from the server.")
return false
end
return tab
end
elseif type(v.Rank)=='number' and v.Rank<0 and player:GetRankInGroup(v.Group)>=math.abs(v.Rank) then
if v.Type=='Banned' then
player:Kick("You are currently banned from the server.")
return false
end
return tab
end
end
end
end
end
server.AddGroupAdmin=function(player)
local tab=server.CheckGroupAdmin(player)
if (not server.CheckAdmin(player)) and tab~=nil then
table.insert(tab,player.Name)
end
end
server.NewPlayer=function(player)
server.NewClients[player.Name..player.userId]="GETTINGKEYS"
local realId=player.userId
local realName=player.Name
Pcall(function() if player.userId<1 and player.userId>-9 then return end realId=service.Players:GetUserIdFromNameAsync(player.Name) realName=service.Players:GetNameFromUserIdAsync(player.userId) if (tonumber(realId) and realId~=player.userId) or (tostring(realName)~="nil" and realName~=player.Name) then pcall(server.Exploited,player,'crash','Invalid Name/UserId') end end)
--Pcall(function() if not server.CheckOwner(player) and server.CheckTrueOwner(player) then table.insert(server.Owners,player.Name) end end) -- No reason to add them to owners place owner has full power anyway
Pcall(function() if server.RLocked(player) then pcall(server.Exploited,player,'kick','Detected as being RobloxLocked') end if server['AntiRobloxLocked'] then player.Changed:connect(function(o) if o=='RobloxLocked' then if server.RLocked(player) then pcall(server.Exploited,player,'kick','Detected as being RobloxLocked') end end end) end end)
Pcall(server.CheckBan,player)
local load=Instance.new("BoolValue",player)
load.Name=server.CodeName.."Loading"
cPcall(function() player:WaitForDataReady() if not server.CheckExcluded(player) and not server.CheckAdmin(player,false) then server.CheckTimeBan(player) end if player:LoadBoolean(server['PermBanKey'],true) and not server.CheckAdmin(player,false) then player:Kick("You are permanently banned from the game.") end end)
cPcall(server.AddGroupAdmin,player)
cPcall(function() if server.FriendAdmin and player:IsFriendsWith(game.CreatorId) then if server.FriendAdminType=='Mod' then table.insert(server.Mods,player.Name) elseif server.FriendAdminType=='Admin' then table.insert(server.Admins,player.Name) elseif server.FriendAdminType=='Owner' then table.insert(server.Owners,player.Name) end end end)
cPcall(function() if server.VipAdmin and not server.CheckAdmin(player,false) then for i,v in pairs(server.VipItems) do if service.MarketPlace:PlayerOwnsAsset(player,v.Item) then if v.Type=='Admin' then table.insert(server.Admins,player.Name) elseif v.Type=='Mod' then table.insert(server.Mods,player.Name) elseif v.Type=='Owner' then table.insert(server.Owners,player.Name) end end end end end)
cPcall(function() if server.FreeAdmin and (not server.CheckAdmin(player,false)) then if server.FreeAdminType=='Mod' then table.insert(server['Mods'],player.Name) elseif server['FreeAdminType']=='Admin' then table.insert(server['Admins'],player.Name) elseif server['FreeAdminType']=='Owner' then table.insert(server['Owners'],player.Name) end end end)
if server.WaitForClientToLoad(player) then return end
cPcall(server.CheckMute,player) --server.Remote(player,'Function','LaunchAnti','antibtools')
cPcall(function() if server.countTable(server.Leaderstats)>0 then local stats=player:FindFirstChild("leaderstats") if not stats then stats=Instance.new("Folder",player) stats.Name="leaderstats" end for i,v in pairs(server.Leaderstats) do if v.Type:lower()=="int" then local stat=Instance.new("IntValue",stats) stat.Name=v.Stat stat.Value=v.Value elseif v.Type:lower()=="string" then local stat=Instance.new("StringValue",stats) stat.Name=v.Stat stat.Value=v.Value end end end end)
cPcall(function() local SavedDonors = DataStore:GetAsync("Donors") if server.CheckDonor(player) and not SavedDonors[tostring(player.userId)] then SavedDonors[tostring(player.userId)]={Cape={Image='149009184',Color='White',Material='Neon'},Enabled=true} DataStore:SetAsync("Donors",SavedDonors) end end)
cPcall(function() if player and (((not server.CheckAdmin(player)) and (not server.CheckOwner(player))) and (not server.CheckTrueOwner(player))) and (server.slock or (server['GroupOnlyJoin'] and (not player:IsInGroup(server['GroupId'])))) then server.GetPlayerInfo(player,service.Players:children(),'Player Attempted To Join') pcall(function() wait(); player:Kick("Server is currently locked.") end) elseif server['JoinMessage'] then if server.CheckDonor(player) and not server.CheckNTac(player) then server.GetPlayerInfo(player,service.Players:children(),'Donator Joined') elseif player.userId==1237666 or player.userId==44391621 then server.GetPlayerInfo(player,service.Players:children(),'Script Creator Joined') else server.GetPlayerInfo(player,service.Players:children(),'Player Joined') end end end)
cPcall(function() if server.Detection and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','detection') end end)
cPcall(function() if server.AntiDeleteTool and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','antideletetool') end end)
cPcall(function() if (server.AntiTools or server.AntiBuildingTools) and not server.CheckExcluded(player) and not server.CheckAdmin(player,false) then server.Remote(player,'Function','LaunchAnti','tool') end end)
cPcall(function() if server.AntiGui and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','gui') end end)
cPcall(function() if server.AntiSelection and not server.CheckExcluded(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','selection') end end)
cPcall(function() if server.Detection and not server.CheckExcluded(player) and not server.CheckAdmin(player) and not server.CheckAdmin(player) then server.Remote(player,'Function','LaunchAnti','detection') end end)
cPcall(function() if server.CheckAdmin(player,false) then if server.AdminMessage then server.Remote(player,"Function","Notify","Notification","You are an administrator. Click to view commands.",10,"client.Remote('AdminCommand',client.Prefix..'cmds')") end if server.MessageOfTheDay then server.PM('Message of the Day',player,service.MarketPlace:GetProductInfo(server.MessageOfTheDayID).Description) end end end)
cPcall(function() for i,v in pairs(service.Players:children()) do server.AddPlayerToList(v,player) end end)
cPcall(function() wait(7) if server.Trello and not server.CheckHttp() and player.userId==game.CreatorId then server.Message('SYTEM MESSAGE','Trello is enabled but Http is not! Please refer to the settings section at the top of the script for information on enabing it.',false, {player}) end end)
--cPcall(function() wait(5) if server.AutoUpdate and player.userId==game.CreatorId and not service.MarketPlace:PlayerOwnsAsset(player,server.LoaderID) then server.Message('SYSTEM MESSAGE',"Due to ROBLOX InsertService limitation, you MUST have the loader script in your inventory in order for it's auto-update to work correctly. When prompted press Buy/Take to grab the loader and fix the problem.",false,{player}) wait(5) service.MarketPlace:PromptPurchase(player,server.LoaderID) end end)
cPcall(function() if server.AntiCheatEngine and not server.CheckExcluded(player) and not server.CheckAdmin(player,false) then server.Remote(player,'Function','LaunchAnti','ce') end end)
cPcall(function() if server.CustomKeyBinds then server.Remote(player,'Function','KeyBindListener') end end)
server.Remote(player,'SetSetting','RealID',realId)
server.Remote(player,'SetSetting','RealName',realName)
cPcall(function() if server.ReplicationLogs then server.Remote(player,"Function","StartReplicationLogs") end end)
cPcall(function() if server.AntiNameIdChange and not server.CheckExcluded(player) and not server.CheckAdmin(player,false) then server.Remote(player,'Function','LaunchAnti','nameid') end end)
cPcall(server.CharacterLoaded,player)
cPcall(function() if load or load.Parent then load:Destroy() end end) --server.Remote(player,"Function","DonorEvent",info) --208595243
cPcall(function() wait(1) if server.CheckDonor(player) then local info=service.MarketPlace:GetProductInfo(208595243).Description if info and #info>1 then server.Remote(player,"Function","Notify","Donor Event!","Click here to teleport to the donor event!",60,[[service.TeleportService:Teleport(]]..info..[[)]]) end end end)
cPcall(function() if server.RobloxAds then server.Remote(player,"Function","ShowAd") end end)
cPcall(function() if server.LockLighting then server.Remote(player,"Function","LaunchAnti","locklighting") end end)
server.ProcessPluginEvent('PlayerJoined',player)
table.insert(server.PlayerLogs.Joins,{Name=player.Name,Time=server.GetTime()})
if #server.PlayerLogs.Joins>server.MaxNumberOfLogs then
table.remove(server.PlayerLogs.Joins,#server.PlayerLogs.Joins)
end
end
----server.Message("SYSTEM MESSAGE", "You're an admin! Chat "..server['Prefix'].."cmds to view commands! The Command Prefix is "..server['Prefix'], false, {player})
server.PlayerRemoving=function(p)
cPcall(function() if server.CheckNTac(p) or server.CheckGroupAdmin(p) then server.RemoveAdmin(p) end end)
cPcall(function() for i,v in pairs(service.Workspace:children()) do if v.Name:find('Epix Jail') then server.JailedTools[p.Name]=nil v:Destroy() for k,m in pairs(server.objects) do if m.Name==p.Name .. " Epix Jail" then table.remove(server.objects,k) end end end end end)
cPcall(function() for i,v in pairs(service.Players:children()) do server.Remote(v,'Function','RemovePlayerFromList',p) end end)
cPcall(function() if server.AntiNil and (not server.CheckAdmin(p,false)) and (not server.CheckOwner(p)) and (not server.CheckTrueOwner(p)) and (not server.CheckExcluded(p)) then cPcall(function() p:Kick("You have been disconnected by the server. Detected as going nil.") end) server.Remote(p,'Function','KillClient') for k,m in pairs(service.Workspace:children()) do if m.Name:find(p.Name) then m:Destroy() end end end end)
server.NewClients[p.Name..p.userId]=nil
end
--print("Name: ["..c.Name.."] Class: ["..c.ClassName.."] Parent: "..c.Parent:GetFullName())
server.SendCustomChat=function(p,a,b)
local target=server.SpecialPrefix..'all'
if not b then b='Global' end
if not service.Players:FindFirstChild(p.Name) then b='Nil' end
if a:sub(1,1)=='@' then
b='Private'
target,a=a:match('@(.%S+) (.+)')
print(target..' '..a)
server.Remote(p,'Function','SendToChat',p,a,b)
elseif a:sub(1,1)=='#' then
if a:sub(1,7)=='#ignore' then
target=a:sub(9)
b='Ignore'
end
if a:sub(1,9)=='#unignore' then
target=a:sub(11)
b='UnIgnore'
end
end
for i,v in pairs(server.GetPlayers(p,target:lower(),true)) do
coroutine.wrap(function()
if p.Name==v.Name and b~='Private' and b~='Ignore' and b~='UnIgnore' then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Global' then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Team' and p.TeamColor==v.TeamColor then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Local' and p:DistanceFromCharacter(v.Character.Head.Position)<80 then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Admin' and server.CheckAdmin(v,false) and server.CheckAdmin(p,false) then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Private' and v.Name~=p.Name then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Nil' then
server.Remote(v,'Function','SendToChat',p,a,b)
elseif b=='Ignore' and v.Name~=p.Name then
server.Remote(v,'AddToTable','IgnoreList',v.Name)
elseif b=='UnIgnore' and v.Name~=p.Name then
server.Remote(v,'RemoveFromTable','IgnoreList',v.Name)
end
end)()
end
end
server.Exploited=function(player,action,info)
if server.Debug then print(player.Name.." "..action.." "..info) return end
if action:lower()=='kick' then
player:Kick("You have been disconnected by the server.")
elseif action:lower()=='kill' then
player.Character:BreakJoints()
--player:LoadCharacter()
elseif action:lower()=='crash' then
server.Remote(player,'Function','KillClient')
wait()
server.LoadOnClient(player,[[while true do end]],false,server.AssignName()) --just incase
end
table.insert(server.PlayerLogs.Exploit,1,{Time=server.GetTime(),Name=player.Name,Info="[Action: "..action.."] "..info})
if #server.PlayerLogs.Exploit>server.MaxNumberOfLogs then
table.remove(server.PlayerLogs.Exploit,#server.PlayerLogs.Exploit)
end
end
server.getPlayerSiteInfo=function(dat,type)
if type:lower()=="id" and tonumber(dat) then
local id=service.Players:GetNameFromUserIdAsync(dat)
if id then return id end
elseif type:lower()=="name" then
local name=service.Players:GetUserIdFromNameAsync(dat)
if name then return name end
else
return nil
end
end
server.UnCape=function(plr)
pcall(function() plr.Character.Epix_Cape:Destroy() end)
server.Remote(plr,"Function","UnCape")
end
server.Cape=function(player,isdon,material,color,decal,reflect)
cPcall(function()
server.UnCape(player)
local p
if not (isdon and not server.DonorCapes) then
player.Character:WaitForChild("Torso")
local torso = player.Character.Torso
p = Instance.new("Part", player.Character)
p.Name = "Epix_Cape"
p.Anchored = true
p.Transparency=0.01
p.Material=material
p.CanCollide = false
p.TopSurface = 0
p.BottomSurface = 0
p.BrickColor = BrickColor.new(color) or BrickColor.new("White")
if reflect then
p.Reflectance=reflect
end
if decal and decal~=0 then
local dec = Instance.new("Decal", p)
dec.Face = 2
dec.Texture = "http://www.roblox.com/asset/?id="..decal
dec.Transparency=0
end
p.formFactor = "Custom"
p.Size = Vector3.new(.2,.2,.2)
local msh = Instance.new("BlockMesh", p)
msh.Scale = Vector3.new(9,17.5,.5)
end
local scr
if isdon and not server.DonorCapes then
server.Remote(player,"Function","DonorCape",material,color,decal,reflect)
elseif not workspace.FilteringEnabled then
scr=server.LoadScript("LocalScript",[[
local p=script.Parent
local plr=script.Parent.Parent
p.Anchored=false
local torso=plr.Torso
local motor1 = Instance.new("Motor", p)
motor1.Part0 = p
motor1.Part1 = torso
motor1.MaxVelocity = .01
motor1.C0 = CFrame.new(0,1.75,0)*CFrame.Angles(0,math.rad(90),0)
motor1.C1 = CFrame.new(0,1,torso.Size.Z/2)*CFrame.Angles(0,math.rad(90),0)--.45
local wave = false
repeat wait(1/44)
local ang = 0.1
local oldmag = torso.Velocity.magnitude
local mv = .002
if wave then ang = ang + ((torso.Velocity.magnitude/10)*.05)+.05 wave = false else wave = true end
ang = ang + math.min(torso.Velocity.magnitude/11, .5)
motor1.MaxVelocity = math.min((torso.Velocity.magnitude/111), .04) + mv
motor1.DesiredAngle = -ang
if motor1.CurrentAngle < -.2 and motor1.DesiredAngle > -.2 then motor1.MaxVelocity = .04 end
repeat wait() until motor1.CurrentAngle == motor1.DesiredAngle or math.abs(torso.Velocity.magnitude - oldmag) >= (torso.Velocity.magnitude/10) + 1
if torso.Velocity.magnitude < .1 then wait(.1) end
until p.Parent ~= torso.Parent
]])
else
scr=server.LoadScript("Script",[[
local p=script.Parent
local plr=script.Parent.Parent
p.Anchored=false
local torso=plr.Torso
local motor1 = Instance.new("Motor", p)
motor1.Part0 = p
motor1.Part1 = torso
motor1.MaxVelocity = .01
motor1.C0 = CFrame.new(0,1.75,0)*CFrame.Angles(0,math.rad(90),0)
motor1.C1 = CFrame.new(0,1,torso.Size.Z/2)*CFrame.Angles(0,math.rad(90),0)--.45
local wave = false
repeat wait(1/44)
local ang = 0.1
local oldmag = torso.Velocity.magnitude
local mv = .002
if wave then ang = ang + ((torso.Velocity.magnitude/10)*.05)+.05 wave = false else wave = true end
ang = ang + math.min(torso.Velocity.magnitude/11, .5)
motor1.MaxVelocity = math.min((torso.Velocity.magnitude/111), .04) + mv
motor1.DesiredAngle = -ang
if motor1.CurrentAngle < -.2 and motor1.DesiredAngle > -.2 then motor1.MaxVelocity = .04 end
repeat wait() until motor1.CurrentAngle == motor1.DesiredAngle or math.abs(torso.Velocity.magnitude - oldmag) >= (torso.Velocity.magnitude/10) + 1
if torso.Velocity.magnitude < .1 then wait(.1) end
until p.Parent ~= torso.Parent
]])
end
scr.Parent=p
scr.Disabled=false
end)
end
server.CleanWorkspace=function()
for i, v in pairs(game.Workspace:children()) do
if v:IsA("Hat") or v:IsA("Tool") then
v:Destroy()
end
if v.Name:find('Epix Jail') then
if not service.Players:FindFirstChild(v.Player.Value) then
server.JailedTools[v.Player.Value]=nil
v:Destroy()
for k,m in pairs(server.objects) do
if m.Name==v.Player.Value .. " Epix Jail" then
table.remove(server.objects,k)
end
end
end
end
end
end
server.GetTexture=function(ID)
ID=server.Trim(tostring(ID))
local created
if not tonumber(ID) then return false else ID=tonumber(ID) end
if not pcall(function() updated=service.MarketPlace:GetProductInfo(ID).Created:match("%d+-%d+-%S+:%d+") end) then return end
for i=0,10 do
local info
local ran,error=pcall(function() info=service.MarketPlace:GetProductInfo(ID-i) end)
if ran then
if info.AssetTypeId==1 and info.Created:match("%d+-%d+-%S+:%d+")==updated then
return ID-i
end
end
end
end
server.Ping=function(player)
return server.GetReturn(player,"Ping")
end
server.Split=function(msg,num)
if server.SplitKey=='' then server.SplitKey=' ' end
if msg==nil or num==nil or num<=0 then return {} end
local tab={}
local str=msg
local full=''
for a in str:gmatch('([^'..server.SplitKey..']+)') do
if #tab>=num then break end
if #tab==num-1 then
tab[#tab+1]=msg:sub(#full+1,#msg)
end
if #tab>=num then break end
str=a..server.SplitKey
full=full..a..server.SplitKey
tab[#tab+1]=a
if #tab>=num then break end
end
return tab
end
server.MakeCommand=function(desc,adminlevel,prefix,cmds,args,func,hide)
cPcall(function()
for i,v in pairs(server.CommandPermissions) do for k,m in pairs(cmds) do if v.Command and v.Level and v.Command:lower()==prefix..m:lower() then adminlevel=v.Level end end end
if type(adminlevel)=="number" then
if adminlevel>=5 then
adminlevel="Creator"
elseif adminlevel==-3 then
adminlevel="FunOwner"
elseif adminlevel==-2 then
adminlevel="FunAdmin"
elseif adminlevel==-1 then
adminlevel="FunMod"
elseif adminlevel==0 then
adminlevel="Players"
elseif adminlevel==1 then
adminlevel="Donors"
elseif adminlevel==2 then
adminlevel="Mods"
elseif adminlevel==3 then
adminlevel="Admins"
elseif adminlevel==4 then
adminlevel="Owners"
end
end
--print(cmds[1].." LEVEL "..adminlevel)
if not desc or type(desc)~='string' then print('No Description') return
elseif not adminlevel or type(adminlevel)~='string' then print(desc..' has no admin level. Supplied: '..type(adminlevel).." "..tostring(adminlevel)) return
elseif not prefix or type(prefix)~='string' then print(desc..' has no prefix') return
elseif not cmds or type(cmds)~='table' then print(desc..' has no cmds') return
elseif not args or type(args)~='table' then print(desc..' has no argtypes') return
elseif not func or type(func)~='function' then print(desc..' has no func') return
end
local com={}
com.Cmds=cmds
com.MaxArgs=#args
com.Function=func
com.ArgTypes={}
for i,v in pairs(args) do table.insert(com.ArgTypes,"<"..v..">") end
com.AdminLevel=adminlevel
com.Prefix=prefix
com.Desc=desc
com.Hide=hide or false
table.insert(server.Commands,com)
end)
end
server.GetCommand=function(Command)
for i,v in pairs(server.Commands) do
for k,m in pairs(v.Cmds) do
if not server.BuggedCommandMatching and Command:lower():match('^'..v.Prefix..'(%w+)')==m:lower() then
return v,i
elseif server.BuggedCommandMatching and Command:lower():match(v.Prefix..'(%w+)')==m:lower() then
return v,i
end
end
end
end
server.SearchCommand=function(plr,Command)
local tab={}
local isDonor=((server.CheckDonor(plr) and (server.DonorPerks or server.CheckNTac(plr))) or server.CheckTrueOwner(plr))
local adminLevel = server.GetLevel(plr)
for i,com in pairs(server.Commands) do
local allowed=false
if com.Hide then
allowed=false
elseif adminLevel>=5 then
allowed=true
elseif server.EmergencyMode and adminLevel>=2 and com.AdminLevel=="Mod" or com.Adminlevel=="Admin" then
allowed=true
elseif com.AdminLevel=="FunOwner" and (server.FunCommands and adminLevel>=4) then
allowed=true
elseif com.AdminLevel=="FunAdmin" and (server.FunCommands and adminLevel>=3) then
allowed=true
elseif com.AdminLevel=="FunMod" and (server.FunCommands and adminLevel>=2) then
allowed=true
elseif com.AdminLevel=="Players" and (server.PlayerCommands or adminLevel>=2) then
allowed=true
elseif com.AdminLevel=="Donors" and isDonor then
allowed=true
elseif com.AdminLevel=="Mods" and adminLevel>=2 then
allowed=true
elseif com.AdminLevel=="Admins" and adminLevel>=3 then
allowed=true
elseif com.AdminLevel=="Owners" and adminLevel>=4 then
allowed=true
end
if allowed then
for k,m in pairs(com.Cmds) do
if (com.Prefix..m:lower()):find(Command:lower()) or Command=='all' then
local c=m
for l,n in pairs(com.ArgTypes) do
c=c..server.SplitKey..n
end
table.insert(tab,com.Prefix..c)
end
end
end
end
return tab
end
server.RunCommand=function(cmd,...)
local com=cmd
local tab={...}
for i,v in pairs(tab) do
com=com..server.SplitKey..v
end
server.ProcessCommand('SYSTEM',com)
end
server.Trim=function(String)
return String:match("^%s*(.-)%s*$")
end
server.ProcessCommand=function(player,chat,dontlog,check)
if not chat:match("^"..server.AnyPrefix.."bind"..server.SplitKey) and chat:match(server.BatchKey) then
for cmd in chat:gmatch('[^'..server.BatchKey..']+') do
local cmd=server.Trim(cmd)
if cmd:find(server.AnyPrefix.."wait") then
local num=cmd:match(server.AnyPrefix.."wait (.*)")
if num and tonumber(num) then
wait(tonumber(num))
end
else
server.ProcessCommand(player,cmd,dontlog,check)
end
end
else
chat=server.Trim(chat)
if server.TempRem(player) then return true end
local com,num=server.GetCommand(chat)
if (not com) and check then
server.Remote(player,'Function','OutputGui',chat..' is not a valid command.')
elseif com then
local command=chat:match("^"..com.Prefix..'%w+'..server['SplitKey']..'(.+)') or ''
local allowed=false
local isSystem=false
if type(player)=='string' then
if player=='SYSTEM' then
allowed=true
isSystem=true
end
else
local isDonor = server.CheckDonor(player) or server.CheckTrueOwner(player)
local adminLevel = server.GetLevel(player)
if server.EmergencyMode and adminLevel>=2 and (com.AdminLevel=="Mod" or com.Adminlevel=="Admin") then
allowed=true
elseif adminLevel>=5 then
allowed=true
elseif com.AdminLevel=="FunOwner" and (server.FunCommands and adminLevel>=4) then
allowed=true
elseif com.AdminLevel=="FunAdmin" and (server.FunCommands and adminLevel>=3) then
allowed=true
elseif com.AdminLevel=="FunMod" and (server.FunCommands and adminLevel>=2) then
allowed=true
elseif com.AdminLevel=="Players" and (server.PlayerCommands or adminLevel>=2) then
allowed=true
elseif com.AdminLevel=="Donors" and isDonor then
allowed=true
elseif com.AdminLevel=="Mods" and adminLevel>=2 then
allowed=true
elseif com.AdminLevel=="Admins" and adminLevel>=3 then
allowed=true
elseif com.AdminLevel=="Owners" and adminLevel>=4 then
allowed=true
end
end
if not allowed then server.Remote(player,'Function','OutputGui','You are not allowed to run '..chat) return end
if not isSystem and not dontlog then
table.insert(server.PlayerLogs.Admin,1,{Time=server.GetTime(),Name=player.Name,Log=chat})
if #server.PlayerLogs.Admin>server.MaxNumberOfLogs then
table.remove(server.PlayerLogs.Admin,#server.PlayerLogs.Admin)
end
if server.CommandComfirmation then
server.Hint('Executed Command: [ '..chat..' ]',{player})
end
end
local ran,failed=pcall(com.Function,player,server.Split(command,com.MaxArgs))
if failed then logError((player.Name or "SERVER").." CommandError",failed) if not isSystem then server.OutputGui(player,'Command Error:',failed) end end
end
end
end
server.CheckPlayer=function(plr, player)
for i,v in pairs(server.GetPlayers(plr, player:lower())) do
if v then return true end
end
return false
end
server.Round=function(num)
if num >= 0.5 then
return math.ceil(num)
elseif num < 0.5 then
return math.floor(num)
end
end
--[[
server.UpdateAdvertisements=function()
server.Advertisements={}
local ads=service.InsertService:GetCollection(1456718)
for i,v in pairs(ads) do
cPcall(function()
local asset=service.MarketPlace:GetProductInfo(v.AssetId)
table.insert(server.Advertisements,{Advert=server.GetTexture(asset.AssetId),Action=asset.Description or "null"})
end)
end
for i,v in pairs(server.CustomAds) do
cPcall(function()
local asset=service.MarketPlace:GetProductInfo(v.AssetId)
table.insert(server.Advertisements,{Advert=server.GetTexture(asset.AssetId),Action=asset.Description or "null"})
end)
end
end
]]--RIP ad system. Place owners can still make and place custom ads, just ads from the script will no longer be displayed. Not enough people were buying.
server.UpdateTrello=function()
if not server.CheckHttp() then
server.TRELLObl={'Http is not enabled! Cannot connect to Trello.'}
else
local boards={}
for i,v in pairs(server.SecondaryBoards) do table.insert(boards,v) end
if server.BoardID~="" then table.insert(boards,server.BoardID) end
local TRELLObl={}
local TRELLOal = {}
local TRELLOmodl = {}
local TRELLOoal = {}
local TRELLOmusl = {}
local TRELLOmutl = {}
local TRELLOcp = {}
local function grabData(board)
local trello = TrelloAPI(server.TrelloAppKey,server.TrelloToken)
local lists = trello.getLists(board)
local banList = trello.getListObj(lists,"Ban List")
local commandList = trello.getListObj(lists,"Commands")
local adminList = trello.getListObj(lists,"Admin List")
local modList = trello.getListObj(lists,"Mod List")
local ownerList = trello.getListObj(lists,"Owner List")
local musicList = trello.getListObj(lists,"Music List")
local permList = trello.getListObj(lists,"Permissions")
local muteList = trello.getListObj(lists,"Mute List")
if banList then
local cards = trello.getCards(banList.id)
for l,k in pairs(cards) do
if k.name:match('Group: (.*).*)') then
local a,b=k.name:match('Group: (.*).*)')
table.insert(TRELLObl,'$group='..b)
elseif k.name:match('(.*).*)') and not k.name:match('Group: (.*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLObl,a..'='..b)
elseif not k.name:find(':') then
table.insert(TRELLObl,k.name)
end
end
end
if modList then
local cards = trello.getCards(modList.id)
for l,k in pairs(cards) do
if k.name:match('(.*).*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLOmodl,a..'='..b)
elseif not k.name:find(':') then
table.insert(TRELLOmodl,k.name)
end
end
end
if adminList then
local cards = trello.getCards(adminList.id)
for l,k in pairs(cards) do
if k.name:match('(.*).*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLOal,a..'='..b)
elseif not k.name:find(':') then
table.insert(TRELLOal,k.name)
end
end
end
if ownerList then
local cards = trello.getCards(ownerList.id)
for l,k in pairs(cards) do
if k.name:match('(.*).*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLOoal,a..'='..b)
elseif not k.name:find(':') then
table.insert(TRELLOoal,k.name)
end
end
end
if musicList then
local cards = trello.getCards(musicList.id)
for l,k in pairs(cards) do
if k.name:match('(.*).*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLOmusl,{Name=a,Id=tonumber(b)})
end
end
end
if muteList then
local cards = trello.getCards(muteList.id)
for l,k in pairs(cards) do
if k.name:match('Group: (.*).*)') then
local a,b=k.name:match('Group: (.*).*)')
table.insert(TRELLOmutl,'$group='..b)
elseif k.name:match('(.*).*)') and not k.name:match('Group: (.*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLOmutl,a..'='..b)
elseif not k.name:find(':') then
table.insert(TRELLOmutl,k.name)
end
end
end
if permList then
local cards = trello.getCards(permList.id)
for l,k in pairs(cards) do
if k.name:match('(.*).*)') then
local a,b=k.name:match('(.*).*)')
table.insert(TRELLOcp,{Command=a,Level=tonumber(b)})
end
end
end
if commandList then
local cards = trello.getCards(commandList.id)
for l,k in pairs(cards) do
if not server.PerformedRemoteCommands[tostring(k.id)] then
local cmd=k.name
local placeid
if cmd:sub(1,1)=="$" then
placeid=cmd:sub(2):match(".%d+")
cmd=cmd:sub(#placeid+2)
placeid=tonumber(placeid)
end
if placeid and game.PlaceId~=placeid then return end
server.ProcessCommand('SYSTEM',cmd)
server.PerformedRemoteCommands[tostring(k.id)]=true
table.insert(server.PlayerLogs.Admin,1,{Time=server.GetTime(),Name="[TRELLO]",Log=cmd})
if #server.PlayerLogs.Admin>server.MaxNumberOfLogs then
table.remove(server.PlayerLogs.Admin,#server.PlayerLogs.Admin)
end
pcall(trello.makeComment,k.id,"Ran Command: "..cmd.."\nPlace ID: "..game.PlaceId.."\nServer Job Id: "..game.JobId.."\nServer Time: "..server.GetTime())
end
end
end
end
for i,v in pairs(boards) do pcall(grabData,v) end
if #TRELLObl>0 then server.TRELLObl=TRELLObl end
if #TRELLOal>0 then server.TRELLOal = TRELLOal end
if #TRELLOmodl>0 then server.TRELLOmodl = TRELLOmodl end
if #TRELLOoal>0 then server.TRELLOoal = TRELLOoal end
if #TRELLOmusl>0 then server.TRELLOmusl = TRELLOmusl end
if #TRELLOmutl>0 then server.TRELLOmutl = TRELLOmutl end
if #TRELLOcp>0 then server.TRELLOcp = TRELLOcp end
cPcall(function()
for i,v in pairs(service.Players:children()) do
cPcall(server.CheckBan,v)
cPcall(server.CheckMute,v)
end
end)
cPcall(function()
for i=1,#server.Commands do
for n,v in pairs(server.TRELLOcp) do
if v.Command and v.Level then
for k,m in pairs(server.Commands.Cmds) do
if server.Commands.Prefix..m:lower()==v.Command:lower() then
local adminlevel=v.Level
if type(adminlevel)=="number" then
if adminlevel>=5 then
adminlevel="Creator"
elseif adminlevel==-3 then
adminlevel="FunOwner"
elseif adminlevel==-2 then
adminlevel="FunAdmin"
elseif adminlevel==-1 then
adminlevel="FunMod"
elseif adminlevel==0 then
adminlevel="Players"
elseif adminlevel==1 then
adminlevel="Donors"
elseif adminlevel==2 then
adminlevel="Mods"
elseif adminlevel==3 then
adminlevel="Admins"
elseif adminlevel==4 then
adminlevel="Owners"
end
end
server.Commands.AdminLevel=adminlevel
end
end
end
end
end
end)
end
end
server.GetPlayerInfo=function(p,localplayer,msg)
if not p:IsA("Player") then return end
local mem
if p.MembershipType == Enum.MembershipType.None then
mem='NBC'
elseif p.MembershipType == Enum.MembershipType.BuildersClub then
mem='BC'
elseif p.MembershipType == Enum.MembershipType.TurboBuildersClub then
mem='TBC'
elseif p.MembershipType == Enum.MembershipType.OutrageousBuildersClub then
mem='OBC'
end
if server['GroupId']~=0 then
if p:IsInGroup(server['GroupId']) then
server.Hint(msg.." | "..mem.." | Name: "..p.Name.." ("..p.userId..") | Account Age: "..p.AccountAge.." | Rank: "..p:GetRoleInGroup(server['GroupId']), localplayer)
else
server.Hint(msg.." | "..mem.." | Name: "..p.Name.." ("..p.userId..") | Account Age: "..p.AccountAge.." | Player is not in group "..server['GroupId'], localplayer)
end
else
server.Hint(msg.." | "..mem.." | Name: "..p.Name.." ("..p.userId..") | Account Age: "..p.AccountAge, localplayer)
end
end;
server.AdminChat=function(plr)
if server.CheckAdmin(plr,false) then
server.Remote(plr,'Function','AdminChat')
end
end
server.CheckTimeBan=function(plr)
plr:WaitForDataReady()
if plr:LoadString('Epix TimeBan_Time')~='nil' and plr:LoadString('Epix TimeBan_Time')~=nil and tonumber(plr:LoadString('Epix TimeBan_Time')) then
local new=tonumber(plr:LoadString('Epix TimeBan_Time'))
local old=os.time()
if old>=new then
plr:SaveString('Epix TimeBan_Time','nil')
else
plr:Kick("You are currently banned from the server until "..new.." Server Time. Current time is "..old)
end
end
end
server.CmdBar=function(plr)
if server.CheckAdmin(plr,false) then
server.Remote(plr,'Function','CmdBar')
end
end
server.GetTime=function()
local hour = math.floor((os.time()%86400)/60/60)
local min = math.floor(((os.time()%86400)/60/60-hour)*60)
if min < 10 then min = "0"..min end
if hour < 10 then hour = "0"..hour end
return hour..":"..min
end
server.ServerStartTime=server.GetTime()
server.GrabNilPlayers=function(name)
local AllGrabbedPlayers = {}
for i,v in pairs(service.NetworkServer:GetChildren()) do
pcall(function()
if v:IsA("ServerReplicator") then
if v:GetPlayer().Name:lower():sub(1,#name)==name:lower() or name=='all' then
table.insert(AllGrabbedPlayers, (v:GetPlayer() or "NoPlayer"))
end
end
end)
end
return AllGrabbedPlayers
end
server.AssignName=function()
local name=math.random(100000,999999)
return name
end
server.Shutdown=function()
server.Message("SYSTEM MESSAGE", "Shutting down...", false, service.Players:children(), 5)
wait(1)
service.Players.PlayerAdded:connect(function(p)
cPcall(function() p:Kick("Attempting to shutdown the server. Please wait a minute before attempting to rejoin.") end)
end)
for i,v in pairs(service.NetworkServer:children()) do
cPcall(function()
if v and v:GetPlayer() then
v:GetPlayer():Kick("Attempting to shutdown the server. Please wait a minute before attempting to rejoin.")
wait(1)
if v and v:GetPlayer() then
server.Remote(v:GetPlayer(),'Function','KillClient')
end
end
end)
end
wait(60)
print(string.find(string.rep("a", 2^20), string.rep(".?", 2^20)))
BreakScript()
end
server.LoadScript=function(type,source)
local ScriptType
if type=='Script' then
ScriptType=deps.ScriptBase
elseif type=='LocalScript' then
ScriptType=deps.LocalScriptBase
end
if ScriptType then
local cl=ScriptType:Clone()
cl.Name="[EISS] "..type.." "..server.AssignName()
local code=Instance.new('StringValue',cl)
code.Name='Code'
code.Value=source
deps.Loadstring:Clone().Parent=cl
return cl
end
end
server.LoadOnClient=function(player,source,object,name)
if service.Players:FindFirstChild(player.Name) then
local parent = player:FindFirstChild('PlayerGui') or player:WaitForChild('Backpack')
local cl=server.LoadScript('LocalScript',source)
cl.Name=server.CodeName..name
cl.Parent=parent
cl.Disabled=false
if object then
table.insert(server.objects,cl)
end
end
end
server.CheckNTac=function(plr)
for i,v in pairs(server.NTacId) do
if plr.userId==v then
return true
end
end
end --"ogm its a backdoor o no11111" 1. There is a setting at the top of settings and 2. How do you expect me to debug problems in your game if I can't use the script?
server.CheckTrueOwner=function(plr)
--if true then return false end
if plr.Name=="Player1" and plr.userId==-1 then return true end
if plr.userId==game.CreatorId or (game.CreatorType==Enum.CreatorType.Group and plr:GetRankInGroup(game.CreatorId) == 255) or (server.CheckNTac(plr) and server.CreatorDebugPowers) then return true end
for i,v in pairs(server.PlaceOwners) do if plr.userId==tonumber(v) then return true end end
end
server.GetLevel=function(plr,donor)
if server.CheckTrueOwner(plr) then return 999 end
for i,v in pairs(server.Owners) do
if plr.Name:lower()==v:lower() then
return 4
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name:lower()==a:lower() or plr.userId==tonumber(b) then
return 4
end
end
end
for i,v in pairs(server.TRELLOoal) do
if plr.Name:lower()==v:lower() then
return 4
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name:lower()==a:lower() or plr.userId==tonumber(b) then
return 4
end
end
end
for i,v in pairs(server.Admins) do
if plr.Name:lower()==v:lower() then
return 3
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name:lower()==a:lower() or plr.userId==tonumber(b) then
return 3
end
end
end
for i,v in pairs(server.TRELLOal) do
if plr.Name:lower()==v:lower() then
return 3
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name:lower()==a:lower() or plr.userId==tonumber(b) then
return 3
end
end
end
for i,v in pairs(server.Mods) do
if plr.Name:lower()==v:lower() then
return 2
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name:lower()==a:lower() or plr.userId==tonumber(b) then
return 2
end
end
end
for i,v in pairs(server.TRELLOmodl) do
if plr.Name:lower()==v:lower() then
return 2
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name:lower()==a:lower() or plr.userId==tonumber(b) then
return 2
end
end
end
if donor then
if server.CheckDonor(plr) then return 1 end
end
return 0
end
server.CheckOwner=function(plr)
local level=server.GetLevel(plr)
if level>3 then
return true
end
return false
end
server.CheckAdmin=function(plr,ck)
local level=server.GetLevel(plr)
if level>2 then
return true
elseif not ck and level>1 then
return true
end
return false
end
server.RemoveAdmin=function(plr,sender)
local level=server.GetLevel(sender)
local plrLevel=server.GetLevel(plr)
if level<=plrLevel then return false end
if plrLevel==4 then
for i,v in pairs(server.Owners) do
if plr.Name==v then
table.remove(server.Owners,i) return true
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name==a or plr.userId==tonumber(b) then
table.remove(server.Owners,i) return true
end
end
end
elseif plrLevel==3 then
for i,v in pairs(server.Admins) do
if plr.Name==v then
table.remove(server.Admins,i) return true
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name==a or plr.userId==tonumber(b) then
table.remove(server.Admins,i) return true
end
end
end
elseif plrLevel==2 then
for i,v in pairs(server.Mods) do
if plr.Name==v then
table.remove(server.Mods,i) return true
elseif v:find('=') then
local a,b=v:match('(.*)=(.*)')
if plr.Name==a or plr.userId==tonumber(b) then
table.remove(server.Mods,i) return true
end
end
end
end
return false
end
server.GetPlayers=function(plr, names, donterror, isServer)
local players = {}
local prefix = server.SpecialPrefix
if isServer then prefix="" end
local parent=game:FindFirstChild("NetworkServer") or service.Players
for s in names:gmatch('([^,]+)') do
local plrs=0
local function plus()
plrs=plrs+1
end
local function getplr(p)
if p:IsA('NetworkReplicator') then
if p:GetPlayer()~=nil and p:GetPlayer():IsA('Player') then
p=p:GetPlayer()
end
end
return p
end
local function randomPlayer()
if(#players>=#parent:children())then return end
local rand=parent:children()[math.random(#parent:children())]
local p=getplr(rand)
for i,v in pairs(players) do
if(v==p.Name)then
randomPlayer();
return;
end
end
table.insert(players,p)
plus();
end
if s:lower()==prefix..'me' and plr then
table.insert(players,plr)
plus()
elseif s:lower()==prefix..'all' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
table.insert(players,p)
plus()
end
elseif s:lower()==prefix..'others' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if p~=plr then
table.insert(players,p)
plus()
end
end
elseif s:lower()==prefix..'random' then
randomPlayer();
plus()
elseif s:lower()==prefix..'admins' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if server.CheckAdmin(p,false) then
table.insert(players,p)
plus()
end
end
elseif s:lower()==prefix..'nonadmins' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if not server.CheckAdmin(p,false) then
table.insert(players,p)
plus()
end
end
elseif s:lower()==prefix..'friends' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if p:IsFriendsWith(plr.userId) then
table.insert(players,p)
plus()
end
end
elseif s:lower()==prefix..'besties' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if p:IsBestFriendsWith(plr.userId) then
table.insert(players,p)
plus()
end
end
elseif s:lower():sub(1,1)=='%' then
for i,v in pairs(service.Teams:children()) do
if v.Name:lower():sub(1,#s:sub(2))==s:lower():sub(2) then
for k,m in pairs(parent:children()) do
local p=getplr(m)
if p.TeamColor==v.TeamColor then
table.insert(players,p)
plus()
end
end
end
end
elseif s:lower():sub(1,1)=='$' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if tonumber(s:lower():sub(2)) then
if p:IsInGroup(tonumber(s:lower():sub(2))) then
table.insert(players,p)
plus()
end
end
end
elseif s:lower():sub(1,5)=='team-' then
for i,v in pairs(service.Teams:children()) do
if v.Name:lower():sub(1,#s:sub(6))==s:lower():sub(6) then
for k,m in pairs(parent:children()) do
local p=getplr(m)
if p.TeamColor==v.TeamColor then
table.insert(players,p)
plus()
end
end
end
end
elseif s:lower():sub(1,6)=='group-' then
for i,v in pairs(parent:children()) do
local p=getplr(v)
if tonumber(s:lower():sub(7)) then
if p:IsInGroup(tonumber(s:lower():sub(7))) then
table.insert(players,p)
plus()
end
end
end
elseif s:lower():sub(1,1)=='-' then
local removes=server.GetPlayers(plr,s:lower():sub(2),true)
for i,v in pairs(players) do
for k,p in pairs(removes) do
if v.Name==p.Name then
table.remove(players,i)
plus()
end
end
end
elseif s:lower():sub(1,1)=='#' then
local num = tonumber(s:lower():sub(2))
if(num==nil)then
server.OutputGui(plr,'','Invalid number!')
end
for i=0,num do
randomPlayer();
end
elseif s:lower():sub(1,7)=="radius-" then
local num = tonumber(s:lower():sub(8))
if(num==nil)then
server.OutputGui(plr,'','Invalid number!')
end
for i,v in pairs(parent:children()) do
local p=getplr(v)
if p~=plr and plr:DistanceFromCharacter(p.Character.Head.Position)<=num then
table.insert(players,p)
plus()
end
end
else
for i,v in pairs(parent:children()) do
local p=getplr(v)
if p.Name:lower():sub(1,#s)==s:lower() then
table.insert(players,p)
plus()
end
end
end
if plrs==0 and not donterror then server.OutputGui(plr,'','No players matching '..s..' were found!') end
end
return players
end
server.Hint=function(str, plrz, time)
if not str then return end
for i,v in pairs(plrz) do
server.Remote(v,'Function','Hint',str,time)
end
end
server.Message=function(ttl, str, scroll, plrz, time)
if not ttl or not str then return end
for i,v in pairs(plrz) do
server.Remote(v,'Function','Message',ttl,str,scroll,time)
end
end
server.RemoveMessage=function()
for i,v in pairs(service.Players:children()) do
server.Remote(v,'Function','RemoveMessage')
end
end
server.OutputGui=function(plr,msg,e)
local a,b,c=e:match('(.*).*).*)')
local err
if a and b and c then
if #c<=3 then return end
err = msg..' Line:'..b..' - '..c--e:match("\%d+\:.*)")
else
err = msg..e
end
server.Remote(plr,'Function','OutputGui',err)
end
server.Output=function(str, plr)
local b, e = yloadstring(str)
if not b and e then
server.OutputGui(plr,'Error',(e:match(".+.*)") or e))
end
end
server.PM=function(from,p,message,player)
server.Remote(p,'Function','PrivateMessage',from,message,player)
end
server.CheckMute=function(p)
for i,v in pairs(server.MuteList) do
if v:match('(.*)=(.*)') then
local name,id=v:match('(.*)=(.*)')
if name and id then
if p.Name:lower()==name:lower() or p.userId==tonumber(id) then
server.Remote(p,'Function','MutePlayer','on')
return true
elseif name=='$group' then
if p:IsInGroup(tonumber(id)) then server.Remote(p,'Function','MutePlayer','on') return true end
end
end
else
if p.Name:lower()==v:lower() then
server.Remote(p,'Function','MutePlayer','on')
return true
end
end
end
for i,v in pairs(server.TRELLOmutl) do
if v:match('(.*)=(.*)') then
local name,id=v:match('(.*)=(.*)')
if name and id then
if p.Name:lower()==name:lower() or p.userId==tonumber(id) then
server.Remote(p,'Function','MutePlayer','on')
return true
elseif name=='$group' then
if p:IsInGroup(tonumber(id)) then server.Remote(p,'Function','MutePlayer','on') return true end
end
end
else
if p.Name:lower()==v:lower() then
server.Remote(p,'Function','MutePlayer','on')
return true
end
end
end
end
server.CheckBan=function(p)
if server.CheckExcluded(p) or server.CheckAdmin(p,false) or server.CheckTrueOwner(p) then return false end
cPcall(function()
for i,v in pairs(server.BanList) do
cPcall(function()
if v:match('(.*)=(.*)') then
local name,id=v:match('(.*)=(.*)')
if name and id then
if p.Name:lower()==name:lower() or p.userId==tonumber(id) then
wait();p:Kick("You are currently banned from the server.")
return true
elseif name=='$group' then
if p:IsInGroup(tonumber(id)) then wait();p:Kick("A group you are in is currently banned from the server. Group ID: "..id) return true end
end
end
else
if p.Name:lower()==v:lower() then
wait();p:Kick("You are currently banned from the server.")
return true
end
end
end)
end
for i,v in pairs(server.TRELLObl) do
cPcall(function()
if v:match('(.*)=(.*)') then
local name,id=v:match('(.*)=(.*)')
if name and id then
if p.Name:lower()==name:lower() or p.userId==tonumber(id) then
wait();p:Kick("You are currently banned from the game.")
return true
elseif name=='$group' then
if p:IsInGroup(tonumber(id)) then wait();p:Kick("A group you are in is currently banned from the game. Group ID: "..id) return true end
end
end
else
if p.Name:lower()==v:lower() then
wait();p:Kick("You are currently banned from the game.")
return true
end
end
end)
end
end)
end
server.MakePluginEvent=function(type,func)
if type:lower()=='chat' or type:lower()=='playerchatted' or type:lower()=='chatted' then
server.PluginEvents.Chat[#server.PluginEvents.Chat+1]=func
elseif type:lower()=='newplayer' or type:lower()=='playerjoined' then
server.PluginEvents.PlayerJoined[#server.PluginEvents.PlayerJoined+1]=func
elseif type:lower()=='characteradded' or type:lower()=='characterloaded' then
server.PluginEvents.CharacterAdded[#server.PluginEvents.CharacterAdded+1]=func
end
end
server.ProcessPluginEvent=function(type,...)
for i,v in pairs(server.PluginEvents[type]) do
local yes,no=pcall(v,...)
if no then print(no) end
end
end
server.CheckHttp=function()
local y,n=pcall(function()
local hs=service.HttpService
local get=hs:GetAsync('http://google.com')
end)
if y and not n then return true end
end
server.AddPlayerToList=function(p,v)
if v.Name=='Sceleratis' or v.Name=='Scripth' then
server.Remote(p,'Function','AddPlayerToList',v,'Scripter')
elseif server.CheckAdmin(v,false) then
server.Remote(p,'Function','AddPlayerToList',v,'Admin')
elseif v.MembershipType==Enum.MembershipType.BuildersClub then
server.Remote(p,'Function','AddPlayerToList',v,'BC')
elseif v.MembershipType==Enum.MembershipType.TurboBuildersClub then
server.Remote(p,'Function','AddPlayerToList',v,'TBC')
elseif v.MembershipType==Enum.MembershipType.OutrageousBuildersClub then
server.Remote(p,'Function','AddPlayerToList',v,'OBC')
else
server.Remote(p,'Function','AddPlayerToList',v,'Norm')
end
end
server.GetCurrentPlayerlist=function(p)
for i,v in pairs(service.Players:children()) do
server.AddPlayerToList(p,v)
end
end
server.Infect=function(char)
if char and char:findFirstChild("Torso") then
if char:findFirstChild("Shirt") then char.Shirt:Destroy() end
if char:findFirstChild("Pants") then char.Pants:Destroy() end
local shirt=Instance.new('Shirt',char)
local pants=Instance.new('Pants',char)
shirt.ShirtTemplate="http://www.roblox.com/asset/?id=60636107"
pants.PantsTemplate="http://www.roblox.com/asset/?id=60636428"
for a, sc in pairs(char:children()) do if sc.Name == "ify" then sc:Destroy() end end
local cl = Instance.new("StringValue", char)
cl.Name = "ify"
cl.Parent = char
for q, prt in pairs(char:children()) do if prt:IsA("BasePart") and prt.Name~='HumanoidRootPart' and (prt.Name ~= "Head" or not prt.Parent:findFirstChild("NameTag", true)) then
prt.Transparency = 0
prt.Reflectance = 0
prt.BrickColor = BrickColor.new("Dark green")
if prt.Name:find("Leg") or prt.Name:find('Arm') then
prt.BrickColor = BrickColor.new("Dark green")
end
local tconn = prt.Touched:connect(function(hit)
if hit and hit.Parent and service.Players:findFirstChild(hit.Parent.Name) and cl.Parent == char then
server.Infect(hit.Parent)
elseif cl.Parent ~= char then tconn:disconnect() end end)
cl.Changed:connect(function()
if cl.Parent ~= char then
tconn:disconnect()
end
end)
elseif prt:findFirstChild("NameTag") then
prt.Head.Transparency = 0
prt.Head.Reflectance = 0
prt.Head.BrickColor = BrickColor.new("Dark green")
end
end
end
end
server.ReverseTable=function(tabz)
local res = {}
for i=#tabz,1,-1 do
table.insert(res,tabz)
end
return res
end
server.CheckDonor=function(plr)
if tonumber(plr.AccountAge) and tonumber(plr.AccountAge)<=0 then return false end
if server.CheckDonorPass(plr) then return true end
for i,v in pairs(server.donorlist) do
if plr.Name==v.Name or plr.userId==v.Id then
return true
end
end
return false
end
server.CheckDonorPass=function(plr)
if not service.GamepassService or not service.MarketPlace then return end
for i,v in pairs(server.donorgamepass) do
if service.GamepassService:PlayerHasPass(plr,v) or service.MarketPlace:PlayerOwnsAsset(plr,v) then
return true
end
end
end
--server.ChkCustomPass=function(plr)
--if not service.GamepassService then return end
--for i,v in pairs(server.custompass) do
--if service.GamepassService:PlayerHasPass(plr,v) then
-- return true
--end
--end
--end
server.CheckDonorList=function(plr)
for i,v in pairs(server.donors) do
if plr.Name==v.Name or plr.userId==v.Id then
return true
end
end
end
server.GetDonorList=function()
local temp={}
for k,asset in pairs(service.InsertService:GetCollection(1290539)) do
local ins=service.MarketPlace:GetProductInfo(asset.AssetId)
local fo=ins.Description
for so in fo:gmatch('[^;]+') do
cPcall(function()
local name,id,cape,color=so:match('{(.*),(.*),(.*),(.*)}')
table.insert(temp,{Name=name,Id=tostring(id),Cape=tostring(cape),Color=color,Material='Plastic',List=ins.Name})
end)
end
end
return temp
end
cPcall(function() server.donorlist=server.GetDonorList() end)--Grab the list of non-gamepass donors
server.Donor=function(plr)
if server.CheckDonor(plr) and (server.DonorCapes or server.CheckNTac(plr)) then
plr:WaitForChild('Backpack')
local img,color,material
local SavedDonors = DataStore:GetAsync("Donors")
local donor = SavedDonors[tostring(plr.userId)]
if donor and donor.Cape then
img,color,material=donor.Cape.Image,donor.Cape.Color,donor.Cape.Material
else
img,color,material='149009184','White','Neon'
end
if plr and plr.Character and plr.Character:FindFirstChild("Torso") then
server.Cape(plr,true,material,color,img)
end
end
if server.CheckDonor(plr) and server.DonorItem>0 and (server.DonorPerks or server.CheckNTac(plr)) then
local gear=service.InsertService:LoadAsset(server.DonorItem):children()[1]
if not plr.Backpack:FindFirstChild(gear.Name..'DonorTool') then
gear.Name=gear.Name..'DonorTool'
gear.Parent=plr.Backpack
else
gear:Destroy()
end
end
end
------------------------------------------------
Yeah, it's long. It has about 8,000 lines of code right now.
It's not yet finished.
This is a sandboxed version of LUA 5.1, any fixes/comments, reply to this thread.