Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local script;do
- script=getfenv(error).script;
- repeat wait(); pcall(game.Destroy,script);until not script.Parent;
- end;
- game:service'StarterGui':setCoreGuiEnabled(0,false);--Playerlist
- local player=game:service'Players'.localPlayer;
- local create=function(class)
- return function(data)
- d=Instance.new(class);
- for i,v in pairs(data)do
- if(type(v)=='function')then
- d[i]:connect(function(...)
- ypcall(v,...);
- end);
- else
- d[i]=v;
- end;
- end;
- return d;
- end;
- end;
- local CurrentlySelectedObject=0;
- local NameColors={
- BrickColor.new('Bright red'),
- BrickColor.new('Bright blue'),
- BrickColor.new('Earth green'),
- BrickColor.new('Bright violet'),
- BrickColor.new('Bright orange'),
- BrickColor.new('Bright yellow'),
- BrickColor.new('Light reddish violet'),
- BrickColor.new('Brick yellow'),
- };
- local List=create'ScreenGui'{
- Name='Playerlist';
- Parent=player.PlayerGui;
- };
- local PlayerListFrame=create'Frame'{
- Parent=List;
- Size=UDim2.new(0.2,0,0.05,0);
- Position=UDim2.new(0,0,0,0);
- BackgroundTransparency=0.9;
- BackgroundColor=BrickColor.new'Black';
- };
- local PlayerListLabel=create'TextLabel'{
- Parent=PlayerListFrame;
- Size=UDim2.new(1,0,1,0);
- TextColor=BrickColor.new'Really red';
- Text='tusKOr661\'s Player List';
- FontSize='Size9';
- BackgroundTransparency=0.7;
- BackgroundColor=BrickColor.new'Grey';
- };
- local InfoFrame=create'Frame'{
- BackgroundTransparency=0.9;
- BackgroundColor=BrickColor.new'Black';
- Position=UDim2.new(1,0,0,0);
- Size=UDim2.new(0.2,0,0.2,0);
- Parent=List;
- };
- Info=create'TextLabel'{
- BackgroundTransparency=0.9;
- BackgroundColor=BrickColor.new'Black';
- Position=UDim2.new(0,0,0,0);
- TextXAlignment='Center';
- Size=UDim2.new(1,0,1/7,0);
- Parent=InfoFrame;
- TextColor=BrickColor.new'Really red';
- FontSize='Size11';
- Text='Information';
- TextWrapped=true;
- };
- local Bestfriend=Info:clone'';
- Bestfriend.Position=UDim2.new(0,0,1/7*1,0);
- Bestfriend.Size=UDim2.new(1,0,1/7,0);
- local Friend=Bestfriend:clone'';
- Friend.Position=UDim2.new(0,0,(1/7)*2,0);
- local ID=Bestfriend:clone'';
- ID.Position=UDim2.new(0,0,(1/7)*3,0);
- local Character=Bestfriend:clone'';
- Character.Position=UDim2.new(0,0,(1/7)*4,0);
- local TeamColor=Bestfriend:clone'';
- TeamColor.Position=UDim2.new(0,0,(1/7)*5,0);
- local Creator=Bestfriend:clone'';
- Creator.Position=UDim2.new(0,0,(1/7)*6,0);
- Bestfriend.Parent,TeamColor.Parent,Character.Parent,ID.Parent,Friend.Parent,Creator.Parent,Info.Parent=InfoFrame,InfoFrame,InfoFrame,InfoFrame,InfoFrame,InfoFrame,InfoFrame,InfoFrame;
- local Frame=create'Frame'{
- BackgroundTransparency=0.9;
- BackgroundColor=BrickColor.new'Black';
- Position=UDim2.new(0,0,0,0);
- Size=UDim2.new(0.2,0,0.25,0);
- Parent=List;
- Visible=true;
- };
- local Up=create'ImageButton'{
- Parent=Frame;
- Name='ScrollObject';
- BackgroundTransparency=0.9;
- BackgroundColor=BrickColor.new'Black';
- Image='rbxasset://textures/ui/scrollbuttonUp_ds.png';
- Size=UDim2.new(0.1,0,0.1,0);
- Position=UDim2.new(0.9,0,0,0);
- };
- local Bar=create'ImageButton'{
- Parent=Frame;
- Name='ScrollObject';
- Image='rbxasset://textures/ui/scrollbar.png';
- Size=UDim2.new(0.1,0,0.8,0);
- Position=UDim2.new(0.9,0,0.1,0);
- BackgroundColor=BrickColor.new'Grey';
- BackgroundTransparency=0.3;
- };
- local Down=Up:clone'';
- Down.Position=UDim2.new(0.9,0,0.9,0);
- Down.Image='rbxasset://textures/ui/scrollbuttonDown_ds.png';
- Down.Parent=Frame;
- Up.mouseButton1Click:connect(function()
- if(CurrentlySelectedObject~=0)then
- local CurrentSel=0;
- for i,v in pairs(FrameObjects(false))do
- CurrentSel=CurrentSel+1;
- if(CurrentSel==CurrentlySelectedObject+10)then
- break;
- end;
- v.Visible=(CurrentSel==1 and false) or true;
- v:TweenPosition( (CurrentSel==1 and UDim2.new(0,0,-0.1,0) )or UDim2.new(0,0,(0.1*(CurrentSel-1))),'Out','Quad',0.15,true);
- end;
- end;
- end);
- Down.mouseButton1Click:connect(function()
- if(CurrentlySelectedObject~=0)then
- local CurrentSel=0;
- for i,v in pairs(FrameObjects(false))do
- CurrentSel=CurrentSel+1;
- if(CurrentSel==CurrentlySelectedObject+10)then
- break;
- end;
- v.Visible=(CurrentSel==11 and false) or true;
- v:TweenPosition( (CurrentSel==11 and UDim2.new(0,0,1,0) )or UDim2.new(0,0,0.1*(CurrentSel+1)),'Out','Quad',0.15,true);
- end;
- end;
- end);
- Frame:TweenPosition(UDim2.new(0.8,0,0.05,0),'Out','Quad',0.5,true);
- PlayerListFrame:TweenPosition(UDim2.new(0.8,0,0,0),'Out','Quad',0.5,true);
- local NameToBrickColor=function(Name)
- local BrickColorCode=0;
- for i=1,#Name do
- Byte=Name:sub(i,i):byte();
- BrickColorCode=BrickColorCode+Byte;
- end;
- return BrickColor.new(BrickColorCode);
- end;
- local FrameObjects=function(v)
- Objs={};
- for _,Obj in pairs(Frame:children'')do
- if(Obj.Name~='ScrollObject')then
- Objs[#Objs+1]=Obj;
- end;
- end;
- return(Objs);
- end;
- local ClearFrame=function()
- for _,v in pairs(FrameObjects(false))do
- v:Remove'';
- end
- end;
- local Update=function()
- local Fix=false;
- for i,v in pairs(Frame:children'')do
- if(v.Name~='ScrollObject' and game.Players:findFirstChild(v.Text)==nil)then
- v:Remove'';
- Fix=true;
- end;
- end;
- if(#FrameObjects''~=#game.Players:players'')then
- Fix=true;
- end;
- if(Fix==true)then
- ClearFrame();
- local Current=0;
- for i,v in pairs(game.Players:players'')do
- coroutine.resume(coroutine.create(function()
- local Size=0;
- local NumberOfPlayers=#game.Players:players'';
- if(NumberOfPlayers>=10)then
- Size=0.1;
- else
- Size=(1/NumberOfPlayers);
- end;
- local NameValue=0;
- for i=1,#v.Name do
- val=string.byte(v.Name:sub(i,i));
- rev=#v.Name-i+1;
- if(#v.Name%2==1)then
- rev=rev-1;
- end;
- if(rev%4>=2)then
- val=-val;
- end;
- NameValue=NameValue+val;
- end;
- NameValue=NameValue%8;
- Label=create'TextButton'{
- Size=UDim2.new(0.9,0,Size,0);
- Position=UDim2.new(0,0,Current*Size,0);
- Text=v.Name;
- BackgroundColor=BrickColor.new'Grey';
- BackgroundTransparency=0.7;
- TextColor=NameColors[NameValue+1];
- Visible=((Current*Size>1 and false) or true);
- FontSize=tostring('Size'..(13-math.floor(Size*10)));
- };
- Label.MouseButton1Click:connect(function()
- Ran,Error=ypcall(function()
- InfoFrame.Position=UDim2.new(1,0,0,0);
- Bestfriend.Text=( (player:isBestFriendsWith(v.userId))==false and 'You are not bestfriends' ) or 'You are bestfriends<3';
- Friend.Text=((player:isBestFriendsWith(v.userId))==false and 'You are not friends' ) or 'You are friends';
- ID.Text=('ID : '..tostring(v.userId));
- Creator.Text='Is '..((v.Name=='tusKOr661' and 'the creator of this gui')or 'not the creator of this gui');
- Character.Text=tostring(v.CharacterAppearance:sub(1,25));
- TeamColor.Text=tostring( (function()
- for _,Team in pairs(game:service'Teams':children'')do
- if(Team:isA'Team')then
- if(Team.BrickColor==v.TeamColor)then
- return Team.Name;
- end;
- end;
- end;
- return'Is not on a team';
- end)());
- InfoFrame:TweenPosition(UDim2.new(0.5,0,0,0),'Out','Quad',1,true);
- end);
- print(Ran,Error,tick(),'Mouse button click on ' .. Label:getFullName'');
- end)
- Current=Current+1;
- Label.Parent=Frame;
- end));
- end
- end
- end;
- game:service'RunService'.Stepped:connect(function()
- --Update();
- ypcall(function()
- Update();
- List.Parent=player.PlayerGui;
- end);
- end);
- Ran,Error=ypcall(Update);
- if(not Ran)then
- print(Error);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement