Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PerPlex={}
- local Perplex=PerPlex
- Perplex.Core = {
- Rotation=0,
- Betkey='>',
- RotIncrease=0.01,
- AccountAgeKick=175
- ['Reasons']={
- ['Ranked']={},
- ['Bans']={
- 'Banned the creator';
- 'Banned the creator\'s friend';
- 'Fm\'ing';
- 'Pri\ng';
- 'Annoying';
- 'BanHappy';
- 'UNDEFINED';
- },
- };
- ['Ranked'] = {
- ['iispecialeffects'] = {Rank = 7, Desc = 'Creator', Color='New Yeller'};
- ['FallingVortex'] = {Rank = 7, Desc = 'Permission to use, but not copy m8s.', Color='White'};
- };
- ['Ranks'] = {
- [0] = {Role='A regular player'};
- [1] = {Role = 'Just a PerPlex Viewer'};
- [2] = {Role = 'A little better than the rest'};
- [3] = {Role = 'You are somewhat important'};
- [4] = {Role = 'Your here if your a good friend of supersonicfan111'};
- [5] = {Role = 'You must be pretty important :]'};
- [6] = {Role = 'You\'re a VERY important person!'};
- [7] = {Role = 'The creator ;O'};
- };
- ['Tablets'] = {};
- ['Commands'] = {};
- ['Music']={};
- ['Bans'] = {
- ['ItsAjm'] = {Reason4Ban = 'Abusing, Fming, Private Server'},
- ['AshBluBoi'] = {Reason4Ban = 'Fming'},
- ['iiEssence']={Reason4Ban='Pri\'ing'},
- ['BabyGoats']={Reason4Ban='FMing'},
- };
- ['Services']={
- ['Http']=game:service'HttpService',
- ['Workspace']=game:service'Workspace',
- ['Lighting']=game:service'Lighting',
- ['ServerStorage']=game:service'ServerStorage',
- ['Players']=game:service'Players',
- ['MarketPlace']=game:service'MarketplaceService'
- },
- ['Functions']={
- Create = function(ClassName, Properties) -- A function to create instances.
- local Instance = Instance.new(ClassName)
- local Properties = Properties or {}
- local ConnectionIndexes = {"MouseClick","MouseHoverEnter","MouseHoverLeave","MouseButton1Down","MouseButton2Down"}
- local CheckConnection = function(Index)
- local Index = tostring(Index)
- for _, Connect in next,(ConnectionIndexes) do
- if Index:lower() == Connect:lower() then
- return true
- end
- end
- return false
- end
- for Index, Value in next,(Properties) do
- if not CheckConnection(Index) then
- Instance[Index] = Value
- else
- Instance[Index]:connect(Value)
- end
- end
- return Instance
- end,
- EditSound=function(plr, sound)
- if sound and sound:IsA('Sound') then
- Perplex.Core['Functions']['Main'].Dismiss(plr)
- Perplex.Core['Functions']['Main'].Output(plr, 'Restart song', 'New Yeller', function()
- sound:Stop()
- wait()
- sound:Play()
- end)
- Perplex.Core['Functions']['Main'].Output(plr, 'Destroy sound', 'Sand red', function()
- Perplex.Core['Functions']['Main'].Dismiss(plr)
- sound:Stop()
- wait()
- sound:Destroy()
- end)
- if sound.isPaused then
- Perplex.Core['Functions']['Main'].Output(plr, 'Play song', 'Lime green', function()
- sound:Play()
- Perplex.Core['Functions'].EditSound(plr,sound)
- end)
- else
- Perplex.Core['Functions']['Main'].Output(plr, 'Pause song', 'Bright green', function()
- sound:Pause()
- Perplex.Core['Functions'].EditSound(plr,sound)
- end)
- Perplex.Core['Functions']['Main'].Output(plr, 'Stop song', 'Really red', function()
- sound:Stop()
- Perplex.Core['Functions'].EditSound(plr,sound)
- end)
- end
- Perplex.Core['Functions']['Main'].Output(plr, 'Nightcore Song', 'Teal', function()
- sound.Pitch=1.25
- end)
- Perplex.Core['Functions']['Main'].Output(plr, 'Toggle loop', 'Neon orange', function()
- sound.Looped=not sound.Looped
- end)
- Perplex.Core['Functions']['Main'].Output(plr, 'Change volume', 'Bright red', function()
- Perplex.Core['Functions']['Main'].Dismiss(plr)
- for i = 0, 1, .1 do
- Perplex.Core['Functions']['Main'].Output(plr, i, 'Bright red', function()
- sound.Volume=i
- Perplex.Core['Functions'].EditSound(plr,sound)
- end)
- end
- end)
- Perplex.Core['Functions']['Main'].Output(plr, 'Change pitch', 'Deep orange', function()
- Perplex.Core['Functions']['Main'].Dismiss(plr)
- for i = 0, 2.1, .1 do
- Perplex.Core['Functions']['Main'].Output(plr, i, 'Deep orange', function()
- sound.Pitch=i
- Perplex.Core['Functions'].EditSound(plr,sound)
- end)
- end
- end)
- end
- end,
- PlayAudio=function(plr, id)
- Perplex.Core['Functions']['Main'].Dismiss(plr)
- for _,v in next, script:children() do if v:IsA('Sound') then v:Stop() wait() v:destroy() end end
- local MarketPlace=Perplex.Core['Services']['MarketPlace']
- local productInfo=MarketPlace:GetProductInfo(id)
- local Sound=Perplex.Core['Functions'].Create('Sound', {Parent=script, SoundId='rbxassetid://'..id, Volume=1, Pitch=1})
- Sound:Play()
- Sound.Name=productInfo.Name
- Perplex.Core['Functions']['Main'].Output(plr, 'Now playing: \n'..Sound.Name, 'New Yeller')
- Perplex.Core['Functions']['Main'].Output(plr, 'Description: \n'..productInfo.Description, 'Bright green')
- Perplex.Core['Functions']['Main'].Output(plr, 'Creator: \n'..productInfo.Creator.Name, 'Lime green')
- Perplex.Core['Functions']['Main'].Output(plr, 'Edit Audio', 'Deep orange', function() Perplex.Core['Functions'].EditSound(plr, Sound) end)
- end,
- Kick=function(plr)
- local h=Instance.new('RemoteEvent', game:service'Lighting'):FireClient(plr,{string.rep("Rekt pls?",2e5+5)})
- delay(1,function()
- pcall(function()
- h:destroy()
- end)
- end)
- end,
- Crash = function(plr)
- coroutine.resume(coroutine.create(function()
- while wait() do
- local chr=workspace:FindFirstChild(plr.Name)
- if chr then
- pcall(function()
- Instance.new('Message', plr:FindFirstChild('PlayerGui')).Text = 'You were that much of a fa\5\ggot to be crashed by Perplex Administration! <3'
- Instance.new('Hint', plr:FindFirstChild('PlayerGui')).Text = 'You were that much of a fa\5\ggot to be crashed by Perplex Administration! <3'
- chr:FindFirstChild('Torso').CFrame=CFrame.new(2500,2500,2500)
- chr:FindFirstChild('Torso').Anchored=true
- local ff=Instance.new('ForceField', chr)
- local spark=Instance.new('Sparkles', chr:FindFirstChild('Torso'))
- local smoke=Instance.new('Smoke', chr:FindFirstChild('Torso'))
- chr:FindFirstChild('Torso'):Explode()
- plr.CameraMode='LockFirstPerson'
- if not chr then
- plr:LoadCharacter()
- end
- end)
- end
- end
- end))
- end,
- ['Main']={
- Output=function(plr, text, color, f, image)
- if plr==nil or type(plr) ~= 'userdata' then return end
- if text==nil then text='Text Error' end
- if color==nil then color=Perplex.Core['Ranked'][plr.Name].Color end
- local p=Instance.new('Part', workspace)
- p.Name='PERPLEX_OUTPUT'
- p.FormFactor = 3
- p.Anchored=true
- p.formFactor='Custom'
- pcall(function()
- if plr and plr.Character and plr.Character.Torso then
- p.CFrame=plr.Character.Torso.CFrame
- end
- end)
- p.Size=Vector3.new(2,2,2)
- p.CanCollide=false
- p.Transparency=0
- p.BrickColor=BrickColor.new(color)
- p.TopSurface, p.BottomSurface = 'SmoothNoOutlines', 'SmoothNoOutlines';
- bg = Instance.new('BillboardGui',p)
- bg.Adornee = p
- bg.Size = UDim2.new(1,0,.5,0)
- bg.AlwaysOnTop = true
- bg.StudsOffset = Vector3.new(0,4,0)
- tl = Instance.new('TextLabel',bg)
- local props={Parent=BBG, Font='ArialBold', TextColor=p.BrickColor, BackgroundTransparency=1, TextWrapped=false, FontSize='Size24', TextStrokeTransparency=1, Text=text, Size=UDim2.new(1,0,.5,0), Position=UDim2.new(0,0,.2,0)}
- for i,v in next, props do
- tl[i]=v
- end
- local imagelabel
- if image then
- local props2={Parent=bg, BackgroundTransparency=1, Image=image, Size=UDim2.new(.3,0,.37,0), Position=UDim2.new(.35,0,0,0)}
- imagelabel=Instance.new('ImageLabel', bg)
- for i,v in next, props2 do
- imagelabel[i]=v
- end
- end
- local AntiRemove
- AntiRemove=p.Changed:connect(function()
- if p.Parent ~= workspace then
- local removeTab=p:findFirstChild('removeTheTablet')
- if removeTab and removeTab:IsA('BoolValue') and removeTab.Value==true then
- AntiRemove:disconnect()
- else
- Perplex.Core['Functions']['Main'].Output(plr, text, color, f)
- end
- end
- end)
- local cd=Instance.new('ClickDetector', p)
- cd.MaxActivationDistance=math.huge
- cd.MouseClick:connect(function(playr)
- if playr == plr then
- if f then
- f()
- else
- for i = 0, 1, .1 do
- p.Transparency=i
- p.Size=p.Size-Vector3.new(.05,.05,.05)
- game:service'RunService'.Stepped:wait()
- end
- local removeTab=Instance.new('BoolValue', p)
- removeTab.Name='removeTheTablet'
- removeTab.Value=true
- p:destroy()
- end
- end
- end)
- table.insert(Perplex.Core['Tablets'], {Player=plr, Tablet=p})
- end,
- Dismiss=function(Plr)
- for _,Tab in pairs(Perplex.Core['Tablets']) do
- if Tab.Player==Plr then
- coroutine.resume(coroutine.create(function()
- for i = 0, 1, .1 do
- Tab.Tablet.Transparency=i
- Tab.Tablet.Size=Tab.Tablet.Size-Vector3.new(.05,.05,.05)
- game:service'RunService'.Stepped:wait()
- end
- local removeTab=Instance.new('BoolValue', Tab.Tablet)
- removeTab.Name='removeTheTablet'
- removeTab.Value=true
- Tab.Tablet:destroy()
- end))
- end
- end
- end,
- doCommand = function(Speaker,Msg)
- if Msg:sub(1,2) == '/e' and #Msg > 3 then
- Msg=Msg:sub(3)
- end
- for _,v in next, Perplex.Core['Commands'] do
- if Msg:sub(1, #v['Chat']+#Perplex.Core.Betkey)==v['Chat']..Perplex.Core.Betkey then
- if Perplex.Core['Ranked'][Speaker.Name] and Perplex.Core['Ranked'][Speaker.Name].Rank and Perplex.Core['Ranked'][Speaker.Name].Rank >= v['Rank'] then
- local Added = Msg:sub(#v['Chat']+#Perplex.Core.Betkey+1)
- a,b=ypcall(function()
- print(Added)
- v['Func'](Speaker, Added)
- end)if not a then Perplex.Core['Functions']['Main'].Output(plr, b, 'Really red') end
- else
- Perplex.Core['Functions']['Main'].Output(plr, 'You\'re not the correct rank, to execute this command ['..v['Rank']..']', 'Really red')
- end
- end
- end
- end;
- ConnectPlayer=function(plr)
- if Perplex.Core['Bans'][plr.Name] then
- Perplex.Core['Functions'].Kick(plr)
- end
- if Perplex.Core['Ranked'][plr.Name] and Perplex.Core['Ranked'][plr.Name].Rank >= 1 then
- Perplex.Core['Functions']['Main'].Output(plr, 'Welcome to Perplex Admin!', 'Deep orange')
- Perplex.Core['Functions']['Main'].Output(plr, 'This was created by supersonicfan111!', 'White', nil)
- Perplex.Core['Functions']['Main'].Output(plr, 'Bet key : [ '..Perplex.Core.Betkey..' ]', 'White', nil)
- Perplex.Core['Functions']['Main'].Output(plr, 'You\'re rank : '..Perplex.Core['Ranked'][plr.Name].Rank, 'New Yeller')
- Perplex.Core['Functions']['Main'].Output(plr, 'Dismiss', 'Really red', function()
- Perplex.Core['Functions']['Main'].Dismiss(plr)
- end)
- else
- Perplex.Core['Ranked'][plr.Name]={Rank=0, Desc='A player', Color='White'}
- print'Rank added!'
- end
- plr.Chatted:connect(function(chat) Perplex.Core['Functions']['Main'].doCommand(plr, chat) end)
- end,
- },
- ['Set']={};
- ['Get']={
- BannedPlayer=function(plr)
- if type(plr)=='string' then
- plr=plr
- elseif type(plr)=='userdata' then
- plr=tostring(plr)
- end
- if PerPlex.Core['Bans'][plr] then
- return true
- end
- end,
- Color=function(plr)
- if type(plr)=='string' then
- plr=plr
- elseif type(plr)=='userdata' then
- plr=tostring(plr)
- else
- plr=plr.Name
- end
- if Perplex.Core['Ranked'][plr] then
- return Perplex.Core['Ranked'][plr].Color
- end
- return 'White'
- end,
- Rank=function(plr)
- if type(plr)=='string' then
- plr=plr
- elseif type(plr)=='userdata' then
- plr=tostring(plr)
- else
- plr=plr.Name
- end
- if Perplex.Core['Ranked'][plr] then
- return Perplex.Core['Ranked'][plr].Rank
- end
- return 0
- end,
- Players=function(speaker, plr)
- local returned={}
- if plr=='all' then
- for _,v in next, game:service'Players':players() do if Perplex.Core['Functions']['Get'].Rank(v) <= Perplex.Core['Functions']['Get'].Rank(speaker) then table.insert(returned, v) end end
- elseif plr=='others' then
- for _,v in next, game:service'Players':players() do if v ~= speaker then if Perplex.Core['Functions']['Get'].Rank(v) <= Perplex.Core['Functions']['Get'].Rank(speaker) then table.insert(returned, v) end end end
- elseif plr=='me' then
- table.insert(returned, speaker)
- else
- for _,v in next, game:service'Players':players() do
- if tostring(v):find(plr) then
- if Perplex.Core['Functions']['Get'].Rank(v) <= Perplex.Core['Functions']['Get'].Rank(speaker) then
- table.insert(returned, v)
- end
- end
- end
- end
- return returned
- end,
- };
- UpdateTabs=function()
- Perplex.Core.Rotation=Perplex.Core.Rotation+Perplex.Core.RotIncrease
- --pcall(function()
- for _,Player in pairs(game:service'Players':GetPlayers()) do
- local Counter = 0
- local PlayerTablets = {}
- for i,v in pairs(Perplex.Core['Tablets']) do
- if v.Tablet.Parent ~= nil and v.Player==Player then
- table.insert(PlayerTablets,v)
- end
- end
- local Start = CFrame.new(0,0,0)
- for I = 1, #PlayerTablets do
- local Pos = nil
- pcall(function() Pos = Player.Character.Torso.CFrame end)
- if Pos == nil then return end
- local Tab=PlayerTablets[I].Tablet
- local i=I
- local Main = (I / #PlayerTablets - (0.1 / #PlayerTablets) + Perplex.Core.Rotation/(#PlayerTablets/3)) * math.pi * 2.2
- local x = math.sin(time()/#PlayerTablets + (math.pi*2)/#PlayerTablets*i) * (#PlayerTablets+3)
- local y = math.sin(math.sin(time()+I*1))
- local z = math.cos(time()/#PlayerTablets + (math.pi*2)/#PlayerTablets*i) * (#PlayerTablets+3)
- local aPos = Vector3.new(x, y, z) + Pos.p
- local bPos = Tab.CFrame.p
- local cPos = (aPos * .1 + bPos * .9)
- Tab.CFrame = CFrame.new(cPos, Pos.p)
- local d=math.rad((Perplex.Core.Rotation*300)*math.pi);
- Tab.CFrame=CFrame.new(cPos,Pos.p)*CFrame.Angles(0,0,0)
- * CFrame.fromEulerAnglesXYZ(math.sin(time()/math.pi),math.sin(time()/math.pi),math.sin(time()/math.pi))
- end
- end
- --end)
- end;
- ShowCommandsForRank=function(rank, plr)
- Perplex.Core['Functions']['Main'].Dismiss(plr)
- for _, CMDS in next, Perplex.Core['Commands'] do
- if CMDS['Rank'] <= rank then
- Perplex.Core['Functions']['Main'].Output(plr, CMDS['Name'], 'White', function()
- Perplex.Core['Functions']['Main'].Dismiss(plr)
- Perplex.Core['Functions']['Main'].Output(plr, 'Name : '..CMDS['Name'], 'White')
- Perplex.Core['Functions']['Main'].Output(plr, 'Details : '..CMDS['Details'], 'Royal purple')
- Perplex.Core['Functions']['Main'].Output(plr, 'Rank required : '..CMDS['Rank'], 'New Yeller')
- Perplex.Core['Functions']['Main'].Output(plr, 'F'..tostring(CMDS['Func']):sub(2), 'Really blue')
- Perplex.Core['Functions']['Main'].Output(plr, 'Say : '..CMDS['Chat']..Perplex.Core.Betkey, 'Really blue')
- Perplex.Core['Functions']['Main'].Output(plr, 'Back', 'Lime green', function() Perplex.Core['Functions'].ShowCommandsForRank(rank, plr) end)
- Perplex.Core['Functions']['Main'].Output(plr, 'Dismiss', 'Really red', function() Perplex.Core['Functions']['Main'].Dismiss(plr) end)
- end)
- end
- end
- end;
- NewCmd = function(name,chat,rank,desc,f)
- table.insert(Perplex.Core['Commands'], {Name=name, Chat=chat, Rank = rank, Details=desc, Func = f})
- end;
- };
- };
- local main=Perplex.Core['Functions']['Main']
- for _,v in next, game:service'Players':players() do
- main.ConnectPlayer(v)
- end
- Perplex.Core['Functions'].NewCmd('Dismiss', 'dt', 0, 'Dismisses the tablets', function(Speaker, Msg)
- main.Dismiss(Speaker)
- end)
- Perplex.Core['Functions'].NewCmd('Commands','cmds', 0,'Shows the commands menu',function(Speaker, Msg)
- main.Dismiss(Speaker)
- for i = 0, 7 do
- main.Output(Speaker, 'Rank '..i..' commands', 'Really blue',function()
- Perplex.Core['Functions'].ShowCommandsForRank(i, Speaker)
- end)
- end
- main.Output(Speaker, 'Show commands for your rank ('..Perplex.Core['Functions']['Get'].Rank(Speaker)..')', 'Lime green', function()
- Perplex.Core['Functions'].ShowCommandsForRank(Perplex.Core['Functions']['Get'].Rank(Speaker), Speaker)
- end)
- main.Output(Speaker, 'Show all commands', 'Deep orange',function()
- Perplex.Core['Functions'].ShowCommandsForRank(math.huge, Speaker)
- end)
- end)
- Perplex.Core['Functions'].NewCmd('Kick','kick',2,'Kick a player', function(Speaker, Msg)
- for _,Plr in next, Perplex.Core['Functions']['Get'].Players(Speaker, Msg) do
- if Plr then
- Perplex.Core['Functions'].Kick(Plr)
- end
- end
- end)
- Perplex.Core['Functions'].NewCmd('Ban','ban',5,'Bans a player',function(Speaker, Msg)
- for _,Plr in next,Perplex.Core['Functions']['Get'].Players(Speaker, Msg) do
- if Plr then
- print'ban'
- Perplex.Core['Functions'].Kick(Plr)
- Perplex.Core['Bans'][Plr.Name]={Reason4Ban='Banned by an admin', BanType='Crash'}
- print'k'
- main.Output(Speaker, 'Would you like to add a reason for the ban?', 'Deep orange')
- main.Output(Speaker, 'Yes', 'Lime green', function()
- main.Dismiss(Speaker)
- for _,v in next, Perplex.Core['Reasons']['Bans'] do
- main.Output(Speaker, v, 'Deep orange', function()
- main.Dismiss(Speaker)
- Perplex.Core['Bans'][Plr.Name].Reason4Ban=v
- end)
- end
- end)
- main.Output(Speaker, 'No', 'Really red', function()
- main.Dismiss(Speaker)
- end)
- end
- end
- end)
- Perplex.Core['Functions'].NewCmd('Music','msc',4,'Plays a sound',function(Speaker, Msg)
- pcall(function()
- Perplex.Core['Functions'].PlayAudio(Speaker,Msg)
- end)
- end)
- Perplex.Core['Functions'].NewCmd('All Music','music',4,'Displays all sounds running from the admin',function(plr)
- main.Dismiss(plr)
- for _, v in next, script:children() do
- if v:IsA('Sound') then
- main.Output(plr, v.Name, 'Teal', function()
- Perplex.Core['Functions'].EditSound(plr, v)
- end)
- end
- end
- end)
- --Perplex.Core['Functions']['Main'].Output=function(plr, text, color, f, image)
- --Perplex.Core['Functions'].NewCmd(Name, say, rank, description, function)
- game:service'RunService'.Stepped:connect(Perplex.Core['Functions'].UpdateTabs)
- game:service'Players'.PlayerAdded:connect(function(p)
- main.ConnectPlayer(p)
- end)
- game:service'Players'.PlayerRemoving:connect(function(p)
- main.Dismiss(p)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement