Advertisement
KrYn0MoRe

minigames v2

Aug 27th, 2020 (edited)
1,317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 74.92 KB | None | 0 0
  1. local pid = 0
  2. local t = 0
  3. local playing = false
  4. local queue,queue2,alive = {},{},{}
  5. local themes = {}
  6. local main = nil
  7.  
  8. local match_folder = Instance.new("Folder",script)
  9. local main_folder = Instance.new("Folder",script)
  10.  
  11. local minigames = {
  12.     function() -- bombs
  13.         t = 30
  14.         spawn(function()
  15.             while playing do
  16.                 local b = Instance.new("Part")
  17.                 local SpecialMesh1 = Instance.new("SpecialMesh")
  18.                 b.CFrame = CFrame.new(69.8065262, 64.7206802, -383.746552, -0.999967933, -0.00797146745, -6.34748039e-06, -3.72146801e-12, -0.000796274282, 0.999999642, -0.00797146931, 0.999967694, 0.000796248845)
  19.                 b.Orientation = Vector3.new(-89.9499969, -0.460000008, -180)
  20.                 b.Position = Vector3.new(69.8065262, 64.7206802, -383.746552)
  21.                 b.Rotation = Vector3.new(-89.9499969, 0, 179.539993)
  22.                 b.Size = Vector3.new(2, 2, 2)
  23.                 b.BottomSurface = Enum.SurfaceType.Smooth
  24.                 b.Locked = true
  25.                 b.TopSurface = Enum.SurfaceType.Smooth
  26.                 b.FormFactor = Enum.FormFactor.Symmetric
  27.                 b.formFactor = Enum.FormFactor.Symmetric
  28.                 b.Shape = Enum.PartType.Ball
  29.                 SpecialMesh1.Parent = b
  30.                 SpecialMesh1.MeshId = "rbxasset://fonts/timebomb.mesh"
  31.                 SpecialMesh1.TextureId = "rbxasset://textures/bombtex.png"
  32.                 SpecialMesh1.MeshType = Enum.MeshType.FileMesh
  33.                 spawn(function()
  34.                     b.Position = main.Position+Vector3.new(math.random(-(main.Size.X-10)/2,(main.Size.X-10)/2),30,math.random(-(main.Size.Z-10)/2,(main.Size.Z-10)/2))
  35.                     b.Parent = match_folder
  36.                     wait(2)
  37.                     local r = 15
  38.                     local exp = Instance.new("Part")
  39.                     exp.Size = Vector3.new(r*2,r*2,r*2)
  40.                     exp.Anchored = true
  41.                     exp.CanCollide = false
  42.                     exp.Material = Enum.Material.Neon
  43.                     exp.Color = Color3.new(1,0,0)
  44.                     exp.Position = b.Position
  45.                     exp.Transparency = 0
  46.                     exp.Shape = Enum.PartType.Ball
  47.                     exp.Parent = match_folder
  48.                     game:GetService("TweenService"):Create(exp,TweenInfo.new(1),{Transparency = 1}):Play()
  49.                     local ex = Instance.new("Explosion")
  50.                     ex.BlastRadius = r
  51.                     ex.Position = b.Position
  52.                     ex.Visible = false
  53.                     ex.DestroyJointRadiusPercent = 0
  54.                     ex.Hit:Connect(function(obj,dist)
  55.                         if not obj:IsDescendantOf(script) then else return end
  56.                         local char = obj.Parent
  57.                         local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  58.                         local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  59.                         if table.find(alive,hum) then else return end
  60.                         if torso and hum then
  61.                             hum:TakeDamage(1/0)
  62.                             char:BreakJoints()
  63.                         end
  64.                     end)
  65.                     ex.Parent = match_folder
  66.                     b:Destroy()
  67.                     local exs = Instance.new("Sound")
  68.                     exs.SoundId = 'rbxassetid://1060191237'
  69.                     exs.Parent = exp
  70.                     exs:Play()
  71.                 end)
  72.                 wait(0.4)
  73.             end
  74.         end)
  75.     end;
  76.     function() -- flood
  77.         t = 20
  78.         local TrussPart0 = Instance.new("TrussPart")
  79.         local TrussPart1 = Instance.new("TrussPart")
  80.         local TrussPart2 = Instance.new("TrussPart")
  81.         local TrussPart3 = Instance.new("TrussPart")
  82.         local TrussPart4 = Instance.new("TrussPart")
  83.         local TrussPart5 = Instance.new("TrussPart")
  84.         TrussPart0.Parent = match_folder
  85.         TrussPart0.CFrame = CFrame.new(76.6699982, 23.0000114, -396.259979, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  86.         TrussPart0.Position = Vector3.new(76.6699982, 23.0000114, -396.259979)
  87.         TrussPart0.Color = Color3.new(0.388235, 0.372549, 0.384314)
  88.         TrussPart0.Size = Vector3.new(2, 46, 2)
  89.         TrussPart0.Anchored = true
  90.         TrussPart0.BackSurface = Enum.SurfaceType.Smooth
  91.         TrussPart0.BottomSurface = Enum.SurfaceType.Smooth
  92.         TrussPart0.BrickColor = BrickColor.new("Dark stone grey")
  93.         TrussPart0.FrontSurface = Enum.SurfaceType.Smooth
  94.         TrussPart0.LeftSurface = Enum.SurfaceType.Smooth
  95.         TrussPart0.RightSurface = Enum.SurfaceType.Smooth
  96.         TrussPart0.TopSurface = Enum.SurfaceType.Smooth
  97.         TrussPart0.brickColor = BrickColor.new("Dark stone grey")
  98.         TrussPart1.Parent = match_folder
  99.         TrussPart1.CFrame = CFrame.new(42, 23, -474.96994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  100.         TrussPart1.Position = Vector3.new(42, 23, -474.96994)
  101.         TrussPart1.Color = Color3.new(0.388235, 0.372549, 0.384314)
  102.         TrussPart1.Size = Vector3.new(2, 46, 2)
  103.         TrussPart1.Anchored = true
  104.         TrussPart1.BackSurface = Enum.SurfaceType.Smooth
  105.         TrussPart1.BottomSurface = Enum.SurfaceType.Smooth
  106.         TrussPart1.BrickColor = BrickColor.new("Dark stone grey")
  107.         TrussPart1.FrontSurface = Enum.SurfaceType.Smooth
  108.         TrussPart1.LeftSurface = Enum.SurfaceType.Smooth
  109.         TrussPart1.RightSurface = Enum.SurfaceType.Smooth
  110.         TrussPart1.TopSurface = Enum.SurfaceType.Smooth
  111.         TrussPart1.brickColor = BrickColor.new("Dark stone grey")
  112.         TrussPart2.Parent = match_folder
  113.         TrussPart2.CFrame = CFrame.new(84, 23, -552.969971, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  114.         TrussPart2.Position = Vector3.new(84, 23, -552.969971)
  115.         TrussPart2.Color = Color3.new(0.388235, 0.372549, 0.384314)
  116.         TrussPart2.Size = Vector3.new(2, 46, 2)
  117.         TrussPart2.Anchored = true
  118.         TrussPart2.BackSurface = Enum.SurfaceType.Smooth
  119.         TrussPart2.BottomSurface = Enum.SurfaceType.Smooth
  120.         TrussPart2.BrickColor = BrickColor.new("Dark stone grey")
  121.         TrussPart2.FrontSurface = Enum.SurfaceType.Smooth
  122.         TrussPart2.LeftSurface = Enum.SurfaceType.Smooth
  123.         TrussPart2.RightSurface = Enum.SurfaceType.Smooth
  124.         TrussPart2.TopSurface = Enum.SurfaceType.Smooth
  125.         TrussPart2.brickColor = BrickColor.new("Dark stone grey")
  126.         TrussPart3.Parent = match_folder
  127.         TrussPart3.CFrame = CFrame.new(-22, 23, -464.96994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  128.         TrussPart3.Position = Vector3.new(-22, 23, -464.96994)
  129.         TrussPart3.Color = Color3.new(0.388235, 0.372549, 0.384314)
  130.         TrussPart3.Size = Vector3.new(2, 46, 2)
  131.         TrussPart3.Anchored = true
  132.         TrussPart3.BackSurface = Enum.SurfaceType.Smooth
  133.         TrussPart3.BottomSurface = Enum.SurfaceType.Smooth
  134.         TrussPart3.BrickColor = BrickColor.new("Dark stone grey")
  135.         TrussPart3.FrontSurface = Enum.SurfaceType.Smooth
  136.         TrussPart3.LeftSurface = Enum.SurfaceType.Smooth
  137.         TrussPart3.RightSurface = Enum.SurfaceType.Smooth
  138.         TrussPart3.TopSurface = Enum.SurfaceType.Smooth
  139.         TrussPart3.brickColor = BrickColor.new("Dark stone grey")
  140.         TrussPart4.Parent = match_folder
  141.         TrussPart4.CFrame = CFrame.new(-66, 23, -558.969971, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  142.         TrussPart4.Position = Vector3.new(-66, 23, -558.969971)
  143.         TrussPart4.Color = Color3.new(0.388235, 0.372549, 0.384314)
  144.         TrussPart4.Size = Vector3.new(2, 46, 2)
  145.         TrussPart4.Anchored = true
  146.         TrussPart4.BackSurface = Enum.SurfaceType.Smooth
  147.         TrussPart4.BottomSurface = Enum.SurfaceType.Smooth
  148.         TrussPart4.BrickColor = BrickColor.new("Dark stone grey")
  149.         TrussPart4.FrontSurface = Enum.SurfaceType.Smooth
  150.         TrussPart4.LeftSurface = Enum.SurfaceType.Smooth
  151.         TrussPart4.RightSurface = Enum.SurfaceType.Smooth
  152.         TrussPart4.TopSurface = Enum.SurfaceType.Smooth
  153.         TrussPart4.brickColor = BrickColor.new("Dark stone grey")
  154.         TrussPart5.Parent = match_folder
  155.         TrussPart5.CFrame = CFrame.new(-78, 23, -396.96994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  156.         TrussPart5.Position = Vector3.new(-78, 23, -396.96994)
  157.         TrussPart5.Color = Color3.new(0.388235, 0.372549, 0.384314)
  158.         TrussPart5.Size = Vector3.new(2, 46, 2)
  159.         TrussPart5.Anchored = true
  160.         TrussPart5.BackSurface = Enum.SurfaceType.Smooth
  161.         TrussPart5.BottomSurface = Enum.SurfaceType.Smooth
  162.         TrussPart5.BrickColor = BrickColor.new("Dark stone grey")
  163.         TrussPart5.FrontSurface = Enum.SurfaceType.Smooth
  164.         TrussPart5.LeftSurface = Enum.SurfaceType.Smooth
  165.         TrussPart5.RightSurface = Enum.SurfaceType.Smooth
  166.         TrussPart5.TopSurface = Enum.SurfaceType.Smooth
  167.         TrussPart5.brickColor = BrickColor.new("Dark stone grey")
  168.         wait(6)
  169.         local water = main:Clone()
  170.         water.Transparency = 0.5
  171.         water.Color = Color3.fromRGB(0, 255, 255)
  172.         water.Material = Enum.Material.SmoothPlastic
  173.         water.CanCollide = false
  174.         water:ClearAllChildren()
  175.         water.Parent = match_folder
  176.         water.Touched:Connect(function(obj)
  177.             if not obj:IsDescendantOf(script) then else return end
  178.             local char = obj.Parent
  179.             local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  180.             local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  181.             if table.find(alive,hum) then else return end
  182.             if torso and hum and not hum:FindFirstChild("Floating kry status") then
  183.                 local confirm = Instance.new("IntValue",hum)
  184.                 confirm.Name = "Floating kry status"
  185.                 game:GetService("Debris"):AddItem(confirm,0.5)
  186.                 local kb = 30
  187.                 local push = Instance.new("BodyVelocity",torso)
  188.                 push.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  189.                 --push.P = 5000
  190.                 push.Velocity = obj.CFrame.upVector*kb+Vector3.new(0,kb,0)
  191.                 game:GetService("Debris"):AddItem(push,0.1)
  192.             end
  193.             if hum and hum.Parent and not hum:FindFirstChild("Drowning kry status") then
  194.                 local confirm = Instance.new("IntValue",hum)
  195.                 confirm.Name = "Drowning kry status"
  196.                 game:GetService("Debris"):AddItem(confirm,0.1)
  197.                 hum:TakeDamage(10)
  198.             end
  199.         end)
  200.         game:GetService("TweenService"):Create(water,TweenInfo.new(10),{Size = water.Size+Vector3.new(0,89,0)}):Play()
  201.     end;
  202.     function() -- nuke
  203.         t = 15
  204.         local pos = main.Position+Vector3.new(math.random(-(main.Size.X-50)/2,(main.Size.X-50)/2),0,math.random(-(main.Size.Z-50)/2,(main.Size.Z-50)/2))
  205.         local dot = Instance.new("Part")
  206.         dot.Size = Vector3.new(0.5,2,0.5)
  207.         dot.Anchored = true
  208.         dot.CanCollide = false
  209.         dot.Material = Enum.Material.Neon
  210.         dot.Position = pos
  211.         dot.Color = Color3.new(1,0,0)
  212.         dot.Parent = match_folder
  213.         local al = Instance.new("Sound")
  214.         al.Parent = main
  215.         al.Volume = 10
  216.         al.SoundId = "rbxassetid://1074331294"
  217.         al.TimePosition = 3.99
  218.         al:Play()
  219.         repeat
  220.             wait()
  221.         until al == nil or al.TimePosition > 8.9
  222.         al.TimePosition = 5.95
  223.         wait(3.25)
  224.         al.TimePosition = 5.95
  225.         wait(3.25)
  226.         al:Destroy()
  227.         spawn(function()
  228.             local r = 90
  229.             dot:Destroy()
  230.             local exp = Instance.new("Part")
  231.             exp.Size = Vector3.new(r*2,r*2,r*2)
  232.             exp.Anchored = true
  233.             exp.CanCollide = false
  234.             exp.Material = Enum.Material.Neon
  235.             exp.Color = Color3.new(1,1,0)
  236.             exp.Position = pos
  237.             exp.Transparency = 0
  238.             exp.Shape = Enum.PartType.Ball
  239.             exp.Parent = match_folder
  240.             game:GetService("TweenService"):Create(exp,TweenInfo.new(3),{Transparency = 1}):Play()
  241.             local ex = Instance.new("Explosion")
  242.             ex.BlastRadius = r
  243.             ex.Position = pos
  244.             ex.Visible = false
  245.             ex.DestroyJointRadiusPercent = 0
  246.             ex.Hit:Connect(function(obj,dist)
  247.                 if not obj:IsDescendantOf(script) then else return end
  248.                 local char = obj.Parent
  249.                 local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  250.                 local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  251.                 if table.find(alive,hum) then else return end
  252.                 if torso and hum then
  253.                     hum:TakeDamage(1/0)
  254.                     char:BreakJoints()
  255.                 end
  256.             end)
  257.             ex.Parent = match_folder
  258.             local exs = Instance.new("Sound")
  259.             exs.SoundId = 'rbxassetid://2648563122'
  260.             exs.Volume = 10
  261.             exs.Parent = exp
  262.             exs:Play()
  263.         end)
  264.     end;
  265.     function() -- zombies
  266.         t = 30
  267.         local cf = CFrame.new;
  268.         local ang = CFrame.Angles;
  269.         local rad = math.rad;
  270.         local sin = math.sin;
  271.         local cos = math.cos;
  272.        
  273.         local function weld(parent, part0, part1, c0, c1)
  274.             local newweld = Instance.new("Weld");
  275.             newweld.Parent = parent;
  276.             newweld.Part0 = part0;
  277.             newweld.Part1 = part1;
  278.             newweld.C0 = c0;
  279.             newweld.C1 = c1;
  280.             return newweld;
  281.         end;
  282.        
  283.         local anim_ref = {
  284.             Neck_C0 = cf(0, 1, 0) * ang(rad(-90), rad(0), rad(180));
  285.             Neck_C1 = cf(0, -0.5, 0) * ang(rad(-90), rad(0), rad(180));
  286.             Right_Shoulder_C0 = cf(1, 0.5, 0) * ang(rad(0), rad(90), rad(0));
  287.             Right_Shoulder_C1 = cf(-0.5, 0.5, 0) * ang(rad(0), rad(90), rad(0));
  288.             Left_Shoulder_C0 = cf(-1, 0.5, 0) * ang(rad(0), rad(-90), rad(0));
  289.             Left_Shoulder_C1 = cf(0.5, 0.5, 0) * ang(rad(0), rad(-90), rad(0));
  290.             Right_Hip_C0 = cf(1, -1, 0) * ang(rad(0), rad(90), rad(0));
  291.             Right_Hip_C1 = cf(0.5, 1, 0) * ang(rad(0), rad(90), rad(0));
  292.             Left_Hip_C0 = cf(-1, -1, 0) * ang(rad(0), rad(-90), rad(0));
  293.             Left_Hip_C1 = cf(-0.5, 1, 0) * ang(rad(0), rad(-90), rad(0));
  294.         };
  295.        
  296.         local walk_anim = {
  297.             {
  298.                 Enum.EasingDirection.Out;
  299.                 anim_ref.Neck_C0;
  300.                 anim_ref.Right_Shoulder_C0 * ang(rad(0), rad(0), rad(100));
  301.                 anim_ref.Left_Shoulder_C0 * ang(rad(0), rad(0), rad(-90));
  302.                 anim_ref.Right_Hip_C0 * ang(rad(0), rad(0), rad(-30));
  303.                 anim_ref.Left_Hip_C0 * ang(rad(0), rad(0), rad(-30));
  304.             };
  305.             {
  306.                 Enum.EasingDirection.In;
  307.                 anim_ref.Neck_C0;
  308.                 anim_ref.Right_Shoulder_C0 * ang(rad(0), rad(0), rad(90));
  309.                 anim_ref.Left_Shoulder_C0 * ang(rad(0), rad(0), rad(-100));
  310.                 anim_ref.Right_Hip_C0 * ang(rad(0), rad(0), rad(0));
  311.                 anim_ref.Left_Hip_C0 * ang(rad(0), rad(0), rad(0));
  312.             };
  313.             {
  314.                 Enum.EasingDirection.Out;
  315.                 anim_ref.Neck_C0;
  316.                 anim_ref.Right_Shoulder_C0 * ang(rad(0), rad(0), rad(80));
  317.                 anim_ref.Left_Shoulder_C0 * ang(rad(0), rad(0), rad(-90));
  318.                 anim_ref.Right_Hip_C0 * ang(rad(0), rad(0), rad(30));
  319.                 anim_ref.Left_Hip_C0 * ang(rad(0), rad(0), rad(30));
  320.             };
  321.             {
  322.                 Enum.EasingDirection.InOut;
  323.                 anim_ref.Neck_C0;
  324.                 anim_ref.Right_Shoulder_C0 * ang(rad(0), rad(0), rad(90));
  325.                 anim_ref.Left_Shoulder_C0 * ang(rad(0), rad(0), rad(-80));
  326.                 anim_ref.Right_Hip_C0 * ang(rad(0), rad(0), rad(0));
  327.                 anim_ref.Left_Hip_C0 * ang(rad(0), rad(0), rad(0));
  328.             };
  329.         };
  330.        
  331.         local function tween_joint(joint, easing_direction, animation_data)
  332.             local tween_data = TweenInfo.new(
  333.                 0.1,
  334.                 Enum.EasingStyle.Sine,
  335.                 easing_direction,
  336.                 0,
  337.                 false
  338.             );
  339.             local new_tween = game:GetService("TweenService"):Create(
  340.             joint,
  341.             tween_data,
  342.             {C0 = animation_data}
  343.             );
  344.             new_tween:Play();
  345.         end;
  346.        
  347.         local function animate_joints(table_1, table_2)
  348.             for Integer = 1, #table_1 do
  349.                 local Joint = table_1[Integer];
  350.                 local Joint_Easing_Direction = table_2[1];
  351.                 local Joint_Animation = table_2[Integer + 1];
  352.                 tween_joint(Joint, Joint_Easing_Direction, Joint_Animation)
  353.             end;
  354.         end;
  355.        
  356.         --\/--
  357.        
  358.         local function create_zombie(walkspeed,health)
  359.             local function sandbox(var,func)
  360.                 local env = getfenv(func)
  361.                 local newenv = setmetatable({},{
  362.                     __index = function(self,k)
  363.                         if k == "script" then
  364.                             return var
  365.                         else
  366.                             return env[k]
  367.                         end
  368.                     end,
  369.                 })
  370.                 setfenv(func, newenv)
  371.                 return func
  372.             end
  373.             local cors = {}
  374.             local mas = Instance.new("Model",game:GetService("Lighting"))
  375.             local Model0 = Instance.new("Model")
  376.             local Part1 = Instance.new("Part")
  377.             local SpecialMesh2 = Instance.new("SpecialMesh")
  378.             local Decal3 = Instance.new("Decal")
  379.             local Part4 = Instance.new("Part")
  380.             local Part5 = Instance.new("Part")
  381.             local Part6 = Instance.new("Part")
  382.             local Part7 = Instance.new("Part")
  383.             local Part8 = Instance.new("Part")
  384.             local Humanoid9 = Instance.new("Humanoid")
  385.             local Script10 = Instance.new("Script")
  386.             Model0.Name = "Zombie"
  387.             Model0.Parent = mas
  388.             Model0.PrimaryPart = Part1
  389.             Part1.Name = "Head"
  390.             Part1.Parent = Model0
  391.             Part1.CFrame = CFrame.new(14.4682684, 4.49999714, 13.7751303, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  392.             Part1.Position = Vector3.new(14.4682684, 4.49999714, 13.7751303)
  393.             Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  394.             Part1.Size = Vector3.new(2, 1, 1)
  395.             Part1.BrickColor = BrickColor.new("Really black")
  396.             Part1.CanCollide = false
  397.             Part1.TopSurface = Enum.SurfaceType.Smooth
  398.             Part1.brickColor = BrickColor.new("Really red")
  399.             Part1.FormFactor = Enum.FormFactor.Symmetric
  400.             Part1.formFactor = Enum.FormFactor.Symmetric
  401.             SpecialMesh2.Parent = Part1
  402.             SpecialMesh2.Scale = Vector3.new(1.25, 1.25, 1.25)
  403.             Decal3.Name = "face"
  404.             Decal3.Parent = Part1
  405.             Decal3.Texture = "rbxassetid://319473813"
  406.             Part4.Name = "Torso"
  407.             Part4.Parent = Model0
  408.             Part4.CFrame = CFrame.new(14.4682684, 2.99999905, 13.7751303, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  409.             Part4.Position = Vector3.new(14.4682684, 2.99999905, 13.7751303)
  410.             Part4.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  411.             Part4.Size = Vector3.new(2, 2, 1)
  412.             Part4.BrickColor = BrickColor.new("Brown")
  413.             Part4.CanCollide = false
  414.             Part4.LeftParamA = 0
  415.             Part4.LeftParamB = 0
  416.             Part4.LeftSurface = Enum.SurfaceType.Smooth
  417.             Part4.RightParamA = 0
  418.             Part4.RightParamB = 0
  419.             Part4.RightSurface = Enum.SurfaceType.Smooth
  420.             Part4.brickColor = BrickColor.new("Really red")
  421.             Part4.FormFactor = Enum.FormFactor.Symmetric
  422.             Part4.formFactor = Enum.FormFactor.Symmetric
  423.             Part5.Name = "Left Arm"
  424.             Part5.Parent = Model0
  425.             Part5.CFrame = CFrame.new(12.9682684, 2.99999905, 13.7751303, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  426.             Part5.Position = Vector3.new(12.9682684, 2.99999905, 13.7751303)
  427.             Part5.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  428.             Part5.Size = Vector3.new(1, 2, 1)
  429.             Part5.BrickColor = BrickColor.new("Really black")
  430.             Part5.CanCollide = false
  431.             Part5.brickColor = BrickColor.new("Really red")
  432.             Part5.FormFactor = Enum.FormFactor.Symmetric
  433.             Part5.formFactor = Enum.FormFactor.Symmetric
  434.             Part6.Name = "Right Arm"
  435.             Part6.Parent = Model0
  436.             Part6.CFrame = CFrame.new(15.9682684, 2.99999905, 13.7751303, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  437.             Part6.Position = Vector3.new(15.9682684, 2.99999905, 13.7751303)
  438.             Part6.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  439.             Part6.Size = Vector3.new(1, 2, 1)
  440.             Part6.BrickColor = BrickColor.new("Really black")
  441.             Part6.CanCollide = false
  442.             Part6.brickColor = BrickColor.new("Really red")
  443.             Part6.FormFactor = Enum.FormFactor.Symmetric
  444.             Part6.formFactor = Enum.FormFactor.Symmetric
  445.             Part7.Name = "Left Leg"
  446.             Part7.Parent = Model0
  447.             Part7.CFrame = CFrame.new(13.9682684, 1, 13.7751303, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  448.             Part7.Position = Vector3.new(13.9682684, 1, 13.7751303)
  449.             Part7.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  450.             Part7.Size = Vector3.new(1, 2, 1)
  451.             Part7.BottomSurface = Enum.SurfaceType.Smooth
  452.             Part7.BrickColor = BrickColor.new("Really black")
  453.             Part7.CanCollide = false
  454.             Part7.brickColor = BrickColor.new("Really red")
  455.             Part7.FormFactor = Enum.FormFactor.Symmetric
  456.             Part7.formFactor = Enum.FormFactor.Symmetric
  457.             Part8.Name = "Right Leg"
  458.             Part8.Parent = Model0
  459.             Part8.CFrame = CFrame.new(14.9682684, 1, 13.7751303, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  460.             Part8.Position = Vector3.new(14.9682684, 1, 13.7751303)
  461.             Part8.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  462.             Part8.Size = Vector3.new(1, 2, 1)
  463.             Part8.BottomSurface = Enum.SurfaceType.Smooth
  464.             Part8.BrickColor = BrickColor.new("Really black")
  465.             Part8.CanCollide = false
  466.             Part8.brickColor = BrickColor.new("Really red")
  467.             Part8.FormFactor = Enum.FormFactor.Symmetric
  468.             Part8.formFactor = Enum.FormFactor.Symmetric
  469.             -- @ Brannon1964802
  470.             local Weld11 = weld(Part4, Part4, Part1, anim_ref.Neck_C0, anim_ref.Neck_C1); -- head
  471.             local Weld12 = weld(Part4, Part4, Part5, anim_ref.Right_Shoulder_C0, anim_ref.Right_Shoulder_C1); -- right arm
  472.             local Weld13 = weld(Part4, Part4, Part6, anim_ref.Left_Shoulder_C0, anim_ref.Left_Shoulder_C1); -- left arm
  473.             local Weld14 = weld(Part4, Part4, Part7, anim_ref.Right_Hip_C0, anim_ref.Right_Hip_C1); -- right leg
  474.             local Weld15 = weld(Part4, Part4, Part8, anim_ref.Left_Hip_C0, anim_ref.Left_Hip_C1); -- left leg
  475.             local joints_table = {
  476.                 Weld11; -- Neck
  477.                 Weld12; -- Right Shoulder
  478.                 Weld13; -- Left Shoulder
  479.                 Weld14; -- Right Hip
  480.                 Weld15; -- Left Hip
  481.             };
  482.             local anim_num = Random.new():NextInteger(1, 4);
  483.             --
  484.             Humanoid9.WalkSpeed = walkspeed
  485.             Humanoid9.AutoJumpEnabled = true
  486.             Humanoid9.Parent = Model0
  487.             Humanoid9.LeftLeg = Part7
  488.             Humanoid9.RightLeg = Part8
  489.             Humanoid9.Torso = Part4
  490.             Script10.Parent = Humanoid9
  491.            
  492.             local jumpcol = Instance.new("Part",Humanoid9)
  493.             jumpcol.Size = Vector3.new(4,5,2)
  494.             jumpcol.Anchored = false
  495.             jumpcol.CanCollide = false
  496.             jumpcol.Transparency = 1
  497.            
  498.             local jumpweld = Instance.new("Weld")
  499.             jumpweld.Parent = Part4
  500.             jumpweld.Part0 = Part4
  501.             jumpweld.Part1 = jumpcol
  502.             jumpweld.C0 = Part4.CFrame:Inverse()
  503.             jumpweld.C1 = jumpcol.CFrame:Inverse()
  504.             jumpweld.C0 = CFrame.new(0,0,-2)
  505.            
  506.             for i,v in pairs(game:GetService("Players"):GetChildren()) do
  507.                 jumpcol.Touched:Connect(function(obj)
  508.                     if obj.Parent:IsA("Humanoid") or obj.Parent:IsA("Accessory") or obj.Parent:FindFirstChildOfClass("Humanoid") or obj.Parent == v.Character or obj.Parent.Name == "Zombie" then return end
  509.                     Humanoid9.Jump = true
  510.                 end)
  511.             end
  512.            
  513.             local dead = false
  514.            
  515.             for i,v in pairs(Model0:GetChildren()) do
  516.                 if v:IsA("Part") then
  517.                     v.Anchored = false
  518.                     v.Touched:Connect(function(obj)
  519.                         local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  520.                         if table.find(alive,hum) then else return end
  521.                         if hum ~= nil and not dead then
  522.                             if hum.Parent.Name == "Zombie" then return end
  523.                             hum.MaxHealth = 100
  524.                             hum:TakeDamage(1)
  525.                         end
  526.                     end)
  527.                 end
  528.             end
  529.            
  530.             local zombie = Instance.new("Sound",Part4)
  531.             zombie.SoundId = "rbxassetid://575382784"
  532.             zombie.Volume = .5
  533.             zombie.Looped = true
  534.             zombie:Play()
  535.             zombie.TimePosition = math.random(0,38)
  536.            
  537.             Humanoid9.Died:Connect(
  538.                 function()
  539.                     dead = true
  540.                     zombie:Destroy()
  541.                     game:GetService("Debris"):AddItem(Model0,3)
  542.                 end
  543.             )
  544.            
  545.             table.insert(
  546.                 cors,
  547.                 sandbox(
  548.                     Script10,
  549.                     function()
  550.                         local function target(pos)
  551.                             local list = game.Workspace:GetChildren()
  552.                             local torso = nil
  553.                             local dist = 250
  554.                             local temp = nil
  555.                             local human = nil
  556.                             local temp2 = nil
  557.                             for x = 1, #list do
  558.                                 temp2 = list[x]
  559.                                 if (temp2.className == "Model") and (temp2.Name ~= "Zombie") then
  560.                                     temp = temp2:FindFirstChild("HumanoidRootPart")
  561.                                     human = temp2:FindFirstChildOfClass("Humanoid")
  562.                                     if (temp ~= nil) and (human ~= nil) and (human.Health > 0)  then
  563.                                         if (temp.Position - pos).magnitude < dist then
  564.                                             torso = temp
  565.                                             dist = (temp.Position - pos).magnitude
  566.                                         end
  567.                                     end
  568.                                 end
  569.                             end
  570.                             return torso
  571.                         end
  572.                         spawn(
  573.                             function()
  574.                                 while wait(.25) do
  575.                                     if not dead then
  576.                                         local target = target(script.Parent.Parent.Head.Position)
  577.                                         local hum = target.Parent:FindFirstChildOfClass("Humanoid")
  578.                                         if target and hum and table.find(alive,hum) then
  579.                                             script.Parent:MoveTo(target.Position)
  580.                                         end
  581.                                     end
  582.                                 end
  583.                             end
  584.                         )
  585.                         -- @ Brannon1964802
  586.                         spawn(
  587.                             function()
  588.                                 while not (dead) do
  589.                                     wait(0.1)
  590.                                     if anim_num < 4 then
  591.                                         anim_num = anim_num + 1;
  592.                                     else
  593.                                         anim_num = 1;
  594.                                     end
  595.                                     animate_joints(joints_table, walk_anim[anim_num]);
  596.                                 end;
  597.                             end
  598.                         );
  599.                         --
  600.                     end
  601.                 )
  602.             )
  603.             for i,v in pairs(mas:GetChildren()) do
  604.                 v.Parent = match_folder
  605.             end
  606.             for i,v in pairs(mas:GetChildren()) do
  607.                 v.Parent = match_folder
  608.                 pcall(function() v:MakeJoints() end)
  609.             end
  610.             mas:Destroy()
  611.             for i,v in pairs(cors) do
  612.                 spawn(function()
  613.                     pcall(v)
  614.                 end)
  615.             end
  616.             Model0.PrimaryPart.CFrame = CFrame.new(main.Position+Vector3.new(math.random(-(main.Size.X-10)/2,(main.Size.X-10)/2),10,math.random(-(main.Size.Z-10)/2,(main.Size.Z-10)/2)))
  617.         end
  618.         local tools = {}
  619.         spawn(function()
  620.             while playing do
  621.                 create_zombie(14,25)
  622.                 wait(2.5)
  623.             end
  624.             for i,v in ipairs(tools) do
  625.                 v:Destroy()
  626.             end
  627.         end)
  628.         for i,v in pairs(alive) do
  629.             local char = v.Parent
  630.             local Tool0 = Instance.new("Tool")
  631.             table.insert(tools,1,Tool0)
  632.             local Part1 = Instance.new("Part")
  633.             local SpecialMesh2 = Instance.new("SpecialMesh")
  634.             local Sound3 = Instance.new("Sound")
  635.             local Sound4 = Instance.new("Sound")
  636.             local Sound5 = Instance.new("Sound")
  637.             Tool0.Name = "ClassicSword"
  638.             --Tool0.Parent = char
  639.             Tool0.TextureId = "rbxasset://Textures/Sword128.png"
  640.             Tool0.Grip = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
  641.             Tool0.GripForward = Vector3.new(-1, -0, -0)
  642.             Tool0.GripPos = Vector3.new(0, 0, -1.5)
  643.             Tool0.GripRight = Vector3.new(0, 1, 0)
  644.             Tool0.GripUp = Vector3.new(0, 0, 1)
  645.             Part1.Name = "Handle"
  646.             Part1.Parent = Tool0
  647.             Part1.CFrame = CFrame.new(214.957138, 4.28734684, -190.317474, 0.0910440385, -0.881099463, 0.464084357, 0.537011683, 0.435894847, 0.722229123, -0.838648558, 0.183463722, 0.512845576)
  648.             Part1.Orientation = Vector3.new(-46.2400017, 42.1399994, 50.9300003)
  649.             Part1.Position = Vector3.new(214.957138, 4.28734684, -190.317474)
  650.             Part1.Rotation = Vector3.new(-54.6199989, 27.6499996, 84.0999985)
  651.             Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
  652.             Part1.Size = Vector3.new(1, 0.800000012, 4)
  653.             Part1.BottomSurface = Enum.SurfaceType.Smooth
  654.             Part1.BrickColor = BrickColor.new("Dark stone grey")
  655.             Part1.Locked = true
  656.             Part1.Reflectance = 0.40000000596046
  657.             Part1.TopSurface = Enum.SurfaceType.Smooth
  658.             Part1.brickColor = BrickColor.new("Dark stone grey")
  659.             Part1.FormFactor = Enum.FormFactor.Plate
  660.             Part1.formFactor = Enum.FormFactor.Plate
  661.             SpecialMesh2.Parent = Part1
  662.             SpecialMesh2.MeshId = "rbxasset://fonts/sword.mesh"
  663.             SpecialMesh2.TextureId = "rbxasset://textures/SwordTexture.png"
  664.             SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  665.             Sound3.Name = "SwordSlash"
  666.             Sound3.Parent = Part1
  667.             Sound3.SoundId = "http://www.roblox.com/asset/?id=12222216"
  668.             Sound3.Volume = 0.69999998807907
  669.             Sound4.Name = "SwordLunge"
  670.             Sound4.Parent = Part1
  671.             Sound4.SoundId = "http://www.roblox.com/asset/?id=12222208"
  672.             Sound4.Volume = 0.60000002384186
  673.             Sound5.Name = "Unsheath"
  674.             Sound5.Parent = Part1
  675.             Sound5.SoundId = "http://www.roblox.com/asset/?id=12222225"
  676.             Sound5.Volume = 1
  677.            
  678.             local Tool = Tool0
  679.             local Handle = Tool:WaitForChild("Handle")
  680.             Tool.Parent = char
  681.            
  682.             local function Create(ty)
  683.                 return function(data)
  684.                     local obj = Instance.new(ty)
  685.                     for k, v in pairs(data) do
  686.                         if type(k) == 'number' then
  687.                             v.Parent = obj
  688.                         else
  689.                             obj[k] = v
  690.                         end
  691.                     end
  692.                     return obj
  693.                 end
  694.             end
  695.            
  696.             local BaseUrl = "rbxassetid://"
  697.            
  698.             local Players = game:GetService("Players")
  699.             local Debris = game:GetService("Debris")
  700.             local RunService = game:GetService("RunService")
  701.            
  702.             local DamageValues = {
  703.                 BaseDamage = 5,
  704.                 SlashDamage = 10,
  705.                 LungeDamage = 30
  706.             }
  707.            
  708.             --For R15 avatars
  709.             local Animations = {
  710.                 R15Slash = 522635514,
  711.                 R15Lunge = 522638767
  712.             }
  713.            
  714.             local Damage = DamageValues.BaseDamage
  715.            
  716.             local Grips = {
  717.                 Up = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0),
  718.                 Out = CFrame.new(0, 0, -1.70000005, 0, 1, 0, 1, -0, 0, 0, 0, -1)
  719.             }
  720.            
  721.             local Sounds = {
  722.                 Slash = Handle:WaitForChild("SwordSlash"),
  723.                 Lunge = Handle:WaitForChild("SwordLunge"),
  724.                 Unsheath = Handle:WaitForChild("Unsheath")
  725.             }
  726.            
  727.             local ToolEquipped = false
  728.            
  729.             --For Omega Rainbow Katana thumbnail to display a lot of particles.
  730.             for i, v in pairs(Handle:GetChildren()) do
  731.                 if v:IsA("ParticleEmitter") then
  732.                     v.Rate = 20
  733.                 end
  734.             end
  735.            
  736.             Tool.Grip = Grips.Up
  737.             Tool.Enabled = true
  738.            
  739.             local function CheckIfAlive()
  740.                 return (((Player and Player.Parent and Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent) and true) or false)
  741.             end
  742.            
  743.             local function IsTeamMate(Player1, Player2)
  744.                 return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
  745.             end
  746.            
  747.             local function TagHumanoid(humanoid, player)
  748.                 local Creator_Tag = Instance.new("ObjectValue")
  749.                 Creator_Tag.Name = "creator"
  750.                 Creator_Tag.Value = player
  751.                 Debris:AddItem(Creator_Tag, 2)
  752.                 Creator_Tag.Parent = humanoid
  753.             end
  754.            
  755.             local function UntagHumanoid(humanoid)
  756.                 for i, v in pairs(humanoid:GetChildren()) do
  757.                     if v:IsA("ObjectValue") and v.Name == "creator" then
  758.                         v:Destroy()
  759.                     end
  760.                 end
  761.             end
  762.            
  763.             local function Blow(Hit)
  764.                 if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped then
  765.                     return
  766.                 end
  767.                 local RightArm = Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand")
  768.                 if not RightArm then
  769.                     return
  770.                 end
  771.                 local RightGrip = RightArm:FindFirstChild("RightGrip")
  772.                 if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then
  773.                     return
  774.                 end
  775.                 local character = Hit.Parent
  776.                 if character == Character then
  777.                     return
  778.                 end
  779.                 local humanoid = character:FindFirstChildOfClass("Humanoid")
  780.                 if not humanoid or humanoid.Health == 0 then
  781.                     return
  782.                 end
  783.                 local player = Players:GetPlayerFromCharacter(character)
  784.                 if player and ((player == Player) or table.find(alive,humanoid)) then
  785.                     return
  786.                 end
  787.                 UntagHumanoid(humanoid)
  788.                 TagHumanoid(humanoid, Player)
  789.                 humanoid:TakeDamage(Damage)
  790.             end
  791.             local function Attack()
  792.                 Damage = DamageValues.SlashDamage
  793.                 Sounds.Slash:Play()
  794.                
  795.                 if Humanoid then
  796.                     if Humanoid.RigType == Enum.HumanoidRigType.R6 then
  797.                         local Anim = Instance.new("StringValue")
  798.                         Anim.Name = "toolanim"
  799.                         Anim.Value = "Slash"
  800.                         Anim.Parent = Tool
  801.                     elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
  802.                         local Anim = Tool:FindFirstChild("R15Slash")
  803.                         if Anim then
  804.                             local Track = Humanoid:LoadAnimation(Anim)
  805.                             Track:Play(0)
  806.                         end
  807.                     end
  808.                 end
  809.             end
  810.             local function Lunge()
  811.                 Damage = DamageValues.LungeDamage
  812.                 Sounds.Lunge:Play()
  813.                 if Humanoid then
  814.                     if Humanoid.RigType == Enum.HumanoidRigType.R6 then
  815.                         local Anim = Instance.new("StringValue")
  816.                         Anim.Name = "toolanim"
  817.                         Anim.Value = "Lunge"
  818.                         Anim.Parent = Tool
  819.                     elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
  820.                         local Anim = Tool:FindFirstChild("R15Lunge")
  821.                         if Anim then
  822.                             local Track = Humanoid:LoadAnimation(Anim)
  823.                             Track:Play(0)
  824.                         end
  825.                     end
  826.                 end    
  827.                 wait(0.2)
  828.                 Tool.Grip = Grips.Out
  829.                 wait(0.6)
  830.                 Tool.Grip = Grips.Up
  831.                
  832.                 Damage = DamageValues.SlashDamage
  833.             end
  834.             Tool.Enabled = true
  835.             local LastAttack = 0
  836.             local function Activated()
  837.                 if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then
  838.                     return
  839.                 end
  840.                 Tool.Enabled = false
  841.                 local Tick = RunService.Stepped:wait()
  842.                 if (Tick - LastAttack < 0.2) then
  843.                     Lunge()
  844.                 else
  845.                     Attack()
  846.                 end
  847.                 LastAttack = Tick
  848.                 --wait(0.5)
  849.                 Damage = DamageValues.BaseDamage
  850.                 local SlashAnim = (Tool:FindFirstChild("R15Slash") or Create("Animation"){
  851.                     Name = "R15Slash",
  852.                     AnimationId = BaseUrl .. Animations.R15Slash,
  853.                     Parent = Tool
  854.                 })
  855.                
  856.                 local LungeAnim = (Tool:FindFirstChild("R15Lunge") or Create("Animation"){
  857.                     Name = "R15Lunge",
  858.                     AnimationId = BaseUrl .. Animations.R15Lunge,
  859.                     Parent = Tool
  860.                 })
  861.                 Tool.Enabled = true
  862.             end
  863.             local function Equipped()
  864.                 Character = Tool.Parent
  865.                 Player = Players:GetPlayerFromCharacter(Character)
  866.                 Humanoid = Character:FindFirstChildOfClass("Humanoid")
  867.                 Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("HumanoidRootPart")
  868.                 if not CheckIfAlive() then
  869.                     return
  870.                 end
  871.                 ToolEquipped = true
  872.                 Sounds.Unsheath:Play()
  873.             end
  874.             local function Unequipped()
  875.                 Tool.Grip = Grips.Up
  876.                 ToolEquipped = false
  877.             end
  878.             Tool.Activated:Connect(Activated)
  879.             Tool.Equipped:Connect(Equipped)
  880.             Tool.Unequipped:Connect(Unequipped)
  881.             local Connection = Handle.Touched:Connect(Blow)
  882.         end
  883.     end;
  884.     function() -- X Beam
  885.         t = 10
  886.         local rot = CFrame.Angles(0,0,0)
  887.         if math.random(1,2) == 1 then
  888.             rot = CFrame.Angles(0,0,0)
  889.         else
  890.             rot = CFrame.Angles(0,math.rad(45),0)
  891.         end
  892.         local Part0 = Instance.new("Part")
  893.         local Part1 = Instance.new("Part")
  894.         Part0.Parent = match_folder
  895.         Part0.CFrame = CFrame.new(0, 9.3999996, -474.96994, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  896.         Part0.Orientation = Vector3.new(0, -90, 0)
  897.         Part0.Position = Vector3.new(0, 9.3999996, -474.96994)
  898.         Part0.Rotation = Vector3.new(0, -90, 0)
  899.         Part0.Color = Color3.new(1, 0, 0)
  900.         Part0.Size = Vector3.new(200, 1.20000005, 2)
  901.         Part0.BottomSurface = Enum.SurfaceType.Smooth
  902.         Part0.BrickColor = BrickColor.new("Really red")
  903.         Part0.Material = Enum.Material.Concrete
  904.         Part0.TopSurface = Enum.SurfaceType.Smooth
  905.         Part0.brickColor = BrickColor.new("Really red")
  906.         Part1.Parent = match_folder
  907.         Part1.CFrame = CFrame.new(0, 9.3999996, -474.96994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  908.         Part1.Position = Vector3.new(0, 9.3999996, -474.96994)
  909.         Part1.Color = Color3.new(1, 0, 0)
  910.         Part1.Size = Vector3.new(200, 1.20000005, 2)
  911.         Part1.BottomSurface = Enum.SurfaceType.Smooth
  912.         Part1.BrickColor = BrickColor.new("Really red")
  913.         Part1.Material = Enum.Material.Concrete
  914.         Part1.TopSurface = Enum.SurfaceType.Smooth
  915.         Part1.brickColor = BrickColor.new("Really red")
  916.         Part0.Anchored = true
  917.         Part0.CanCollide = false
  918.         Part1.Anchored = true
  919.         Part1.CanCollide = false
  920.         Part0.CFrame = Part0.CFrame*rot
  921.         Part1.CFrame = Part1.CFrame*rot
  922.         --
  923.         wait(5)
  924.         Part0:Destroy()
  925.         Part1:Destroy()
  926.         local b1 = Instance.new("Part")
  927.         local b2 = Instance.new("Part")
  928.         b1.Parent = match_folder
  929.         b1.CFrame = CFrame.new(0, 9.3999996, -474.96994, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  930.         b1.Orientation = Vector3.new(0, -90, 0)
  931.         b1.Position = Vector3.new(0, 9.3999996, -474.96994)
  932.         b1.Rotation = Vector3.new(0, -90, 0)
  933.         b1.Color = Color3.new(1, 0, 0)
  934.         b1.Size = Vector3.new(250, 50, 50)
  935.         b1.BottomSurface = Enum.SurfaceType.Smooth
  936.         b1.BrickColor = BrickColor.new("Really red")
  937.         b1.Material = Enum.Material.Neon
  938.         b1.TopSurface = Enum.SurfaceType.Smooth
  939.         b1.brickColor = BrickColor.new("Really red")
  940.         b1.Shape = Enum.PartType.Cylinder
  941.         b2.Parent = match_folder
  942.         b2.CFrame = CFrame.new(0, 9.3999996, -474.96994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  943.         b2.Position = Vector3.new(0, 9.3999996, -474.96994)
  944.         b2.Color = Color3.new(1, 0, 0)
  945.         b2.Size = Vector3.new(250, 50, 50)
  946.         b2.BottomSurface = Enum.SurfaceType.Smooth
  947.         b2.BrickColor = BrickColor.new("Really red")
  948.         b2.Material = Enum.Material.Neon
  949.         b2.TopSurface = Enum.SurfaceType.Smooth
  950.         b2.brickColor = BrickColor.new("Really red")
  951.         b2.Shape = Enum.PartType.Cylinder
  952.         b1.CFrame = b1.CFrame*rot
  953.         b2.CFrame = b2.CFrame*rot
  954.         b1.Touched:Connect(function(obj)
  955.             if not obj:IsDescendantOf(script) then else return end
  956.             local char = obj.Parent
  957.             local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  958.             local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  959.             if table.find(alive,hum) then else return end
  960.             if torso and hum then
  961.                 hum:TakeDamage(1/0)
  962.                 char:BreakJoints()
  963.             end
  964.         end)
  965.         b2.Touched:Connect(function(obj)
  966.             if not obj:IsDescendantOf(script) then else return end
  967.             local char = obj.Parent
  968.             local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  969.             local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  970.             if table.find(alive,hum) then else return end
  971.             if torso and hum then
  972.                 hum:TakeDamage(1/0)
  973.                 char:BreakJoints()
  974.             end
  975.         end)
  976.         b1.Anchored = true
  977.         b2.Anchored = true
  978.         b1.CanCollide = false
  979.         b2.CanCollide = false
  980.         local exs = Instance.new("Sound")
  981.         exs.SoundId = 'rbxassetid://1906350651'
  982.         exs.Volume = 5
  983.         exs.Parent = b1
  984.         exs:Play()
  985.         local exs = Instance.new("Sound")
  986.         exs.SoundId = 'rbxassetid://1906350651'
  987.         exs.Volume = 5
  988.         exs.Parent = b2
  989.         exs:Play()
  990.         game:GetService("TweenService"):Create(b1,TweenInfo.new(3),{Transparency = 1}):Play()
  991.         game:GetService("TweenService"):Create(b2,TweenInfo.new(3),{Transparency = 1}):Play()
  992.         game:GetService("Debris"):AddItem(b1,3)
  993.         game:GetService("Debris"):AddItem(b2,3)
  994.     end;
  995.     function() -- button of death walls
  996.         t = 20
  997.         local bp = Instance.new("Part")
  998.         local CylinderMesh1 = Instance.new("CylinderMesh")
  999.         local press = Instance.new("Part")
  1000.         local CylinderMesh3 = Instance.new("CylinderMesh")
  1001.         bp.Parent = match_folder
  1002.         bp.CFrame = CFrame.new(-0.280818999, 0.910803974, -474.927887, -1, 7.19989831e-20, 5.96046448e-08, 7.19989767e-20, 1, -9.98901304e-20, -5.96046448e-08, -9.9890124e-20, -1)
  1003.         bp.Orientation = Vector3.new(0, 180, 0)
  1004.         bp.Position = Vector3.new(-0.280818999, 0.910803974, -474.927887)
  1005.         bp.Rotation = Vector3.new(180, 0, -180)
  1006.         bp.Color = Color3.new(0.803922, 0.803922, 0.803922)
  1007.         bp.Size = Vector3.new(22.7698441, 1.82158768, 27.3238144)
  1008.         bp.Anchored = true
  1009.         bp.BottomSurface = Enum.SurfaceType.Smooth
  1010.         bp.BrickColor = BrickColor.new("Mid gray")
  1011.         bp.TopSurface = Enum.SurfaceType.Smooth
  1012.         bp.brickColor = BrickColor.new("Mid gray")
  1013.         CylinderMesh1.Parent = bp
  1014.         press.Parent = match_folder
  1015.         press.CFrame = CFrame.new(-0.280818999, 4.50740194, -474.927887, 5.96046519e-08, -7.20652351e-20, -1, -9.98186956e-20, 1, -7.20652416e-20, 1, 9.98187021e-20, 5.96046519e-08)
  1016.         press.Orientation = Vector3.new(0, -90, 0)
  1017.         press.Position = Vector3.new(-0.280818999, 4.50740194, -474.927887)
  1018.         press.Rotation = Vector3.new(0, -90, 0)
  1019.         press.Color = Color3.new(1, 0, 0)
  1020.         press.Size = Vector3.new(18.2158756, 5.46476269, 22.7698441)
  1021.         press.Anchored = true
  1022.         press.BrickColor = BrickColor.new("Really red")
  1023.         press.TopSurface = Enum.SurfaceType.Smooth
  1024.         press.brickColor = BrickColor.new("Really red")
  1025.         CylinderMesh3.Parent = press
  1026.         CylinderMesh3.Offset = Vector3.new(0, -0.200000003, 0)
  1027.         CylinderMesh3.Scale = Vector3.new(1, 0.699999988, 1.39999998)
  1028.         local pressed = false
  1029.         press.Touched:Connect(function(obj)
  1030.             if not obj:IsDescendantOf(script) then else return end
  1031.             local char = obj.Parent
  1032.             local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  1033.             local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  1034.             if table.find(alive,hum) then else return end
  1035.             if not pressed then
  1036.                 pressed = true
  1037.                 local k1 = Instance.new("Part")
  1038.                 local k2 = Instance.new("Part")
  1039.                 local k3 = Instance.new("Part")
  1040.                 local k4 = Instance.new("Part")
  1041.                 k1.Anchored = true
  1042.                 k2.Anchored = true
  1043.                 k3.Anchored = true
  1044.                 k4.Anchored = true
  1045.                 k1.CanCollide = false
  1046.                 k2.CanCollide = false
  1047.                 k3.CanCollide = false
  1048.                 k4.CanCollide = false
  1049.                 k1.Parent = match_folder
  1050.                 k1.CFrame = CFrame.new(80, 36.9000015, -474.96994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1051.                 k1.Position = Vector3.new(80, 36.9000015, -474.96994)
  1052.                 k1.Color = Color3.new(1, 0, 0)
  1053.                 k1.Transparency = 0.60000002384186
  1054.                 k1.Size = Vector3.new(90, 76.1999969, 250)
  1055.                 k1.BottomSurface = Enum.SurfaceType.Smooth
  1056.                 k1.BrickColor = BrickColor.new("Really red")
  1057.                 k1.Material = Enum.Material.Concrete
  1058.                 k1.TopSurface = Enum.SurfaceType.Smooth
  1059.                 k1.brickColor = BrickColor.new("Really red")
  1060.                 k2.Parent = match_folder
  1061.                 k2.CFrame = CFrame.new(0, 36.9000015, -554.969971, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1062.                 k2.Position = Vector3.new(0, 36.9000015, -554.969971)
  1063.                 k2.Color = Color3.new(1, 0, 0)
  1064.                 k2.Transparency = 0.60000002384186
  1065.                 k2.Size = Vector3.new(250, 76.1999969, 90)
  1066.                 k2.BottomSurface = Enum.SurfaceType.Smooth
  1067.                 k2.BrickColor = BrickColor.new("Really red")
  1068.                 k2.Material = Enum.Material.Concrete
  1069.                 k2.TopSurface = Enum.SurfaceType.Smooth
  1070.                 k2.brickColor = BrickColor.new("Really red")
  1071.                 k3.Parent = match_folder
  1072.                 k3.CFrame = CFrame.new(-80, 36.9000015, -474.96994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1073.                 k3.Position = Vector3.new(-80, 36.9000015, -474.96994)
  1074.                 k3.Color = Color3.new(1, 0, 0)
  1075.                 k3.Transparency = 0.60000002384186
  1076.                 k3.Size = Vector3.new(90, 76.1999969, 250)
  1077.                 k3.BottomSurface = Enum.SurfaceType.Smooth
  1078.                 k3.BrickColor = BrickColor.new("Really red")
  1079.                 k3.Material = Enum.Material.Concrete
  1080.                 k3.TopSurface = Enum.SurfaceType.Smooth
  1081.                 k3.brickColor = BrickColor.new("Really red")
  1082.                 k4.Parent = match_folder
  1083.                 k4.CFrame = CFrame.new(0, 36.9000015, -394.96994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1084.                 k4.Position = Vector3.new(0, 36.9000015, -394.96994)
  1085.                 k4.Color = Color3.new(1, 0, 0)
  1086.                 k4.Transparency = 0.60000002384186
  1087.                 k4.Size = Vector3.new(250, 76.1999969, 90)
  1088.                 k4.BottomSurface = Enum.SurfaceType.Smooth
  1089.                 k4.BrickColor = BrickColor.new("Really red")
  1090.                 k4.Material = Enum.Material.Concrete
  1091.                 k4.TopSurface = Enum.SurfaceType.Smooth
  1092.                 k4.brickColor = BrickColor.new("Really red")
  1093.                 k1.Touched:Connect(function(obj)
  1094.                     if not obj:IsDescendantOf(script) then else return end
  1095.                     local char = obj.Parent
  1096.                     local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  1097.                     local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  1098.                     if table.find(alive,hum) then else return end
  1099.                     if torso and hum then
  1100.                         hum:TakeDamage(1/0)
  1101.                         char:BreakJoints()
  1102.                     end
  1103.                 end)
  1104.                 k2.Touched:Connect(function(obj)
  1105.                     if not obj:IsDescendantOf(script) then else return end
  1106.                     local char = obj.Parent
  1107.                     local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  1108.                     local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  1109.                     if table.find(alive,hum) then else return end
  1110.                     if torso and hum then
  1111.                         hum:TakeDamage(1/0)
  1112.                         char:BreakJoints()
  1113.                     end
  1114.                 end)
  1115.                 k3.Touched:Connect(function(obj)
  1116.                     if not obj:IsDescendantOf(script) then else return end
  1117.                     local char = obj.Parent
  1118.                     local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  1119.                     local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  1120.                     if table.find(alive,hum) then else return end
  1121.                     if torso and hum then
  1122.                         hum:TakeDamage(1/0)
  1123.                         char:BreakJoints()
  1124.                     end
  1125.                 end)
  1126.                 k4.Touched:Connect(function(obj)
  1127.                     if not obj:IsDescendantOf(script) then else return end
  1128.                     local char = obj.Parent
  1129.                     local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  1130.                     local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  1131.                     if table.find(alive,hum) then else return end
  1132.                     if torso and hum then
  1133.                         hum:TakeDamage(1/0)
  1134.                         char:BreakJoints()
  1135.                     end
  1136.                 end)
  1137.             end
  1138.         end)
  1139.     end;
  1140.     function() -- tsunami
  1141.         t = 10
  1142.         local tsunami = Instance.new("Model")
  1143.         tsunami.Parent = match_folder
  1144.         local p = Instance.new("Part")
  1145.         local ParticleEmitter1 = Instance.new("ParticleEmitter")
  1146.         local ParticleEmitter2 = Instance.new("ParticleEmitter")
  1147.         local ParticleEmitter3 = Instance.new("ParticleEmitter")
  1148.         local ParticleEmitter4 = Instance.new("ParticleEmitter")
  1149.         local ParticleEmitter5 = Instance.new("ParticleEmitter")
  1150.         local ManualWeld6 = Instance.new("ManualWeld")
  1151.         local WedgePart7 = Instance.new("WedgePart")
  1152.         local WedgePart8 = Instance.new("WedgePart")
  1153.         p.Parent = tsunami
  1154.         p.CFrame = CFrame.new(-0.0450058207, -2.98210955, -591.788696, -0.99999994, -2.90431785e-08, 1.33582034e-12, -2.7930291e-08, 0.961724818, -0.27401641, 7.93741606e-09, -0.27401644, -0.961724877)
  1155.         p.Orientation = Vector3.new(15.8999996, 180, 0)
  1156.         p.Position = Vector3.new(-0.0450058207, -2.98210955, -591.788696)
  1157.         p.Rotation = Vector3.new(164.100006, 0, 180)
  1158.         p.Color = Color3.new(1, 0.686275, 0)
  1159.         p.Transparency = 1
  1160.         p.Size = Vector3.new(247.520096, 0.199999139, 2.80000019)
  1161.         p.Anchored = true
  1162.         p.BottomSurface = Enum.SurfaceType.Smooth
  1163.         p.BrickColor = BrickColor.new("Deep orange")
  1164.         p.CanCollide = false
  1165.         p.Locked = true
  1166.         p.Material = Enum.Material.SmoothPlastic
  1167.         p.TopSurface = Enum.SurfaceType.Smooth
  1168.         p.brickColor = BrickColor.new("Deep orange")
  1169.         p.FormFactor = Enum.FormFactor.Symmetric
  1170.         p.formFactor = Enum.FormFactor.Symmetric
  1171.         ParticleEmitter1.Parent = p
  1172.         ParticleEmitter1.Speed = NumberRange.new(10, 10)
  1173.         ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.901961, 1, 1),Color3.new(0.901961, 1, 1))
  1174.         ParticleEmitter1.LightEmission = 0.30000001192093
  1175.         ParticleEmitter1.LightInfluence = 0.30000001192093
  1176.         ParticleEmitter1.Texture = "rbxassetid://241685484"
  1177.         ParticleEmitter1.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
  1178.         ParticleEmitter1.ZOffset = 0.30000001192093
  1179.         ParticleEmitter1.Acceleration = Vector3.new(5, 0, 0)
  1180.         ParticleEmitter1.Lifetime = NumberRange.new(1, 2)
  1181.         ParticleEmitter1.Rate = 111
  1182.         ParticleEmitter1.RotSpeed = NumberRange.new(260, 260)
  1183.         ParticleEmitter1.SpreadAngle = Vector2.new(360, 360)
  1184.         ParticleEmitter1.VelocitySpread = 360
  1185.         ParticleEmitter2.Parent = p
  1186.         ParticleEmitter2.Speed = NumberRange.new(10, 10)
  1187.         ParticleEmitter2.Color = ColorSequence.new(Color3.new(0.796078, 0.992157, 1),Color3.new(0.796078, 0.992157, 1))
  1188.         ParticleEmitter2.LightEmission = 0.30000001192093
  1189.         ParticleEmitter2.LightInfluence = 0.30000001192093
  1190.         ParticleEmitter2.Texture = "rbxassetid://241685484"
  1191.         ParticleEmitter2.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
  1192.         ParticleEmitter2.ZOffset = 0.30000001192093
  1193.         ParticleEmitter2.Acceleration = Vector3.new(5, 0, 0)
  1194.         ParticleEmitter2.Lifetime = NumberRange.new(1, 2)
  1195.         ParticleEmitter2.Rate = 111
  1196.         ParticleEmitter2.RotSpeed = NumberRange.new(260, 260)
  1197.         ParticleEmitter2.SpreadAngle = Vector2.new(360, 360)
  1198.         ParticleEmitter2.VelocitySpread = 360
  1199.         ParticleEmitter3.Parent = p
  1200.         ParticleEmitter3.Speed = NumberRange.new(10, 10)
  1201.         ParticleEmitter3.Color = ColorSequence.new(Color3.new(0.843137, 1, 0.992157),Color3.new(0.843137, 1, 0.992157))
  1202.         ParticleEmitter3.LightEmission = 0.30000001192093
  1203.         ParticleEmitter3.LightInfluence = 0.30000001192093
  1204.         ParticleEmitter3.Texture = "rbxassetid://241685484"
  1205.         ParticleEmitter3.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
  1206.         ParticleEmitter3.ZOffset = 0.30000001192093
  1207.         ParticleEmitter3.Acceleration = Vector3.new(5, 0, 0)
  1208.         ParticleEmitter3.Lifetime = NumberRange.new(1, 2)
  1209.         ParticleEmitter3.Rate = 111
  1210.         ParticleEmitter3.RotSpeed = NumberRange.new(260, 260)
  1211.         ParticleEmitter3.SpreadAngle = Vector2.new(360, 360)
  1212.         ParticleEmitter3.VelocitySpread = 360
  1213.         ParticleEmitter4.Parent = p
  1214.         ParticleEmitter4.Speed = NumberRange.new(10, 10)
  1215.         ParticleEmitter4.LightEmission = 0.30000001192093
  1216.         ParticleEmitter4.LightInfluence = 0.30000001192093
  1217.         ParticleEmitter4.Texture = "rbxassetid://241685484"
  1218.         ParticleEmitter4.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
  1219.         ParticleEmitter4.ZOffset = 0.30000001192093
  1220.         ParticleEmitter4.Acceleration = Vector3.new(5, 0, 0)
  1221.         ParticleEmitter4.Lifetime = NumberRange.new(1, 2)
  1222.         ParticleEmitter4.Rate = 111
  1223.         ParticleEmitter4.RotSpeed = NumberRange.new(260, 260)
  1224.         ParticleEmitter4.SpreadAngle = Vector2.new(360, 360)
  1225.         ParticleEmitter4.VelocitySpread = 360
  1226.         ParticleEmitter5.Parent = p
  1227.         ParticleEmitter5.Speed = NumberRange.new(10, 10)
  1228.         ParticleEmitter5.LightEmission = 0.30000001192093
  1229.         ParticleEmitter5.LightInfluence = 0.30000001192093
  1230.         ParticleEmitter5.Texture = "rbxassetid://241685484"
  1231.         ParticleEmitter5.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
  1232.         ParticleEmitter5.ZOffset = 0.30000001192093
  1233.         ParticleEmitter5.Acceleration = Vector3.new(5, 0, 0)
  1234.         ParticleEmitter5.Lifetime = NumberRange.new(1, 2)
  1235.         ParticleEmitter5.Rate = 111
  1236.         ParticleEmitter5.RotSpeed = NumberRange.new(260, 260)
  1237.         ParticleEmitter5.SpreadAngle = Vector2.new(360, 360)
  1238.         ParticleEmitter5.VelocitySpread = 360
  1239.         ManualWeld6.Name = "Part Terrain Joint"
  1240.         ManualWeld6.Parent = p
  1241.         ManualWeld6.Part1 = p
  1242.         ManualWeld6.part1 = p
  1243.         WedgePart7.Parent = tsunami
  1244.         WedgePart7.CFrame = CFrame.new(0.00999999978, -22.0264359, -584.304749, -1, 0, 0, 0, 0.707106829, 0.707106829, 0, 0.707106829, -0.707106829)
  1245.         WedgePart7.Orientation = Vector3.new(-45, 180, 0)
  1246.         WedgePart7.Position = Vector3.new(0.00999999978, -22.0264359, -584.304749)
  1247.         WedgePart7.Rotation = Vector3.new(-135, 0, -180)
  1248.         WedgePart7.Color = Color3.new(0.0352941, 0.537255, 0.811765)
  1249.         WedgePart7.Size = Vector3.new(247.989975, 21.9099865, 39.3700066)
  1250.         WedgePart7.Anchored = true
  1251.         WedgePart7.BottomSurface = Enum.SurfaceType.Smooth
  1252.         WedgePart7.BrickColor = BrickColor.new("Electric blue")
  1253.         WedgePart7.CanCollide = false
  1254.         WedgePart7.Locked = true
  1255.         WedgePart7.brickColor = BrickColor.new("Electric blue")
  1256.         WedgePart8.Parent = tsunami
  1257.         WedgePart8.CFrame = CFrame.new(0.00999999978, -35.5200043, -584.7948, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  1258.         WedgePart8.Orientation = Vector3.new(0, 180, 0)
  1259.         WedgePart8.Position = Vector3.new(0.00999999978, -35.5200043, -584.7948)
  1260.         WedgePart8.Rotation = Vector3.new(-180, 0, -180)
  1261.         WedgePart8.Color = Color3.new(0.0352941, 0.537255, 0.811765)
  1262.         WedgePart8.Size = Vector3.new(247.989975, 41.4599915, 39.6200027)
  1263.         WedgePart8.Anchored = true
  1264.         WedgePart8.BottomSurface = Enum.SurfaceType.Smooth
  1265.         WedgePart8.BrickColor = BrickColor.new("Electric blue")
  1266.         WedgePart8.CanCollide = false
  1267.         WedgePart8.Locked = true
  1268.         WedgePart8.brickColor = BrickColor.new("Electric blue")
  1269.         for i,v in pairs(tsunami:GetChildren()) do
  1270.             if v:IsA("BasePart") and v ~= p then
  1271.                 local w = Instance.new("Weld")
  1272.                 w.Part0 = p
  1273.                 w.Part1 = v
  1274.                 w.C0 = p.CFrame:Inverse()
  1275.                 w.C1 = v.CFrame:Inverse()
  1276.                 v.Anchored = false
  1277.                 w.Parent = v
  1278.                 v.Touched:Connect(function(obj)
  1279.                     if not obj:IsDescendantOf(script) then else return end
  1280.                     local char = obj.Parent
  1281.                     local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  1282.                     local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  1283.                     if table.find(alive,hum) then else return end
  1284.                     if torso and hum then
  1285.                         hum:TakeDamage(1/0)
  1286.                         char:BreakJoints()
  1287.                     end
  1288.                 end)
  1289.             end
  1290.         end
  1291.         p.Touched:Connect(function(obj)
  1292.             if not obj:IsDescendantOf(script) then else return end
  1293.             local char = obj.Parent
  1294.             local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  1295.             local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  1296.             if table.find(alive,hum) then else return end
  1297.             if torso and hum then
  1298.                 hum:TakeDamage(1/0)
  1299.                 char:BreakJoints()
  1300.             end
  1301.         end)
  1302.         local exs = Instance.new("Sound")
  1303.         exs.SoundId = 'rbxassetid://898059911'
  1304.         exs.Volume = 7
  1305.         exs.Parent = p
  1306.         exs:Play()
  1307.         spawn(function()
  1308.             game:GetService("TweenService"):Create(p,TweenInfo.new(5),{Position = Vector3.new(0,44.11, -439.31)}):Play()
  1309.             wait(5)
  1310.             game:GetService("TweenService"):Create(p,TweenInfo.new(4),{Position = Vector3.new(0,-11.17, -390.3)}):Play()
  1311.             wait(4)
  1312.         end)
  1313.     end;
  1314.     function() -- moving pillar beams
  1315.         t = 12
  1316.         local Model0 = Instance.new("Model")
  1317.         local Part1 = Instance.new("Part")
  1318.         local Part2 = Instance.new("Part")
  1319.         local Part3 = Instance.new("Part")
  1320.         local Part4 = Instance.new("Part")
  1321.         local Model5 = Instance.new("Model")
  1322.         local Part6 = Instance.new("Part")
  1323.         local Part7 = Instance.new("Part")
  1324.         local Part8 = Instance.new("Part")
  1325.         local Part9 = Instance.new("Part")
  1326.         Model0.Name = "p2"
  1327.         Model0.Parent = match_folder
  1328.         Part1.Parent = Model0
  1329.         Part1.CFrame = CFrame.new(111.279999, 40, -529.589966, 0, 1, 0, 1, 0, 0, 0, 0, -1)
  1330.         Part1.Orientation = Vector3.new(0, 180, 90)
  1331.         Part1.Position = Vector3.new(111.279999, 40, -529.589966)
  1332.         Part1.Rotation = Vector3.new(-180, 0, -90)
  1333.         Part1.Color = Color3.new(1, 0, 0)
  1334.         Part1.Size = Vector3.new(80, 15, 15)
  1335.         Part1.BottomSurface = Enum.SurfaceType.Smooth
  1336.         Part1.BrickColor = BrickColor.new("Really red")
  1337.         Part1.Material = Enum.Material.Neon
  1338.         Part1.TopSurface = Enum.SurfaceType.Smooth
  1339.         Part1.brickColor = BrickColor.new("Really red")
  1340.         Part1.Shape = Enum.PartType.Cylinder
  1341.         Part2.Parent = Model0
  1342.         Part2.CFrame = CFrame.new(111.279999, 40, -589.589966, 0, 1, 0, 1, 0, 0, 0, 0, -1)
  1343.         Part2.Orientation = Vector3.new(0, 180, 90)
  1344.         Part2.Position = Vector3.new(111.279999, 40, -589.589966)
  1345.         Part2.Rotation = Vector3.new(-180, 0, -90)
  1346.         Part2.Color = Color3.new(1, 0, 0)
  1347.         Part2.Size = Vector3.new(80, 15, 15)
  1348.         Part2.BottomSurface = Enum.SurfaceType.Smooth
  1349.         Part2.BrickColor = BrickColor.new("Really red")
  1350.         Part2.Material = Enum.Material.Neon
  1351.         Part2.TopSurface = Enum.SurfaceType.Smooth
  1352.         Part2.brickColor = BrickColor.new("Really red")
  1353.         Part2.Shape = Enum.PartType.Cylinder
  1354.         Part3.Parent = Model0
  1355.         Part3.CFrame = CFrame.new(111.279999, 40, -469.589935, 0, 1, 0, 1, 0, 0, 0, 0, -1)
  1356.         Part3.Orientation = Vector3.new(0, 180, 90)
  1357.         Part3.Position = Vector3.new(111.279999, 40, -469.589935)
  1358.         Part3.Rotation = Vector3.new(-180, 0, -90)
  1359.         Part3.Color = Color3.new(1, 0, 0)
  1360.         Part3.Size = Vector3.new(80, 15, 15)
  1361.         Part3.BottomSurface = Enum.SurfaceType.Smooth
  1362.         Part3.BrickColor = BrickColor.new("Really red")
  1363.         Part3.Material = Enum.Material.Neon
  1364.         Part3.TopSurface = Enum.SurfaceType.Smooth
  1365.         Part3.brickColor = BrickColor.new("Really red")
  1366.         Part3.Shape = Enum.PartType.Cylinder
  1367.         Part4.Parent = Model0
  1368.         Part4.CFrame = CFrame.new(111.279999, 40, -409.589935, 0, 1, 0, 1, 0, 0, 0, 0, -1)
  1369.         Part4.Orientation = Vector3.new(0, 180, 90)
  1370.         Part4.Position = Vector3.new(111.279999, 40, -409.589935)
  1371.         Part4.Rotation = Vector3.new(-180, 0, -90)
  1372.         Part4.Color = Color3.new(1, 0, 0)
  1373.         Part4.Size = Vector3.new(80, 15, 15)
  1374.         Part4.BottomSurface = Enum.SurfaceType.Smooth
  1375.         Part4.BrickColor = BrickColor.new("Really red")
  1376.         Part4.Material = Enum.Material.Neon
  1377.         Part4.TopSurface = Enum.SurfaceType.Smooth
  1378.         Part4.brickColor = BrickColor.new("Really red")
  1379.         Part4.Shape = Enum.PartType.Cylinder
  1380.         Model5.Name = "p1"
  1381.         Model5.Parent = match_folder
  1382.         Part6.Parent = Model5
  1383.         Part6.CFrame = CFrame.new(-113.720001, 40, -559.589966, 0, 1, 0, 1, 0, 0, 0, 0, -1)
  1384.         Part6.Orientation = Vector3.new(0, 180, 90)
  1385.         Part6.Position = Vector3.new(-113.720001, 40, -559.589966)
  1386.         Part6.Rotation = Vector3.new(-180, 0, -90)
  1387.         Part6.Color = Color3.new(1, 0, 0)
  1388.         Part6.Size = Vector3.new(80, 15, 15)
  1389.         Part6.BottomSurface = Enum.SurfaceType.Smooth
  1390.         Part6.BrickColor = BrickColor.new("Really red")
  1391.         Part6.Material = Enum.Material.Neon
  1392.         Part6.TopSurface = Enum.SurfaceType.Smooth
  1393.         Part6.brickColor = BrickColor.new("Really red")
  1394.         Part6.Shape = Enum.PartType.Cylinder
  1395.         Part7.Parent = Model5
  1396.         Part7.CFrame = CFrame.new(-113.720001, 40, -499.589935, 0, 1, 0, 1, 0, 0, 0, 0, -1)
  1397.         Part7.Orientation = Vector3.new(0, 180, 90)
  1398.         Part7.Position = Vector3.new(-113.720001, 40, -499.589935)
  1399.         Part7.Rotation = Vector3.new(-180, 0, -90)
  1400.         Part7.Color = Color3.new(1, 0, 0)
  1401.         Part7.Size = Vector3.new(80, 15, 15)
  1402.         Part7.BottomSurface = Enum.SurfaceType.Smooth
  1403.         Part7.BrickColor = BrickColor.new("Really red")
  1404.         Part7.Material = Enum.Material.Neon
  1405.         Part7.TopSurface = Enum.SurfaceType.Smooth
  1406.         Part7.brickColor = BrickColor.new("Really red")
  1407.         Part7.Shape = Enum.PartType.Cylinder
  1408.         Part8.Parent = Model5
  1409.         Part8.CFrame = CFrame.new(-113.720001, 40, -439.589935, 0, 1, 0, 1, 0, 0, 0, 0, -1)
  1410.         Part8.Orientation = Vector3.new(0, 180, 90)
  1411.         Part8.Position = Vector3.new(-113.720001, 40, -439.589935)
  1412.         Part8.Rotation = Vector3.new(-180, 0, -90)
  1413.         Part8.Color = Color3.new(1, 0, 0)
  1414.         Part8.Size = Vector3.new(80, 15, 15)
  1415.         Part8.BottomSurface = Enum.SurfaceType.Smooth
  1416.         Part8.BrickColor = BrickColor.new("Really red")
  1417.         Part8.Material = Enum.Material.Neon
  1418.         Part8.TopSurface = Enum.SurfaceType.Smooth
  1419.         Part8.brickColor = BrickColor.new("Really red")
  1420.         Part8.Shape = Enum.PartType.Cylinder
  1421.         Part9.Parent = Model5
  1422.         Part9.CFrame = CFrame.new(-113.720001, 40, -379.589935, 0, 1, 0, 1, 0, 0, 0, 0, -1)
  1423.         Part9.Orientation = Vector3.new(0, 180, 90)
  1424.         Part9.Position = Vector3.new(-113.720001, 40, -379.589935)
  1425.         Part9.Rotation = Vector3.new(-180, 0, -90)
  1426.         Part9.Color = Color3.new(1, 0, 0)
  1427.         Part9.Size = Vector3.new(80, 15, 15)
  1428.         Part9.BottomSurface = Enum.SurfaceType.Smooth
  1429.         Part9.BrickColor = BrickColor.new("Really red")
  1430.         Part9.Material = Enum.Material.Neon
  1431.         Part9.TopSurface = Enum.SurfaceType.Smooth
  1432.         Part9.brickColor = BrickColor.new("Really red")
  1433.         Part9.Shape = Enum.PartType.Cylinder
  1434.         for i,v in pairs(Model0:GetChildren()) do
  1435.             v.Anchored = true
  1436.             v.CanCollide = false
  1437.             v.Touched:Connect(function(obj)
  1438.                 if not obj:IsDescendantOf(script) then else return end
  1439.                 local char = obj.Parent
  1440.                 local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  1441.                 local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  1442.                 if table.find(alive,hum) then else return end
  1443.                 if torso and hum then
  1444.                     hum:TakeDamage(1/0)
  1445.                     char:BreakJoints()
  1446.                 end
  1447.             end)
  1448.         end
  1449.         for i,v in pairs(Model5:GetChildren()) do
  1450.             v.Anchored = true
  1451.             v.CanCollide = false
  1452.             v.Touched:Connect(function(obj)
  1453.                 if not obj:IsDescendantOf(script) then else return end
  1454.                 local char = obj.Parent
  1455.                 local hum = obj.Parent:FindFirstChildOfClass("Humanoid")
  1456.                 local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  1457.                 if table.find(alive,hum) then else return end
  1458.                 if torso and hum then
  1459.                     hum:TakeDamage(1/0)
  1460.                     char:BreakJoints()
  1461.                 end
  1462.             end)
  1463.         end
  1464.         spawn(function()
  1465.             wait(2)
  1466.             for i = 1,5 do
  1467.                 for i,v in pairs(Model0:GetChildren()) do
  1468.                     game:GetService("TweenService"):Create(v,TweenInfo.new(1),{CFrame = v.CFrame*CFrame.new(0,-225,0)}):Play()
  1469.                 end
  1470.                 for i,v in pairs(Model5:GetChildren()) do
  1471.                     game:GetService("TweenService"):Create(v,TweenInfo.new(1),{CFrame = v.CFrame*CFrame.new(0,225,0)}):Play()
  1472.                 end
  1473.                 wait(1)
  1474.                 for i,v in pairs(Model0:GetChildren()) do
  1475.                     game:GetService("TweenService"):Create(v,TweenInfo.new(1),{CFrame = v.CFrame*CFrame.new(0,225,0)}):Play()
  1476.                 end
  1477.                 for i,v in pairs(Model5:GetChildren()) do
  1478.                     game:GetService("TweenService"):Create(v,TweenInfo.new(1),{CFrame = v.CFrame*CFrame.new(0,-225,0)}):Play()
  1479.                 end
  1480.                 wait(1)
  1481.             end
  1482.         end)
  1483.     end;
  1484. }
  1485.  
  1486. function create_base()
  1487.     local Model0 = Instance.new("Model")
  1488.     local Part1 = Instance.new("Part")
  1489.     local Part2 = Instance.new("Part")
  1490.     local Part3 = Instance.new("Part")
  1491.     local Part4 = Instance.new("Part")
  1492.     local Part5 = Instance.new("Part")
  1493.     Model0.Name = "Walls"
  1494.     Model0.Parent = main_folder
  1495.     Part1.Parent = Model0
  1496.     Part1.CFrame = CFrame.new(124.5, 36.9000015, -474.96994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1497.     Part1.Position = Vector3.new(124.5, 36.9000015, -474.96994)
  1498.     Part1.Transparency = 0.60000002384186
  1499.     Part1.Size = Vector3.new(1, 76, 250)
  1500.     Part1.BottomSurface = Enum.SurfaceType.Smooth
  1501.     Part1.Material = Enum.Material.SmoothPlastic
  1502.     Part1.TopSurface = Enum.SurfaceType.Smooth
  1503.     Part2.Parent = Model0
  1504.     Part2.CFrame = CFrame.new(0, 36.9000015, -350.46994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1505.     Part2.Position = Vector3.new(0, 36.9000015, -350.46994)
  1506.     Part2.Transparency = 0.60000002384186
  1507.     Part2.Size = Vector3.new(250, 76, 1)
  1508.     Part2.BottomSurface = Enum.SurfaceType.Smooth
  1509.     Part2.Material = Enum.Material.SmoothPlastic
  1510.     Part2.TopSurface = Enum.SurfaceType.Smooth
  1511.     Part3.Parent = Model0
  1512.     Part3.CFrame = CFrame.new(-124.5, 36.9000015, -474.96994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1513.     Part3.Position = Vector3.new(-124.5, 36.9000015, -474.96994)
  1514.     Part3.Transparency = 0.60000002384186
  1515.     Part3.Size = Vector3.new(1, 76, 250)
  1516.     Part3.BottomSurface = Enum.SurfaceType.Smooth
  1517.     Part3.Material = Enum.Material.SmoothPlastic
  1518.     Part3.TopSurface = Enum.SurfaceType.Smooth
  1519.     Part4.Parent = Model0
  1520.     Part4.CFrame = CFrame.new(0, 36.9000015, -599.469971, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1521.     Part4.Position = Vector3.new(0, 36.9000015, -599.469971)
  1522.     Part4.Transparency = 0.60000002384186
  1523.     Part4.Size = Vector3.new(250, 76, 1)
  1524.     Part4.BottomSurface = Enum.SurfaceType.Smooth
  1525.     Part4.Material = Enum.Material.SmoothPlastic
  1526.     Part4.TopSurface = Enum.SurfaceType.Smooth
  1527.     Part5.Name = "Main"
  1528.     Part5.Parent = main_folder
  1529.     Part5.CFrame = CFrame.new(0, -0.600000024, -474.96994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1530.     Part5.Position = Vector3.new(0, -0.600000024, -474.96994)
  1531.     Part5.Size = Vector3.new(250, 1.20000005, 250)
  1532.     Part5.BottomSurface = Enum.SurfaceType.Smooth
  1533.     Part5.Material = Enum.Material.Concrete
  1534.     Part5.TopSurface = Enum.SurfaceType.Smooth
  1535.     local roof = Instance.new("Part")
  1536.     roof.Name = "Roof"
  1537.     roof.Parent = main_folder
  1538.     roof.CFrame = CFrame.new(0, 74.4000015, -474.96994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1539.     roof.Position = Vector3.new(0, 74.4000015, -474.96994)
  1540.     roof.Transparency = 0.60000002384186
  1541.     roof.Size = Vector3.new(250, 1.20000005, 250)
  1542.     roof.BottomSurface = Enum.SurfaceType.Smooth
  1543.     roof.TopSurface = Enum.SurfaceType.Smooth
  1544.     main = Part5
  1545.     for i,v in ipairs(main_folder:GetDescendants()) do
  1546.         if v:IsA("BasePart") then
  1547.             v.Anchored = true
  1548.             v.CanCollide = true
  1549.             v.Locked = true
  1550.         end
  1551.     end
  1552. end
  1553.  
  1554. function create_theme()
  1555.     local themes = {1450664955,576075040,188865181,182677060,1287355926,4462782259,893350377,452771968}
  1556.     local tid = math.random(1,#themes)
  1557.     local theme = Instance.new("Sound")
  1558.     theme.SoundId = 'rbxassetid://' .. themes[tid]
  1559.     theme.Volume = 3
  1560.     theme.Parent = main
  1561.     spawn(function()
  1562.         while true do
  1563.             wait()
  1564.             theme.SoundId = 'rbxassetid://' .. themes[tid]
  1565.             theme:Play()
  1566.             repeat wait(1) until not theme.IsPlaying
  1567.             tid = tid + 1
  1568.             if tid > #themes then
  1569.                 tid = 1
  1570.             end
  1571.         end
  1572.     end)
  1573. end
  1574.  
  1575. function create_queue()
  1576.     local Part0 = Instance.new("Part")
  1577.     local SurfaceGui1 = Instance.new("SurfaceGui")
  1578.     local TextLabel2 = Instance.new("TextBox")
  1579.     local ScrollingFrame3 = Instance.new("ScrollingFrame")
  1580.     local UIListLayout4 = Instance.new("UIListLayout")
  1581.     Part0.Name = "Queue"
  1582.     Part0.Parent = main_folder
  1583.     Part0.Position = Vector3.new(0.25, 4.5, -348.97)
  1584.     Part0.Size = Vector3.new(16, 9, 2)
  1585.     Part0.BottomSurface = Enum.SurfaceType.Smooth
  1586.     Part0.TopSurface = Enum.SurfaceType.Smooth
  1587.     Part0.Anchored = true
  1588.     Part0.Locked = true
  1589.     SurfaceGui1.Parent = Part0
  1590.     SurfaceGui1.LightInfluence = 1
  1591.     SurfaceGui1.Face = Enum.NormalId.Back
  1592.     SurfaceGui1.ClipsDescendants = true
  1593.     SurfaceGui1.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  1594.     SurfaceGui1.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
  1595.     SurfaceGui1.PixelsPerStud = 100
  1596.     SurfaceGui1.Adornee = Part0
  1597.     TextLabel2.Name = "Title"
  1598.     TextLabel2.Parent = SurfaceGui1
  1599.     TextLabel2.Size = UDim2.new(1, 0, 0.200000003, 0)
  1600.     TextLabel2.BackgroundColor = BrickColor.new("Dirt brown")
  1601.     TextLabel2.BackgroundColor3 = Color3.new(0.254902, 0.254902, 0.254902)
  1602.     TextLabel2.Font = Enum.Font.SourceSans
  1603.     TextLabel2.FontSize = Enum.FontSize.Size14
  1604.     TextLabel2.Text = "N/A"
  1605.     TextLabel2.TextColor = BrickColor.new("Institutional white")
  1606.     TextLabel2.TextColor3 = Color3.new(1, 1, 1)
  1607.     TextLabel2.TextScaled = true
  1608.     TextLabel2.TextSize = 14
  1609.     TextLabel2.TextWrap = true
  1610.     TextLabel2.TextWrapped = true
  1611.     ScrollingFrame3.Parent = SurfaceGui1
  1612.     ScrollingFrame3.Position = UDim2.new(0, 0, 0.200000003, 0)
  1613.     ScrollingFrame3.Size = UDim2.new(1, 0, 0.600000024, 0)
  1614.     ScrollingFrame3.Active = true
  1615.     ScrollingFrame3.BackgroundColor = BrickColor.new("Dark grey metallic")
  1616.     ScrollingFrame3.BackgroundColor3 = Color3.new(0.345098, 0.345098, 0.345098)
  1617.     UIListLayout4.SortOrder = Enum.SortOrder.LayoutOrder
  1618.     UIListLayout4.Parent = ScrollingFrame3
  1619.     local p1 = Instance.new("Part")
  1620.     local SurfaceGui1 = Instance.new("SurfaceGui")
  1621.     local TextButton2 = Instance.new("TextBox")
  1622.     local normal = Instance.new("ClickDetector")
  1623.     local SurfaceGui5 = Instance.new("SurfaceGui")
  1624.     local TextLabel6 = Instance.new("TextLabel")
  1625.     local ScrollingFrame7 = Instance.new("ScrollingFrame")
  1626.     local UIListLayout8 = Instance.new("UIListLayout")
  1627.     local TextButton9 = Instance.new("TextBox")
  1628.     local p2 = Instance.new("Part")
  1629.     local SurfaceGui11 = Instance.new("SurfaceGui")
  1630.     local TextButton12 = Instance.new("TextBox")
  1631.     local hard = Instance.new("ClickDetector")
  1632.     p1.Name = "Join"
  1633.     p1.Parent = main_folder
  1634.     p1.Position = Vector3.new(4.25, 0.905, -348.865)
  1635.     p1.Size = Vector3.new(8, 1.8099997, 2.2099998)
  1636.     p1.Anchored = true
  1637.     p1.BottomSurface = Enum.SurfaceType.Smooth
  1638.     p1.Locked = true
  1639.     p1.TopSurface = Enum.SurfaceType.Smooth
  1640.     SurfaceGui1.Parent = p1
  1641.     SurfaceGui1.LightInfluence = 1
  1642.     SurfaceGui1.Face = Enum.NormalId.Back
  1643.     SurfaceGui1.ClipsDescendants = true
  1644.     SurfaceGui1.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  1645.     SurfaceGui1.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
  1646.     SurfaceGui1.PixelsPerStud = 100
  1647.     SurfaceGui1.Adornee = p1
  1648.     TextButton2.Name = "Normal"
  1649.     TextButton2.Parent = SurfaceGui1
  1650.     TextButton2.Size = UDim2.new(1, 0, 1, 0)
  1651.     TextButton2.BackgroundColor = BrickColor.new("Lime green")
  1652.     TextButton2.BackgroundColor3 = Color3.new(0, 1, 0)
  1653.     TextButton2.BorderSizePixel = 0
  1654.     TextButton2.Font = Enum.Font.SourceSans
  1655.     TextButton2.FontSize = Enum.FontSize.Size14
  1656.     TextButton2.Text = "NORMAL MODE"
  1657.     TextButton2.TextColor = BrickColor.new("Institutional white")
  1658.     TextButton2.TextColor3 = Color3.new(1, 1, 1)
  1659.     TextButton2.TextScaled = true
  1660.     TextButton2.TextSize = 14
  1661.     TextButton2.TextWrap = true
  1662.     TextButton2.TextWrapped = true
  1663.     normal.Parent = p1
  1664.     p2.Name = "Join"
  1665.     p2.Parent = main_folder
  1666.     p2.Position = Vector3.new(-3.75, 0.905, -348.865)
  1667.     p2.Size = Vector3.new(8, 1.8099997, 2.2099998)
  1668.     p2.Anchored = true
  1669.     p2.BottomSurface = Enum.SurfaceType.Smooth
  1670.     p2.Locked = true
  1671.     p2.TopSurface = Enum.SurfaceType.Smooth
  1672.     SurfaceGui11.Parent = p2
  1673.     SurfaceGui11.LightInfluence = 1
  1674.     SurfaceGui11.Face = Enum.NormalId.Back
  1675.     SurfaceGui11.ClipsDescendants = true
  1676.     SurfaceGui11.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  1677.     SurfaceGui11.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
  1678.     SurfaceGui11.PixelsPerStud = 100
  1679.     SurfaceGui11.Adornee = p2
  1680.     TextButton12.Name = "Hard"
  1681.     TextButton12.Parent = SurfaceGui11
  1682.     TextButton12.Size = UDim2.new(1, 0, 1, 0)
  1683.     TextButton12.BackgroundColor = BrickColor.new("Really red")
  1684.     TextButton12.BackgroundColor3 = Color3.new(1, 0, 0)
  1685.     TextButton12.BorderSizePixel = 0
  1686.     TextButton12.Font = Enum.Font.SourceSans
  1687.     TextButton12.FontSize = Enum.FontSize.Size14
  1688.     TextButton12.Text = "HARD MODE"
  1689.     TextButton12.TextColor = BrickColor.new("Institutional white")
  1690.     TextButton12.TextColor3 = Color3.new(1, 1, 1)
  1691.     TextButton12.TextScaled = true
  1692.     TextButton12.TextSize = 14
  1693.     TextButton12.TextWrap = true
  1694.     TextButton12.TextWrapped = true
  1695.     hard.Parent = p2
  1696.     return Part0,p1,p2,hard,normal,TextLabel2,ScrollingFrame3
  1697. end
  1698.  
  1699. function create_alive()
  1700.     local Part0 = Instance.new("Part")
  1701.     local SurfaceGui1 = Instance.new("SurfaceGui")
  1702.     local TextLabel2 = Instance.new("TextBox")
  1703.     local ScrollingFrame3 = Instance.new("ScrollingFrame")
  1704.     local UIListLayout4 = Instance.new("UIListLayout")
  1705.     Part0.Name = "Alive"
  1706.     Part0.Parent = main_folder
  1707.     Part0.CFrame = CFrame.new(18.5000134, 4.50000811, -348.969788, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1708.     Part0.Position = Vector3.new(18.5000134, 4.50000811, -348.969788)
  1709.     Part0.Size = Vector3.new(16, 9, 2)
  1710.     Part0.Anchored = true
  1711.     Part0.BottomSurface = Enum.SurfaceType.Smooth
  1712.     Part0.TopSurface = Enum.SurfaceType.Smooth
  1713.     SurfaceGui1.Parent = Part0
  1714.     SurfaceGui1.LightInfluence = 1
  1715.     SurfaceGui1.Face = Enum.NormalId.Back
  1716.     SurfaceGui1.ClipsDescendants = true
  1717.     SurfaceGui1.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  1718.     SurfaceGui1.Adornee = Part0
  1719.     SurfaceGui1.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
  1720.     SurfaceGui1.PixelsPerStud = 100
  1721.     TextLabel2.Name = "Title"
  1722.     TextLabel2.Parent = SurfaceGui1
  1723.     TextLabel2.Size = UDim2.new(1, 0, 0.200000003, 0)
  1724.     TextLabel2.BackgroundColor = BrickColor.new("Dirt brown")
  1725.     TextLabel2.BackgroundColor3 = Color3.new(0.254902, 0.254902, 0.254902)
  1726.     TextLabel2.Font = Enum.Font.SourceSans
  1727.     TextLabel2.FontSize = Enum.FontSize.Size14
  1728.     TextLabel2.Text = "Alive List"
  1729.     TextLabel2.TextColor = BrickColor.new("Institutional white")
  1730.     TextLabel2.TextColor3 = Color3.new(1, 1, 1)
  1731.     TextLabel2.TextScaled = true
  1732.     TextLabel2.TextSize = 14
  1733.     TextLabel2.TextWrap = true
  1734.     TextLabel2.TextWrapped = true
  1735.     ScrollingFrame3.Parent = SurfaceGui1
  1736.     ScrollingFrame3.Position = UDim2.new(0, 0, 0.200000003, 0)
  1737.     ScrollingFrame3.Size = UDim2.new(1, 0, 0.800000012, 0)
  1738.     ScrollingFrame3.Active = true
  1739.     ScrollingFrame3.BackgroundColor = BrickColor.new("Dark grey metallic")
  1740.     ScrollingFrame3.BackgroundColor3 = Color3.new(0.345098, 0.345098, 0.345098)
  1741.     UIListLayout4.Parent = ScrollingFrame3
  1742.     UIListLayout4.SortOrder = Enum.SortOrder.LayoutOrder
  1743.     return TextLabel2,ScrollingFrame3
  1744. end
  1745.  
  1746. function update_queue(scroll)
  1747.     for i,v in pairs(scroll:GetChildren()) do
  1748.         if not v:IsA("UIListLayout") then
  1749.             v:Destroy()
  1750.         end
  1751.     end
  1752.     for i,v in ipairs(queue) do
  1753.         if v and v.plr then
  1754.             local pt = Instance.new("TextBox")
  1755.             pt.Name = "Player"
  1756.             pt.Parent = scroll
  1757.             pt.Size = UDim2.new(1, 0, 0, 150)
  1758.             pt.BackgroundColor = BrickColor.new("Dark grey")
  1759.             pt.BackgroundColor3 = Color3.new(0.45098, 0.45098, 0.45098)
  1760.             pt.BorderColor = BrickColor.new("Institutional white")
  1761.             pt.BorderColor3 = Color3.new(1, 1, 1)
  1762.             pt.BorderSizePixel = 0
  1763.             pt.Font = Enum.Font.SourceSans
  1764.             pt.FontSize = Enum.FontSize.Size14
  1765.             pt.Text = v.plr.Name
  1766.             if v.mode == 1 then
  1767.                 pt.TextColor3 = Color3.new(0, 1, 0)
  1768.             elseif v.mode == 2 then
  1769.                 pt.TextColor3 = Color3.new(1, 0, 0)
  1770.             end
  1771.             pt.TextScaled = true
  1772.             pt.TextSize = 14
  1773.             pt.TextWrap = true
  1774.             pt.TextWrapped = true
  1775.         end
  1776.     end
  1777. end
  1778.  
  1779. function update_alive_list(title,scroll)
  1780.     for i,v in pairs(scroll:GetChildren()) do
  1781.         if not v:IsA("UIListLayout") then
  1782.             v:Destroy()
  1783.         end
  1784.     end
  1785.     for i,v in ipairs(alive) do
  1786.         if v and v.Parent and v.Health > 0 then
  1787.             local pt = Instance.new("TextBox")
  1788.             pt.Name = "Player"
  1789.             pt.Parent = scroll
  1790.             pt.Size = UDim2.new(1, 0, 0, 150)
  1791.             pt.BackgroundColor = BrickColor.new("Dark grey")
  1792.             pt.BackgroundColor3 = Color3.new(0.45098, 0.45098, 0.45098)
  1793.             pt.BorderColor = BrickColor.new("Institutional white")
  1794.             pt.BorderColor3 = Color3.new(1, 1, 1)
  1795.             pt.BorderSizePixel = 0
  1796.             pt.Font = Enum.Font.SourceSans
  1797.             pt.FontSize = Enum.FontSize.Size14
  1798.             local errored,reason = pcall(function()
  1799.                 pt.Text = game:GetService("Players"):GetPlayerFromCharacter(v.Parent).Name
  1800.             end)
  1801.             pt.TextScaled = true
  1802.             pt.TextSize = 14
  1803.             pt.TextWrap = true
  1804.             pt.TextWrapped = true
  1805.             if errored then
  1806.                 pt:Destroy()
  1807.             end
  1808.         end
  1809.     end
  1810.     title.Text = "Alive List("..#alive..")"
  1811. end
  1812.  
  1813. function update_alive()
  1814.     for i,v in pairs(alive) do
  1815.         if v and v.Parent and v.Health > 0 then
  1816.             v.WalkSpeed = 16
  1817.             --v.MaxHealth = 100 or 1
  1818.             v.JumpPower = 50
  1819.             v.BreakJointsOnDeath = true
  1820.             local char = v.Parent
  1821.             local plr = game:GetService("Players"):GetPlayerFromCharacter(char)
  1822.             if char then
  1823.                 for i,v in pairs(char:GetChildren()) do
  1824.                     if v:IsA("Tool") and v.Name ~= 'ClassicSword' then
  1825.                         v:Destroy()
  1826.                     end
  1827.                 end
  1828.             end
  1829.             if plr then
  1830.                 for i,v in pairs(plr:FindFirstChildOfClass("Backpack"):GetChildren()) do
  1831.                     if v:IsA("Tool") and v.Name ~= 'ClassicSword' then
  1832.                         v:Destroy()
  1833.                     end
  1834.                 end
  1835.             end
  1836.         else
  1837.             table.remove(alive,i)
  1838.         end
  1839.     end
  1840. end
  1841.  
  1842. function start()
  1843.     spawn(function()
  1844.         playing = true
  1845.         wait(1)
  1846.         local mid = math.random(1,#minigames)
  1847.         spawn(function()
  1848.             minigames[mid]()
  1849.         end)
  1850.         repeat wait(); until t > 0;
  1851.         repeat wait(1); t = t - 1; update_alive(); until 0 >= t or 0 >= #alive
  1852.         match_folder:ClearAllChildren()
  1853.         playing = false
  1854.     end)
  1855. end
  1856.  
  1857. function start_queue(title)
  1858.     repeat wait(1); title.Text = "Match in progress(" .. tostring(t) .. ")"; update_alive(); until not playing;
  1859.     title.Text = "Waiting for players.."
  1860.     repeat wait(1); update_alive(); until #queue >= 1 or #alive >= 1
  1861.     for i = 10,1,-1 do
  1862.         title.Text = "Intermission(" .. tostring(i) .. ")"
  1863.         wait(1)
  1864.     end
  1865.     for i,v in pairs(queue2) do
  1866.         if v then
  1867.             local char = v.Character
  1868.             if char then
  1869.                 local hum,torso
  1870.                 pcall(function()
  1871.                     torso = char:FindFirstChild("HumanoidRootPart")
  1872.                 end)
  1873.                 pcall(function()
  1874.                     hum = char:FindFirstChildOfClass("Humanoid")
  1875.                 end)
  1876.                 if torso and hum and hum.Health > 0 then
  1877.                     torso.CFrame = CFrame.new(main.Position+Vector3.new(math.random(-(main.Size.X-10)/2,(main.Size.X-10)/2),30,math.random(-(main.Size.Z-10)/2,(main.Size.Z-10)/2)))
  1878.                     table.insert(alive,1,hum)
  1879.                 end
  1880.             end
  1881.         end
  1882.     end
  1883.     for i,v in ipairs(queue) do
  1884.         if v.plr then
  1885.             local char = v.plr.Character
  1886.             if char then
  1887.                 local hum,torso
  1888.                 pcall(function()
  1889.                     torso = char:FindFirstChild("HumanoidRootPart")
  1890.                 end)
  1891.                 pcall(function()
  1892.                     hum = char:FindFirstChildOfClass("Humanoid")
  1893.                 end)
  1894.                 if torso and hum and hum.Health > 0 then
  1895.                     hum.Died:Connect(function()
  1896.                         table.remove(alive,table.find(alive,hum))
  1897.                     end)
  1898.                 end
  1899.             end
  1900.         end
  1901.         table.remove(queue,i)
  1902.     end
  1903.     for i,v in pairs(queue2) do
  1904.         queue2[i] = nil
  1905.     end
  1906.     start()
  1907.     start_queue(title)
  1908. end
  1909.  
  1910. function create_check()
  1911.     spawn(function()
  1912.         game:GetService("RunService").Heartbeat:Connect(function()
  1913.             local rg = Region3.new(Vector3.new(0, 36.9, -474.97)-(Vector3.new(250, 76.2, 250)/2.1),main.Position+(Vector3.new(250, 76.2, 250)/2.1))
  1914.             local objs = workspace:FindPartsInRegion3WithIgnoreList(rg,{script})
  1915.             for i,v in pairs(objs) do
  1916.                 if not v:IsDescendantOf(script) then else continue end
  1917.                 local char = v.Parent
  1918.                 local plr = game:GetService("Players"):GetPlayerFromCharacter(char)
  1919.                 local hum = char:FindFirstChildOfClass("Humanoid")
  1920.                 local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head")
  1921.                 if plr and torso and hum and not table.find(alive,hum) then
  1922.                     torso.CFrame = CFrame.new(math.random(-10,30), 5.5, -335)
  1923.                     continue;
  1924.                 end
  1925.             end
  1926.         end)
  1927.     end)
  1928. end
  1929.  
  1930. function setup_game(timer,pos,size)
  1931.     local part,p1,p2,hard,normal,title,scroll = create_queue()
  1932.     local ps = game:GetService("PhysicsService")
  1933.     pcall(function()
  1934.         ps:CreateCollisionGroup("plr char kry")
  1935.     end)
  1936.     ps:CollisionGroupSetCollidable("plr char kry","plr char kry",false)
  1937.     normal.MouseClick:Connect(function(plr)
  1938.         local found = false
  1939.         for i,v in ipairs(queue) do
  1940.             if v.plr.Name == plr.Name then
  1941.                 --if v.mode ~= 1 then
  1942.                     queue[i].mode = 1
  1943.                     found = true
  1944.                 --[[
  1945.                 else
  1946.                     return
  1947.                 end
  1948.                 ]]
  1949.             end
  1950.         end
  1951.         local char = plr.Character
  1952.         local hum
  1953.         if char then
  1954.             hum = char:FindFirstChildOfClass("Humanoid")
  1955.             local torso = char:FindFirstChild("HumanoidRootPart")
  1956.             if hum and torso then
  1957.                 queue2[torso] = plr
  1958.                 hum.MaxHealth = 100
  1959.                 hum.Health = 100
  1960.                 for i,v in ipairs(char:GetChildren()) do
  1961.                     if v:IsA("BasePart") or v:IsA("UnionOperation") then
  1962.                         ps:SetPartCollisionGroup(v,"plr char kry")
  1963.                     end
  1964.                 end
  1965.             end
  1966.         end
  1967.         if not found then
  1968.             local n = #queue+1
  1969.             table.insert(queue,n,{plr = plr,mode = 1})
  1970.         end
  1971.         update_queue(scroll)
  1972.     end)
  1973.     hard.MouseClick:Connect(function(plr)
  1974.         local found = false
  1975.         for i,v in ipairs(queue) do
  1976.             if v.plr.Name == plr.Name then
  1977.                 --if v.mode ~= 2 then
  1978.                     queue[i].mode = 2
  1979.                     found = true
  1980.                 --[[
  1981.                 else
  1982.                     return
  1983.                 end
  1984.                 ]]
  1985.             end
  1986.         end
  1987.         local char = plr.Character
  1988.         local hum
  1989.         if char then
  1990.             hum = char:FindFirstChildOfClass("Humanoid")
  1991.             local torso = char:FindFirstChild("HumanoidRootPart")
  1992.             if hum and torso then
  1993.                 queue2[torso] = plr
  1994.                 hum.MaxHealth = 1
  1995.                 hum.Health = 1
  1996.                 for i,v in ipairs(char:GetChildren()) do
  1997.                     if v:IsA("BasePart") or v:IsA("UnionOperation") then
  1998.                         ps:SetPartCollisionGroup(v,"plr char kry")
  1999.                     elseif v:IsA("ForceField") then
  2000.                         v:Destroy()
  2001.                     end
  2002.                 end
  2003.             end
  2004.         end
  2005.         if not found then
  2006.             local n = #queue+1
  2007.             table.insert(queue,n,{plr = plr,mode = 2})
  2008.         end
  2009.         update_queue(scroll)
  2010.     end)
  2011.     create_check()
  2012.     create_base()
  2013.     create_theme()
  2014.     local title2,scroll2 = create_alive()
  2015.     spawn(function()
  2016.         while wait(0.5) do
  2017.             update_queue(scroll)
  2018.             update_alive_list(title2,scroll2)
  2019.         end
  2020.     end)
  2021.     start_queue(title)
  2022. end
  2023.  
  2024. setup_game()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement