Advertisement
Guest User

Untitled

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