Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Decompiled with the Synapse X Luau decompiler.
- while true do
- wait(1);
- if workspace:FindFirstChild(game:GetService("Players").LocalPlayer.Name) then
- break;
- end;
- end;
- while true do
- wait();
- if shared() == true then
- break;
- end;
- end;
- while true do
- wait();
- if Module("Placement") then
- break;
- end;
- end;
- game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui"):SetTopbarTransparency(1);
- local v1 = Module("Maid");
- local v2 = Module("Network");
- local v3 = Module("Placement");
- local v4 = Module("Raycast");
- local v5 = Module("Signal");
- local v6 = Module("Create");
- local l__RunService__7 = game:GetService("RunService");
- local l__Players__8 = game:GetService("Players");
- local l__ReplicatedStorage__9 = game:GetService("ReplicatedStorage");
- local l__ContentProvider__10 = game:GetService("ContentProvider");
- local l__MarketplaceService__11 = game:GetService("MarketplaceService");
- local l__StarterGui__12 = game:GetService("StarterGui");
- local l__LocalPlayer__13 = l__Players__8.LocalPlayer;
- local l__UserInputService__14 = game:GetService("UserInputService");
- local l__ReplicatedStorage__15 = game:GetService("ReplicatedStorage");
- local l__Players__16 = game:GetService("Players");
- local l__Modules__17 = l__ReplicatedStorage__15:WaitForChild("Client"):WaitForChild("Modules");
- local l__TouchEnabled__18 = game:GetService("UserInputService").TouchEnabled;
- local v19 = require(l__Modules__17:WaitForChild("Hover"));
- local v20 = require(l__Modules__17:WaitForChild("PlaySound"));
- local v21 = require(l__Modules__17:WaitForChild("Broadcast"));
- local v22 = require(l__Modules__17:WaitForChild("Comma"));
- v2:On("Event", "Message", "Show", v21);
- local l__SFX__23 = l__ReplicatedStorage__15:WaitForChild("Client"):WaitForChild("SFX");
- local l__Move__24 = script.Parent:WaitForChild("Upgrade"):WaitForChild("Move");
- local l__Move__25 = script.Parent:WaitForChild("Settings"):WaitForChild("Move");
- local v26 = { script.Parent:WaitForChild("Settings"):WaitForChild("Move"):WaitForChild("Close"), script.Parent:WaitForChild("Upgrade"):WaitForChild("Move"):WaitForChild("Close") };
- l__StarterGui__12:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false);
- 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") };
- local u1 = {};
- function addComas(p1)
- local v28 = "" .. p1;
- return #v28 % 3 == 0 and v28:reverse():gsub("(%d%d%d)", "%1,"):reverse():sub(2) or v28:reverse():gsub("(%d%d%d)", "%1,"):reverse();
- end;
- local l__Loading__2 = script.Parent.Loading;
- local u3 = true;
- local function u4()
- l__Loading__2.Visible = true;
- while u3 do
- for v29 = 1, 3 do
- local v30 = nil;
- v30 = "Fetching Data";
- for v31 = 1, v29 do
- v30 = v30 .. ".";
- end;
- l__Loading__2.Status.Text = local v32;
- if not u3 then
- break;
- end;
- local v33 = l__Loading__2.Frame[tostring(v29)];
- v33:TweenSize(UDim2.new(0, 75, 0, 75), "Out", "Sine", 0.5, true);
- wait(0.5);
- v33:TweenSize(UDim2.new(0, 50, 0, 50), "In", "Sine", 0.5, true);
- wait(0.5);
- end;
- end;
- l__Loading__2.Visible = false;
- end;
- spawn(function()
- u4();
- end);
- v19(script.Parent:WaitForChild("Holder"):WaitForChild("Troops"):GetChildren(), 5);
- v19(script.Parent:WaitForChild("Holder"):WaitForChild("Tabs"):GetChildren(), 5);
- v19(script.Parent:WaitForChild("DiffVote"):WaitForChild("Move"):WaitForChild("Buttons"):GetChildren(), 5);
- v19(script.Parent:WaitForChild("Upgrade"):WaitForChild("Move"):WaitForChild("Specials"):GetChildren(), 5);
- v19(v27, 3);
- local v34 = {};
- for v35, v36 in pairs(l__ReplicatedStorage__9.Towers:GetChildren()) do
- v34[v36.Name] = {
- Stats = v36:FindFirstChild("Stats") and require(v36.Stats)
- };
- end;
- local function u5(p2)
- local l__TouchGui__37 = l__LocalPlayer__13.PlayerGui:FindFirstChild("TouchGui");
- if l__TouchGui__37 then
- local l__TouchControlFrame__38 = l__TouchGui__37:FindFirstChild("TouchControlFrame");
- if l__TouchControlFrame__38 then
- l__TouchControlFrame__38.JumpButton.Visible = p2;
- l__TouchControlFrame__38.RunButton.Visible = p2;
- l__TouchControlFrame__38.TauntButton.Visible = p2;
- end;
- end;
- end;
- local u6 = nil;
- local function u7(p3, p4)
- if p3 then
- for v39, v40 in pairs(p3.HumanoidRootPart:WaitForChild("Ring"):GetChildren()) do
- if v40:IsA("Beam") then
- v40.Enabled = p4;
- end;
- end;
- end;
- end;
- local u8 = v1.new();
- local l__Upgrade__9 = script.Parent:WaitForChild("Upgrade");
- function CloseUpgradeFrame()
- u5(true);
- if not u6 then
- return;
- end;
- if u6:FindFirstChild("RingPath") then
- u6.RingPath.Transparency = 1;
- end;
- if u6.Type.Value == "Void Miner" then
- u6.HumanoidRootPart.Collected.Enabled = false;
- end;
- u7(u6, true);
- u8:Sweep();
- l__Upgrade__9.Move.Active = false;
- l__Upgrade__9.Move:TweenPosition(UDim2.new(0.5, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
- if l__TouchEnabled__18 == false then
- if l__ReplicatedStorage__9.State.Mode.Value == "Versus" then
- script.Parent.Queue.Move:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
- end;
- end;
- local l__HumanoidRootPart__41 = u6:FindFirstChild("HumanoidRootPart");
- if l__HumanoidRootPart__41 then
- if l__HumanoidRootPart__41:FindFirstChild("MusicGui") then
- local l__MusicGui__42 = script:FindFirstChild("MusicGui");
- if l__MusicGui__42 then
- l__MusicGui__42.Enabled = false;
- l__MusicGui__42.Adornee = nil;
- end;
- end;
- end;
- end;
- local v43 = { "First", "Closest", "Strongest" };
- local v44 = {};
- local u10 = {};
- function v44.Start(p5, p6, p7)
- if not u10[p6] then
- u10[p6] = {
- Active = true,
- Signals = {},
- Time = 0
- };
- else
- u10[p6].Active = true;
- end;
- local v45 = p7;
- while true do
- v45 = v45 - 1;
- for v46, v47 in pairs(u10[p6].Signals) do
- v47:Fire(v45);
- end;
- u10[p6].Time = v45;
- wait(1);
- if v45 <= 0 then
- break;
- end;
- end;
- u10[p6].Time = 0;
- u10[p6].Active = false;
- end;
- function v44.Connect(p8, p9, p10)
- if not u10[p9] then
- u10[p9] = {
- Active = false,
- Signals = {},
- Time = 0
- };
- end;
- local v48 = v5.new();
- table.insert(u10[p9].Signals, v48);
- return v48:Connect(p10);
- end;
- function v44.Get(p11, p12)
- return u10[p12];
- end;
- u10 = {};
- function OpenUpgradeFrame(p13)
- CloseUpgradeFrame();
- u5(false);
- u6 = p13;
- u7(u6, false);
- l__Upgrade__9.Move:TweenPosition(UDim2.new(0.5, 0, 0, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 0.2, true);
- l__Upgrade__9.Move.Active = true;
- if l__TouchEnabled__18 == false then
- if l__ReplicatedStorage__9.State.Mode.Value == "Versus" then
- script.Parent.Queue.Move:TweenPosition(UDim2.new(-1.2, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
- end;
- end;
- local l__HumanoidRootPart__49 = p13:FindFirstChild("HumanoidRootPart");
- if l__HumanoidRootPart__49 then
- if l__HumanoidRootPart__49:FindFirstChild("MusicGui") then
- local l__MusicGui__50 = script:FindFirstChild("MusicGui");
- l__MusicGui__50.Enabled = true;
- if l__MusicGui__50 then
- local l__Main__51 = l__MusicGui__50:WaitForChild("Main");
- u8:Mark(l__Main__51.Input.TextBox.FocusLost:Connect(function()
- local v52, v53 = pcall(function()
- return tonumber(l__Main__51.Input.TextBox.Text);
- end);
- if v52 then
- if v53 then
- l__ContentProvider__10:PreloadAsync({ "rbxassetid://" .. v53 }, function()
- if l__RunService__7:IsStudio() then
- warn("Loaded");
- end;
- end);
- local v54, v55 = pcall(function()
- return l__MarketplaceService__11:GetProductInfo(v53);
- end);
- u10[v53] = v54 and v55 or nil;
- end;
- end;
- end));
- u8:Mark(l__Main__51.Play.Detector.MouseButton1Down:Connect(function()
- local v56 = nil;
- v20(l__SFX__23.Click);
- local v57 = nil;
- v57, v56 = pcall(function()
- return tonumber(l__Main__51.Input.TextBox.Text);
- end);
- if v57 then
- if v56 then
- else
- v20(l__SFX__23.Error);
- return;
- end;
- else
- v20(l__SFX__23.Error);
- return;
- end;
- if v2:InvokeServer("Towers", "Execute", {
- Tower = p13,
- Name = "Music",
- Data = { v56 }
- }) then
- else
- v20(l__SFX__23.Error);
- return;
- end;
- local v58 = u10[v56];
- if not v58 then
- local v59, v60 = pcall(function()
- return l__MarketplaceService__11:GetProductInfo(v56);
- end);
- v58 = v59 and v60 or {};
- end;
- l__Main__51.SongName.Text = v58.Name and "Untitled Song";
- end));
- l__MusicGui__50.Adornee = l__HumanoidRootPart__49;
- end;
- end;
- end;
- local function v61()
- l__Upgrade__9.Move.Stats.Damage.TextLabel.Text = "Damage: " .. u6.Damage.Value;
- l__Upgrade__9.Move.Stats.Firerate.TextLabel.Text = "Firerate: " .. u6.Cooldown.Value;
- l__Upgrade__9.Move.Stats.Range.TextLabel.Text = "Range: " .. u6.Range.Value;
- end;
- local u11 = nil;
- local function v62(p14)
- if u11 then
- u11:Destroy();
- end;
- p14 = p14 + p14 * (u6.Display.Range.Value / 100);
- u11 = l__ReplicatedStorage__9:WaitForChild("Effects"):WaitForChild("RangePart"):Clone();
- u11.Size = Vector3.new(p14 * 2, 0.3, p14 * 2);
- u11.CFrame = p13.HumanoidRootPart.GridPart.CFrame;
- u11.Color = Color3.fromRGB(13, 105, 172);
- u11.Parent = workspace.CurrentCamera;
- u8:Mark(u11);
- if u6.Type.Value == "Ace Pilot" then
- u6.RingPath.Transparency = 0.3;
- u8:Mark(u11, l__RunService__7.RenderStepped:Connect(function()
- u11.Position = u6.FlightPos.Range.WorldPosition;
- end));
- elseif u6.Type.Value == "Void Miner" then
- u6.HumanoidRootPart.Collected.Enabled = true;
- end;
- return u11;
- end;
- local l__Range__63 = p13:WaitForChild("Range");
- u8:Mark(l__Range__63.Changed:Connect(v62));
- v62(l__Range__63.Value);
- v61();
- local v64, v65, v66 = pairs(l__Upgrade__9.Move:WaitForChild("Upgrades"):GetChildren());
- while true do
- local v67, v68 = v64(v65, v66);
- if v67 then
- else
- break;
- end;
- v66 = v67;
- if v68:IsA("Frame") then
- v68.BackgroundColor3 = Color3.fromRGB(255, 255, 255);
- end;
- end;
- local l__Upgrade__69 = p13:WaitForChild("Upgrade");
- local function v70(p15)
- local l__Move__71 = l__Upgrade__9:WaitForChild("Move");
- local v72 = 1 - 1;
- while true do
- local v73 = l__Move__71:WaitForChild("Upgrades"):FindFirstChild(v72);
- if v73 then
- v73.BackgroundColor3 = Color3.fromRGB(0, 255, 3);
- end;
- if 0 <= 1 then
- if v72 < p15 then
- else
- break;
- end;
- elseif p15 < v72 then
- else
- break;
- end;
- v72 = v72 + 1;
- end;
- l__Move__71:WaitForChild("Level").Text = "Level " .. p15;
- end;
- u8:Mark(l__Upgrade__69.Changed:Connect(v70));
- v70(l__Upgrade__69.Value);
- local function v74(p16)
- if p16 then
- p16 = math.floor(math.clamp(p16 - p16 * (u6.Display.Discount.Value / 100), 0, math.huge));
- end;
- if p16 then
- l__Upgrade__9.Move.Upgrade.ImageColor3 = Color3.fromRGB(142, 255, 37);
- l__Upgrade__9.Move.Upgrade.Detector.Text = "Upgrade: $" .. addComas(math.floor(p16));
- return;
- end;
- if p16 then
- if p16 <= 0 then
- l__Upgrade__9.Move.Upgrade.ImageColor3 = Color3.fromRGB(142, 255, 37);
- l__Upgrade__9.Move.Upgrade.Detector.Text = "Upgrade: FREE";
- return;
- end;
- end;
- l__Upgrade__9.Move.Upgrade.ImageColor3 = Color3.fromRGB(139, 139, 139);
- l__Upgrade__9.Move.Upgrade.Detector.Text = "Fully Upgraded";
- end;
- local function v75()
- local v76 = v34[u6.Type.Value].Stats.UpgradeNames and v34[u6.Type.Value].Stats.UpgradeNames[u6.Upgrade.Value + 1];
- l__Upgrade__9.Move.UpgradeName.Text = v76 and "Next Upgrade: " .. v76 or "";
- end;
- local function v77()
- 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 "";
- end;
- v74((v2:InvokeServer("Towers", "Upgrade", "Get", {
- Tower = u6
- })));
- v75();
- v77();
- l__Upgrade__9.Move.TroopName.Text = u6.Type.Value;
- u8:Mark(l__Upgrade__9.Move.Upgrade.Detector.MouseButton1Click:Connect(function()
- local v78 = v2:InvokeServer("Towers", "Upgrade", "Set", {
- Tower = u6
- });
- if not v78 then
- v20(l__SFX__23.Error);
- return v21({
- Text = "Not enough money!",
- Color = Color3.fromRGB(236, 0, 0)
- });
- end;
- if v78 == true then
- v74();
- else
- v20(l__SFX__23.Purchase);
- v74(v78);
- end;
- l__Upgrade__9.Move.TroopName.Text = u6.Type.Value;
- v75();
- v77();
- v61();
- end));
- l__Upgrade__9.Move.Target.Detector.Text = v2:InvokeServer("Towers", "Mode", "Get", {
- Tower = u6
- });
- u8:Mark(l__Upgrade__9.Move.Target.Detector.MouseButton1Click:Connect(function()
- l__Upgrade__9.Move.Target.Detector.Text = v2:InvokeServer("Towers", "Mode", "Set", {
- Tower = u6
- });
- end));
- local v79 = v34[u6.Type.Value].Stats and v34[u6.Type.Value].Stats.Abilities or {};
- local v80, v81, v82 = pairs({ l__Upgrade__9.Move.Specials.Ability1, l__Upgrade__9.Move.Specials.Ability2, l__Upgrade__9.Move.Specials.Ability3 });
- while true do
- local v83, v84 = v80(v81, v82);
- if v83 then
- else
- break;
- end;
- v82 = v83;
- local v85 = v79[v83];
- if v85 then
- v84.Active = true;
- v84.Visible = true;
- if v85.Price == 0 then
- local v86 = "";
- else
- v86 = "$" .. v85.Price;
- end;
- v84.Price.Text = v86;
- u8:Mark(v84.Detector.MouseButton1Click:Connect(function()
- if v44:Get(u6) then
- if not v44:Get(u6).Active then
- if v2:InvokeServer("Towers", "Abilities", "Activate", {
- Tower = u6,
- Index = v85.Name
- }) then
- v44:Start(u6, v85.Debounce);
- end;
- end;
- end;
- end));
- u8:Mark(l__Upgrade__69.Changed:Connect(function(p17)
- if v85.Level <= p17 then
- v84.Visible = true;
- end;
- end));
- if l__Upgrade__69.Value < v85.Level then
- v84.Visible = false;
- end;
- if v44:Get(u6) then
- local l__Time__87 = v44:Get(u6).Time;
- if l__Time__87 <= 0 then
- local v88 = "";
- else
- v88 = l__Time__87;
- end;
- v84.Count.Text = v88;
- end;
- u8:Mark(v44:Connect(u6, function(p18)
- if p18 <= 0 then
- local v89 = "";
- else
- v89 = p18;
- end;
- v84.Count.Text = v89;
- end));
- v84.Icon.Image = "rbxassetid://" .. v85.Icon;
- else
- v84.Active = false;
- v84.Visible = false;
- v84.Icon.Image = "rbxassetid://0";
- end;
- end;
- l__Upgrade__9.Move.Icon.Damage.Text = "Total Damage: " .. u6:WaitForChild("Damage").Value;
- u8:Mark(u6:WaitForChild("Damage").Changed:Connect(function(p19)
- l__Upgrade__9.Move.Icon.Damage.Text = "Total Damage: " .. p19;
- end));
- local function v90()
- local v91 = v34[u6.Type.Value].Stats.Desc[l__Upgrade__69.Value + 1];
- if v91 then
- l__Upgrade__9.Move.Description.Text = table.concat(v91, "\n");
- end;
- end;
- u8:Mark(l__Upgrade__69.Changed:Connect(v90));
- v90();
- if u6:FindFirstChild("Units") then
- local l__Units__92 = u6.Units;
- local function v93(p20, p21)
- local v94 = l__ReplicatedStorage__9:WaitForChild("Effects"):WaitForChild("RangePart"):Clone();
- v94.Size = Vector3.new(p21 * 2, 0.3, p21 * 2);
- v94.Color = Color3.fromRGB(13, 105, 172);
- v94.Parent = workspace.CurrentCamera;
- u8:Mark(v94);
- u8:Mark(l__RunService__7.RenderStepped:Connect(function()
- if p20:IsDescendantOf(workspace) then
- v94.Position = p20.HumanoidRootPart.Range.WorldPosition;
- return;
- end;
- if v94.Parent then
- v94:Destroy();
- end;
- end));
- return v94;
- end;
- local v95, v96, v97 = pairs(l__Units__92:GetChildren());
- while true do
- local v98, v99 = v95(v96, v97);
- if v98 then
- else
- break;
- end;
- v97 = v98;
- v93(v99.Value, v99.Value.Range.Value);
- end;
- u8:Mark(l__Units__92.ChildAdded:Connect(function(p22)
- v93(p22.Value, p22.Value.Range.Value);
- end));
- end;
- u8:Mark(l__Move__24.Sell.Detector.MouseButton1Click:Connect(function()
- if v2:InvokeServer("Towers", "Sell", u6) then
- CloseUpgradeFrame();
- end;
- end));
- local function v100(p23)
- l__Move__24.Sell.Detector.Text = "Sell $" .. math.floor(p23 / 3);
- end;
- u8:Mark(u6.Worth.Changed:Connect(v100));
- v100(u6.Worth.Value);
- u8:Mark(u6.Display.Cooldown.Changed:Connect(function(p24)
- l__Move__24.Icon.Buffs.Firerate.Amount.Text = "+" .. p24 / 100 * 10000 .. "%";
- l__Move__24.Icon.Buffs.Firerate.Visible = 0 < u6.Display.Cooldown.Value;
- end));
- u8:Mark(u6.Display.Damage.Changed:Connect(function(p25)
- l__Move__24.Icon.Buffs.Strength.Amount.Text = "+" .. p25 .. "%";
- l__Move__24.Icon.Buffs.Strength.Visible = 0 < u6.Display.Damage.Value;
- end));
- u8:Mark(u6.Display.Range.Changed:Connect(function(p26)
- l__Move__24.Icon.Buffs.Range.Amount.Text = "+" .. p26 .. "%";
- l__Move__24.Icon.Buffs.Range.Visible = 0 < u6.Display.Range.Value;
- end));
- u8:Mark(u6.Display.Discount.Changed:Connect(function(p27)
- l__Move__24.Icon.Buffs.Discount.Amount.Text = "+" .. p27 .. "%";
- l__Move__24.Icon.Buffs.Discount.Visible = 0 < u6.Display.Discount.Value;
- end));
- l__Move__24.Icon.Buffs.Firerate.Visible = 0 < u6.Display.Cooldown.Value;
- l__Move__24.Icon.Buffs.Strength.Visible = 0 < u6.Display.Damage.Value;
- l__Move__24.Icon.Buffs.Discount.Visible = 0 < u6.Display.Discount.Value;
- l__Move__24.Icon.Buffs.Range.Visible = 0 < u6.Display.Range.Value;
- l__Move__24.Icon.Buffs.Firerate.Amount.Text = "+" .. u6.Display.Cooldown.Value .. "%";
- l__Move__24.Icon.Buffs.Strength.Amount.Text = "+" .. u6.Display.Damage.Value .. "%";
- l__Move__24.Icon.Buffs.Discount.Amount.Text = "+" .. u6.Display.Discount.Value .. "%";
- l__Move__24.Icon.Buffs.Range.Amount.Text = "+" .. u6.Display.Range.Value .. "%";
- end;
- local u12 = v4.new("Blacklist", { workspace:WaitForChild("Map"):FindFirstChild("Regions"), workspace:WaitForChild("Map"):FindFirstChild("Confetti"), l__LocalPlayer__13.Character });
- local u13 = function(p28, p29)
- if p28 and p29 then
- while true do
- local v101 = p28:FindFirstChild(p29);
- if v101 then
- return v101;
- end;
- p28 = p28.Parent;
- if not p28 then
- break;
- end;
- if not p28:IsDescendantOf(workspace) then
- break;
- end;
- end;
- end;
- end;
- local function u14()
- local v102 = u12:CastMouse();
- if v102.Hit then
- local v103 = u13(v102.Hit, "Owner");
- if v103 and v103.Value == l__Players__8.LocalPlayer and v102.Hit.Name ~= "GridPart" and v102.Hit.Name ~= "RingPath" then
- local l__Parent__104 = v103.Parent;
- if l__Parent__104 then
- OpenUpgradeFrame(l__Parent__104);
- end;
- end;
- end;
- end;
- l__UserInputService__14.InputBegan:Connect(function(p30, p31)
- if p31 then
- return;
- end;
- if p30.UserInputType == Enum.UserInputType.MouseButton1 then
- u14();
- return;
- end;
- if p30.UserInputType == Enum.UserInputType.Touch then
- u14();
- end;
- end);
- l__Upgrade__9.Move.Close.Detector.MouseButton1Click:Connect(function()
- CloseUpgradeFrame();
- end);
- u12 = v1.new;
- u12 = u12();
- u13 = v2.InvokeServer;
- u13 = u13(v2, "Session", "Inventory");
- u3 = false;
- local v105 = {};
- for v106, v107 in pairs(l__ReplicatedStorage__9.Towers:GetChildren()) do
- v105[v107.Name] = {
- Stats = require(v107.Stats),
- Skins = v107.Skins
- };
- end;
- local l__Holder__108 = script.Parent:WaitForChild("Holder");
- 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") };
- local u16 = v2:InvokeServer("Session", "Get").Equipped;
- local u17 = v105;
- local u18 = {
- Enabled = false,
- Current = nil,
- Tower = ""
- };
- local u19 = l__Holder__108;
- function reloadTroops()
- local v109 = nil;
- u12:Sweep();
- local v110, v111, v112 = pairs(u15);
- while true do
- local v113, v114 = v110(v111, v112);
- if v113 then
- else
- break;
- end;
- v112 = v113;
- v114.Icon.Image = "rbxassetid://3957544328";
- v114.Icon.ImageTransparency = 0.7;
- v114.Icon.ImageColor3 = Color3.fromRGB(0, 0, 0);
- v114.Label.Text = "Empty";
- v114.Label.TextColor3 = Color3.fromRGB(255, 255, 255);
- v114.Lock.Visible = false;
- end;
- v109 = u15[5];
- if 10 <= l__LocalPlayer__13.Level.Value then
- v109.Lock.Visible = false;
- v109.Level.Visible = false;
- v109.Label.Visible = true;
- else
- v109.Level.Visible = true;
- v109.Lock.Visible = true;
- v109.Label.Visible = false;
- end;
- local v115, v116, v117 = pairs(u15);
- while true do
- local v118, v119 = v115(v116, v117);
- if v118 then
- else
- break;
- end;
- v117 = v118;
- local v120 = u16.Troops[v118];
- if v120 then
- local v121 = u17[v120];
- local v122 = u13.Troops[v120] and u13.Troops[v120].Skin;
- if v121 then
- if v122 then
- v119.Icon.ImageTransparency = 0;
- v119.Icon.ImageColor3 = Color3.fromRGB(255, 255, 255);
- v119.Label.TextColor3 = Color3.fromRGB(106, 235, 0);
- if v121.Stats.Skins ~= nil then
- if v122 ~= "Default" then
- v119.Icon.Image = "rbxassetid://" .. v121.Stats.Skins[v122];
- else
- v119.Icon.Image = "rbxassetid://" .. v121.Stats.Icon;
- end;
- else
- v119.Icon.Image = "rbxassetid://" .. v121.Stats.Icon;
- end;
- v119.Label.Text = "$" .. addComas(math.floor(v121.Stats.Price * l__ReplicatedStorage__9.State.PriceScale.Value));
- u12:Mark(v119.Detector.MouseButton1Click:Connect(function()
- if l__LocalPlayer__13.Cash.Value < v121.Stats.Price * l__ReplicatedStorage__9.State.PriceScale.Value then
- v20(l__SFX__23.Error);
- return v21({
- Text = "Not enough money!",
- Color = Color3.fromRGB(236, 0, 0)
- });
- end;
- if u18.Current then
- u18.Current:Stop();
- u18.Current = nil;
- v3:ViewBoundaries(false);
- end;
- local v123 = u13.Troops[v120] and v121.Skins[u13.Troops[v120].Skin];
- if v123 then
- u18.Tower = v120;
- u18.Current = v3.new(v120);
- u18.Current:Start(v123, v121.Stats.Range, v121.Stats.Class);
- v3:ViewBoundaries(true);
- if l__TouchEnabled__18 then
- u19.Rotate.Visible = true;
- u19.Trash.Visible = true;
- else
- u19["Stats Bar"].CancelTip.Visible = true;
- u19["Stats Bar"].RotateTip.Visible = true;
- end;
- CloseUpgradeFrame();
- end;
- end));
- end;
- end;
- end;
- end;
- end;
- reloadTroops();
- u19.Rotate.Detector.MouseButton1Click:Connect(function()
- if u18.Current then
- u18.Current:Rotate();
- v20(l__SFX__23.Zoom);
- end;
- end);
- u19.Trash.Detector.MouseButton1Click:Connect(function()
- if u18.Current then
- u18.Current:Stop();
- u18.Current = nil;
- v3:ViewBoundaries(false);
- v20(l__SFX__23.Trash);
- u19.Rotate.Visible = false;
- u19.Trash.Visible = false;
- end;
- end);
- for v124, v125 in pairs(script.Parent:WaitForChild("Holder"):WaitForChild("Troops"):GetChildren()) do
- if v125:IsA("ImageLabel") then
- v125.Detector.MouseButton1Click:Connect(function()
- v20(l__SFX__23.Click);
- end);
- end;
- end;
- local l__mouse__126 = game.Players.LocalPlayer:GetMouse();
- l__UserInputService__14.InputBegan:Connect(function(p32, p33)
- if p32.UserInputType == Enum.UserInputType.Keyboard then
- local l__KeyCode__127 = p32.KeyCode;
- if u18.Current then
- if l__KeyCode__127 == Enum.KeyCode.R then
- u18.Current:Rotate();
- v20(l__SFX__23.Zoom);
- return;
- end;
- if l__KeyCode__127 == Enum.KeyCode.Q then
- if u18.Current then
- u18.Current:Stop();
- u18.Current = nil;
- v3:ViewBoundaries(false);
- end;
- u19.Rotate.Visible = false;
- u19.Trash.Visible = false;
- u19["Stats Bar"].CancelTip.Visible = false;
- u19["Stats Bar"].RotateTip.Visible = false;
- v20(l__SFX__23.Trash);
- end;
- end;
- end;
- end);
- local u20 = 0;
- local function u21()
- local v128 = nil;
- if l__TouchEnabled__18 and u18.Current then
- if tick() - u20 >= 0.4 then
- u20 = tick();
- return;
- end;
- u20 = tick();
- end;
- if u18.Current then
- local v129 = nil;
- v128, v129 = u18.Current:Place();
- if v128.Message then
- v20(l__SFX__23.Error);
- v21({
- Text = v128.Message,
- Color = Color3.fromRGB(255, 255, 255)
- });
- end;
- if v128.Quit then
- u18.Current:Stop();
- u19.Rotate.Visible = false;
- u19.Trash.Visible = false;
- u18.Current = nil;
- v3:ViewBoundaries(false);
- u19["Stats Bar"].CancelTip.Visible = false;
- u19["Stats Bar"].RotateTip.Visible = false;
- return;
- end;
- if not v128.Tower then
- return;
- end;
- else
- return;
- end;
- local l__Tower__130 = v128.Tower;
- v3:ViewBoundaries(false);
- v20(l__SFX__23.Place);
- local v131 = u17[l__Tower__130.Name];
- if v131 then
- local v132 = l__ReplicatedStorage__9.Effects.Ring:Clone();
- v132.CFrame = CFrame.new(l__Tower__130.Model:WaitForChild("HumanoidRootPart").GridPart.Position) * CFrame.new(0, 0.15, 0);
- if v131.Stats.ring_size then
- v132.Attachment1.Position = Vector3.new(0, 0, -v131.Stats.ring_size);
- v132.Attachment2.Position = Vector3.new(0, 0, v131.Stats.ring_size);
- v132.Attachment3.Position = Vector3.new(-v131.Stats.ring_size, 0, 0);
- v132.Attachment4.Position = Vector3.new(v131.Stats.ring_size, 0, 0);
- for v133, v134 in pairs(v132:GetChildren()) do
- if v134:IsA("Beam") then
- local v135 = 1.3333333333333333 * v131.Stats.ring_size * math.tan(math.pi / 8);
- v134.CurveSize0 = v135;
- v134.CurveSize1 = v135;
- end;
- end;
- end;
- v132.Parent = l__Tower__130.Model:WaitForChild("HumanoidRootPart");
- end;
- u18.Current:Stop();
- u19.Rotate.Visible = false;
- u19.Trash.Visible = false;
- u18.Current = nil;
- u19["Stats Bar"].CancelTip.Visible = false;
- u19["Stats Bar"].RotateTip.Visible = false;
- end;
- l__UserInputService__14.InputBegan:Connect(function(p34, p35)
- if p35 then
- return;
- end;
- if p34.UserInputType == Enum.UserInputType.MouseButton1 then
- u21();
- return;
- end;
- if p34.UserInputType == Enum.UserInputType.Touch then
- u21();
- end;
- end);
- u13 = pairs;
- u17 = script;
- u16 = u17.Parent;
- u19 = "Holder";
- u17 = u16;
- u16 = u16.WaitForChild;
- u16 = u16(u17, u19);
- u19 = "Tabs";
- u17 = u16;
- u16 = u16.WaitForChild;
- u16 = u16(u17, u19);
- u17 = u16;
- u16 = u16.GetChildren;
- u13, u16, u17 = u13(u16(u17));
- while true do
- u19 = u13;
- u15 = u16;
- u19, u15 = u19(u15, u17);
- if not u19 then
- break;
- end;
- u17 = u19;
- if u15:IsA("ImageLabel") then
- u15.Detector.MouseButton1Click:Connect(function()
- v20(l__SFX__23.Click);
- end);
- end;
- end;
- u17 = l__Move__24.Upgrade;
- u16 = u17.Detector;
- u13 = u16.MouseButton1Click;
- u17 = function()
- v20(l__SFX__23.Click);
- end;
- u16 = u13;
- u13 = u13.Connect;
- u13(u16, u17);
- u17 = l__Move__24.Target;
- u16 = u17.Detector;
- u13 = u16.MouseButton1Click;
- u17 = function()
- v20(l__SFX__23.Click);
- end;
- u16 = u13;
- u13 = u13.Connect;
- u13(u16, u17);
- u17 = l__Move__24.Sell;
- u16 = u17.Detector;
- u13 = u16.MouseButton1Click;
- u17 = function()
- v20(l__SFX__23.Click);
- end;
- u16 = u13;
- u13 = u13.Connect;
- u13(u16, u17);
- u13 = pairs;
- u17 = script;
- u16 = u17.Parent;
- u19 = "Upgrade";
- u17 = u16;
- u16 = u16.WaitForChild;
- u16 = u16(u17, u19);
- u19 = "Move";
- u17 = u16;
- u16 = u16.WaitForChild;
- u16 = u16(u17, u19);
- u19 = "Specials";
- u17 = u16;
- u16 = u16.WaitForChild;
- u16 = u16(u17, u19);
- u17 = u16;
- u16 = u16.GetChildren;
- u13, u16, u17 = u13(u16(u17));
- while true do
- u19 = u13;
- u15 = u16;
- u19, u15 = u19(u15, u17);
- if not u19 then
- break;
- end;
- u17 = u19;
- if u15:IsA("ImageLabel") then
- u15.Detector.MouseButton1Click:Connect(function()
- v20(l__SFX__23.Click);
- end);
- end;
- end;
- u13 = tostring;
- u16 = "Settings";
- u13 = u13(u16);
- u16 = false;
- u1[u13] = u16;
- u15 = script;
- u19 = u15.Parent;
- u15 = "Settings Button";
- u17 = u19[u15];
- u16 = u17.Detector;
- u13 = u16.MouseButton1Down;
- local function u22(p36)
- for v136, v137 in pairs(script.Parent:GetChildren()) do
- if tostring(v137) ~= p36 and tostring(v137) == "Settings" then
- 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);
- u1[tostring(v137)] = false;
- end;
- end;
- end;
- u17 = function()
- if l__TouchEnabled__18 then
- u22("Settings");
- end;
- if u1[tostring("Settings")] == true then
- script.Parent.Settings.Move:TweenPosition(UDim2.new(0, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
- else
- script.Parent.Settings.Move:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
- end;
- u1.Settings = not u1.Settings;
- v20(l__SFX__23.Click);
- end;
- u16 = u13;
- u13 = u13.Connect;
- u13(u16, u17);
- u15 = script.Parent.Settings;
- u19 = u15.Move;
- u17 = u19.Close;
- u16 = u17.Detector;
- u13 = u16.MouseButton1Down;
- u17 = function()
- if u1[tostring("Settings")] == true then
- script.Parent.Settings.Move:TweenPosition(UDim2.new(0, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
- else
- script.Parent.Settings.Move:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
- end;
- u1.Settings = not u1.Settings;
- v20(l__SFX__23.Click);
- end;
- u16 = u13;
- u13 = u13.Connect;
- u13(u16, u17);
- u17 = script;
- u16 = u17.Parent;
- u19 = "Settings";
- u17 = u16;
- u16 = u16.WaitForChild;
- u16 = u16(u17, u19);
- u13 = u16.Move;
- u16 = v6;
- u17 = "Folder";
- u19 = {};
- u15 = "Settings";
- u19.Name = u15;
- u19.Parent = l__LocalPlayer__13;
- u16 = u16(u17, u19);
- u17 = pairs;
- u19 = u13.Buttons;
- u15 = u19;
- u19 = u19.GetChildren;
- for v138, v139 in u17(u19(u15)) do
- if v139:IsA("Frame") then
- local v140 = v2:InvokeServer("Settings", "Status", v139.Name);
- local v141 = v6("BoolValue", {
- Name = v139.Name,
- Parent = u16
- });
- v141.Value = v140;
- v139.Frame.Detector.MouseButton1Down:Connect(function()
- v20(l__SFX__23.Click);
- local v142 = v2:InvokeServer("Settings", "Toggle", v139.Name);
- if v142 then
- v139.Frame.Tick.Visible = true;
- v139.Frame.Cross.Visible = false;
- else
- v139.Frame.Tick.Visible = false;
- v139.Frame.Cross.Visible = true;
- end;
- v141.Value = v142;
- end);
- if v140 then
- v139.Frame.Tick.Visible = true;
- v139.Frame.Cross.Visible = false;
- else
- v139.Frame.Tick.Visible = false;
- v139.Frame.Cross.Visible = true;
- end;
- end;
- end;
- u16 = script;
- u13 = u16.Parent;
- u17 = "Skip";
- u16 = u13;
- u13 = u13.WaitForChild;
- u13 = u13(u16, u17);
- u16 = nil;
- u17 = nil;
- u19 = function(p37)
- if u16 then
- u16:Disconnect();
- end;
- if u17 then
- u17:Disconnect();
- end;
- if p37 then
- v20(l__SFX__23.Click);
- end;
- end;
- u15 = function(p38)
- if p38 then
- local v143 = 0;
- else
- v143 = -1;
- end;
- u13.Move:TweenPosition(UDim2.new(0, 0, v143, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
- end;
- v2:On("Event", "Vote", "Update", function(p39)
- u13.Move.Centre.Amount.Text = p39 .. "/" .. math.clamp(math.floor(#l__Players__8:GetChildren() / 1.25), 1, 100);
- end);
- v2:On("Event", "Vote", "Enable", function()
- u15(true);
- u17 = u13.Move.No.Detector.MouseButton1Down:Connect(function()
- u19(true);
- u15(false);
- end);
- u16 = u13.Move.Yes.Detector.MouseButton1Down:Connect(function()
- u19(true);
- v2:FireServer("Vote", "Skip");
- u15(false);
- end);
- end);
- v2:On("Event", "Vote", "Disable", function()
- u19();
- u15(false);
- end);
- u13 = l__Players__8.LocalPlayer;
- u13 = u13.GetMouse;
- u13 = u13(u13);
- local u23 = script.Parent:WaitForChild("Hover");
- local u24 = v4.new("Blacklist", { workspace:WaitForChild("Map"):FindFirstChild("Regions"), workspace:WaitForChild("Map"):FindFirstChild("Confetti"), l__LocalPlayer__13.Character });
- local u25 = {
- Towers = workspace:WaitForChild("Towers"),
- Enemies = workspace:WaitForChild("Enemies"),
- Units = workspace:WaitForChild("Units")
- };
- local u26 = function(p40, p41)
- if p40 and p41 then
- while true do
- local v144 = p40:FindFirstChild(p41);
- if v144 then
- return v144;
- end;
- p40 = p40.Parent;
- if not p40 then
- break;
- end;
- if not p40:IsDescendantOf(workspace) then
- break;
- end;
- end;
- end;
- end;
- l__RunService__7.RenderStepped:Connect(function()
- local v145 = nil;
- local v146 = nil;
- if _G.no then
- u23.Enabled = false;
- return;
- end;
- local v147 = u24:CastMouse();
- if not v147.Hit then
- u23.Enabled = false;
- return;
- end;
- if v147.Hit.Name == "GridPart" then
- u23.Enabled = false;
- return;
- end;
- if v147.Hit:IsDescendantOf(u25.Enemies) or v147.Hit:IsDescendantOf(u25.Units) then
- u23.Enabled = true;
- u23.Health.Visible = true;
- u23.Desc.Visible = false;
- u23.Health.Position = UDim2.new(0, u13.X + 10, 0, u13.Y);
- local v148 = u26(v147.Hit, "Values");
- if v148 then
- u23.Health.Bar.Count.Text = v148.Health.Current.Value .. "/" .. v148.Health.Max.Value;
- u23.Health.Bar.Bar.Size = UDim2.new(math.clamp(v148.Health.Current.Value / v148.Health.Max.Value, 0, math.huge), 0, 1, 0);
- u23.Health.UnitName.Text = v148.Type.Value;
- return;
- else
- u23.Enabled = false;
- return;
- end;
- end;
- if not v147.Hit:IsDescendantOf(u25.Towers) then
- u23.Enabled = false;
- return;
- end;
- if v147.Hit.Name == "RingPath" then
- u23.Enabled = false;
- return;
- end;
- u23.Enabled = true;
- u23.Health.Visible = false;
- u23.Desc.Visible = true;
- u23.Desc.Position = UDim2.new(0, u13.X + 10, 0, u13.Y);
- local v149 = u26(v147.Hit, "Owner");
- v145 = u26(v147.Hit, "Type");
- v146 = u26(v147.Hit, "Upgrade");
- if not v149 or not v145 or not v146 then
- u23.Enabled = false;
- return;
- end;
- u23.Desc.Username.Text = v149.Value.Name;
- u23.Desc.Tower.Text = v145.Value;
- u23.Desc.Level.Text = "Lvl. " .. v146.Value;
- end);
- u13 = function(p42, p43, p44)
- local function v150()
- p42:WaitForChild("Count").Text = math.clamp(p43.Value, 0, math.huge) .. "/" .. p44.Value;
- p42:WaitForChild("Bar").Size = UDim2.new(math.clamp(p43.Value / p44.Value, 0, math.huge), 0, 1, 0);
- end;
- p43.Changed:Connect(v150);
- v150();
- end;
- setupHealthBar = u13;
- u24 = "State";
- u23 = l__ReplicatedStorage__9;
- u25 = l__ReplicatedStorage__9.WaitForChild;
- u25 = u25(u23, u24);
- u24 = "Mode";
- u23 = u25;
- u25 = u25.WaitForChild;
- u25 = u25(u23, u24);
- u13 = u25.Value;
- u25 = "Versus";
- if u13 == u25 then
- u24 = l__ReplicatedStorage__9.State;
- u23 = u24.Teams;
- u25 = u23.Red;
- u13 = u25.Health;
- u26 = l__ReplicatedStorage__9.State;
- u24 = u26.Teams;
- u23 = u24.Blue;
- u25 = u23.Health;
- u23 = setupHealthBar;
- u26 = script;
- u24 = u26.Parent;
- u26 = u24;
- u24 = u24.WaitForChild;
- u24 = u24(u26, "Hp");
- u26 = u24;
- u24 = u24.WaitForChild;
- u24 = u24(u26, "Red");
- u26 = u13.Current;
- u23(u24, u26, u13.Max);
- u23 = setupHealthBar;
- u26 = script;
- u24 = u26.Parent;
- u26 = u24;
- u24 = u24.WaitForChild;
- u24 = u24(u26, "Hp");
- u26 = u24;
- u24 = u24.WaitForChild;
- u24 = u24(u26, "Blue");
- u26 = u25.Current;
- u23(u24, u26, u25.Max);
- u26 = script;
- u24 = u26.Parent;
- u26 = u24;
- u24 = u24.WaitForChild;
- u24 = u24(u26, "Hp");
- u23 = u24.Solo;
- u24 = false;
- u23.Visible = u24;
- u26 = script;
- u24 = u26.Parent;
- u26 = u24;
- u24 = u24.WaitForChild;
- u24 = u24(u26, "Hp");
- u23 = u24.Blue;
- u24 = true;
- u23.Visible = u24;
- u26 = script;
- u24 = u26.Parent;
- u26 = u24;
- u24 = u24.WaitForChild;
- u24 = u24(u26, "Hp");
- u23 = u24.Red;
- u24 = true;
- u23.Visible = u24;
- else
- u25 = l__ReplicatedStorage__9.State;
- u13 = u25.Health;
- u25 = setupHealthBar;
- u24 = script;
- u23 = u24.Parent;
- u26 = "Hp";
- u24 = u23;
- u23 = u23.WaitForChild;
- u23 = u23(u24, u26);
- u26 = "Solo";
- u24 = u23;
- u23 = u23.WaitForChild;
- u23 = u23(u24, u26);
- u24 = u13.Current;
- u26 = u13.Max;
- u25(u23, u24, u26);
- u24 = script;
- u23 = u24.Parent;
- u26 = "Hp";
- u24 = u23;
- u23 = u23.WaitForChild;
- u23 = u23(u24, u26);
- u25 = u23.Solo;
- u23 = true;
- u25.Visible = u23;
- u24 = script;
- u23 = u24.Parent;
- u26 = "Hp";
- u24 = u23;
- u23 = u23.WaitForChild;
- u23 = u23(u24, u26);
- u25 = u23.Blue;
- u23 = false;
- u25.Visible = u23;
- u24 = script;
- u23 = u24.Parent;
- u26 = "Hp";
- u24 = u23;
- u23 = u23.WaitForChild;
- u23 = u23(u24, u26);
- u25 = u23.Red;
- u23 = false;
- u25.Visible = u23;
- end;
- u25 = script;
- u13 = u25.Parent;
- u23 = "Holder";
- u25 = u13;
- u13 = u13.WaitForChild;
- u13 = u13(u25, u23);
- u23 = "Stats Bar";
- u25 = u13;
- u13 = u13.WaitForChild;
- u13 = u13(u25, u23);
- u23 = "Cash";
- u25 = u13;
- u13 = u13.WaitForChild;
- u13 = u13(u25, u23);
- u23 = "Amount";
- u25 = u13;
- u13 = u13.WaitForChild;
- u13 = u13(u25, u23);
- u23 = l__Players__8.LocalPlayer;
- u26 = "Cash";
- u24 = u23;
- u23 = u23.WaitForChild;
- u23 = u23(u24, u26);
- u25 = u23.Changed;
- u24 = function(p45)
- u13.Text = "$" .. v22(math.floor(p45));
- end;
- u23 = u25;
- u25 = u25.Connect;
- u25(u23, u24);
- u23 = "$";
- u24 = v22;
- u26 = math.floor;
- u24 = u24(u26(l__Players__8.LocalPlayer:WaitForChild("Cash").Value));
- u25 = u23 .. u24;
- u13.Text = u25;
- u25 = function()
- script.Parent.Queue.Visible = true;
- script.Parent.Queue.Move:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
- end;
- AppearQueue = u25;
- u23 = script;
- u25 = u23.Parent;
- u24 = "DiffVote";
- u23 = u25;
- u25 = u25.WaitForChild;
- u25 = u25(u23, u24);
- u24 = "Move";
- u23 = u25;
- u25 = u25.WaitForChild;
- u25 = u25(u23, u24);
- u23 = 0.3;
- u26 = l__ReplicatedStorage__9.State.Game.Voting;
- u24 = u26.Value;
- if u24 then
- u24 = delay;
- u26 = 0.5;
- u24(u26, function()
- u25:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.3, true);
- wait(0.5);
- l__ReplicatedStorage__9.State:WaitForChild("Music").Value = "Intermission";
- if not l__ReplicatedStorage__9.State.Game.Voting.Value then
- u25:TweenPosition(UDim2.new(0, 0, -1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.3, true);
- if l__ReplicatedStorage__9.State.Mode.Value ~= "Versus" then
- return;
- end;
- else
- v20(l__SFX__23.Swoosh);
- return;
- end;
- AppearQueue();
- end);
- else
- u26 = u25;
- u24 = u25.TweenPosition;
- u24(u26, UDim2.new(0, 0, -1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.3, true);
- u26 = l__ReplicatedStorage__9.State.Mode;
- u24 = u26.Value;
- u26 = "Versus";
- if u24 == u26 then
- u24 = AppearQueue;
- u24();
- end;
- u26 = l__ReplicatedStorage__9.State;
- u24 = u26.Music;
- u26 = "";
- u24.Value = u26;
- end;
- u26 = l__ReplicatedStorage__9.State.Game.Voting;
- u24 = u26.Changed;
- u26 = u24;
- u24 = u24.Connect;
- u24(u26, function(p46)
- if not p46 then
- u25:TweenPosition(UDim2.new(0, 0, -1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.3, true);
- v20(l__SFX__23.Woosh);
- if l__ReplicatedStorage__9.State.Mode.Value == "Versus" then
- AppearQueue();
- end;
- l__ReplicatedStorage__9.State.Music.Value = "";
- end;
- end);
- u24 = function(p47, p48)
- return p48.Detector.MouseButton1Down:Connect(function()
- v2:FireServer("Difficulty", "Vote", p47);
- v20(l__SFX__23.Click);
- end);
- end;
- u26 = {
- Easy = u25.Buttons.Easy,
- Normal = u25.Buttons.Normal,
- Hard = u25.Buttons.Hard,
- Insane = u25.Buttons.Insane
- };
- v2:On("Event", "Difficulty", "Update", function(p49)
- for v151, v152 in pairs(u26) do
- v152.Votes.Text = p49[v152.Name] and "";
- end;
- end);
- u24("Easy", u26.Easy);
- u24("Normal", u26.Normal);
- u24("Hard", u26.Hard);
- u24("Insane", u26.Insane);
- u24 = "State";
- u23 = l__ReplicatedStorage__9;
- u25 = l__ReplicatedStorage__9.WaitForChild;
- u25 = u25(u23, u24);
- u26 = u25;
- u24 = u25.WaitForChild;
- u24 = u24(u26, "Mode");
- u23 = u24.Value;
- u24 = "Versus";
- if u23 ~= u24 then
- u24 = script;
- u23 = u24.Parent;
- u26 = "Holder";
- u24 = u23;
- u23 = u23.WaitForChild;
- u23 = u23(u24, u26);
- u26 = "Tabs";
- u24 = u23;
- u23 = u23.WaitForChild;
- u23 = u23(u24, u26);
- u24 = false;
- u23.Visible = u24;
- end;
- u26 = "Wave";
- u24 = u25;
- u23 = u25.WaitForChild;
- u23 = u23(u24, u26);
- u26 = script;
- u24 = u26.Parent;
- u26 = u24;
- u24 = u24.WaitForChild;
- u24 = u24(u26, "Hp");
- u26 = u24;
- u24 = u24.WaitForChild;
- u24 = u24(u26, "Wave");
- u26 = function(p50)
- u24.Visible = p50 > 0;
- u24.Text = "Wave: " .. p50;
- end;
- u23.Changed:Connect(u26);
- u26(u23.Value);
- local u27 = script.Parent:WaitForChild("Results");
- function Format(p51)
- return string.format("%02i", p51);
- end;
- function convertToMS(p52)
- local v153 = (p52 - p52 % 60) / 60;
- p52 = p52 - v153 * 60;
- return Format(v153) .. ":" .. Format(p52);
- end;
- local u28 = l__ReplicatedStorage__9.Client.Controllers.HiddenWave:GetChildren();
- local u29 = l__ReplicatedStorage__9:WaitForChild("Client"):WaitForChild("Music"):WaitForChild("Win"):GetChildren();
- local u30 = l__ReplicatedStorage__9:WaitForChild("Client"):WaitForChild("Music"):WaitForChild("Lose"):GetChildren();
- local u31 = function(p53, p54)
- return v6("TextLabel", {
- Font = Enum.Font.SourceSansSemibold,
- Text = p53,
- Size = UDim2.new(0, 100, 0, 20),
- BackgroundTransparency = 1,
- TextScaled = true,
- TextColor3 = p54,
- TextStrokeColor3 = Color3.fromRGB(0, 0, 0),
- TextStrokeTransparency = 0.6,
- Parent = u27.Rewards
- });
- end;
- v2:On("Event", "Interface", "Finished", function(p55)
- for v154, v155 in pairs(u28) do
- if v155:IsA("Sound") then
- v155:Stop();
- end;
- end;
- local v156 = u27.Titles:FindFirstChild(p55.Result);
- if v156 then
- v156.Visible = true;
- end;
- u27.Length.Text = "The game lasted for " .. convertToMS(p55.Duration) .. " minutes.";
- if p55.Result ~= "Win" and p55.Result ~= "Triumph" then
- local v157 = p55.Result == "Draw" and l__SFX__23.Victory or l__SFX__23.Lose;
- else
- v157 = l__SFX__23.Victory or l__SFX__23.Lose;
- end;
- v157:Play();
- 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;
- for v158, v159 in pairs(p55.Rewards) do
- u31(v159.Text, v159.Color);
- end;
- u27.Visible = true;
- end);
- u30 = "Emotes";
- u29 = l__ReplicatedStorage__9;
- u27 = l__ReplicatedStorage__9.WaitForChild;
- u27 = u27(u29, u30);
- u29 = {};
- u30 = pairs;
- u28 = u27;
- u31 = u27.GetChildren;
- for v160, v161 in u30(u31(u28)) do
- u29[v161.Name] = require(v161:WaitForChild("Stats"));
- end;
- u30 = Instance.new;
- u31 = "Camera";
- u30 = u30(u31);
- u28 = CFrame.Angles;
- u28 = u28(0, math.rad(180), 0);
- u31 = u28 * CFrame.new(0, 0.5, 5);
- u30.CFrame = u31;
- u31 = v1.new;
- u31 = u31();
- u28 = function()
- u31:Sweep();
- local v162 = v2:InvokeServer("Emotes", "Get");
- for v163 = 1, 4 do
- local v164 = v162[v163] and u27:FindFirstChild(v162[v163]);
- local l__Move__165 = script.Parent:WaitForChild("Taunts").Move;
- l__Move__165.Buttons[v163].Icon:ClearAllChildren();
- if v164 then
- local v166 = v164.Model:Clone();
- v166:SetPrimaryPartCFrame(CFrame.new(0, 0, 0));
- v166.Parent = l__Move__165.Buttons[v163].Icon;
- l__Move__165.Buttons[v163].Icon.CurrentCamera = u30;
- u31:Mark(l__Move__165.Buttons[v163].Detector.MouseButton1Click:Connect(function()
- local l__Humanoid__167 = l__LocalPlayer__13.Character:FindFirstChild("Humanoid");
- if l__Humanoid__167 then
- v2:FireServer("Emotes", "Stop");
- l__Humanoid__167.Taunting.Value = true;
- local v168 = u29[v162[v163]];
- v2:FireServer("Emotes", "Play", v162[v163]);
- if loadedAnimation then
- loadedAnimation:Stop();
- end;
- l__Humanoid__167.WalkSpeed = v168.walkspeed;
- l__Humanoid__167.JumpPower = v168.jumppower;
- loadedAnimation = l__Humanoid__167:LoadAnimation(v164);
- loadedAnimation:Play();
- if not v168.looped then
- local u32 = nil;
- u32 = loadedAnimation.Stopped:Connect(function()
- v2:FireServer("Emotes", "Stop");
- u32:Disconnect();
- loadedAnimation:Stop();
- loadedAnimation = nil;
- if emoteSound then
- emoteSound:Stop();
- end;
- l__LocalPlayer__13.Character.Humanoid.JumpPower = 50;
- l__LocalPlayer__13.Character.Humanoid.WalkSpeed = 16;
- l__Humanoid__167.Taunting.Value = false;
- end);
- end;
- if emoteSound then
- emoteSound:Stop();
- end;
- local l__Sound__169 = v164:FindFirstChild("Sound");
- if l__Sound__169 then
- emoteSound = l__Sound__169:Clone();
- emoteSound.Parent = l__LocalPlayer__13.Character.HumanoidRootPart;
- emoteSound:Play();
- if v168.looped then
- emoteSound.Looped = true;
- else
- emoteSound.Looped = false;
- end;
- end;
- tauntFrameOpen = false;
- script.Parent.Taunts.Move:TweenPosition(UDim2.new(0, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
- u1.Taunts = false;
- end;
- end));
- l__Move__165.Buttons[v163].TauntName.Text = v162[v163];
- end;
- end;
- end;
- refreshEquippedEmotes = u28;
- u28 = game;
- u28 = u28.GetService;
- u28 = u28(u28, "UserInputService");
- u28.InputBegan:Connect(function(p56, p57)
- if p57 then
- return;
- end;
- if p56.UserInputType == Enum.UserInputType.Keyboard and p56.KeyCode == Enum.KeyCode.G then
- v2:FireServer("Emotes", "Stop");
- if loadedAnimation then
- loadedAnimation:Stop();
- end;
- if loadedAnimation then
- v2:FireServer("Emotes", "Stop");
- if emoteSound then
- emoteSound:Stop();
- end;
- end;
- if loadedAnimation then
- l__LocalPlayer__13.Character.Humanoid.JumpPower = 50;
- l__LocalPlayer__13.Character.Humanoid.WalkSpeed = 16;
- l__LocalPlayer__13.Character.Humanoid.Taunting.Value = false;
- loadedAnimation = nil;
- return;
- end;
- tauntFrameOpen = not tauntFrameOpen;
- u22("Taunts");
- if u1[tostring("Taunts")] == true then
- script.Parent.Taunts.Move:TweenPosition(UDim2.new(0, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
- u1.Taunts = false;
- return;
- end;
- script.Parent.Taunts.Move:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
- u1.Taunts = true;
- end;
- end);
- script.Parent.Taunts.Move.Close.Detector.MouseButton1Click:Connect(function()
- tauntFrameOpen = false;
- script.Parent.Taunts.Move:TweenPosition(UDim2.new(0, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
- u1.Taunts = false;
- end);
- refreshEquippedEmotes();
- if game:GetService("UserInputService").TouchEnabled then
- local l__TouchGui__170 = l__LocalPlayer__13.PlayerGui:FindFirstChild("TouchGui");
- if l__TouchGui__170 then
- local v171 = script.Parent.TauntButton:Clone();
- local l__JumpButton__172 = l__TouchGui__170:WaitForChild("TouchControlFrame"):WaitForChild("JumpButton");
- v171.Parent = l__TouchGui__170.TouchControlFrame;
- 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);
- v171.AnchorPoint = Vector2.new(0, 0.5);
- 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);
- v171.Visible = true;
- v171.MouseButton1Click:Connect(function()
- v2:FireServer("Emotes", "Stop");
- if loadedAnimation then
- loadedAnimation:Stop();
- end;
- if loadedAnimation then
- v2:FireServer("Emotes", "Stop");
- if emoteSound then
- emoteSound:Stop();
- end;
- end;
- if loadedAnimation then
- l__LocalPlayer__13.Character.Humanoid.JumpPower = 50;
- l__LocalPlayer__13.Character.Humanoid.WalkSpeed = 16;
- l__LocalPlayer__13.Character.Humanoid.Taunting.Value = false;
- loadedAnimation = nil;
- return;
- end;
- tauntFrameOpen = not tauntFrameOpen;
- u22("Taunts");
- if u1[tostring("Taunts")] == true then
- script.Parent.Taunts.Move:TweenPosition(UDim2.new(0, 0, 1.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
- u1.Taunts = false;
- return;
- end;
- script.Parent.Taunts.Move:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true);
- u1.Taunts = true;
- end);
- end;
- end;
- u29 = script;
- u27 = u29.Parent;
- u30 = "Holder";
- u29 = u27;
- u27 = u27.WaitForChild;
- u27 = u27(u29, u30);
- u30 = "Tabs";
- u29 = u27;
- u27 = u27.WaitForChild;
- u27 = u27(u29, u30);
- u28 = "Mode";
- u31 = u25;
- u30 = u25.WaitForChild;
- u30 = u30(u31, u28);
- u29 = u30.Value;
- u30 = "Versus";
- if u29 == u30 then
- u29 = {};
- u30 = pairs;
- u28 = l__ReplicatedStorage__9;
- u31 = l__ReplicatedStorage__9.WaitForChild;
- u31 = u31(u28, "Enemies");
- u28 = u31;
- u31 = u31.GetChildren;
- for v173, v174 in u30(u31(u28)) do
- u29[v174.Name] = require(v174.Stats);
- end;
- u30 = function()
- local l__Page__175 = script.Parent:WaitForChild("Holder"):WaitForChild("Page");
- local l__Troops__176 = script.Parent:WaitForChild("Holder"):WaitForChild("Troops");
- local v177 = {};
- for v178, v179 in pairs(require(l__ReplicatedStorage__9:WaitForChild("Data"):WaitForChild("Prices"))[l__ReplicatedStorage__9:WaitForChild("State"):WaitForChild("Difficulty").Value]) do
- table.insert(v177, {
- Name = v178,
- Wave = v179.Wave,
- Price = v179.Price
- });
- end;
- table.sort(v177, function(p58, p59)
- return p58.Wave < p59.Wave;
- end);
- local u33 = v1.new();
- local u34 = { l__Troops__176.Troop1, l__Troops__176.Troop2, l__Troops__176.Troop3, l__Troops__176.Troop4, l__Troops__176.Troop5 };
- local u35 = v1.new();
- local function u36(p60)
- l__Page__175.Text = "Page: " .. p60;
- u33:Sweep();
- local v180 = p60 * 5 - 4;
- local v181 = {};
- for v182 = v180, math.min(v180 + 5 - 1, #v177) do
- table.insert(v181, v177[v182]);
- end;
- for v183, v184 in pairs(u34) do
- v184.Label.Text = "";
- if v184:FindFirstChild("Lock") then
- v184.Lock.Visible = false;
- end;
- v184.Icon.Image = "rbxassetid://0";
- end;
- for v185, v186 in pairs(v181) do
- local v187 = u34[v185];
- if v187 then
- if v187:FindFirstChild("Level") then
- v187.Level.Visible = false;
- end;
- v187.Label.Text = v186.Name;
- v187.Label.Visible = true;
- v187.Label.TextColor3 = Color3.fromRGB(255, 255, 255);
- if l__ReplicatedStorage__9.State.Wave.Value < v186.Wave then
- if v187:FindFirstChild("Lock") then
- v187.Lock.Visible = true;
- end;
- v187.Icon.ImageColor3 = Color3.fromRGB(0, 0, 0);
- v187.Icon.ImageTransparency = 0.7;
- else
- v187.Icon.ImageColor3 = Color3.fromRGB(255, 255, 255);
- v187.Icon.ImageTransparency = 0;
- end;
- u33:Mark(l__ReplicatedStorage__9.State.Wave.Changed:Connect(function(p61)
- if v186.Wave <= p61 then
- if v187:FindFirstChild("Lock") then
- v187.Lock.Visible = false;
- end;
- v187.Icon.ImageColor3 = Color3.fromRGB(255, 255, 255);
- v187.Icon.ImageTransparency = 0;
- end;
- end));
- u33:Mark(v187.Detector.MouseButton1Click:Connect(function()
- if v186.Wave <= l__ReplicatedStorage__9.State.Wave.Value and not v2:InvokeServer("Enemy", "Send", v186.Name) then
- v21({
- Text = "Not enough money!",
- Color = Color3.fromRGB(236, 0, 0)
- });
- end;
- end));
- if u29[v186.Name].icon then
- v187.Icon.Image = "rbxassetid://" .. u29[v186.Name].icon;
- else
- v187.Icon.Image = "rbxassetid://0";
- end;
- end;
- end;
- end;
- local function u37(p62)
- l__Troops__176.Next.Visible = p62;
- l__Troops__176.Previous.Visible = p62;
- l__Page__175.Visible = p62;
- end;
- u27.Troops.Detector.MouseButton1Click:Connect(function()
- v20(l__SFX__23.Click);
- u37(false);
- reloadTroops();
- end);
- local function u38()
- u12:Sweep();
- u35:Sweep();
- u36(1);
- local u39 = 1;
- local u40 = math.floor((#v177 + 5 - 1) / 5);
- u35:Mark(l__Troops__176.Next.Detector.MouseButton1Down:Connect(function()
- u39 = math.clamp(u39 + 1, 1, u40);
- u36(u39);
- end));
- u35:Mark(l__Troops__176.Previous.Detector.MouseButton1Down:Connect(function()
- u39 = math.clamp(u39 - 1, 1, u40);
- u36(u39);
- end));
- end;
- u27.Zombies.Detector.MouseButton1Click:Connect(function()
- v20(l__SFX__23.Click);
- u37(true);
- u38();
- end);
- end;
- u28 = l__ReplicatedStorage__9.State.Difficulty;
- u31 = u28.Changed;
- u28 = u31;
- u31 = u31.Connect;
- u31(u28, u30);
- else
- u29 = false;
- u27.Visible = u29;
- end;
- u30 = "Assets";
- u29 = l__ReplicatedStorage__9;
- u27 = l__ReplicatedStorage__9.WaitForChild;
- u27 = u27(u29, u30);
- u30 = "Templates";
- u29 = u27;
- u27 = u27.WaitForChild;
- u27 = u27(u29, u30);
- u30 = "Enemy";
- u29 = u27;
- u27 = u27.WaitForChild;
- u27 = u27(u29, u30);
- u28 = script;
- u31 = u28.Parent;
- u28 = u31;
- u31 = u31.WaitForChild;
- u31 = u31(u28, "Queue");
- u30 = u31.Move;
- u29 = u30.Enemies;
- u30 = {};
- u31 = pairs;
- u28 = l__ReplicatedStorage__9.WaitForChild;
- u28 = u28(l__ReplicatedStorage__9, "Enemies");
- u28 = u28.GetChildren;
- for v188, v189 in u31(u28(u28)) do
- u30[v189.Name] = require(v189.Stats);
- end;
- u31 = require;
- u28 = l__ReplicatedStorage__9.WaitForChild;
- u28 = u28(l__ReplicatedStorage__9, "Data");
- u28 = u28.WaitForChild;
- u31 = u31(u28(u28, "Prices"));
- u28 = v2.On;
- u28(v2, "Event", "Queue", "Update", function(p63)
- for v190 = 1, 5 do
- local v191 = u29:FindFirstChild(v190);
- if v191 then
- local v192 = p63[v190];
- if v192 then
- local v193 = u30[v192.Name];
- if v193 then
- v191.Icon.Image = "rbxassetid://" .. v193.icon;
- end;
- v191.Wait.Text = v192.Data.Wait;
- else
- v191.Icon.Image = "rbxassetid://0";
- v191.Wait.Text = "";
- end;
- end;
- end;
- end);
- u27 = game;
- u30 = "MarketplaceService";
- u29 = u27;
- u27 = u27.GetService;
- u27 = u27(u29, u30);
- u29 = function()
- return u27:GetProductInfo(game.PlaceId).Updated;
- end;
- u31 = workspace;
- u28 = u31;
- u31 = u31.WaitForChild;
- u31 = u31(u28, "Version");
- u30 = u31.Value;
- u28 = script;
- u31 = u28.Parent;
- u28 = u31;
- u31 = u31.WaitForChild;
- u31 = u31(u28, "Version");
- u28 = function()
- u31.Text = "Version: " .. u30;
- u31.TextColor3 = u30 == u29() and Color3.fromRGB(32, 255, 6) or Color3.fromRGB(245, 0, 18);
- end;
- spawn(function()
- while wait(30) do
- u28();
- end;
- end);
- u28();
- u30 = "Event";
- u31 = "Confetti";
- u28 = "Start";
- u29 = v2;
- u27 = v2.On;
- u27(u29, u30, u31, u28, function(p64)
- if p64.Team then
- local v194 = workspace:WaitForChild("Map"):WaitForChild("Confetti"):FindFirstChild(p64.Team);
- if v194 then
- for v195, v196 in pairs(v194:GetChildren()) do
- v196:Emit(200);
- end;
- return;
- end;
- else
- local l__Confetti__197 = workspace:WaitForChild("Map"):WaitForChild("Confetti");
- if l__Confetti__197 then
- local v198, v199, v200 = pairs(l__Confetti__197:GetChildren());
- while true do
- local v201, v202 = v198(v199, v200);
- if v201 then
- end;
- v200 = v201;
- v202:Emit(200);
- end;
- end;
- end;
- end);
- u30 = "TeleportGui";
- u29 = l__ReplicatedStorage__9;
- u27 = l__ReplicatedStorage__9.WaitForChild;
- u27 = u27(u29, u30);
- u29 = game;
- u31 = "TeleportService";
- u30 = u29;
- u29 = u29.GetService;
- u29 = u29(u30, u31);
- u28 = u27;
- u31 = u29;
- u30 = u29.SetTeleportGui;
- u30(u31, u28);
- u30 = game;
- u28 = "TweenService";
- u31 = u30;
- u30 = u30.GetService;
- u30 = u30(u31, u28);
- u28 = v2;
- u31 = v2.On;
- u31(u28, "Event", "Teleport", "Activate", function()
- local l__LoadingGui__203 = l__LocalPlayer__13.PlayerGui:WaitForChild("LoadingGui");
- l__LoadingGui__203.Background.Logo.Position = UDim2.new(0.5, 0, 0.5, 20);
- u30:Create(l__LoadingGui__203.Background.Logo, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {
- Position = UDim2.new(0.5, 0, 0.5, 0)
- }):Play();
- u30:Create(l__LoadingGui__203.Background.Logo, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {
- ImageTransparency = 0
- }):Play();
- delay(0.1, function()
- u30:Create(l__LoadingGui__203.Background, TweenInfo.new(1.5, Enum.EasingStyle.Quint), {
- BackgroundTransparency = 0
- }):Play();
- end);
- end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement