Advertisement
hgh920

act study material 4 me

Apr 2nd, 2017
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.80 KB | None | 0 0
  1.  
  2. local isAdmin = {
  3. ["thomasthong"] = true,
  4. ["X8311"] = true,
  5. [""] = true,
  6. }
  7.  
  8. local isBanned = {
  9. ["JumbledMiguel813"] = true,
  10. ["AceOfEternal123"] = true,
  11. ["nickales1757"] = true,
  12. ["airsamer"] = true,
  13. ["name1"] = true,
  14. ["name1"] = true,
  15. ["name1"] = true,
  16. ["name1"] = true,
  17. }
  18.  
  19. local Modifier = "/"
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26. --- ACTUAL STUFF --
  27. script.Name = "Reaper_Admin"
  28. coroutine.yield()
  29. workspace.Reaper_Admin.Parent = nil
  30.  
  31. local me = game:GetService("Players")[getfenv()["owner"].Name]
  32. local char = workspace:findFirstChild(me.Name)
  33.  
  34. -- PLAYER CHATTED --
  35. function playerChatted(player, msg)
  36. if isAdmin[player.Name] then
  37.  
  38. local Command = "fullclean" .. Modifier
  39. if string.find(msg:lower(), Command:lower()) ~= nil then
  40. upInFlames(game)
  41. resetStats()
  42. for _,v in pairs(game:GetService("Players"):GetPlayers()) do
  43. v:LoadCharacter()
  44. wait(0.1)
  45. end
  46. end
  47.  
  48. local Command = "kick" .. Modifier
  49. if string.lower(msg:sub(1,Command:len())) == Command then
  50. local players, mod = returnPlayers(msg:sub(Command:len() + 1):lower(), player)
  51. for i,v in pairs(players) do
  52. if isAdmin[v.Name] then
  53. table.remove(players, i)
  54. end
  55. end
  56. removeFromGame(players)
  57. end
  58.  
  59. local Command = "kill" .. Modifier
  60. if string.lower(msg:sub(1,Command:len())) == Command then
  61. local players, mod = returnPlayers(msg:sub(Command:len() + 1):lower(), player)
  62. for _,target in pairs(players) do
  63. target.Character:BreakJoints()
  64. end
  65. end
  66.  
  67. local Command = "ban" .. Modifier
  68. if string.lower(msg:sub(1,Command:len())) == Command then
  69. local players, mod = returnPlayers(msg:sub(Command:len() + 1):lower(), player)
  70. for i,v in pairs(players) do
  71. if isAdmin[v.Name] then
  72. table.remove(players, i)
  73. warn("Cannot ban " .. v.Name .. ", he's an admin :)")
  74. else
  75. isBanned[v.Name] = true
  76. warn(v.Name .. " is now banned")
  77. end
  78. end
  79. removeFromGame(players)
  80. end
  81.  
  82.  
  83. end
  84. end
  85.  
  86.  
  87. function removeFromGame(inputPlayerTable)
  88. local tempTable = {}
  89. for _,player in pairs(inputPlayerTable) do
  90. if not isAdmin[player.Name] then
  91. table.insert(tempTable, player)
  92. print("|Reaper_Admin|: Executing ['" .. player.Name .. "']")
  93. else
  94. print("|Reaper_Admin|: Can't Execute ['" .. player.Name .. "'] |: Admins Can't Be Executed")
  95. end
  96. end
  97. local tempcode = game:GetService("TeleportService"):ReserveServer(game.PlaceId)
  98. game:GetService("TeleportService"):TeleportToPrivateServer(game.PlaceId,tempcode,tempTable)
  99. end
  100.  
  101. function returnPlayers(name, player)
  102. local exportingPlayers = {}
  103. local actionPlayers = {}
  104. local divider = ","
  105. local currentName = ""
  106. local mod = ""
  107. local checkModLocation = name:len()
  108. name = name:lower()
  109. if string.find(name, "-") ~= nil then
  110. checkModLocation = string.find(name, "-")
  111. mod = name:sub(checkModLocation + 1)
  112. name = name:sub(1,(checkModLocation-1))
  113. end
  114. if string.find(name, "nonadmin") then
  115. for _,target in pairs(game:GetService("Players"):GetPlayers()) do
  116. if not isAdmin[target.Name] then
  117. table.insert(exportingPlayers, target)
  118. end
  119. end
  120. elseif string.find(name, "admin") then
  121. for _,target in pairs(game:GetService("Players"):GetPlayers()) do
  122. if isAdmin[target.Name] then
  123. table.insert(exportingPlayers, target)
  124. end
  125. end
  126. elseif string.find(name, "other") then
  127. for _,target in pairs(game:GetService("Players"):GetPlayers()) do
  128. if target.Name ~= player.Name then
  129. table.insert(exportingPlayers, target)
  130. end
  131. end
  132. elseif string.find(name, "all") then
  133. for _,target in pairs(game:GetService("Players"):GetPlayers()) do
  134. table.insert(exportingPlayers, target)
  135. end
  136. else
  137. for i = 1, string.len(name)+1 do
  138. if name:sub(i,i) ~= divider and name:sub(i,i) ~= " " and name:sub(i,i) ~= "-" then
  139. currentName = currentName .. name:sub(i,i)
  140. else
  141. if currentName ~= "" then
  142. table.insert(actionPlayers, currentName:lower())
  143. currentName = ""
  144. end
  145. end
  146. if i == string.len(name)+1 then
  147. if currentName ~= "" then
  148. table.insert(actionPlayers, currentName:lower())
  149. currentName = ""
  150. end
  151. end
  152. end
  153. for _,target in pairs(game:GetService("Players"):GetPlayers()) do
  154. for i,v in pairs(actionPlayers) do
  155. if v == "me" then
  156. table.insert(exportingPlayers, player)
  157. elseif string.find(target.Name:lower(), v) ~= nil then
  158. table.insert(exportingPlayers, target)
  159. end
  160. end
  161. end
  162. end
  163. if name == "" or name == " " then
  164. exportingPlayers = game:GetService("Players"):GetPlayers()
  165. end
  166. --print(mod)
  167. return exportingPlayers, mod
  168. end
  169.  
  170. function resetStats() --a lot of stuff
  171. workspace.Terrain:Clear()
  172. workspace.Gravity = 196.2
  173. workspace.Name = "Workspace"
  174. game:GetService("Lighting").Name = "Lighting"
  175. game:GetService("Lighting").TimeOfDay = 14
  176. game:GetService("Lighting").Ambient = Color3.new(0,0,0)
  177. game:GetService("Lighting").Brightness = 1
  178. game:GetService("Lighting").ColorShift_Bottom = Color3.new(0,0,0)
  179. game:GetService("Lighting").ColorShift_Top = Color3.new(0,0,0)
  180. game:GetService("Lighting").OutdoorAmbient = Color3.fromRGB(127, 127, 127)
  181. game:GetService("Lighting").GeographicLatitude = 41.733
  182. game:GetService("Lighting").FogStart = 0
  183. game:GetService("Lighting").FogEnd = 100000
  184. for i,v in pairs(game:GetService("Lighting"):GetChildren()) do
  185. pcall(function()
  186. v:Remove()
  187. end)
  188. end
  189. game:GetService("Players").Name = "Players"
  190. local b = Instance.new("Part", workspace)
  191. b.Name = "Base"
  192. b.Anchored = true
  193. b.Size = Vector3.new(700, -0.5, 700)
  194. b.CFrame = CFrame.new(0, 0.7, 0)
  195. b.Material = "Grass"
  196. b.BrickColor = BrickColor.new("Bright green")
  197. end
  198.  
  199. function upInFlames(location)
  200. for _,place in pairs(location:GetChildren()) do
  201. pcall(function()
  202. if place ~= game:GetService("StarterPlayer") then
  203. pcall(function()
  204. place:Remove()
  205. end)
  206. pcall(function()
  207. upInFlames(place)
  208. end)
  209. end
  210. end)
  211. end
  212. end
  213.  
  214. -- INSTANT STUFF --
  215.  
  216. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  217. v.Chatted:connect(function(msg)
  218. playerChatted(v, msg)
  219. end)
  220. if isBanned[v.Name] then
  221. removeFromGame({v})
  222. warn(v.Name .. " is on the banlist and has been removed")
  223. end
  224. end
  225.  
  226. -- ALWAYS STUFF
  227.  
  228. game:GetService("Players").PlayerAdded:connect(function(player)
  229. player.Chatted:connect(function(msg)
  230. playerChatted(player, msg)
  231. end)
  232. wait(0.5)
  233. if isBanned[player.Name] then
  234. warn(player.Name .. " is not allowed to join: BANNED")
  235. removeFromGame({player})
  236. end
  237. end)
  238.  
  239. game:GetService("RunService").Stepped:connect(function()
  240. pcall(function()
  241. local char = workspace:findFirstChild(me.Name)
  242. if char:findFirstChild("SethOrb") then
  243. pcall(function()
  244. char:findFirstChild("SethOrb").bodypos.Position = char.Torso.Position + Vector3.new(2,3,2)
  245. end)
  246. else
  247. createOrb()
  248. end
  249. end)
  250. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement