Advertisement
advancedev

Bace

Jan 25th, 2015
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.91 KB | None | 0 0
  1. print("Enabling admin commands.");
  2.  
  3. local GUI = script.Parent.Parent;
  4. local player = GUI.Parent.Parent;
  5. local user = player.Character;
  6. local cam = workspace.CurrentCamera;
  7.  
  8. if player.Name == "advancedev" or player.Name == "gothdood12" or player.Name == "prinny1234" or player.Name == "johncena5651" or player.Name == "uhate66" or player.Name == "Reefrat" or player.Name == "justinbox" or player.Name == "PlayerMagroo" or player.Name == "andreZD" or player.Name == "Bobby4fun" or player.Name == "jacobsmith545" or player.Name == "carloswellsrock" or player.Name == "matt5673" or player.Name == "" or player.Name == "" or player.Name == "" or player.Name == "" or player.Name == "pizzavis10" or player.Name == ""
  9. or player.Name == "" or player.name == "" then
  10. GUI.ad.Visible = true;
  11.  
  12. GUI.admin.Visible = true;
  13.  
  14. local skins = {
  15. BrickColor.new("Sand green"),
  16. BrickColor.new("Sand red"),
  17. BrickColor.new("Sand blue")
  18. };
  19. local shirts = {
  20. BrickColor.new("Mid gray"),
  21. BrickColor.new("Medium green"),
  22. BrickColor.new("Medium red"),
  23. BrickColor.new("Medium blue"),
  24. BrickColor.new("Black"),
  25. BrickColor.new("Light stone grey")
  26. };
  27. local pants = {
  28. BrickColor.new("Black"),
  29. BrickColor.new("Dark stone grey"),
  30. BrickColor.new("Reddish brown"),
  31. BrickColor.new("Brown"),
  32. BrickColor.new("Black"),
  33. BrickColor.new("Light stone grey")
  34. };
  35.  
  36. local function spawn()
  37. if GUI.admin.spawnCount.Text ~= "" and GUI.admin.spawnType.Text ~= "" then
  38. local count = tonumber(GUI.admin.spawnCount.Text);
  39. local name = GUI.admin.spawnType.Text;
  40. local model = false;
  41.  
  42. for index, child in pairs(game.Lighting.assets.items:getChildren()) do
  43. if string.lower(child.Name) == "item"..string.lower(name) then
  44. model = true;
  45. name = child.Name;
  46. end
  47. end
  48.  
  49. if count and model then
  50. for step = 1, count do
  51. local hit, position = workspace:FindPartOnRayWithIgnoreList(Ray.new((user.Torso.CFrame*CFrame.new(0, 0, -2.5)).p, Vector3.new(0, -30, 0)), {cam, workspace.targetFilter.ignore});
  52. local area = CFrame.new(position+Vector3.new(0, 1, 0))*CFrame.Angles(0, math.rad(math.random(0, 359)), 0);
  53.  
  54. local drop = game.Lighting.assets.items[name]:clone();
  55.  
  56. Instance.new("BoolValue", drop).Name = "given";
  57. drop.Parent = workspace.targetFilter.ignore.items;
  58.  
  59. local origin = drop.main.CFrame;
  60.  
  61. for index, child in pairs(drop:getChildren()) do
  62. if child:isA("BasePart") then
  63. child.Anchored = true;
  64. child.CanCollide = false;
  65.  
  66. child.CFrame = area*origin:toObjectSpace(child.CFrame);
  67.  
  68. if child.Name == "light" or child.Name == "laser" then
  69. child:Destroy();
  70. end
  71. end
  72. end
  73. end
  74. elseif string.lower(name) == "z" then
  75. local hit, position = workspace:FindPartOnRayWithIgnoreList(Ray.new((user.Torso.CFrame*CFrame.new(0, 0, -20)).p, Vector3.new(0, -30, 0)), {cam, workspace.targetFilter.ignore});
  76. local area = CFrame.new(position+Vector3.new(0, 3.5, 0))*CFrame.Angles(0, math.rad(math.random(0, 359)), 0);
  77. local zombie = game.Lighting.assets.zombies.zombie:clone();
  78.  
  79. for index, child in pairs (zombie:getChildren()) do
  80. if child:isA("BasePart") and child.Name ~= "main" then
  81. local zombieWeld = Instance.new("Weld", zombie);
  82. zombieWeld.Part0 = zombie.main;
  83. zombieWeld.Part1 = child;
  84. zombieWeld.C0 = zombie.main.CFrame:toObjectSpace(child.CFrame)*CFrame.Angles(math.rad(math.random(-5, 5)), math.rad(math.random(-5, 5)), math.rad(math.random(-5, 5)));
  85. end
  86. end
  87.  
  88. local skin = skins[math.random(1, #skins)];
  89. local shirt = shirts[math.random(1, #shirts)];
  90. local pant = pants[math.random(1, #pants)];
  91.  
  92. zombie.Head.BrickColor = skin;
  93. zombie.arm1.BrickColor = skin;
  94. zombie.arm2.BrickColor = skin;
  95. zombie.main.BrickColor = shirt;
  96. zombie.legs.BrickColor = pant;
  97.  
  98. zombie.Parent = workspace.zombies;
  99. zombie:moveTo(area.p);
  100.  
  101. local balance = math.random();
  102. zombie.speed.Value = 55;
  103. zombie.blood.Value = 25000;
  104. zombie.damage.Value = 10000;
  105. elseif game.Lighting.assets.vehicles:findFirstChild(name) then
  106. local car = game.Lighting.assets.vehicles[name]:clone();
  107. car.Parent = workspace.targetFilter.ignore.vehicles;
  108.  
  109. for index, child in pairs (car:getChildren()) do
  110. if child:isA("BasePart") then
  111. child.Anchored = true;
  112. if child.Name ~= "main" then
  113. child.CFrame = player.Character.Torso.CFrame*CFrame.new(0, 0, -10)*car.main.CFrame:toObjectSpace(child.CFrame);
  114. end
  115. end
  116. end
  117.  
  118. car.main.CFrame = player.Character.Torso.CFrame*CFrame.new(0, 0, -10);
  119. end
  120. end
  121. end
  122.  
  123. GUI.ad.MouseButton1Down:connect(function()
  124. GUI.admin.Visible = not GUI.admin.Visible;
  125. end)
  126.  
  127. GUI.admin.sz.MouseButton1Down:connect(function()
  128. GUI.gameData.safezone.Value = not GUI.gameData.safezone.Value;
  129. GUI.gameData.spawn.Value = Vector3.new(1103.66663, 167.896805, 4209.3374);
  130. end)
  131.  
  132. GUI.admin.tele.MouseButton1Down:connect(function()
  133. user.Torso.CFrame = CFrame.new(1103.66663, 167.896805, 4209.3374);
  134. end)
  135.  
  136. GUI.admin.cash.MouseButton1Down:connect(function()
  137. GUI.gameData.cash.Value = GUI.gameData.cash.Value+100;
  138. end)
  139.  
  140. GUI.admin.spawn.MouseButton1Down:connect(function()
  141. spawn();
  142. end)
  143.  
  144. GUI.admin.spawnType.FocusLost:connect(function()
  145. spawn();
  146. end)
  147.  
  148. GUI.admin.rain.MouseButton1Down:connect(function()
  149. workspace.generateWorld.raining.Value = not workspace.generateWorld.raining.Value;
  150. end)
  151.  
  152. while wait(1/30) do
  153. GUI.admin.output1.Text = workspace.autoExecute.output.output1.Value;
  154. GUI.admin.output2.Text = workspace.autoExecute.output.output2.Value;
  155. GUI.admin.output3.Text = workspace.autoExecute.output.output3.Value;
  156. GUI.admin.output4.Text = workspace.autoExecute.output.output4.Value;
  157. GUI.admin.output5.Text = workspace.autoExecute.output.output5.Value;
  158. end
  159. else
  160. script:Destroy();
  161. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement