kingkoolie

Untitled

Nov 1st, 2015
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.81 KB | None | 0 0
  1. banditpics = {160133287,160133243,117135218,117135561,117136102}
  2. banditnames= {"Marauder","Raider","Brigand","Highwayman","Bandit"}
  3.  
  4. zombiepics ={160133348,160133314,117135313,117135692,117136250}
  5. zombienames= {"Nomad","Vagabond","Wanderer","Vagrant","Survivor"}
  6. content = game:GetService("ContentProvider")
  7. game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
  8. LS = Instance.new("Script",script.Parent)
  9. C = Instance.new("StringValue",LS)
  10. C.Name = "Content"
  11. C.Value = "function enter() script.Parent.Profile.Visible=true end function leave() script.Parent.Profile.Visible=false end script.Parent.MouseEnter:connect(enter) script.Parent.MouseLeave:connect(leave)"
  12. LS.Disabled = true
  13. LSS = LS.Content.Value
  14. loadstring(LSS)()
  15. if script.Parent.ClassName~="ScreenGui" then
  16. local ScreenGui=Instance.new("ScreenGui",script.Parent)
  17. wait()
  18. script.Parent=ScreenGui
  19.  
  20. wait()
  21. end
  22. if script.Parent.Parent.Parent:FindFirstChild("DatabaseForPlayerlist")==nil then
  23. local ChickenNoodleSoup=Instance.new("StringValue",script.Parent.Parent.Parent)
  24. ChickenNoodleSoup.Name="DatabaseForPlayerlist"
  25. end
  26. function CheckDatabaseForPlayerlist(Player)
  27. local Childran=(script.Parent.Parent.Parent.DatabaseForPlayerlist:GetChildren())
  28. --print(#Childran)
  29. if #Childran==0 then
  30. return false
  31. else
  32. for x=1,#Childran do
  33. if string.find(tostring(Childran[x].Name),tostring(Player))~=nil then
  34. return true
  35.  
  36. end
  37.  
  38. end
  39. return false
  40. end
  41. end
  42.  
  43. function WaitForStats(ThatDudsName)
  44.  
  45. local Blehs=script.Parent.Parent.Parent.DatabaseForPlayerlist:FindFirstChild(ThatDudsName)
  46. local Children=Blehs:GetChildren()
  47. if #Children==0 then
  48. return true
  49. else
  50. return false
  51. end
  52.  
  53. end
  54.  
  55. function StartUp()
  56. for i,Player in pairs(script.Parent.Parent.Parent.Parent:GetChildren()) do --List all players in server
  57. local NameLength=(string.len(tostring(Player))+1)
  58.  
  59. if CheckDatabaseForPlayerlist(Player)==false then
  60. print('creating new profile for '..Player.Name)
  61. game:GetService("ContentProvider"):Preload("http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..tostring(Player))
  62. repeat wait() until content.RequestQueueSize == 0
  63. local BadgeProfile=Instance.new("StringValue",script.Parent.Parent.Parent.DatabaseForPlayerlist)
  64. BadgeProfile.Name=tostring(Player)
  65.  
  66. end --True means the player already has a profile
  67. if Player.Name~=script.Parent.Parent.Parent.Name then
  68. for poaspdowa,asdwpaosodw in pairs(Player:GetChildren()) do
  69. asdwpaosodw:Destroy()
  70. end
  71. end
  72.  
  73.  
  74. local Playa=Instance.new("TextLabel",script.Parent)
  75. script.Controls:Clone().Parent=Playa
  76. Playa.Visible=false
  77. Playa.Archivable=true
  78. if game.Players.NumPlayers>4 then
  79. Playa.BackgroundColor3=Color3.new(0,0,0)
  80. else
  81. Playa.BackgroundColor3=Color3.new(61/255,61/255,61/255)
  82. end
  83. Playa.BackgroundTransparency=.5
  84. Playa.BorderSizePixel=0
  85. Playa.Name=tostring(Player)
  86. Playa.Position=UDim2.new(1, -140, 0, (1+(16*NumPlayers)))
  87. Playa.Size=UDim2.new(0, 140, 0, 16)
  88. Playa.ZIndex=1
  89. Playa.Font="ArialBold"
  90. Playa.FontSize="Size14"
  91. Playa.Text="[P] "..tostring(Player).." "
  92. Playa.TextColor3=Color3.new(1,1,1)
  93. Playa.TextStrokeColor3=Color3.new(0,0,0)
  94. Playa.TextStrokeTransparency=0
  95. Playa.TextXAlignment="Center"
  96. NumPlayers=NumPlayers+1
  97.  
  98. if tostring(Player) == "SuperiorSpringy" then
  99. Playa.Text = "[O] "..tostring(Player).." "
  100. Playa.TextColor3 = Color3.new(255/255,0,0)
  101. end
  102.  
  103. local PF=Instance.new("Frame",Playa) --Creates a ProfileFrame
  104. PF.Position=UDim2.new(0, -200, 0, 0)
  105. PF.Size=UDim2.new(0,200,0,200)
  106. PF.ZIndex=2
  107. PF.Style="DropShadow"
  108. PF.Name="Profile"
  109. PF.Visible=false
  110.  
  111.  
  112. local Title=Instance.new("TextLabel",PF)
  113. Title.BackgroundTransparency=1
  114. Title.Position=UDim2.new(0,0,0,7)
  115. Title.Size=UDim2.new(1,0,0,0)
  116. Title.ZIndex=10
  117. Title.TextColor3=Color3.new(1,1,1)
  118. Title.TextStrokeColor3=Color3.new(0,0,0)
  119. Title.TextStrokeTransparency=0
  120. Title.TextXAlignment="Left"
  121. Title.Text=tostring(Player)
  122. Title.FontSize="Size24"
  123. Title.Font="SourceSans"
  124.  
  125. if Player.userId<0 then
  126. ---------------------------------------------------------------
  127. local Person=Instance.new("ImageLabel",PF)
  128. Person.BackgroundTransparency=1
  129. Person.Image="rbxassetid://65732094"
  130. Person.Position=UDim2.new(0,-20,0,15)
  131. Person.Size=UDim2.new(0,100,0,100)
  132. Person.ZIndex=9
  133. Person.Name="Person"
  134.  
  135.  
  136.  
  137. local BT=Instance.new("TextLabel",PF) --bandit text
  138. BT.BackgroundTransparency=1
  139. BT.Position=UDim2.new(0.5,0,1,-20)
  140. BT.Size=UDim2.new(0,0,0,0)
  141. BT.ZIndex=10
  142. BT.Font="ArialBold"
  143. BT.FontSize="Size18"
  144. BT.TextColor3=Color3.new(1,1,1)
  145. BT.TextStrokeColor3=Color3.new(0,0,0)
  146. BT.TextStrokeTransparency=0
  147. BT.Name="WahtM8"
  148. BT.Text="No Profile Available"
  149. else
  150. --------------------------------------------------------------
  151. local Person=Instance.new("ImageLabel",PF)
  152. Person.BackgroundTransparency=1
  153. Person.Image="http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..tostring(Player)
  154. Person.Position=UDim2.new(0,-20,0,15)
  155. Person.Size=UDim2.new(0,100,0,100)
  156. Person.ZIndex=9
  157. Person.Name="Person"
  158.  
  159. local BCFrame=Instance.new("Frame",Person)
  160. BCFrame.Position=UDim2.new(0,17,1,-25)
  161. BCFrame.Size=UDim2.new(0,66,0,19)
  162. BCFrame.BackgroundTransparency=1
  163. BCFrame.ZIndex=9
  164. BCFrame.ClipsDescendants=true
  165.  
  166. local BC=Instance.new("ImageLabel",BCFrame)
  167. BC.BackgroundTransparency=1
  168. BC.Image="http://www.roblox.com/Thumbs/BCOverlay.ashx?username="..tostring(Player)
  169. BC.Name="BC"
  170. BC.Position=UDim2.new(0,-30,0,0)
  171. BC.Size=UDim2.new(0,66,0,19)
  172. BC.ZIndex=10
  173.  
  174. local AT=Instance.new("TextLabel",Person) --Age Text
  175. AT.BackgroundTransparency=1
  176. AT.Position=UDim2.new(0,20,1,2)
  177. AT.Size=UDim2.new(0,0,0,0)
  178. AT.ZIndex=8
  179. AT.Font="SourceSans"
  180. AT.FontSize="Size18"
  181. AT.TextColor3=Color3.new(1,1,1)
  182. AT.TextStrokeColor3=Color3.new(0,0,0)
  183. AT.TextStrokeTransparency=0
  184. AT.TextXAlignment="Left"
  185. AT.TextYAlignment="Top"
  186. local years = math.floor(Player.AccountAge / 365.2425)
  187. local days = math.floor(Player.AccountAge % 365.2425)
  188. if tonumber(years)<1 then
  189. AT.Text="Account Age: "..days.." days"
  190. else
  191. AT.Text="Age: "..years.." years, "..days.." days"
  192. end
  193.  
  194. local IDT=Instance.new("TextLabel",Person) --ID Text
  195. IDT.TextXAlignment="Left"
  196. IDT.TextYAlignment="Top"
  197. IDT.Size=UDim2.new(0,0,0,0)
  198. IDT.Position=UDim2.new(0,20,1,20)
  199. IDT.ZIndex=8
  200. IDT.Font="SourceSans"
  201. IDT.FontSize="Size18"
  202. IDT.TextColor3=Color3.new(1,1,1)
  203. IDT.TextStrokeColor3=Color3.new(0,0,0)
  204. IDT.TextStrokeTransparency=0
  205. IDT.Text="User ID: "..tostring(Player.userId)
  206.  
  207.  
  208.  
  209. local bandit=Instance.new("ImageLabel",PF)
  210. bandit.Size=UDim2.new(0,125,0,125)
  211. bandit.Position=UDim2.new(1,-122,0,-3)
  212. bandit.ZIndex=9
  213. bandit.ImageTransparency=.2
  214. bandit.BackgroundTransparency=1
  215. bandit.Name="bandit"
  216. bandit.Image="rbxassetid://202135008"
  217.  
  218.  
  219. local zomkiller=Instance.new("ImageLabel",PF)
  220. zomkiller.Size=UDim2.new(0,75,0,75)
  221. zomkiller.Position=UDim2.new(0,0,1,-75)
  222. zomkiller.ZIndex=9
  223. zomkiller.ImageTransparency=.8
  224. zomkiller.BackgroundTransparency=1
  225. zomkiller.Name="zomkiller"
  226. zomkiller.Image="rbxassetid://202135008"
  227.  
  228. local BT=Instance.new("TextLabel",PF) --bandit text
  229. BT.BackgroundTransparency=1
  230. BT.Position=UDim2.new(0,-3,1,-20)
  231. BT.Size=UDim2.new(0,95,0,20)
  232. BT.ZIndex=10
  233. BT.Font="ArialBold"
  234. BT.FontSize="Size18"
  235. BT.TextColor3=Color3.new(1,1,1)
  236. BT.TextStrokeColor3=Color3.new(0,0,0)
  237. BT.TextStrokeTransparency=0
  238. BT.Name="BanditText"
  239. BT.Text=""
  240.  
  241. local ZT=Instance.new("TextLabel",PF) --zomkiller text
  242. ZT.BackgroundTransparency=1
  243. ZT.Position=UDim2.new(0,92,1,-20)
  244. ZT.Size=UDim2.new(0,95,0,20)
  245. ZT.ZIndex=10
  246. ZT.Font="ArialBold"
  247. ZT.FontSize="Size18"
  248. ZT.TextColor3=Color3.new(1,1,1)
  249. ZT.TextStrokeColor3=Color3.new(0,0,0)
  250. ZT.TextStrokeTransparency=0
  251. ZT.Name="ZomText"
  252. ZT.Text=""
  253. if Player.Neutral==false then
  254. Playa.BackgroundColor=Player.TeamColor
  255. else
  256. Playa.BackgroundColor3=Color3.new(61/255,61/255,61/255)
  257. end
  258.  
  259.  
  260. local Statistics=script.Parent.Parent.Parent.DatabaseForPlayerlist:FindFirstChild(Player.Name)
  261. if WaitForStats(Player.Name)==true then
  262. print('go')
  263. local asdp=script.Parent.Parent.Parent.DatabaseForPlayerlist:FindFirstChild(tostring(Player))
  264. local ChickenLittle=Instance.new("StringValue",asdp)
  265. local BadgeStats = game.Workspace.CheckBadges:InvokeServer(tostring(Player.Name))
  266. print("The BadgeStats are: "..BadgeStats)
  267. ChickenLittle.Name=tostring(BadgeStats)
  268.  
  269. end
  270. local Counter=0
  271. while WaitForStats(Player.Name)==true do
  272. Counter=Counter+1 wait(.2)
  273. if Counter==25 then
  274.  
  275. break
  276. end
  277.  
  278. end --true means there are no stats yet
  279. local Stats=Statistics:GetChildren()
  280. if string.find(Stats[1].Name,"B")==nil then
  281. print('Getting badges again')
  282. Stats[1]:Destroy()
  283. local asdp=script.Parent.Parent.Parent.DatabaseForPlayerlist:FindFirstChild(tostring(Player))
  284. local ChickenLittle=Instance.new("StringValue",asdp)
  285. local BadgeStats = game.Workspace.CheckBadges:InvokeServer(tostring(Player.Name))
  286. print("The BadgeStats are: "..BadgeStats)
  287. ChickenLittle.Name=tostring(BadgeStats)
  288. wait(3)
  289. script:Clone().Parent=script.Parent
  290. wait()
  291. script:Destroy()
  292. end
  293.  
  294. local BValue=2
  295. local ZValue=4
  296. print(string.sub(tostring(Stats[1].Name),BValue,BValue))
  297. print(string.sub(tostring(Stats[1].Name),ZValue,ZValue))
  298. local BanditStats=tonumber(string.sub(tostring(Stats[1].Name),BValue,BValue))
  299. local ZombieStats=tonumber(string.sub(tostring(Stats[1].Name),ZValue,ZValue))
  300. if BanditStats==0 then
  301. BT.Text=""
  302. bandit.Image=""
  303. else
  304. BT.Text=banditnames[BanditStats]
  305. bandit.Image="rbxassetid://"..banditpics[BanditStats]
  306. end
  307. if ZombieStats==0 then
  308. ZT.Text=""
  309. zomkiller.Image=""
  310.  
  311. else
  312. ZT.Text=zombienames[ZombieStats]
  313. zomkiller.Image="rbxassetid://"..zombiepics[ZombieStats]
  314. end
  315.  
  316. end
  317.  
  318. end
  319.  
  320. end
  321.  
  322. function PlayersChanged()
  323. NumPlayers=0
  324. for i,v in pairs(script.Parent:GetChildren()) do
  325. if v.ClassName=="TextLabel" then
  326. --print('marked')
  327. v.Archivable=false
  328. end
  329. end
  330. wait(.1)
  331. StartUp()
  332. for i,v in pairs(script.Parent:GetChildren()) do
  333. if v.ClassName=="TextLabel" and v.Archivable==false then
  334. --print('cleared')
  335. v:Destroy()
  336.  
  337. elseif v.ClassName=="TextLabel" and v.Archivable==true then
  338. v.Visible=true
  339. end
  340. end
  341. end
  342.  
  343. PlayersChanged()
  344.  
  345. script.Parent.Parent.Parent.Parent.ChildAdded:connect(PlayersChanged)
  346. script.Parent.Parent.Parent.Parent.ChildRemoved:connect(PlayersChanged)
Add Comment
Please, Sign In to add comment