Advertisement
XZTablets

TDSController

May 22nd, 2020
1,297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 55.54 KB | None | 0 0
  1. -- Decompiled with the Synapse X Luau decompiler.
  2.  
  3. while true do
  4.     wait(1);
  5.     if workspace:FindFirstChild(game:GetService("Players").LocalPlayer.Name) then
  6.         break;
  7.     end;
  8. end;
  9. while true do
  10.     wait();
  11.     if shared() == true then
  12.         break;
  13.     end;
  14. end;
  15. while true do
  16.     wait();
  17.     if Module("Placement") then
  18.         break;
  19.     end;
  20. end;
  21. game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui"):SetTopbarTransparency(1);
  22. local v1 = Module("Maid");
  23. local v2 = Module("Network");
  24. local v3 = Module("Placement");
  25. local v4 = Module("Raycast");
  26. local v5 = Module("Signal");
  27. local v6 = Module("Create");
  28. local l__RunService__7 = game:GetService("RunService");
  29. local l__Players__8 = game:GetService("Players");
  30. local l__ReplicatedStorage__9 = game:GetService("ReplicatedStorage");
  31. local l__ContentProvider__10 = game:GetService("ContentProvider");
  32. local l__MarketplaceService__11 = game:GetService("MarketplaceService");
  33. local l__StarterGui__12 = game:GetService("StarterGui");
  34. local l__LocalPlayer__13 = l__Players__8.LocalPlayer;
  35. local l__UserInputService__14 = game:GetService("UserInputService");
  36. local l__ReplicatedStorage__15 = game:GetService("ReplicatedStorage");
  37. local l__Players__16 = game:GetService("Players");
  38. local l__Modules__17 = l__ReplicatedStorage__15:WaitForChild("Client"):WaitForChild("Modules");
  39. local l__TouchEnabled__18 = game:GetService("UserInputService").TouchEnabled;
  40. local v19 = require(l__Modules__17:WaitForChild("Hover"));
  41. local v20 = require(l__Modules__17:WaitForChild("PlaySound"));
  42. local v21 = require(l__Modules__17:WaitForChild("Broadcast"));
  43. local v22 = require(l__Modules__17:WaitForChild("Comma"));
  44. v2:On("Event", "Message", "Show", v21);
  45. local l__SFX__23 = l__ReplicatedStorage__15:WaitForChild("Client"):WaitForChild("SFX");
  46. local l__Move__24 = script.Parent:WaitForChild("Upgrade"):WaitForChild("Move");
  47. local l__Move__25 = script.Parent:WaitForChild("Settings"):WaitForChild("Move");
  48. local v26 = { script.Parent:WaitForChild("Settings"):WaitForChild("Move"):WaitForChild("Close"), script.Parent:WaitForChild("Upgrade"):WaitForChild("Move"):WaitForChild("Close") };
  49. l__StarterGui__12:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false);
  50. local v27 = { l__Move__25:WaitForChild("Buttons"):WaitForChild("Music"):WaitForChild("Frame"), l__Move__25:WaitForChild("Buttons"):WaitForChild("Muzzle"):WaitForChild("Frame"), l__Move__25:WaitForChild("Buttons"):WaitForChild("Translucent"):WaitForChild("Frame"), l__Move__25:WaitForChild("Buttons"):WaitForChild("Explosion"):WaitForChild("Frame"), l__Move__25:WaitForChild("Buttons"):WaitForChild("Sounds"):WaitForChild("Frame") };
  51. local u1 = {};
  52. function addComas(p1)
  53.     local v28 = "" .. p1;
  54.     return #v28 % 3 == 0 and v28:reverse():gsub("(%d%d%d)", "%1,"):reverse():sub(2) or v28:reverse():gsub("(%d%d%d)", "%1,"):reverse();
  55. end;
  56. local l__Loading__2 = script.Parent.Loading;
  57. local u3 = true;
  58. local function u4()
  59.     l__Loading__2.Visible = true;
  60.     while u3 do
  61.         for v29 = 1, 3 do
  62.             local v30 = nil;
  63.             v30 = "Fetching Data";
  64.             for v31 = 1, v29 do
  65.                 v30 = v30 .. ".";
  66.             end;
  67.             l__Loading__2.Status.Text = local v32;
  68.             if not u3 then
  69.                 break;
  70.             end;
  71.             local v33 = l__Loading__2.Frame[tostring(v29)];
  72.             v33:TweenSize(UDim2.new(0, 75, 0, 75), "Out", "Sine", 0.5, true);
  73.             wait(0.5);
  74.             v33:TweenSize(UDim2.new(0, 50, 0, 50), "In", "Sine", 0.5, true);
  75.             wait(0.5);
  76.         end;   
  77.     end;
  78.     l__Loading__2.Visible = false;
  79. end;
  80. spawn(function()
  81.     u4();
  82. end);
  83. v19(script.Parent:WaitForChild("Holder"):WaitForChild("Troops"):GetChildren(), 5);
  84. v19(script.Parent:WaitForChild("Holder"):WaitForChild("Tabs"):GetChildren(), 5);
  85. v19(script.Parent:WaitForChild("DiffVote"):WaitForChild("Move"):WaitForChild("Buttons"):GetChildren(), 5);
  86. v19(script.Parent:WaitForChild("Upgrade"):WaitForChild("Move"):WaitForChild("Specials"):GetChildren(), 5);
  87. v19(v27, 3);
  88. local v34 = {};
  89. for v35, v36 in pairs(l__ReplicatedStorage__9.Towers:GetChildren()) do
  90.     v34[v36.Name] = {
  91.         Stats = v36:FindFirstChild("Stats") and require(v36.Stats)
  92.     };
  93. end;
  94. local function u5(p2)
  95.     local l__TouchGui__37 = l__LocalPlayer__13.PlayerGui:FindFirstChild("TouchGui");
  96.     if l__TouchGui__37 then
  97.         local l__TouchControlFrame__38 = l__TouchGui__37:FindFirstChild("TouchControlFrame");
  98.         if l__TouchControlFrame__38 then
  99.             l__TouchControlFrame__38.JumpButton.Visible = p2;
  100.             l__TouchControlFrame__38.RunButton.Visible = p2;
  101.             l__TouchControlFrame__38.TauntButton.Visible = p2;
  102.         end;
  103.     end;
  104. end;
  105. local u6 = nil;
  106. local function u7(p3, p4)
  107.     if p3 then
  108.         for v39, v40 in pairs(p3.HumanoidRootPart:WaitForChild("Ring"):GetChildren()) do
  109.             if v40:IsA("Beam") then
  110.                 v40.Enabled = p4;
  111.             end;
  112.         end;
  113.     end;
  114. end;
  115. local u8 = v1.new();
  116. local l__Upgrade__9 = script.Parent:WaitForChild("Upgrade");
  117. function CloseUpgradeFrame()
  118.     u5(true);
  119.     if not u6 then
  120.         return;
  121.     end;
  122.     if u6:FindFirstChild("RingPath") then
  123.         u6.RingPath.Transparency = 1;
  124.     end;
  125.     if u6.Type.Value == "Void Miner" then
  126.         u6.HumanoidRootPart.Collected.Enabled = false;
  127.     end;
  128.     u7(u6, true);
  129.     u8:Sweep();
  130.     l__Upgrade__9.Move.Active = false;
  131.     l__Upgrade__9.Move:TweenPosition(UDim2.new(0.5, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
  132.     if l__TouchEnabled__18 == false then
  133.         if l__ReplicatedStorage__9.State.Mode.Value == "Versus" then
  134.             script.Parent.Queue.Move:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
  135.         end;
  136.     end;
  137.     local l__HumanoidRootPart__41 = u6:FindFirstChild("HumanoidRootPart");
  138.     if l__HumanoidRootPart__41 then
  139.         if l__HumanoidRootPart__41:FindFirstChild("MusicGui") then
  140.             local l__MusicGui__42 = script:FindFirstChild("MusicGui");
  141.             if l__MusicGui__42 then
  142.                 l__MusicGui__42.Enabled = false;
  143.                 l__MusicGui__42.Adornee = nil;
  144.             end;
  145.         end;
  146.     end;
  147. end;
  148. local v43 = { "First", "Closest", "Strongest" };
  149. local v44 = {};
  150. local u10 = {};
  151. function v44.Start(p5, p6, p7)
  152.     if not u10[p6] then
  153.         u10[p6] = {
  154.             Active = true,
  155.             Signals = {},
  156.             Time = 0
  157.         };
  158.     else
  159.         u10[p6].Active = true;
  160.     end;
  161.     local v45 = p7;
  162.     while true do
  163.         v45 = v45 - 1;
  164.         for v46, v47 in pairs(u10[p6].Signals) do
  165.             v47:Fire(v45);
  166.         end;
  167.         u10[p6].Time = v45;
  168.         wait(1);
  169.         if v45 <= 0 then
  170.             break;
  171.         end;   
  172.     end;
  173.     u10[p6].Time = 0;
  174.     u10[p6].Active = false;
  175. end;
  176. function v44.Connect(p8, p9, p10)
  177.     if not u10[p9] then
  178.         u10[p9] = {
  179.             Active = false,
  180.             Signals = {},
  181.             Time = 0
  182.         };
  183.     end;
  184.     local v48 = v5.new();
  185.     table.insert(u10[p9].Signals, v48);
  186.     return v48:Connect(p10);
  187. end;
  188. function v44.Get(p11, p12)
  189.     return u10[p12];
  190. end;
  191. u10 = {};
  192. function OpenUpgradeFrame(p13)
  193.     CloseUpgradeFrame();
  194.     u5(false);
  195.     u6 = p13;
  196.     u7(u6, false);
  197.     l__Upgrade__9.Move:TweenPosition(UDim2.new(0.5, 0, 0, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 0.2, true);
  198.     l__Upgrade__9.Move.Active = true;
  199.     if l__TouchEnabled__18 == false then
  200.         if l__ReplicatedStorage__9.State.Mode.Value == "Versus" then
  201.             script.Parent.Queue.Move:TweenPosition(UDim2.new(-1.2, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
  202.         end;
  203.     end;
  204.     local l__HumanoidRootPart__49 = p13:FindFirstChild("HumanoidRootPart");
  205.     if l__HumanoidRootPart__49 then
  206.         if l__HumanoidRootPart__49:FindFirstChild("MusicGui") then
  207.             local l__MusicGui__50 = script:FindFirstChild("MusicGui");
  208.             l__MusicGui__50.Enabled = true;
  209.             if l__MusicGui__50 then
  210.                 local l__Main__51 = l__MusicGui__50:WaitForChild("Main");
  211.                 u8:Mark(l__Main__51.Input.TextBox.FocusLost:Connect(function()
  212.                     local v52, v53 = pcall(function()
  213.                         return tonumber(l__Main__51.Input.TextBox.Text);
  214.                     end);
  215.                     if v52 then
  216.                         if v53 then
  217.                             l__ContentProvider__10:PreloadAsync({ "rbxassetid://" .. v53 }, function()
  218.                                 if l__RunService__7:IsStudio() then
  219.                                     warn("Loaded");
  220.                                 end;
  221.                             end);
  222.                             local v54, v55 = pcall(function()
  223.                                 return l__MarketplaceService__11:GetProductInfo(v53);
  224.                             end);
  225.                             u10[v53] = v54 and v55 or nil;
  226.                         end;
  227.                     end;
  228.                 end));
  229.                 u8:Mark(l__Main__51.Play.Detector.MouseButton1Down:Connect(function()
  230.                     local v56 = nil;
  231.                     v20(l__SFX__23.Click);
  232.                     local v57 = nil;
  233.                     v57, v56 = pcall(function()
  234.                         return tonumber(l__Main__51.Input.TextBox.Text);
  235.                     end);
  236.                     if v57 then
  237.                         if v56 then
  238.  
  239.                         else
  240.                             v20(l__SFX__23.Error);
  241.                             return;
  242.                         end;
  243.                     else
  244.                         v20(l__SFX__23.Error);
  245.                         return;
  246.                     end;
  247.                     if v2:InvokeServer("Towers", "Execute", {
  248.                         Tower = p13,
  249.                         Name = "Music",
  250.                         Data = { v56 }
  251.                     }) then
  252.  
  253.                     else
  254.                         v20(l__SFX__23.Error);
  255.                         return;
  256.                     end;
  257.                     local v58 = u10[v56];
  258.                     if not v58 then
  259.                         local v59, v60 = pcall(function()
  260.                             return l__MarketplaceService__11:GetProductInfo(v56);
  261.                         end);
  262.                         v58 = v59 and v60 or {};
  263.                     end;
  264.                     l__Main__51.SongName.Text = v58.Name and "Untitled Song";
  265.                 end));
  266.                 l__MusicGui__50.Adornee = l__HumanoidRootPart__49;
  267.             end;
  268.         end;
  269.     end;
  270.     local function v61()
  271.         l__Upgrade__9.Move.Stats.Damage.TextLabel.Text = "Damage: " .. u6.Damage.Value;
  272.         l__Upgrade__9.Move.Stats.Firerate.TextLabel.Text = "Firerate: " .. u6.Cooldown.Value;
  273.         l__Upgrade__9.Move.Stats.Range.TextLabel.Text = "Range: " .. u6.Range.Value;
  274.     end;
  275.     local u11 = nil;
  276.     local function v62(p14)
  277.         if u11 then
  278.             u11:Destroy();
  279.         end;
  280.         p14 = p14 + p14 * (u6.Display.Range.Value / 100);
  281.         u11 = l__ReplicatedStorage__9:WaitForChild("Effects"):WaitForChild("RangePart"):Clone();
  282.         u11.Size = Vector3.new(p14 * 2, 0.3, p14 * 2);
  283.         u11.CFrame = p13.HumanoidRootPart.GridPart.CFrame;
  284.         u11.Color = Color3.fromRGB(13, 105, 172);
  285.         u11.Parent = workspace.CurrentCamera;
  286.         u8:Mark(u11);
  287.         if u6.Type.Value == "Ace Pilot" then
  288.             u6.RingPath.Transparency = 0.3;
  289.             u8:Mark(u11, l__RunService__7.RenderStepped:Connect(function()
  290.                 u11.Position = u6.FlightPos.Range.WorldPosition;
  291.             end));
  292.         elseif u6.Type.Value == "Void Miner" then
  293.             u6.HumanoidRootPart.Collected.Enabled = true;
  294.         end;
  295.         return u11;
  296.     end;
  297.     local l__Range__63 = p13:WaitForChild("Range");
  298.     u8:Mark(l__Range__63.Changed:Connect(v62));
  299.     v62(l__Range__63.Value);
  300.     v61();
  301.     local v64, v65, v66 = pairs(l__Upgrade__9.Move:WaitForChild("Upgrades"):GetChildren());
  302.     while true do
  303.         local v67, v68 = v64(v65, v66);
  304.         if v67 then
  305.  
  306.         else
  307.             break;
  308.         end;
  309.         v66 = v67;
  310.         if v68:IsA("Frame") then
  311.             v68.BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  312.         end;   
  313.     end;
  314.     local l__Upgrade__69 = p13:WaitForChild("Upgrade");
  315.     local function v70(p15)
  316.         local l__Move__71 = l__Upgrade__9:WaitForChild("Move");
  317.         local v72 = 1 - 1;
  318.         while true do
  319.             local v73 = l__Move__71:WaitForChild("Upgrades"):FindFirstChild(v72);
  320.             if v73 then
  321.                 v73.BackgroundColor3 = Color3.fromRGB(0, 255, 3);
  322.             end;
  323.             if 0 <= 1 then
  324.                 if v72 < p15 then
  325.  
  326.                 else
  327.                     break;
  328.                 end;
  329.             elseif p15 < v72 then
  330.  
  331.             else
  332.                 break;
  333.             end;
  334.             v72 = v72 + 1;     
  335.         end;
  336.         l__Move__71:WaitForChild("Level").Text = "Level " .. p15;
  337.     end;
  338.     u8:Mark(l__Upgrade__69.Changed:Connect(v70));
  339.     v70(l__Upgrade__69.Value);
  340.     local function v74(p16)
  341.         if p16 then
  342.             p16 = math.floor(math.clamp(p16 - p16 * (u6.Display.Discount.Value / 100), 0, math.huge));
  343.         end;
  344.         if p16 then
  345.             l__Upgrade__9.Move.Upgrade.ImageColor3 = Color3.fromRGB(142, 255, 37);
  346.             l__Upgrade__9.Move.Upgrade.Detector.Text = "Upgrade: $" .. addComas(math.floor(p16));
  347.             return;
  348.         end;
  349.         if p16 then
  350.             if p16 <= 0 then
  351.                 l__Upgrade__9.Move.Upgrade.ImageColor3 = Color3.fromRGB(142, 255, 37);
  352.                 l__Upgrade__9.Move.Upgrade.Detector.Text = "Upgrade: FREE";
  353.                 return;
  354.             end;
  355.         end;
  356.         l__Upgrade__9.Move.Upgrade.ImageColor3 = Color3.fromRGB(139, 139, 139);
  357.         l__Upgrade__9.Move.Upgrade.Detector.Text = "Fully Upgraded";
  358.     end;
  359.     local function v75()
  360.         local v76 = v34[u6.Type.Value].Stats.UpgradeNames and v34[u6.Type.Value].Stats.UpgradeNames[u6.Upgrade.Value + 1];
  361.         l__Upgrade__9.Move.UpgradeName.Text = v76 and "Next Upgrade: " .. v76 or "";
  362.     end;
  363.     local function v77()
  364.         l__Upgrade__9.Move.Icon.Icon.Image = "rbxassetid://" .. (v34[u6.Type.Value].Stats.Images and v34[u6.Type.Value].Stats.Images[u6.Upgrade.Value + 1] or v34[u6.Type.Value].Stats.Images[u6.Upgrade.Value]) and "";
  365.     end;
  366.     v74((v2:InvokeServer("Towers", "Upgrade", "Get", {
  367.         Tower = u6
  368.     })));
  369.     v75();
  370.     v77();
  371.     l__Upgrade__9.Move.TroopName.Text = u6.Type.Value;
  372.     u8:Mark(l__Upgrade__9.Move.Upgrade.Detector.MouseButton1Click:Connect(function()
  373.         local v78 = v2:InvokeServer("Towers", "Upgrade", "Set", {
  374.             Tower = u6
  375.         });
  376.         if not v78 then
  377.             v20(l__SFX__23.Error);
  378.             return v21({
  379.                 Text = "Not enough money!",
  380.                 Color = Color3.fromRGB(236, 0, 0)
  381.             });
  382.         end;
  383.         if v78 == true then
  384.             v74();
  385.         else
  386.             v20(l__SFX__23.Purchase);
  387.             v74(v78);
  388.         end;
  389.         l__Upgrade__9.Move.TroopName.Text = u6.Type.Value;
  390.         v75();
  391.         v77();
  392.         v61();
  393.     end));
  394.     l__Upgrade__9.Move.Target.Detector.Text = v2:InvokeServer("Towers", "Mode", "Get", {
  395.         Tower = u6
  396.     });
  397.     u8:Mark(l__Upgrade__9.Move.Target.Detector.MouseButton1Click:Connect(function()
  398.         l__Upgrade__9.Move.Target.Detector.Text = v2:InvokeServer("Towers", "Mode", "Set", {
  399.             Tower = u6
  400.         });
  401.     end));
  402.     local v79 = v34[u6.Type.Value].Stats and v34[u6.Type.Value].Stats.Abilities or {};
  403.     local v80, v81, v82 = pairs({ l__Upgrade__9.Move.Specials.Ability1, l__Upgrade__9.Move.Specials.Ability2, l__Upgrade__9.Move.Specials.Ability3 });
  404.     while true do
  405.         local v83, v84 = v80(v81, v82);
  406.         if v83 then
  407.  
  408.         else
  409.             break;
  410.         end;
  411.         v82 = v83;
  412.         local v85 = v79[v83];
  413.         if v85 then
  414.             v84.Active = true;
  415.             v84.Visible = true;
  416.             if v85.Price == 0 then
  417.                 local v86 = "";
  418.             else
  419.                 v86 = "$" .. v85.Price;
  420.             end;
  421.             v84.Price.Text = v86;
  422.             u8:Mark(v84.Detector.MouseButton1Click:Connect(function()
  423.                 if v44:Get(u6) then
  424.                     if not v44:Get(u6).Active then
  425.                         if v2:InvokeServer("Towers", "Abilities", "Activate", {
  426.                             Tower = u6,
  427.                             Index = v85.Name
  428.                         }) then
  429.                             v44:Start(u6, v85.Debounce);
  430.                         end;
  431.                     end;
  432.                 end;
  433.             end));
  434.             u8:Mark(l__Upgrade__69.Changed:Connect(function(p17)
  435.                 if v85.Level <= p17 then
  436.                     v84.Visible = true;
  437.                 end;
  438.             end));
  439.             if l__Upgrade__69.Value < v85.Level then
  440.                 v84.Visible = false;
  441.             end;
  442.             if v44:Get(u6) then
  443.                 local l__Time__87 = v44:Get(u6).Time;
  444.                 if l__Time__87 <= 0 then
  445.                     local v88 = "";
  446.                 else
  447.                     v88 = l__Time__87;
  448.                 end;
  449.                 v84.Count.Text = v88;
  450.             end;
  451.             u8:Mark(v44:Connect(u6, function(p18)
  452.                 if p18 <= 0 then
  453.                     local v89 = "";
  454.                 else
  455.                     v89 = p18;
  456.                 end;
  457.                 v84.Count.Text = v89;
  458.             end));
  459.             v84.Icon.Image = "rbxassetid://" .. v85.Icon;
  460.         else
  461.             v84.Active = false;
  462.             v84.Visible = false;
  463.             v84.Icon.Image = "rbxassetid://0";
  464.         end;   
  465.     end;
  466.     l__Upgrade__9.Move.Icon.Damage.Text = "Total Damage: " .. u6:WaitForChild("Damage").Value;
  467.     u8:Mark(u6:WaitForChild("Damage").Changed:Connect(function(p19)
  468.         l__Upgrade__9.Move.Icon.Damage.Text = "Total Damage: " .. p19;
  469.     end));
  470.     local function v90()
  471.         local v91 = v34[u6.Type.Value].Stats.Desc[l__Upgrade__69.Value + 1];
  472.         if v91 then
  473.             l__Upgrade__9.Move.Description.Text = table.concat(v91, "\n");
  474.         end;
  475.     end;
  476.     u8:Mark(l__Upgrade__69.Changed:Connect(v90));
  477.     v90();
  478.     if u6:FindFirstChild("Units") then
  479.         local l__Units__92 = u6.Units;
  480.         local function v93(p20, p21)
  481.             local v94 = l__ReplicatedStorage__9:WaitForChild("Effects"):WaitForChild("RangePart"):Clone();
  482.             v94.Size = Vector3.new(p21 * 2, 0.3, p21 * 2);
  483.             v94.Color = Color3.fromRGB(13, 105, 172);
  484.             v94.Parent = workspace.CurrentCamera;
  485.             u8:Mark(v94);
  486.             u8:Mark(l__RunService__7.RenderStepped:Connect(function()
  487.                 if p20:IsDescendantOf(workspace) then
  488.                     v94.Position = p20.HumanoidRootPart.Range.WorldPosition;
  489.                     return;
  490.                 end;
  491.                 if v94.Parent then
  492.                     v94:Destroy();
  493.                 end;
  494.             end));
  495.             return v94;
  496.         end;
  497.         local v95, v96, v97 = pairs(l__Units__92:GetChildren());
  498.         while true do
  499.             local v98, v99 = v95(v96, v97);
  500.             if v98 then
  501.  
  502.             else
  503.                 break;
  504.             end;
  505.             v97 = v98;
  506.             v93(v99.Value, v99.Value.Range.Value);     
  507.         end;
  508.         u8:Mark(l__Units__92.ChildAdded:Connect(function(p22)
  509.             v93(p22.Value, p22.Value.Range.Value);
  510.         end));
  511.     end;
  512.     u8:Mark(l__Move__24.Sell.Detector.MouseButton1Click:Connect(function()
  513.         if v2:InvokeServer("Towers", "Sell", u6) then
  514.             CloseUpgradeFrame();
  515.         end;
  516.     end));
  517.     local function v100(p23)
  518.         l__Move__24.Sell.Detector.Text = "Sell $" .. math.floor(p23 / 3);
  519.     end;
  520.     u8:Mark(u6.Worth.Changed:Connect(v100));
  521.     v100(u6.Worth.Value);
  522.     u8:Mark(u6.Display.Cooldown.Changed:Connect(function(p24)
  523.         l__Move__24.Icon.Buffs.Firerate.Amount.Text = "+" .. p24 / 100 * 10000 .. "%";
  524.         l__Move__24.Icon.Buffs.Firerate.Visible = 0 < u6.Display.Cooldown.Value;
  525.     end));
  526.     u8:Mark(u6.Display.Damage.Changed:Connect(function(p25)
  527.         l__Move__24.Icon.Buffs.Strength.Amount.Text = "+" .. p25 .. "%";
  528.         l__Move__24.Icon.Buffs.Strength.Visible = 0 < u6.Display.Damage.Value;
  529.     end));
  530.     u8:Mark(u6.Display.Range.Changed:Connect(function(p26)
  531.         l__Move__24.Icon.Buffs.Range.Amount.Text = "+" .. p26 .. "%";
  532.         l__Move__24.Icon.Buffs.Range.Visible = 0 < u6.Display.Range.Value;
  533.     end));
  534.     u8:Mark(u6.Display.Discount.Changed:Connect(function(p27)
  535.         l__Move__24.Icon.Buffs.Discount.Amount.Text = "+" .. p27 .. "%";
  536.         l__Move__24.Icon.Buffs.Discount.Visible = 0 < u6.Display.Discount.Value;
  537.     end));
  538.     l__Move__24.Icon.Buffs.Firerate.Visible = 0 < u6.Display.Cooldown.Value;
  539.     l__Move__24.Icon.Buffs.Strength.Visible = 0 < u6.Display.Damage.Value;
  540.     l__Move__24.Icon.Buffs.Discount.Visible = 0 < u6.Display.Discount.Value;
  541.     l__Move__24.Icon.Buffs.Range.Visible = 0 < u6.Display.Range.Value;
  542.     l__Move__24.Icon.Buffs.Firerate.Amount.Text = "+" .. u6.Display.Cooldown.Value .. "%";
  543.     l__Move__24.Icon.Buffs.Strength.Amount.Text = "+" .. u6.Display.Damage.Value .. "%";
  544.     l__Move__24.Icon.Buffs.Discount.Amount.Text = "+" .. u6.Display.Discount.Value .. "%";
  545.     l__Move__24.Icon.Buffs.Range.Amount.Text = "+" .. u6.Display.Range.Value .. "%";
  546. end;
  547. local u12 = v4.new("Blacklist", { workspace:WaitForChild("Map"):FindFirstChild("Regions"), workspace:WaitForChild("Map"):FindFirstChild("Confetti"), l__LocalPlayer__13.Character });
  548. local u13 = function(p28, p29)
  549.     if p28 and p29 then
  550.         while true do
  551.             local v101 = p28:FindFirstChild(p29);
  552.             if v101 then
  553.                 return v101;
  554.             end;
  555.             p28 = p28.Parent;
  556.             if not p28 then
  557.                 break;
  558.             end;
  559.             if not p28:IsDescendantOf(workspace) then
  560.                 break;
  561.             end;       
  562.         end;
  563.     end;
  564. end;
  565. local function u14()
  566.     local v102 = u12:CastMouse();
  567.     if v102.Hit then
  568.         local v103 = u13(v102.Hit, "Owner");
  569.         if v103 and v103.Value == l__Players__8.LocalPlayer and v102.Hit.Name ~= "GridPart" and v102.Hit.Name ~= "RingPath" then
  570.             local l__Parent__104 = v103.Parent;
  571.             if l__Parent__104 then
  572.                 OpenUpgradeFrame(l__Parent__104);
  573.             end;
  574.         end;
  575.     end;
  576. end;
  577. l__UserInputService__14.InputBegan:Connect(function(p30, p31)
  578.     if p31 then
  579.         return;
  580.     end;
  581.     if p30.UserInputType == Enum.UserInputType.MouseButton1 then
  582.         u14();
  583.         return;
  584.     end;
  585.     if p30.UserInputType == Enum.UserInputType.Touch then
  586.         u14();
  587.     end;
  588. end);
  589. l__Upgrade__9.Move.Close.Detector.MouseButton1Click:Connect(function()
  590.     CloseUpgradeFrame();
  591. end);
  592. u12 = v1.new;
  593. u12 = u12();
  594. u13 = v2.InvokeServer;
  595. u13 = u13(v2, "Session", "Inventory");
  596. u3 = false;
  597. local v105 = {};
  598. for v106, v107 in pairs(l__ReplicatedStorage__9.Towers:GetChildren()) do
  599.     v105[v107.Name] = {
  600.         Stats = require(v107.Stats),
  601.         Skins = v107.Skins
  602.     };
  603. end;
  604. local l__Holder__108 = script.Parent:WaitForChild("Holder");
  605. local u15 = { l__Holder__108.Troops:WaitForChild("Troop1"), l__Holder__108.Troops:WaitForChild("Troop2"), l__Holder__108.Troops:WaitForChild("Troop3"), l__Holder__108.Troops:WaitForChild("Troop4"), l__Holder__108.Troops:WaitForChild("Troop5") };
  606. local u16 = v2:InvokeServer("Session", "Get").Equipped;
  607. local u17 = v105;
  608. local u18 = {
  609.     Enabled = false,
  610.     Current = nil,
  611.     Tower = ""
  612. };
  613. local u19 = l__Holder__108;
  614. function reloadTroops()
  615.     local v109 = nil;
  616.     u12:Sweep();
  617.     local v110, v111, v112 = pairs(u15);
  618.     while true do
  619.         local v113, v114 = v110(v111, v112);
  620.         if v113 then
  621.  
  622.         else
  623.             break;
  624.         end;
  625.         v112 = v113;
  626.         v114.Icon.Image = "rbxassetid://3957544328";
  627.         v114.Icon.ImageTransparency = 0.7;
  628.         v114.Icon.ImageColor3 = Color3.fromRGB(0, 0, 0);
  629.         v114.Label.Text = "Empty";
  630.         v114.Label.TextColor3 = Color3.fromRGB(255, 255, 255);
  631.         v114.Lock.Visible = false; 
  632.     end;
  633.     v109 = u15[5];
  634.     if 10 <= l__LocalPlayer__13.Level.Value then
  635.         v109.Lock.Visible = false;
  636.         v109.Level.Visible = false;
  637.         v109.Label.Visible = true;
  638.     else
  639.         v109.Level.Visible = true;
  640.         v109.Lock.Visible = true;
  641.         v109.Label.Visible = false;
  642.     end;
  643.     local v115, v116, v117 = pairs(u15);
  644.     while true do
  645.         local v118, v119 = v115(v116, v117);
  646.         if v118 then
  647.  
  648.         else
  649.             break;
  650.         end;
  651.         v117 = v118;
  652.         local v120 = u16.Troops[v118];
  653.         if v120 then
  654.             local v121 = u17[v120];
  655.             local v122 = u13.Troops[v120] and u13.Troops[v120].Skin;
  656.             if v121 then
  657.                 if v122 then
  658.                     v119.Icon.ImageTransparency = 0;
  659.                     v119.Icon.ImageColor3 = Color3.fromRGB(255, 255, 255);
  660.                     v119.Label.TextColor3 = Color3.fromRGB(106, 235, 0);
  661.                     if v121.Stats.Skins ~= nil then
  662.                         if v122 ~= "Default" then
  663.                             v119.Icon.Image = "rbxassetid://" .. v121.Stats.Skins[v122];
  664.                         else
  665.                             v119.Icon.Image = "rbxassetid://" .. v121.Stats.Icon;
  666.                         end;
  667.                     else
  668.                         v119.Icon.Image = "rbxassetid://" .. v121.Stats.Icon;
  669.                     end;
  670.                     v119.Label.Text = "$" .. addComas(math.floor(v121.Stats.Price * l__ReplicatedStorage__9.State.PriceScale.Value));
  671.                     u12:Mark(v119.Detector.MouseButton1Click:Connect(function()
  672.                         if l__LocalPlayer__13.Cash.Value < v121.Stats.Price * l__ReplicatedStorage__9.State.PriceScale.Value then
  673.                             v20(l__SFX__23.Error);
  674.                             return v21({
  675.                                 Text = "Not enough money!",
  676.                                 Color = Color3.fromRGB(236, 0, 0)
  677.                             });
  678.                         end;
  679.                         if u18.Current then
  680.                             u18.Current:Stop();
  681.                             u18.Current = nil;
  682.                             v3:ViewBoundaries(false);
  683.                         end;
  684.                         local v123 = u13.Troops[v120] and v121.Skins[u13.Troops[v120].Skin];
  685.                         if v123 then
  686.                             u18.Tower = v120;
  687.                             u18.Current = v3.new(v120);
  688.                             u18.Current:Start(v123, v121.Stats.Range, v121.Stats.Class);
  689.                             v3:ViewBoundaries(true);
  690.                             if l__TouchEnabled__18 then
  691.                                 u19.Rotate.Visible = true;
  692.                                 u19.Trash.Visible = true;
  693.                             else
  694.                                 u19["Stats Bar"].CancelTip.Visible = true;
  695.                                 u19["Stats Bar"].RotateTip.Visible = true;
  696.                             end;
  697.                             CloseUpgradeFrame();
  698.                         end;
  699.                     end));
  700.                 end;
  701.             end;
  702.         end;   
  703.     end;
  704. end;
  705. reloadTroops();
  706. u19.Rotate.Detector.MouseButton1Click:Connect(function()
  707.     if u18.Current then
  708.         u18.Current:Rotate();
  709.         v20(l__SFX__23.Zoom);
  710.     end;
  711. end);
  712. u19.Trash.Detector.MouseButton1Click:Connect(function()
  713.     if u18.Current then
  714.         u18.Current:Stop();
  715.         u18.Current = nil;
  716.         v3:ViewBoundaries(false);
  717.         v20(l__SFX__23.Trash);
  718.         u19.Rotate.Visible = false;
  719.         u19.Trash.Visible = false;
  720.     end;
  721. end);
  722. for v124, v125 in pairs(script.Parent:WaitForChild("Holder"):WaitForChild("Troops"):GetChildren()) do
  723.     if v125:IsA("ImageLabel") then
  724.         v125.Detector.MouseButton1Click:Connect(function()
  725.             v20(l__SFX__23.Click);
  726.         end);
  727.     end;
  728. end;
  729. local l__mouse__126 = game.Players.LocalPlayer:GetMouse();
  730. l__UserInputService__14.InputBegan:Connect(function(p32, p33)
  731.     if p32.UserInputType == Enum.UserInputType.Keyboard then
  732.         local l__KeyCode__127 = p32.KeyCode;
  733.         if u18.Current then
  734.             if l__KeyCode__127 == Enum.KeyCode.R then
  735.                 u18.Current:Rotate();
  736.                 v20(l__SFX__23.Zoom);
  737.                 return;
  738.             end;
  739.             if l__KeyCode__127 == Enum.KeyCode.Q then
  740.                 if u18.Current then
  741.                     u18.Current:Stop();
  742.                     u18.Current = nil;
  743.                     v3:ViewBoundaries(false);
  744.                 end;
  745.                 u19.Rotate.Visible = false;
  746.                 u19.Trash.Visible = false;
  747.                 u19["Stats Bar"].CancelTip.Visible = false;
  748.                 u19["Stats Bar"].RotateTip.Visible = false;
  749.                 v20(l__SFX__23.Trash);
  750.             end;
  751.         end;
  752.     end;
  753. end);
  754. local u20 = 0;
  755. local function u21()
  756.     local v128 = nil;
  757.     if l__TouchEnabled__18 and u18.Current then
  758.         if tick() - u20 >= 0.4 then
  759.             u20 = tick();
  760.             return;
  761.         end;
  762.         u20 = tick();
  763.     end;
  764.     if u18.Current then
  765.         local v129 = nil;
  766.         v128, v129 = u18.Current:Place();
  767.         if v128.Message then
  768.             v20(l__SFX__23.Error);
  769.             v21({
  770.                 Text = v128.Message,
  771.                 Color = Color3.fromRGB(255, 255, 255)
  772.             });
  773.         end;
  774.         if v128.Quit then
  775.             u18.Current:Stop();
  776.             u19.Rotate.Visible = false;
  777.             u19.Trash.Visible = false;
  778.             u18.Current = nil;
  779.             v3:ViewBoundaries(false);
  780.             u19["Stats Bar"].CancelTip.Visible = false;
  781.             u19["Stats Bar"].RotateTip.Visible = false;
  782.             return;
  783.         end;
  784.         if not v128.Tower then
  785.             return;
  786.         end;
  787.     else
  788.         return;
  789.     end;
  790.     local l__Tower__130 = v128.Tower;
  791.     v3:ViewBoundaries(false);
  792.     v20(l__SFX__23.Place);
  793.     local v131 = u17[l__Tower__130.Name];
  794.     if v131 then
  795.         local v132 = l__ReplicatedStorage__9.Effects.Ring:Clone();
  796.         v132.CFrame = CFrame.new(l__Tower__130.Model:WaitForChild("HumanoidRootPart").GridPart.Position) * CFrame.new(0, 0.15, 0);
  797.         if v131.Stats.ring_size then
  798.             v132.Attachment1.Position = Vector3.new(0, 0, -v131.Stats.ring_size);
  799.             v132.Attachment2.Position = Vector3.new(0, 0, v131.Stats.ring_size);
  800.             v132.Attachment3.Position = Vector3.new(-v131.Stats.ring_size, 0, 0);
  801.             v132.Attachment4.Position = Vector3.new(v131.Stats.ring_size, 0, 0);
  802.             for v133, v134 in pairs(v132:GetChildren()) do
  803.                 if v134:IsA("Beam") then
  804.                     local v135 = 1.3333333333333333 * v131.Stats.ring_size * math.tan(math.pi / 8);
  805.                     v134.CurveSize0 = v135;
  806.                     v134.CurveSize1 = v135;
  807.                 end;
  808.             end;
  809.         end;
  810.         v132.Parent = l__Tower__130.Model:WaitForChild("HumanoidRootPart");
  811.     end;
  812.     u18.Current:Stop();
  813.     u19.Rotate.Visible = false;
  814.     u19.Trash.Visible = false;
  815.     u18.Current = nil;
  816.     u19["Stats Bar"].CancelTip.Visible = false;
  817.     u19["Stats Bar"].RotateTip.Visible = false;
  818. end;
  819. l__UserInputService__14.InputBegan:Connect(function(p34, p35)
  820.     if p35 then
  821.         return;
  822.     end;
  823.     if p34.UserInputType == Enum.UserInputType.MouseButton1 then
  824.         u21();
  825.         return;
  826.     end;
  827.     if p34.UserInputType == Enum.UserInputType.Touch then
  828.         u21();
  829.     end;
  830. end);
  831. u13 = pairs;
  832. u17 = script;
  833. u16 = u17.Parent;
  834. u19 = "Holder";
  835. u17 = u16;
  836. u16 = u16.WaitForChild;
  837. u16 = u16(u17, u19);
  838. u19 = "Tabs";
  839. u17 = u16;
  840. u16 = u16.WaitForChild;
  841. u16 = u16(u17, u19);
  842. u17 = u16;
  843. u16 = u16.GetChildren;
  844. u13, u16, u17 = u13(u16(u17));
  845. while true do
  846.     u19 = u13;
  847.     u15 = u16;
  848.     u19, u15 = u19(u15, u17);
  849.     if not u19 then
  850.         break;
  851.     end;
  852.     u17 = u19;
  853.     if u15:IsA("ImageLabel") then
  854.         u15.Detector.MouseButton1Click:Connect(function()
  855.             v20(l__SFX__23.Click);
  856.         end);
  857.     end;
  858. end;
  859. u17 = l__Move__24.Upgrade;
  860. u16 = u17.Detector;
  861. u13 = u16.MouseButton1Click;
  862. u17 = function()
  863.     v20(l__SFX__23.Click);
  864. end;
  865. u16 = u13;
  866. u13 = u13.Connect;
  867. u13(u16, u17);
  868. u17 = l__Move__24.Target;
  869. u16 = u17.Detector;
  870. u13 = u16.MouseButton1Click;
  871. u17 = function()
  872.     v20(l__SFX__23.Click);
  873. end;
  874. u16 = u13;
  875. u13 = u13.Connect;
  876. u13(u16, u17);
  877. u17 = l__Move__24.Sell;
  878. u16 = u17.Detector;
  879. u13 = u16.MouseButton1Click;
  880. u17 = function()
  881.     v20(l__SFX__23.Click);
  882. end;
  883. u16 = u13;
  884. u13 = u13.Connect;
  885. u13(u16, u17);
  886. u13 = pairs;
  887. u17 = script;
  888. u16 = u17.Parent;
  889. u19 = "Upgrade";
  890. u17 = u16;
  891. u16 = u16.WaitForChild;
  892. u16 = u16(u17, u19);
  893. u19 = "Move";
  894. u17 = u16;
  895. u16 = u16.WaitForChild;
  896. u16 = u16(u17, u19);
  897. u19 = "Specials";
  898. u17 = u16;
  899. u16 = u16.WaitForChild;
  900. u16 = u16(u17, u19);
  901. u17 = u16;
  902. u16 = u16.GetChildren;
  903. u13, u16, u17 = u13(u16(u17));
  904. while true do
  905.     u19 = u13;
  906.     u15 = u16;
  907.     u19, u15 = u19(u15, u17);
  908.     if not u19 then
  909.         break;
  910.     end;
  911.     u17 = u19;
  912.     if u15:IsA("ImageLabel") then
  913.         u15.Detector.MouseButton1Click:Connect(function()
  914.             v20(l__SFX__23.Click);
  915.         end);
  916.     end;
  917. end;
  918. u13 = tostring;
  919. u16 = "Settings";
  920. u13 = u13(u16);
  921. u16 = false;
  922. u1[u13] = u16;
  923. u15 = script;
  924. u19 = u15.Parent;
  925. u15 = "Settings Button";
  926. u17 = u19[u15];
  927. u16 = u17.Detector;
  928. u13 = u16.MouseButton1Down;
  929. local function u22(p36)
  930.     for v136, v137 in pairs(script.Parent:GetChildren()) do
  931.         if tostring(v137) ~= p36 and tostring(v137) == "Settings" then
  932.             v137.Move:TweenPosition(UDim2.new(v137.Move.Position.X.Scale, v137.Move.Position.X.Offset, 1.2, v137.Move.Position.Y.Offset), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
  933.             u1[tostring(v137)] = false;
  934.         end;
  935.     end;
  936. end;
  937. u17 = function()
  938.     if l__TouchEnabled__18 then
  939.         u22("Settings");
  940.     end;
  941.     if u1[tostring("Settings")] == true then
  942.         script.Parent.Settings.Move:TweenPosition(UDim2.new(0, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
  943.     else
  944.         script.Parent.Settings.Move:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
  945.     end;
  946.     u1.Settings = not u1.Settings;
  947.     v20(l__SFX__23.Click);
  948. end;
  949. u16 = u13;
  950. u13 = u13.Connect;
  951. u13(u16, u17);
  952. u15 = script.Parent.Settings;
  953. u19 = u15.Move;
  954. u17 = u19.Close;
  955. u16 = u17.Detector;
  956. u13 = u16.MouseButton1Down;
  957. u17 = function()
  958.     if u1[tostring("Settings")] == true then
  959.         script.Parent.Settings.Move:TweenPosition(UDim2.new(0, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
  960.     else
  961.         script.Parent.Settings.Move:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
  962.     end;
  963.     u1.Settings = not u1.Settings;
  964.     v20(l__SFX__23.Click);
  965. end;
  966. u16 = u13;
  967. u13 = u13.Connect;
  968. u13(u16, u17);
  969. u17 = script;
  970. u16 = u17.Parent;
  971. u19 = "Settings";
  972. u17 = u16;
  973. u16 = u16.WaitForChild;
  974. u16 = u16(u17, u19);
  975. u13 = u16.Move;
  976. u16 = v6;
  977. u17 = "Folder";
  978. u19 = {};
  979. u15 = "Settings";
  980. u19.Name = u15;
  981. u19.Parent = l__LocalPlayer__13;
  982. u16 = u16(u17, u19);
  983. u17 = pairs;
  984. u19 = u13.Buttons;
  985. u15 = u19;
  986. u19 = u19.GetChildren;
  987. for v138, v139 in u17(u19(u15)) do
  988.     if v139:IsA("Frame") then
  989.         local v140 = v2:InvokeServer("Settings", "Status", v139.Name);
  990.         local v141 = v6("BoolValue", {
  991.             Name = v139.Name,
  992.             Parent = u16
  993.         });
  994.         v141.Value = v140;
  995.         v139.Frame.Detector.MouseButton1Down:Connect(function()
  996.             v20(l__SFX__23.Click);
  997.             local v142 = v2:InvokeServer("Settings", "Toggle", v139.Name);
  998.             if v142 then
  999.                 v139.Frame.Tick.Visible = true;
  1000.                 v139.Frame.Cross.Visible = false;
  1001.             else
  1002.                 v139.Frame.Tick.Visible = false;
  1003.                 v139.Frame.Cross.Visible = true;
  1004.             end;
  1005.             v141.Value = v142;
  1006.         end);
  1007.         if v140 then
  1008.             v139.Frame.Tick.Visible = true;
  1009.             v139.Frame.Cross.Visible = false;
  1010.         else
  1011.             v139.Frame.Tick.Visible = false;
  1012.             v139.Frame.Cross.Visible = true;
  1013.         end;
  1014.     end;
  1015. end;
  1016. u16 = script;
  1017. u13 = u16.Parent;
  1018. u17 = "Skip";
  1019. u16 = u13;
  1020. u13 = u13.WaitForChild;
  1021. u13 = u13(u16, u17);
  1022. u16 = nil;
  1023. u17 = nil;
  1024. u19 = function(p37)
  1025.     if u16 then
  1026.         u16:Disconnect();
  1027.     end;
  1028.     if u17 then
  1029.         u17:Disconnect();
  1030.     end;
  1031.     if p37 then
  1032.         v20(l__SFX__23.Click);
  1033.     end;
  1034. end;
  1035. u15 = function(p38)
  1036.     if p38 then
  1037.         local v143 = 0;
  1038.     else
  1039.         v143 = -1;
  1040.     end;
  1041.     u13.Move:TweenPosition(UDim2.new(0, 0, v143, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
  1042. end;
  1043. v2:On("Event", "Vote", "Update", function(p39)
  1044.     u13.Move.Centre.Amount.Text = p39 .. "/" .. math.clamp(math.floor(#l__Players__8:GetChildren() / 1.25), 1, 100);
  1045. end);
  1046. v2:On("Event", "Vote", "Enable", function()
  1047.     u15(true);
  1048.     u17 = u13.Move.No.Detector.MouseButton1Down:Connect(function()
  1049.         u19(true);
  1050.         u15(false);
  1051.     end);
  1052.     u16 = u13.Move.Yes.Detector.MouseButton1Down:Connect(function()
  1053.         u19(true);
  1054.         v2:FireServer("Vote", "Skip");
  1055.         u15(false);
  1056.     end);
  1057. end);
  1058. v2:On("Event", "Vote", "Disable", function()
  1059.     u19();
  1060.     u15(false);
  1061. end);
  1062. u13 = l__Players__8.LocalPlayer;
  1063. u13 = u13.GetMouse;
  1064. u13 = u13(u13);
  1065. local u23 = script.Parent:WaitForChild("Hover");
  1066. local u24 = v4.new("Blacklist", { workspace:WaitForChild("Map"):FindFirstChild("Regions"), workspace:WaitForChild("Map"):FindFirstChild("Confetti"), l__LocalPlayer__13.Character });
  1067. local u25 = {
  1068.     Towers = workspace:WaitForChild("Towers"),
  1069.     Enemies = workspace:WaitForChild("Enemies"),
  1070.     Units = workspace:WaitForChild("Units")
  1071. };
  1072. local u26 = function(p40, p41)
  1073.     if p40 and p41 then
  1074.         while true do
  1075.             local v144 = p40:FindFirstChild(p41);
  1076.             if v144 then
  1077.                 return v144;
  1078.             end;
  1079.             p40 = p40.Parent;
  1080.             if not p40 then
  1081.                 break;
  1082.             end;
  1083.             if not p40:IsDescendantOf(workspace) then
  1084.                 break;
  1085.             end;       
  1086.         end;
  1087.     end;
  1088. end;
  1089. l__RunService__7.RenderStepped:Connect(function()
  1090.     local v145 = nil;
  1091.     local v146 = nil;
  1092.     if _G.no then
  1093.         u23.Enabled = false;
  1094.         return;
  1095.     end;
  1096.     local v147 = u24:CastMouse();
  1097.     if not v147.Hit then
  1098.         u23.Enabled = false;
  1099.         return;
  1100.     end;
  1101.     if v147.Hit.Name == "GridPart" then
  1102.         u23.Enabled = false;
  1103.         return;
  1104.     end;
  1105.     if v147.Hit:IsDescendantOf(u25.Enemies) or v147.Hit:IsDescendantOf(u25.Units) then
  1106.         u23.Enabled = true;
  1107.         u23.Health.Visible = true;
  1108.         u23.Desc.Visible = false;
  1109.         u23.Health.Position = UDim2.new(0, u13.X + 10, 0, u13.Y);
  1110.         local v148 = u26(v147.Hit, "Values");
  1111.         if v148 then
  1112.             u23.Health.Bar.Count.Text = v148.Health.Current.Value .. "/" .. v148.Health.Max.Value;
  1113.             u23.Health.Bar.Bar.Size = UDim2.new(math.clamp(v148.Health.Current.Value / v148.Health.Max.Value, 0, math.huge), 0, 1, 0);
  1114.             u23.Health.UnitName.Text = v148.Type.Value;
  1115.             return;
  1116.         else
  1117.             u23.Enabled = false;
  1118.             return;
  1119.         end;
  1120.     end;
  1121.     if not v147.Hit:IsDescendantOf(u25.Towers) then
  1122.         u23.Enabled = false;
  1123.         return;
  1124.     end;
  1125.     if v147.Hit.Name == "RingPath" then
  1126.         u23.Enabled = false;
  1127.         return;
  1128.     end;
  1129.     u23.Enabled = true;
  1130.     u23.Health.Visible = false;
  1131.     u23.Desc.Visible = true;
  1132.     u23.Desc.Position = UDim2.new(0, u13.X + 10, 0, u13.Y);
  1133.     local v149 = u26(v147.Hit, "Owner");
  1134.     v145 = u26(v147.Hit, "Type");
  1135.     v146 = u26(v147.Hit, "Upgrade");
  1136.     if not v149 or not v145 or not v146 then
  1137.         u23.Enabled = false;
  1138.         return;
  1139.     end;
  1140.     u23.Desc.Username.Text = v149.Value.Name;
  1141.     u23.Desc.Tower.Text = v145.Value;
  1142.     u23.Desc.Level.Text = "Lvl. " .. v146.Value;
  1143. end);
  1144. u13 = function(p42, p43, p44)
  1145.     local function v150()
  1146.         p42:WaitForChild("Count").Text = math.clamp(p43.Value, 0, math.huge) .. "/" .. p44.Value;
  1147.         p42:WaitForChild("Bar").Size = UDim2.new(math.clamp(p43.Value / p44.Value, 0, math.huge), 0, 1, 0);
  1148.     end;
  1149.     p43.Changed:Connect(v150);
  1150.     v150();
  1151. end;
  1152. setupHealthBar = u13;
  1153. u24 = "State";
  1154. u23 = l__ReplicatedStorage__9;
  1155. u25 = l__ReplicatedStorage__9.WaitForChild;
  1156. u25 = u25(u23, u24);
  1157. u24 = "Mode";
  1158. u23 = u25;
  1159. u25 = u25.WaitForChild;
  1160. u25 = u25(u23, u24);
  1161. u13 = u25.Value;
  1162. u25 = "Versus";
  1163. if u13 == u25 then
  1164.     u24 = l__ReplicatedStorage__9.State;
  1165.     u23 = u24.Teams;
  1166.     u25 = u23.Red;
  1167.     u13 = u25.Health;
  1168.     u26 = l__ReplicatedStorage__9.State;
  1169.     u24 = u26.Teams;
  1170.     u23 = u24.Blue;
  1171.     u25 = u23.Health;
  1172.     u23 = setupHealthBar;
  1173.     u26 = script;
  1174.     u24 = u26.Parent;
  1175.     u26 = u24;
  1176.     u24 = u24.WaitForChild;
  1177.     u24 = u24(u26, "Hp");
  1178.     u26 = u24;
  1179.     u24 = u24.WaitForChild;
  1180.     u24 = u24(u26, "Red");
  1181.     u26 = u13.Current;
  1182.     u23(u24, u26, u13.Max);
  1183.     u23 = setupHealthBar;
  1184.     u26 = script;
  1185.     u24 = u26.Parent;
  1186.     u26 = u24;
  1187.     u24 = u24.WaitForChild;
  1188.     u24 = u24(u26, "Hp");
  1189.     u26 = u24;
  1190.     u24 = u24.WaitForChild;
  1191.     u24 = u24(u26, "Blue");
  1192.     u26 = u25.Current;
  1193.     u23(u24, u26, u25.Max);
  1194.     u26 = script;
  1195.     u24 = u26.Parent;
  1196.     u26 = u24;
  1197.     u24 = u24.WaitForChild;
  1198.     u24 = u24(u26, "Hp");
  1199.     u23 = u24.Solo;
  1200.     u24 = false;
  1201.     u23.Visible = u24;
  1202.     u26 = script;
  1203.     u24 = u26.Parent;
  1204.     u26 = u24;
  1205.     u24 = u24.WaitForChild;
  1206.     u24 = u24(u26, "Hp");
  1207.     u23 = u24.Blue;
  1208.     u24 = true;
  1209.     u23.Visible = u24;
  1210.     u26 = script;
  1211.     u24 = u26.Parent;
  1212.     u26 = u24;
  1213.     u24 = u24.WaitForChild;
  1214.     u24 = u24(u26, "Hp");
  1215.     u23 = u24.Red;
  1216.     u24 = true;
  1217.     u23.Visible = u24;
  1218. else
  1219.     u25 = l__ReplicatedStorage__9.State;
  1220.     u13 = u25.Health;
  1221.     u25 = setupHealthBar;
  1222.     u24 = script;
  1223.     u23 = u24.Parent;
  1224.     u26 = "Hp";
  1225.     u24 = u23;
  1226.     u23 = u23.WaitForChild;
  1227.     u23 = u23(u24, u26);
  1228.     u26 = "Solo";
  1229.     u24 = u23;
  1230.     u23 = u23.WaitForChild;
  1231.     u23 = u23(u24, u26);
  1232.     u24 = u13.Current;
  1233.     u26 = u13.Max;
  1234.     u25(u23, u24, u26);
  1235.     u24 = script;
  1236.     u23 = u24.Parent;
  1237.     u26 = "Hp";
  1238.     u24 = u23;
  1239.     u23 = u23.WaitForChild;
  1240.     u23 = u23(u24, u26);
  1241.     u25 = u23.Solo;
  1242.     u23 = true;
  1243.     u25.Visible = u23;
  1244.     u24 = script;
  1245.     u23 = u24.Parent;
  1246.     u26 = "Hp";
  1247.     u24 = u23;
  1248.     u23 = u23.WaitForChild;
  1249.     u23 = u23(u24, u26);
  1250.     u25 = u23.Blue;
  1251.     u23 = false;
  1252.     u25.Visible = u23;
  1253.     u24 = script;
  1254.     u23 = u24.Parent;
  1255.     u26 = "Hp";
  1256.     u24 = u23;
  1257.     u23 = u23.WaitForChild;
  1258.     u23 = u23(u24, u26);
  1259.     u25 = u23.Red;
  1260.     u23 = false;
  1261.     u25.Visible = u23;
  1262. end;
  1263. u25 = script;
  1264. u13 = u25.Parent;
  1265. u23 = "Holder";
  1266. u25 = u13;
  1267. u13 = u13.WaitForChild;
  1268. u13 = u13(u25, u23);
  1269. u23 = "Stats Bar";
  1270. u25 = u13;
  1271. u13 = u13.WaitForChild;
  1272. u13 = u13(u25, u23);
  1273. u23 = "Cash";
  1274. u25 = u13;
  1275. u13 = u13.WaitForChild;
  1276. u13 = u13(u25, u23);
  1277. u23 = "Amount";
  1278. u25 = u13;
  1279. u13 = u13.WaitForChild;
  1280. u13 = u13(u25, u23);
  1281. u23 = l__Players__8.LocalPlayer;
  1282. u26 = "Cash";
  1283. u24 = u23;
  1284. u23 = u23.WaitForChild;
  1285. u23 = u23(u24, u26);
  1286. u25 = u23.Changed;
  1287. u24 = function(p45)
  1288.     u13.Text = "$" .. v22(math.floor(p45));
  1289. end;
  1290. u23 = u25;
  1291. u25 = u25.Connect;
  1292. u25(u23, u24);
  1293. u23 = "$";
  1294. u24 = v22;
  1295. u26 = math.floor;
  1296. u24 = u24(u26(l__Players__8.LocalPlayer:WaitForChild("Cash").Value));
  1297. u25 = u23 .. u24;
  1298. u13.Text = u25;
  1299. u25 = function()
  1300.     script.Parent.Queue.Visible = true;
  1301.     script.Parent.Queue.Move:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
  1302. end;
  1303. AppearQueue = u25;
  1304. u23 = script;
  1305. u25 = u23.Parent;
  1306. u24 = "DiffVote";
  1307. u23 = u25;
  1308. u25 = u25.WaitForChild;
  1309. u25 = u25(u23, u24);
  1310. u24 = "Move";
  1311. u23 = u25;
  1312. u25 = u25.WaitForChild;
  1313. u25 = u25(u23, u24);
  1314. u23 = 0.3;
  1315. u26 = l__ReplicatedStorage__9.State.Game.Voting;
  1316. u24 = u26.Value;
  1317. if u24 then
  1318.     u24 = delay;
  1319.     u26 = 0.5;
  1320.     u24(u26, function()
  1321.         u25:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.3, true);
  1322.         wait(0.5);
  1323.         l__ReplicatedStorage__9.State:WaitForChild("Music").Value = "Intermission";
  1324.         if not l__ReplicatedStorage__9.State.Game.Voting.Value then
  1325.             u25:TweenPosition(UDim2.new(0, 0, -1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.3, true);
  1326.             if l__ReplicatedStorage__9.State.Mode.Value ~= "Versus" then
  1327.                 return;
  1328.             end;
  1329.         else
  1330.             v20(l__SFX__23.Swoosh);
  1331.             return;
  1332.         end;
  1333.         AppearQueue();
  1334.     end);
  1335. else
  1336.     u26 = u25;
  1337.     u24 = u25.TweenPosition;
  1338.     u24(u26, UDim2.new(0, 0, -1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.3, true);
  1339.     u26 = l__ReplicatedStorage__9.State.Mode;
  1340.     u24 = u26.Value;
  1341.     u26 = "Versus";
  1342.     if u24 == u26 then
  1343.         u24 = AppearQueue;
  1344.         u24();
  1345.     end;
  1346.     u26 = l__ReplicatedStorage__9.State;
  1347.     u24 = u26.Music;
  1348.     u26 = "";
  1349.     u24.Value = u26;
  1350. end;
  1351. u26 = l__ReplicatedStorage__9.State.Game.Voting;
  1352. u24 = u26.Changed;
  1353. u26 = u24;
  1354. u24 = u24.Connect;
  1355. u24(u26, function(p46)
  1356.     if not p46 then
  1357.         u25:TweenPosition(UDim2.new(0, 0, -1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.3, true);
  1358.         v20(l__SFX__23.Woosh);
  1359.         if l__ReplicatedStorage__9.State.Mode.Value == "Versus" then
  1360.             AppearQueue();
  1361.         end;
  1362.         l__ReplicatedStorage__9.State.Music.Value = "";
  1363.     end;
  1364. end);
  1365. u24 = function(p47, p48)
  1366.     return p48.Detector.MouseButton1Down:Connect(function()
  1367.         v2:FireServer("Difficulty", "Vote", p47);
  1368.         v20(l__SFX__23.Click);
  1369.     end);
  1370. end;
  1371. u26 = {
  1372.     Easy = u25.Buttons.Easy,
  1373.     Normal = u25.Buttons.Normal,
  1374.     Hard = u25.Buttons.Hard,
  1375.     Insane = u25.Buttons.Insane
  1376. };
  1377. v2:On("Event", "Difficulty", "Update", function(p49)
  1378.     for v151, v152 in pairs(u26) do
  1379.         v152.Votes.Text = p49[v152.Name] and "";
  1380.     end;
  1381. end);
  1382. u24("Easy", u26.Easy);
  1383. u24("Normal", u26.Normal);
  1384. u24("Hard", u26.Hard);
  1385. u24("Insane", u26.Insane);
  1386. u24 = "State";
  1387. u23 = l__ReplicatedStorage__9;
  1388. u25 = l__ReplicatedStorage__9.WaitForChild;
  1389. u25 = u25(u23, u24);
  1390. u26 = u25;
  1391. u24 = u25.WaitForChild;
  1392. u24 = u24(u26, "Mode");
  1393. u23 = u24.Value;
  1394. u24 = "Versus";
  1395. if u23 ~= u24 then
  1396.     u24 = script;
  1397.     u23 = u24.Parent;
  1398.     u26 = "Holder";
  1399.     u24 = u23;
  1400.     u23 = u23.WaitForChild;
  1401.     u23 = u23(u24, u26);
  1402.     u26 = "Tabs";
  1403.     u24 = u23;
  1404.     u23 = u23.WaitForChild;
  1405.     u23 = u23(u24, u26);
  1406.     u24 = false;
  1407.     u23.Visible = u24;
  1408. end;
  1409. u26 = "Wave";
  1410. u24 = u25;
  1411. u23 = u25.WaitForChild;
  1412. u23 = u23(u24, u26);
  1413. u26 = script;
  1414. u24 = u26.Parent;
  1415. u26 = u24;
  1416. u24 = u24.WaitForChild;
  1417. u24 = u24(u26, "Hp");
  1418. u26 = u24;
  1419. u24 = u24.WaitForChild;
  1420. u24 = u24(u26, "Wave");
  1421. u26 = function(p50)
  1422.     u24.Visible = p50 > 0;
  1423.     u24.Text = "Wave: " .. p50;
  1424. end;
  1425. u23.Changed:Connect(u26);
  1426. u26(u23.Value);
  1427. local u27 = script.Parent:WaitForChild("Results");
  1428. function Format(p51)
  1429.     return string.format("%02i", p51);
  1430. end;
  1431. function convertToMS(p52)
  1432.     local v153 = (p52 - p52 % 60) / 60;
  1433.     p52 = p52 - v153 * 60;
  1434.     return Format(v153) .. ":" .. Format(p52);
  1435. end;
  1436. local u28 = l__ReplicatedStorage__9.Client.Controllers.HiddenWave:GetChildren();
  1437. local u29 = l__ReplicatedStorage__9:WaitForChild("Client"):WaitForChild("Music"):WaitForChild("Win"):GetChildren();
  1438. local u30 = l__ReplicatedStorage__9:WaitForChild("Client"):WaitForChild("Music"):WaitForChild("Lose"):GetChildren();
  1439. local u31 = function(p53, p54)
  1440.     return v6("TextLabel", {
  1441.         Font = Enum.Font.SourceSansSemibold,
  1442.         Text = p53,
  1443.         Size = UDim2.new(0, 100, 0, 20),
  1444.         BackgroundTransparency = 1,
  1445.         TextScaled = true,
  1446.         TextColor3 = p54,
  1447.         TextStrokeColor3 = Color3.fromRGB(0, 0, 0),
  1448.         TextStrokeTransparency = 0.6,
  1449.         Parent = u27.Rewards
  1450.     });
  1451. end;
  1452. v2:On("Event", "Interface", "Finished", function(p55)
  1453.     for v154, v155 in pairs(u28) do
  1454.         if v155:IsA("Sound") then
  1455.             v155:Stop();
  1456.         end;
  1457.     end;
  1458.     local v156 = u27.Titles:FindFirstChild(p55.Result);
  1459.     if v156 then
  1460.         v156.Visible = true;
  1461.     end;
  1462.     u27.Length.Text = "The game lasted for " .. convertToMS(p55.Duration) .. " minutes.";
  1463.     if p55.Result ~= "Win" and p55.Result ~= "Triumph" then
  1464.         local v157 = p55.Result == "Draw" and l__SFX__23.Victory or l__SFX__23.Lose;
  1465.     else
  1466.         v157 = l__SFX__23.Victory or l__SFX__23.Lose;
  1467.     end;
  1468.     v157:Play();
  1469.     l__ReplicatedStorage__9.State.Music.Value = ((p55.Result == "Win" or p55.Result == "Triumph" or p55.Result == "Draw") and u29[Random.new():NextInteger(1, #u29)] or u30[Random.new():NextInteger(1, #u30)]).Name;
  1470.     for v158, v159 in pairs(p55.Rewards) do
  1471.         u31(v159.Text, v159.Color);
  1472.     end;
  1473.     u27.Visible = true;
  1474. end);
  1475. u30 = "Emotes";
  1476. u29 = l__ReplicatedStorage__9;
  1477. u27 = l__ReplicatedStorage__9.WaitForChild;
  1478. u27 = u27(u29, u30);
  1479. u29 = {};
  1480. u30 = pairs;
  1481. u28 = u27;
  1482. u31 = u27.GetChildren;
  1483. for v160, v161 in u30(u31(u28)) do
  1484.     u29[v161.Name] = require(v161:WaitForChild("Stats"));
  1485. end;
  1486. u30 = Instance.new;
  1487. u31 = "Camera";
  1488. u30 = u30(u31);
  1489. u28 = CFrame.Angles;
  1490. u28 = u28(0, math.rad(180), 0);
  1491. u31 = u28 * CFrame.new(0, 0.5, 5);
  1492. u30.CFrame = u31;
  1493. u31 = v1.new;
  1494. u31 = u31();
  1495. u28 = function()
  1496.     u31:Sweep();
  1497.     local v162 = v2:InvokeServer("Emotes", "Get");
  1498.     for v163 = 1, 4 do
  1499.         local v164 = v162[v163] and u27:FindFirstChild(v162[v163]);
  1500.         local l__Move__165 = script.Parent:WaitForChild("Taunts").Move;
  1501.         l__Move__165.Buttons[v163].Icon:ClearAllChildren();
  1502.         if v164 then
  1503.             local v166 = v164.Model:Clone();
  1504.             v166:SetPrimaryPartCFrame(CFrame.new(0, 0, 0));
  1505.             v166.Parent = l__Move__165.Buttons[v163].Icon;
  1506.             l__Move__165.Buttons[v163].Icon.CurrentCamera = u30;
  1507.             u31:Mark(l__Move__165.Buttons[v163].Detector.MouseButton1Click:Connect(function()
  1508.                 local l__Humanoid__167 = l__LocalPlayer__13.Character:FindFirstChild("Humanoid");
  1509.                 if l__Humanoid__167 then
  1510.                     v2:FireServer("Emotes", "Stop");
  1511.                     l__Humanoid__167.Taunting.Value = true;
  1512.                     local v168 = u29[v162[v163]];
  1513.                     v2:FireServer("Emotes", "Play", v162[v163]);
  1514.                     if loadedAnimation then
  1515.                         loadedAnimation:Stop();
  1516.                     end;
  1517.                     l__Humanoid__167.WalkSpeed = v168.walkspeed;
  1518.                     l__Humanoid__167.JumpPower = v168.jumppower;
  1519.                     loadedAnimation = l__Humanoid__167:LoadAnimation(v164);
  1520.                     loadedAnimation:Play();
  1521.                     if not v168.looped then
  1522.                         local u32 = nil;
  1523.                         u32 = loadedAnimation.Stopped:Connect(function()
  1524.                             v2:FireServer("Emotes", "Stop");
  1525.                             u32:Disconnect();
  1526.                             loadedAnimation:Stop();
  1527.                             loadedAnimation = nil;
  1528.                             if emoteSound then
  1529.                                 emoteSound:Stop();
  1530.                             end;
  1531.                             l__LocalPlayer__13.Character.Humanoid.JumpPower = 50;
  1532.                             l__LocalPlayer__13.Character.Humanoid.WalkSpeed = 16;
  1533.                             l__Humanoid__167.Taunting.Value = false;
  1534.                         end);
  1535.                     end;
  1536.                     if emoteSound then
  1537.                         emoteSound:Stop();
  1538.                     end;
  1539.                     local l__Sound__169 = v164:FindFirstChild("Sound");
  1540.                     if l__Sound__169 then
  1541.                         emoteSound = l__Sound__169:Clone();
  1542.                         emoteSound.Parent = l__LocalPlayer__13.Character.HumanoidRootPart;
  1543.                         emoteSound:Play();
  1544.                         if v168.looped then
  1545.                             emoteSound.Looped = true;
  1546.                         else
  1547.                             emoteSound.Looped = false;
  1548.                         end;
  1549.                     end;
  1550.                     tauntFrameOpen = false;
  1551.                     script.Parent.Taunts.Move:TweenPosition(UDim2.new(0, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
  1552.                     u1.Taunts = false;
  1553.                 end;
  1554.             end));
  1555.             l__Move__165.Buttons[v163].TauntName.Text = v162[v163];
  1556.         end;
  1557.     end;
  1558. end;
  1559. refreshEquippedEmotes = u28;
  1560. u28 = game;
  1561. u28 = u28.GetService;
  1562. u28 = u28(u28, "UserInputService");
  1563. u28.InputBegan:Connect(function(p56, p57)
  1564.     if p57 then
  1565.         return;
  1566.     end;
  1567.     if p56.UserInputType == Enum.UserInputType.Keyboard and p56.KeyCode == Enum.KeyCode.G then
  1568.         v2:FireServer("Emotes", "Stop");
  1569.         if loadedAnimation then
  1570.             loadedAnimation:Stop();
  1571.         end;
  1572.         if loadedAnimation then
  1573.             v2:FireServer("Emotes", "Stop");
  1574.             if emoteSound then
  1575.                 emoteSound:Stop();
  1576.             end;
  1577.         end;
  1578.         if loadedAnimation then
  1579.             l__LocalPlayer__13.Character.Humanoid.JumpPower = 50;
  1580.             l__LocalPlayer__13.Character.Humanoid.WalkSpeed = 16;
  1581.             l__LocalPlayer__13.Character.Humanoid.Taunting.Value = false;
  1582.             loadedAnimation = nil;
  1583.             return;
  1584.         end;
  1585.         tauntFrameOpen = not tauntFrameOpen;
  1586.         u22("Taunts");
  1587.         if u1[tostring("Taunts")] == true then
  1588.             script.Parent.Taunts.Move:TweenPosition(UDim2.new(0, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
  1589.             u1.Taunts = false;
  1590.             return;
  1591.         end;
  1592.         script.Parent.Taunts.Move:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
  1593.         u1.Taunts = true;
  1594.     end;
  1595. end);
  1596. script.Parent.Taunts.Move.Close.Detector.MouseButton1Click:Connect(function()
  1597.     tauntFrameOpen = false;
  1598.     script.Parent.Taunts.Move:TweenPosition(UDim2.new(0, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
  1599.     u1.Taunts = false;
  1600. end);
  1601. refreshEquippedEmotes();
  1602. if game:GetService("UserInputService").TouchEnabled then
  1603.     local l__TouchGui__170 = l__LocalPlayer__13.PlayerGui:FindFirstChild("TouchGui");
  1604.     if l__TouchGui__170 then
  1605.         local v171 = script.Parent.TauntButton:Clone();
  1606.         local l__JumpButton__172 = l__TouchGui__170:WaitForChild("TouchControlFrame"):WaitForChild("JumpButton");
  1607.         v171.Parent = l__TouchGui__170.TouchControlFrame;
  1608.         v171.Size = UDim2.new(l__JumpButton__172.Size.X.Scale / 1.25, l__JumpButton__172.Size.X.Offset / 1.25, l__JumpButton__172.Size.Y.Scale / 1.25, l__JumpButton__172.Size.Y.Offset / 1.25);
  1609.         v171.AnchorPoint = Vector2.new(0, 0.5);
  1610.         v171.Position = l__JumpButton__172.Position + UDim2.new(0, v171.Size.X.Offset / 1.75, 0, 0) + UDim2.new(0, 0, 0, l__JumpButton__172.Position.Y.Offset / 2);
  1611.         v171.Visible = true;
  1612.         v171.MouseButton1Click:Connect(function()
  1613.             v2:FireServer("Emotes", "Stop");
  1614.             if loadedAnimation then
  1615.                 loadedAnimation:Stop();
  1616.             end;
  1617.             if loadedAnimation then
  1618.                 v2:FireServer("Emotes", "Stop");
  1619.                 if emoteSound then
  1620.                     emoteSound:Stop();
  1621.                 end;
  1622.             end;
  1623.             if loadedAnimation then
  1624.                 l__LocalPlayer__13.Character.Humanoid.JumpPower = 50;
  1625.                 l__LocalPlayer__13.Character.Humanoid.WalkSpeed = 16;
  1626.                 l__LocalPlayer__13.Character.Humanoid.Taunting.Value = false;
  1627.                 loadedAnimation = nil;
  1628.                 return;
  1629.             end;
  1630.             tauntFrameOpen = not tauntFrameOpen;
  1631.             u22("Taunts");
  1632.             if u1[tostring("Taunts")] == true then
  1633.                 script.Parent.Taunts.Move:TweenPosition(UDim2.new(0, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
  1634.                 u1.Taunts = false;
  1635.                 return;
  1636.             end;
  1637.             script.Parent.Taunts.Move:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
  1638.             u1.Taunts = true;
  1639.         end);
  1640.     end;
  1641. end;
  1642. u29 = script;
  1643. u27 = u29.Parent;
  1644. u30 = "Holder";
  1645. u29 = u27;
  1646. u27 = u27.WaitForChild;
  1647. u27 = u27(u29, u30);
  1648. u30 = "Tabs";
  1649. u29 = u27;
  1650. u27 = u27.WaitForChild;
  1651. u27 = u27(u29, u30);
  1652. u28 = "Mode";
  1653. u31 = u25;
  1654. u30 = u25.WaitForChild;
  1655. u30 = u30(u31, u28);
  1656. u29 = u30.Value;
  1657. u30 = "Versus";
  1658. if u29 == u30 then
  1659.     u29 = {};
  1660.     u30 = pairs;
  1661.     u28 = l__ReplicatedStorage__9;
  1662.     u31 = l__ReplicatedStorage__9.WaitForChild;
  1663.     u31 = u31(u28, "Enemies");
  1664.     u28 = u31;
  1665.     u31 = u31.GetChildren;
  1666.     for v173, v174 in u30(u31(u28)) do
  1667.         u29[v174.Name] = require(v174.Stats);
  1668.     end;
  1669.     u30 = function()
  1670.         local l__Page__175 = script.Parent:WaitForChild("Holder"):WaitForChild("Page");
  1671.         local l__Troops__176 = script.Parent:WaitForChild("Holder"):WaitForChild("Troops");
  1672.         local v177 = {};
  1673.         for v178, v179 in pairs(require(l__ReplicatedStorage__9:WaitForChild("Data"):WaitForChild("Prices"))[l__ReplicatedStorage__9:WaitForChild("State"):WaitForChild("Difficulty").Value]) do
  1674.             table.insert(v177, {
  1675.                 Name = v178,
  1676.                 Wave = v179.Wave,
  1677.                 Price = v179.Price
  1678.             });
  1679.         end;
  1680.         table.sort(v177, function(p58, p59)
  1681.             return p58.Wave < p59.Wave;
  1682.         end);
  1683.         local u33 = v1.new();
  1684.         local u34 = { l__Troops__176.Troop1, l__Troops__176.Troop2, l__Troops__176.Troop3, l__Troops__176.Troop4, l__Troops__176.Troop5 };
  1685.         local u35 = v1.new();
  1686.         local function u36(p60)
  1687.             l__Page__175.Text = "Page: " .. p60;
  1688.             u33:Sweep();
  1689.             local v180 = p60 * 5 - 4;
  1690.             local v181 = {};
  1691.             for v182 = v180, math.min(v180 + 5 - 1, #v177) do
  1692.                 table.insert(v181, v177[v182]);
  1693.             end;
  1694.             for v183, v184 in pairs(u34) do
  1695.                 v184.Label.Text = "";
  1696.                 if v184:FindFirstChild("Lock") then
  1697.                     v184.Lock.Visible = false;
  1698.                 end;
  1699.                 v184.Icon.Image = "rbxassetid://0";
  1700.             end;
  1701.             for v185, v186 in pairs(v181) do
  1702.                 local v187 = u34[v185];
  1703.                 if v187 then
  1704.                     if v187:FindFirstChild("Level") then
  1705.                         v187.Level.Visible = false;
  1706.                     end;
  1707.                     v187.Label.Text = v186.Name;
  1708.                     v187.Label.Visible = true;
  1709.                     v187.Label.TextColor3 = Color3.fromRGB(255, 255, 255);
  1710.                     if l__ReplicatedStorage__9.State.Wave.Value < v186.Wave then
  1711.                         if v187:FindFirstChild("Lock") then
  1712.                             v187.Lock.Visible = true;
  1713.                         end;
  1714.                         v187.Icon.ImageColor3 = Color3.fromRGB(0, 0, 0);
  1715.                         v187.Icon.ImageTransparency = 0.7;
  1716.                     else
  1717.                         v187.Icon.ImageColor3 = Color3.fromRGB(255, 255, 255);
  1718.                         v187.Icon.ImageTransparency = 0;
  1719.                     end;
  1720.                     u33:Mark(l__ReplicatedStorage__9.State.Wave.Changed:Connect(function(p61)
  1721.                         if v186.Wave <= p61 then
  1722.                             if v187:FindFirstChild("Lock") then
  1723.                                 v187.Lock.Visible = false;
  1724.                             end;
  1725.                             v187.Icon.ImageColor3 = Color3.fromRGB(255, 255, 255);
  1726.                             v187.Icon.ImageTransparency = 0;
  1727.                         end;
  1728.                     end));
  1729.                     u33:Mark(v187.Detector.MouseButton1Click:Connect(function()
  1730.                         if v186.Wave <= l__ReplicatedStorage__9.State.Wave.Value and not v2:InvokeServer("Enemy", "Send", v186.Name) then
  1731.                             v21({
  1732.                                 Text = "Not enough money!",
  1733.                                 Color = Color3.fromRGB(236, 0, 0)
  1734.                             });
  1735.                         end;
  1736.                     end));
  1737.                     if u29[v186.Name].icon then
  1738.                         v187.Icon.Image = "rbxassetid://" .. u29[v186.Name].icon;
  1739.                     else
  1740.                         v187.Icon.Image = "rbxassetid://0";
  1741.                     end;
  1742.                 end;
  1743.             end;
  1744.         end;
  1745.         local function u37(p62)
  1746.             l__Troops__176.Next.Visible = p62;
  1747.             l__Troops__176.Previous.Visible = p62;
  1748.             l__Page__175.Visible = p62;
  1749.         end;
  1750.         u27.Troops.Detector.MouseButton1Click:Connect(function()
  1751.             v20(l__SFX__23.Click);
  1752.             u37(false);
  1753.             reloadTroops();
  1754.         end);
  1755.         local function u38()
  1756.             u12:Sweep();
  1757.             u35:Sweep();
  1758.             u36(1);
  1759.             local u39 = 1;
  1760.             local u40 = math.floor((#v177 + 5 - 1) / 5);
  1761.             u35:Mark(l__Troops__176.Next.Detector.MouseButton1Down:Connect(function()
  1762.                 u39 = math.clamp(u39 + 1, 1, u40);
  1763.                 u36(u39);
  1764.             end));
  1765.             u35:Mark(l__Troops__176.Previous.Detector.MouseButton1Down:Connect(function()
  1766.                 u39 = math.clamp(u39 - 1, 1, u40);
  1767.                 u36(u39);
  1768.             end));
  1769.         end;
  1770.         u27.Zombies.Detector.MouseButton1Click:Connect(function()
  1771.             v20(l__SFX__23.Click);
  1772.             u37(true);
  1773.             u38();
  1774.         end);
  1775.     end;
  1776.     u28 = l__ReplicatedStorage__9.State.Difficulty;
  1777.     u31 = u28.Changed;
  1778.     u28 = u31;
  1779.     u31 = u31.Connect;
  1780.     u31(u28, u30);
  1781. else
  1782.     u29 = false;
  1783.     u27.Visible = u29;
  1784. end;
  1785. u30 = "Assets";
  1786. u29 = l__ReplicatedStorage__9;
  1787. u27 = l__ReplicatedStorage__9.WaitForChild;
  1788. u27 = u27(u29, u30);
  1789. u30 = "Templates";
  1790. u29 = u27;
  1791. u27 = u27.WaitForChild;
  1792. u27 = u27(u29, u30);
  1793. u30 = "Enemy";
  1794. u29 = u27;
  1795. u27 = u27.WaitForChild;
  1796. u27 = u27(u29, u30);
  1797. u28 = script;
  1798. u31 = u28.Parent;
  1799. u28 = u31;
  1800. u31 = u31.WaitForChild;
  1801. u31 = u31(u28, "Queue");
  1802. u30 = u31.Move;
  1803. u29 = u30.Enemies;
  1804. u30 = {};
  1805. u31 = pairs;
  1806. u28 = l__ReplicatedStorage__9.WaitForChild;
  1807. u28 = u28(l__ReplicatedStorage__9, "Enemies");
  1808. u28 = u28.GetChildren;
  1809. for v188, v189 in u31(u28(u28)) do
  1810.     u30[v189.Name] = require(v189.Stats);
  1811. end;
  1812. u31 = require;
  1813. u28 = l__ReplicatedStorage__9.WaitForChild;
  1814. u28 = u28(l__ReplicatedStorage__9, "Data");
  1815. u28 = u28.WaitForChild;
  1816. u31 = u31(u28(u28, "Prices"));
  1817. u28 = v2.On;
  1818. u28(v2, "Event", "Queue", "Update", function(p63)
  1819.     for v190 = 1, 5 do
  1820.         local v191 = u29:FindFirstChild(v190);
  1821.         if v191 then
  1822.             local v192 = p63[v190];
  1823.             if v192 then
  1824.                 local v193 = u30[v192.Name];
  1825.                 if v193 then
  1826.                     v191.Icon.Image = "rbxassetid://" .. v193.icon;
  1827.                 end;
  1828.                 v191.Wait.Text = v192.Data.Wait;
  1829.             else
  1830.                 v191.Icon.Image = "rbxassetid://0";
  1831.                 v191.Wait.Text = "";
  1832.             end;
  1833.         end;
  1834.     end;
  1835. end);
  1836. u27 = game;
  1837. u30 = "MarketplaceService";
  1838. u29 = u27;
  1839. u27 = u27.GetService;
  1840. u27 = u27(u29, u30);
  1841. u29 = function()
  1842.     return u27:GetProductInfo(game.PlaceId).Updated;
  1843. end;
  1844. u31 = workspace;
  1845. u28 = u31;
  1846. u31 = u31.WaitForChild;
  1847. u31 = u31(u28, "Version");
  1848. u30 = u31.Value;
  1849. u28 = script;
  1850. u31 = u28.Parent;
  1851. u28 = u31;
  1852. u31 = u31.WaitForChild;
  1853. u31 = u31(u28, "Version");
  1854. u28 = function()
  1855.     u31.Text = "Version: " .. u30;
  1856.     u31.TextColor3 = u30 == u29() and Color3.fromRGB(32, 255, 6) or Color3.fromRGB(245, 0, 18);
  1857. end;
  1858. spawn(function()
  1859.     while wait(30) do
  1860.         u28(); 
  1861.     end;
  1862. end);
  1863. u28();
  1864. u30 = "Event";
  1865. u31 = "Confetti";
  1866. u28 = "Start";
  1867. u29 = v2;
  1868. u27 = v2.On;
  1869. u27(u29, u30, u31, u28, function(p64)
  1870.     if p64.Team then
  1871.         local v194 = workspace:WaitForChild("Map"):WaitForChild("Confetti"):FindFirstChild(p64.Team);
  1872.         if v194 then
  1873.             for v195, v196 in pairs(v194:GetChildren()) do
  1874.                 v196:Emit(200);
  1875.             end;
  1876.             return;
  1877.         end;
  1878.     else
  1879.         local l__Confetti__197 = workspace:WaitForChild("Map"):WaitForChild("Confetti");
  1880.         if l__Confetti__197 then
  1881.             local v198, v199, v200 = pairs(l__Confetti__197:GetChildren());
  1882.             while true do
  1883.                 local v201, v202 = v198(v199, v200);
  1884.                 if v201 then
  1885.  
  1886.                 end;
  1887.                 v200 = v201;
  1888.                 v202:Emit(200);        
  1889.             end;
  1890.         end;
  1891.     end;
  1892. end);
  1893. u30 = "TeleportGui";
  1894. u29 = l__ReplicatedStorage__9;
  1895. u27 = l__ReplicatedStorage__9.WaitForChild;
  1896. u27 = u27(u29, u30);
  1897. u29 = game;
  1898. u31 = "TeleportService";
  1899. u30 = u29;
  1900. u29 = u29.GetService;
  1901. u29 = u29(u30, u31);
  1902. u28 = u27;
  1903. u31 = u29;
  1904. u30 = u29.SetTeleportGui;
  1905. u30(u31, u28);
  1906. u30 = game;
  1907. u28 = "TweenService";
  1908. u31 = u30;
  1909. u30 = u30.GetService;
  1910. u30 = u30(u31, u28);
  1911. u28 = v2;
  1912. u31 = v2.On;
  1913. u31(u28, "Event", "Teleport", "Activate", function()
  1914.     local l__LoadingGui__203 = l__LocalPlayer__13.PlayerGui:WaitForChild("LoadingGui");
  1915.     l__LoadingGui__203.Background.Logo.Position = UDim2.new(0.5, 0, 0.5, 20);
  1916.     u30:Create(l__LoadingGui__203.Background.Logo, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {
  1917.         Position = UDim2.new(0.5, 0, 0.5, 0)
  1918.     }):Play();
  1919.     u30:Create(l__LoadingGui__203.Background.Logo, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {
  1920.         ImageTransparency = 0
  1921.     }):Play();
  1922.     delay(0.1, function()
  1923.         u30:Create(l__LoadingGui__203.Background, TweenInfo.new(1.5, Enum.EasingStyle.Quint), {
  1924.             BackgroundTransparency = 0
  1925.         }):Play();
  1926.     end);
  1927. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement