Advertisement
NukeVsCity

wordcs

Apr 21st, 2023
981
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 31.80 KB | None | 0 0
  1. -- Decompiled with the Synapse X Luau decompiler.
  2.  
  3. local v1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
  4. while not v1.Loaded do
  5.     game:GetService("RunService").Heartbeat:Wait();
  6. end;
  7. local l__Teleport__2 = v1.GUI.Main.Left.Tools:FindFirstChild("Teleport");
  8. local v3 = {};
  9. local v4 = {};
  10. for v5, v6 in pairs(v1.Directory.Areas) do
  11.     if not v6.hidden then
  12.         table.insert(v3, v5);
  13.     end;
  14. end;
  15. table.sort(v3, function(p1, p2)
  16.     local v7 = v1.Directory.Areas[p1];
  17.     local v8 = v1.Directory.Areas[p2];
  18.     local v9 = v1.Directory.Worlds[v7.world];
  19.     local v10 = v1.Directory.Worlds[v8.world];
  20.     local v11 = v1.Shared.Currency[v9.mainCurrency];
  21.     local v12 = v1.Shared.Currency[v10.mainCurrency];
  22.     if v9.worldOrder ~= v10.worldOrder then
  23.         return v9.worldOrder < v10.worldOrder;
  24.     end;
  25.     if v11.order ~= v12.order then
  26.         return v11.order < v12.order;
  27.     end;
  28.     if v7.isShop ~= v8.isShop then
  29.         return v7.isShop;
  30.     end;
  31.     if not v7.gate or not v8.gate then
  32.         return v7.mult < v8.mult;
  33.     end;
  34.     return v7.gate.cost < v8.gate.cost;
  35. end);
  36. local v13, v14, v15 = ipairs(v3);
  37. while true do
  38.     v13(v14, v15);
  39.     if not v13 then
  40.         break;
  41.     end;
  42.     v15 = v13;
  43.     local l__world__16 = v1.Directory.Areas[v14].world;
  44.     if not table.find(v4, l__world__16) then
  45.         table.insert(v4, l__world__16);
  46.     end;
  47. end;
  48. function GetTeleportIcon(p3)
  49.     return ({
  50.         MachineUpgrade = "rbxassetid://12520076522",
  51.         MachineFuse = "rbxassetid://12520076797",
  52.         MachineRainbow = "rbxassetid://12520076664",
  53.         MachineEnchant = "rbxassetid://12520076963",
  54.         MachineDarkMatter = "rbxassetid://12520077127",
  55.         MachineServerBoosts = "rbxassetid://12523969236",
  56.         Chest = "rbxassetid://12520085862",
  57.         Teleport = "rbxassetid://12520085508"
  58.     })[p3];
  59. end;
  60. function ActuallyTeleport(p4, p5)
  61.     if not v1.WorldCmds.CanDoAction() then
  62.         return false, "Cannot perform actions right now";
  63.     end;
  64.     if not v1.FFlags.Get(v1.FFlags.Keys.Teleporting) then
  65.         if not v1.FFlags.CanBypass() then
  66.             return false, "Sorry this is disabled right now! Try back soon!";
  67.         end;
  68.     end;
  69.     local v17 = v1.Directory.Areas[p4];
  70.     if not v17 then
  71.         return false, "Unknown area!";
  72.     end;
  73.     if not p5 then
  74.         if not v1.WorldCmds.HasAccess(v17.world) then
  75.             return false, "You do not have access to this world!";
  76.         end;
  77.     end;
  78.     if not p5 then
  79.         if not v1.WorldCmds.HasArea(p4) then
  80.             return false, "You do not have access to this area!";
  81.         end;
  82.     end;
  83.     if not p5 then
  84.         if not v1.WorldCmds.HasTeleport(p4) then
  85.             return false, "You do not own the teleport to this area!";
  86.         end;
  87.     end;
  88.     if v1.WorldCmds.Get() ~= v17.world then
  89.         if not v1.WorldCmds.Load(v17.world) then
  90.             return false, "World failed to load!";
  91.         end;
  92.     end;
  93.     local v18 = v1.WorldCmds.GetMap().Teleports:FindFirstChild(p4);
  94.     if not v18 then
  95.         return false, "No such teleport for area!";
  96.     end;
  97.     assert(v18);
  98.     local l__LocalPlayer__19 = v1.LocalPlayer;
  99.     local v20 = l__LocalPlayer__19.Character or l__LocalPlayer__19.CharacterAdded:Wait();
  100.     local l__Humanoid__21 = v20:WaitForChild("Humanoid");
  101.     local l__HumanoidRootPart__22 = v20:WaitForChild("HumanoidRootPart");
  102.     v1.Signal.Fire("Teleporting");
  103.     task.wait(0.25);
  104.     local l__CFrame__23 = v18.CFrame;
  105.     v20:PivotTo(l__CFrame__23 + l__CFrame__23.UpVector * (l__Humanoid__21.HipHeight + l__HumanoidRootPart__22.Size.Y / 2));
  106.     v1.Audio.Play("rbxassetid://7009904957", script, 1, 0.4);
  107.     v1.Network.Fire("Performed Teleport", p4);
  108.     task.wait(0.25);
  109.     return true;
  110. end;
  111. function Teleport(p6, p7)
  112.     v1.Asserts.string(p6);
  113.     assert(v1.Directory.Areas[p6]);
  114.     if v1.Variables.Teleporting then
  115.         return false, "You are already teleporting!";
  116.     end;
  117.     v1.Variables.Teleporting = true;
  118.     local v24, v25 = ActuallyTeleport(p6, p7);
  119.     v1.Variables.Teleporting = false;
  120.     return v24, v25;
  121. end;
  122. v1.Network.Invoked("Force Teleport").OnInvoke = function(p8)
  123.     return Teleport(p8, true);
  124. end;
  125. function Purchase(p9)
  126.     if not v1.Message.New("It costs " .. v1.Functions.Commas(v1.Directory.Areas[p9].teleportPrice) .. " Diamonds to unlock this teleport. Are you sure?", true) then
  127.         return;
  128.     end;
  129.     local v26, v27 = v1.Network.Invoke("Buy Teleport Area", p9);
  130.     if not v26 then
  131.  
  132.     else
  133.         v1.Audio.Play("rbxassetid://7255664014", script);
  134.         return;
  135.     end;
  136.     v1.Message.New(v27 and "An error occurred.");
  137. end;
  138. function Clicked(p10)
  139.     if v1.WorldCmds.HasTeleport(p10) then
  140.         local v28, v29 = Teleport(p10);
  141.         if not v28 then
  142.  
  143.         else
  144.             return;
  145.         end;
  146.     else
  147.         Purchase(p10);
  148.         return;
  149.     end;
  150.     v1.Message.New(v29 and "An error occurred.");
  151. end;
  152. local u1 = "Spawn";
  153. local l__Teleport__2 = v1.GUI.Teleport;
  154. function ClickedWorld(p11)
  155.     if u1 ~= p11 then
  156.         u1 = p11;
  157.         if u1 ~= "Hardcore" then
  158.             if u1 ~= "Normal" then
  159.                 if u1 == "Trading Plaza" then
  160.                     local v30 = u1 .. " Teleports";
  161.                 else
  162.                     v30 = v1.Directory.Worlds[u1].display;
  163.                 end;
  164.             else
  165.                 v30 = u1 .. " Teleports";
  166.             end;
  167.         else
  168.             v30 = u1 .. " Teleports";
  169.         end;
  170.         l__Teleport__2.Gui.Frame.RightContainer.Holder.Category.Text = "~ " .. v30 .. " ~";
  171.         UpdateAreas();
  172.         l__Teleport__2.RightContainer.Holder.CanvasPosition = Vector2.new(0, 0);
  173.     end;
  174. end;
  175. function RealmClicked(p12)
  176.     if p12 == "Hardcore" then
  177.         v1.Variables.LoadingWorld = true;
  178.         local v31, v32 = v1.Network.Invoke("Toggle Hardcore Mode");
  179.         if v31 then
  180.             v1.GUIFX.Loading("Hardcore Mode");
  181.             return;
  182.         else
  183.             v1.Variables.LoadingWorld = false;
  184.             v1.Message.New(v32 and "Something went wrong.");
  185.             return;
  186.         end;
  187.     end;
  188.     if p12 == "Normal" then
  189.  
  190.     else
  191.         if p12 == "Trading Plaza" then
  192.             local u3 = false;
  193.             pcall(function()
  194.                 u3 = v1.VoiceChatService:IsVoiceEnabledForUserIdAsync(v1.LocalPlayer.UserId);
  195.             end);
  196.             v1.Signal.Fire("Show Trading Plaza Choice", u3);
  197.         end;
  198.         return;
  199.     end;
  200.     v1.Variables.LoadingWorld = true;
  201.     local v33, v34 = v1.Network.Invoke("Toggle Hardcore Mode");
  202.     if v33 then
  203.         v1.GUIFX.Loading("Normal Mode");
  204.         return;
  205.     end;
  206.     v1.Variables.LoadingWorld = false;
  207.     v1.Message.New(v34 and "Something went wrong.");
  208. end;
  209. local u4 = false;
  210. local u5 = false;
  211. local l__IsHardcore__6 = v1.Shared.IsHardcore;
  212. local l__ID__7 = v1.Directory.Gamepasses.VIP.ID;
  213. function Setup()
  214.     if v1.Shared.IsTradingPlaza then
  215.         if not l__Teleport__2.Holder:FindFirstChild("TeleportsDisabled") then
  216.             script.TeleportsDisabled:Clone().Parent = l__Teleport__2.Frame;
  217.             l__Teleport__2.LeftContainer.Visible = false;
  218.             l__Teleport__2.RightContainer.Visible = false;
  219.             l__Teleport__2.UnlockAll.Visible = false;
  220.         end;
  221.         return;
  222.     end;
  223.     local v35 = v1.Save.Get();
  224.     if not v35 then
  225.         return;
  226.     end;
  227.     assert(v35);
  228.     l__Teleport__2.Gui.Frame.RightContainer.Holder.Category.Text = "~ " .. v1.Directory.Worlds[u1].display .. " ~";
  229.     local l__Holder__36 = l__Teleport__2.Gui.Frame.LeftContainer.Holder;
  230.     local l__WorldTemplate__37 = l__Holder__36.WorldTemplate;
  231.     local v38 = 1;
  232.     if not u4 then
  233.         local v39, v40, v41 = ipairs(v4);
  234.         while true do
  235.             v39(v40, v41);
  236.             if v39 then
  237.  
  238.             else
  239.                 break;
  240.             end;
  241.             v41 = v39;
  242.             if v40 ~= "Diamond Mine" then
  243.                 local v42 = v1.Directory.Worlds[v40];
  244.                 if not l__Holder__36:FindFirstChild(v40) then
  245.                     local v43 = l__WorldTemplate__37:Clone();
  246.                     v43.ImageLabel.Image = v42.teleportImage and "rbxassetid://12405479224";
  247.                     v43.Visible = true;
  248.                     v43.Parent = l__Holder__36;
  249.                     v43.Name = v40;
  250.                     v43.Title.Text = v42.display;
  251.                     v43.LayoutOrder = v38;
  252.                     v38 = v38 + 1;
  253.                     v1.GUIFX.ButtonFX(v43);
  254.                     v43.Activated:Connect(function()
  255.                         if not u5 then
  256.                             u5 = true;
  257.                             ClickedWorld(v40);
  258.                             u5 = false;
  259.                         end;
  260.                     end);
  261.                 end;
  262.                 u4 = true;
  263.             end;       
  264.         end;
  265.         l__Holder__36.CategoryRealms.LayoutOrder = v38;
  266.         v38 = v38 + 1;
  267.     end;
  268.     if not l__Holder__36:FindFirstChild("Diamond Mine") then
  269.         local v44 = l__WorldTemplate__37:Clone();
  270.         v44.Parent = l__Holder__36;
  271.         v44.Visible = true;
  272.         v44.Name = "Diamond Mine";
  273.         v44.Title.Text = "Diamond Mine";
  274.         v44.ImageLabel.Image = v1.Directory.Worlds["Diamond Mine"].teleportImage and "rbxassetid://12405479224";
  275.         v44.LayoutOrder = v38;
  276.         v1.GUIFX.ButtonFX(v44);
  277.         v44.Activated:Connect(function()
  278.             if not u5 then
  279.                 u5 = true;
  280.                 ClickedWorld("Diamond Mine");
  281.                 u5 = false;
  282.             end;
  283.         end);
  284.         v38 = v38 + 1;
  285.     end;
  286.     if v35.HardcoreUnlocked then
  287.         if not l__IsHardcore__6 then
  288.             if not l__Holder__36:FindFirstChild("Hardcore") then
  289.                 local v45 = l__WorldTemplate__37:Clone();
  290.                 v45.Parent = l__Holder__36;
  291.                 v45.Visible = true;
  292.                 v45.Name = "Hardcore";
  293.                 v45.Title.Text = "Hardcore Mode";
  294.                 v45.LayoutOrder = v38;
  295.                 v45.ImageLabel.Image = "rbxassetid://12447471006";
  296.                 v1.GUIFX.ButtonFX(v45);
  297.                 v45.Activated:Connect(function()
  298.                     if not u5 then
  299.                         u5 = true;
  300.                         ClickedWorld("Hardcore");
  301.                         u5 = false;
  302.                     end;
  303.                 end);
  304.                 v38 = v38 + 1;
  305.             end;
  306.         elseif l__IsHardcore__6 then
  307.             if not l__Holder__36:FindFirstChild("Normal") then
  308.                 local v46 = l__WorldTemplate__37:Clone();
  309.                 v46.Parent = l__Holder__36;
  310.                 v46.Visible = true;
  311.                 v46.Name = "Normal";
  312.                 v46.Title.Text = "Normal Mode";
  313.                 v46.LayoutOrder = v38;
  314.                 v46.ImageLabel.Image = "rbxassetid://12447471006";
  315.                 v1.GUIFX.ButtonFX(v46);
  316.                 v46.Activated:Connect(function()
  317.                     if not u5 then
  318.                         u5 = true;
  319.                         ClickedWorld("Normal");
  320.                         u5 = false;
  321.                     end;
  322.                 end);
  323.                 v38 = v38 + 1;
  324.             end;
  325.         end;
  326.     elseif l__IsHardcore__6 then
  327.         if not l__Holder__36:FindFirstChild("Normal") then
  328.             v46 = l__WorldTemplate__37:Clone();
  329.             v46.Parent = l__Holder__36;
  330.             v46.Visible = true;
  331.             v46.Name = "Normal";
  332.             v46.Title.Text = "Normal Mode";
  333.             v46.LayoutOrder = v38;
  334.             v46.ImageLabel.Image = "rbxassetid://12447471006";
  335.             v1.GUIFX.ButtonFX(v46);
  336.             v46.Activated:Connect(function()
  337.                 if not u5 then
  338.                     u5 = true;
  339.                     ClickedWorld("Normal");
  340.                     u5 = false;
  341.                 end;
  342.             end);
  343.             v38 = v38 + 1;
  344.         end;
  345.     end;
  346.     if v35.OwnsTradingPlaza then
  347.         if not l__Holder__36:FindFirstChild("Trading Plaza") then
  348.             local v47 = l__WorldTemplate__37:Clone();
  349.             v47.Parent = l__Holder__36;
  350.             v47.Visible = true;
  351.             v47.Name = "Trading Plaza";
  352.             v47.Title.Text = "Trading Plaza";
  353.             v47.LayoutOrder = v38;
  354.             v47.ImageLabel.Image = "rbxassetid://12447471127";
  355.             v1.GUIFX.ButtonFX(v47);
  356.             v47.Activated:Connect(function()
  357.                 if not u5 then
  358.                     u5 = true;
  359.                     ClickedWorld("Trading Plaza");
  360.                     u5 = false;
  361.                 end;
  362.             end);
  363.         end;
  364.     end;
  365.     Scrolling(l__Teleport__2.Gui.Frame.LeftContainer.Holder);
  366.     local l__Holder__48 = l__Teleport__2.Gui.Frame.RightContainer.Holder;
  367.     local v49, v50, v51 = ipairs(l__Holder__48:GetChildren());
  368.     while true do
  369.         v49(v50, v51);
  370.         if v49 then
  371.  
  372.         else
  373.             break;
  374.         end;
  375.         v51 = v49;
  376.         if v50:GetAttribute("World") then
  377.             if v50:GetAttribute("World") ~= u1 then
  378.                 v50:Destroy();
  379.             end;
  380.         end;   
  381.     end;
  382.     local l__AreaTemplate__52 = l__Holder__48.AreaTemplate;
  383.     local v53 = 1;
  384.     if u1 ~= "Hardcore" then
  385.         if u1 ~= "Trading Plaza" then
  386.             local v54, v55, v56 = ipairs(v3);
  387.             while true do
  388.                 v54(v55, v56);
  389.                 if v54 then
  390.  
  391.                 else
  392.                     break;
  393.                 end;
  394.                 v56 = v54;
  395.                 local v57 = v1.Directory.Areas[v55];
  396.                 if v57.world == u1 then
  397.                     if v55 == "VIP" then
  398.                         if v1.Gamepasses.Owns(l__ID__7) then
  399.                             local v58 = l__Holder__48:FindFirstChild(v55);
  400.                             if not v58 then
  401.                                 v58 = v1.Assets.UI.Teleport.Area:Clone();
  402.                                 v58.LayoutOrder = v53;
  403.                                 if v55 == "Easter" then
  404.                                     v58.LayoutOrder = 0;
  405.                                 end;
  406.                                 v53 = v53 + 1;
  407.                                 v58.Name = v55;
  408.                                 v58.Parent = l__Holder__48;
  409.                                 v58:SetAttribute("World", v57.world);
  410.                                 v1.GUIFX.ButtonFX(v58);
  411.                                 v58.Activated:Connect(function()
  412.                                     if not u5 then
  413.                                         if v1.WorldCmds.HasArea(v55) then
  414.                                             u5 = true;
  415.                                             Clicked(v55);
  416.                                             u5 = false;
  417.                                         end;
  418.                                     end;
  419.                                 end);
  420.                             end;
  421.                             local v59 = v1.WorldCmds.HasArea(v55);
  422.                             local v60 = v1.WorldCmds.HasTeleport(v55);
  423.                             local v61 = GetTeleportIcon(v57.tpIcon);
  424.                             if not v61 then
  425.                                 if v57.isShop then
  426.                                     v61 = "rbxassetid://7255478767";
  427.                                 else
  428.                                     v61 = "rbxassetid://6708234702";
  429.                                 end;
  430.                             end;
  431.                             v58.ImageColor3 = v59 and Color3.new(1, 1, 1) or Color3.fromRGB(120, 120, 120);
  432.                             v58.Title.Text = v59 and v57.name or "???";
  433.                             if v59 then
  434.                                 if not v60 then
  435.                                     local v62 = "rbxassetid://7045637286";
  436.                                 else
  437.                                     v62 = "rbxassetid://6869680115";
  438.                                 end;
  439.                             else
  440.                                 v62 = "rbxassetid://6869680115";
  441.                             end;
  442.                             v58.Image = v62;
  443.                             if v59 then
  444.                                 if not v60 then
  445.                                     local v63 = "rbxassetid://7045637411";
  446.                                 else
  447.                                     v63 = "rbxassetid://6903539993";
  448.                                 end;
  449.                             else
  450.                                 v63 = "rbxassetid://6903539993";
  451.                             end;
  452.                             v58.HoverImage = v63;
  453.                             if not v59 then
  454.                                 v58.Icon.Image = "rbxassetid://7255478600";
  455.                             elseif not v60 then
  456.                                 v58.Icon.Image = "rbxassetid://7255478657";
  457.                             elseif v60 then
  458.                                 if v59 then
  459.                                     v58.Icon.Image = v61;
  460.                                 end;
  461.                             end;
  462.                         end;
  463.                     else
  464.                         v58 = l__Holder__48:FindFirstChild(v55);
  465.                         if not v58 then
  466.                             v58 = v1.Assets.UI.Teleport.Area:Clone();
  467.                             v58.LayoutOrder = v53;
  468.                             if v55 == "Easter" then
  469.                                 v58.LayoutOrder = 0;
  470.                             end;
  471.                             v53 = v53 + 1;
  472.                             v58.Name = v55;
  473.                             v58.Parent = l__Holder__48;
  474.                             v58:SetAttribute("World", v57.world);
  475.                             v1.GUIFX.ButtonFX(v58);
  476.                             v58.Activated:Connect(function()
  477.                                 if not u5 then
  478.                                     if v1.WorldCmds.HasArea(v55) then
  479.                                         u5 = true;
  480.                                         Clicked(v55);
  481.                                         u5 = false;
  482.                                     end;
  483.                                 end;
  484.                             end);
  485.                         end;
  486.                         v59 = v1.WorldCmds.HasArea(v55);
  487.                         v60 = v1.WorldCmds.HasTeleport(v55);
  488.                         v61 = GetTeleportIcon(v57.tpIcon);
  489.                         if not v61 then
  490.                             if v57.isShop then
  491.                                 v61 = "rbxassetid://7255478767";
  492.                             else
  493.                                 v61 = "rbxassetid://6708234702";
  494.                             end;
  495.                         end;
  496.                         v58.ImageColor3 = v59 and Color3.new(1, 1, 1) or Color3.fromRGB(120, 120, 120);
  497.                         v58.Title.Text = v59 and v57.name or "???";
  498.                         if v59 then
  499.                             if not v60 then
  500.                                 v62 = "rbxassetid://7045637286";
  501.                             else
  502.                                 v62 = "rbxassetid://6869680115";
  503.                             end;
  504.                         else
  505.                             v62 = "rbxassetid://6869680115";
  506.                         end;
  507.                         v58.Image = v62;
  508.                         if v59 then
  509.                             if not v60 then
  510.                                 v63 = "rbxassetid://7045637411";
  511.                             else
  512.                                 v63 = "rbxassetid://6903539993";
  513.                             end;
  514.                         else
  515.                             v63 = "rbxassetid://6903539993";
  516.                         end;
  517.                         v58.HoverImage = v63;
  518.                         if not v59 then
  519.                             v58.Icon.Image = "rbxassetid://7255478600";
  520.                         elseif not v60 then
  521.                             v58.Icon.Image = "rbxassetid://7255478657";
  522.                         elseif v60 then
  523.                             if v59 then
  524.                                 v58.Icon.Image = v61;
  525.                             end;
  526.                         end;
  527.                     end;
  528.                 end;           
  529.             end;
  530.         else
  531.             local v64 = l__Holder__48:FindFirstChild(u1);
  532.             if not v64 then
  533.                 v64 = v1.Assets.UI.Teleport.Area:Clone();
  534.                 v64.LayoutOrder = v53;
  535.                 v64.Name = u1;
  536.                 v64.Parent = l__Holder__48;
  537.                 v64:SetAttribute("World", u1);
  538.                 v1.GUIFX.ButtonFX(v64);
  539.                 v64.Activated:Connect(function()
  540.                     if not u5 then
  541.                         u5 = true;
  542.                         RealmClicked(u1);
  543.                         u5 = false;
  544.                     end;
  545.                 end);
  546.             end;
  547.             local v65 = u1 == "Hardcore" and v35.HardcoreUnlocked or v35.OwnsTradingPlaza;
  548.             local v66 = u1 == "Hardcore" and v35.HardcoreUnlocked or v35.OwnsTradingPlaza;
  549.             v64.ImageColor3 = v65 and Color3.new(1, 1, 1) or Color3.fromRGB(120, 120, 120);
  550.             v64.Title.Text = u1;
  551.             if v65 then
  552.                 if not v66 then
  553.                     local v67 = "rbxassetid://7045637286";
  554.                 else
  555.                     v67 = "rbxassetid://6869680115";
  556.                 end;
  557.             else
  558.                 v67 = "rbxassetid://6869680115";
  559.             end;
  560.             v64.Image = v67;
  561.             if v65 then
  562.                 if not v66 then
  563.                     local v68 = "rbxassetid://7045637411";
  564.                 else
  565.                     v68 = "rbxassetid://6903539993";
  566.                 end;
  567.             else
  568.                 v68 = "rbxassetid://6903539993";
  569.             end;
  570.             v64.HoverImage = v68;
  571.             if not v65 then
  572.                 v64.Icon.Image = "rbxassetid://7255478600";
  573.             elseif not v66 then
  574.                 v64.Icon.Image = "rbxassetid://7255478657";
  575.             elseif v66 then
  576.                 if v65 then
  577.                     v64.Icon.Image = "rbxassetid://6708234702";
  578.                 end;
  579.             end;
  580.         end;
  581.     else
  582.         v64 = l__Holder__48:FindFirstChild(u1);
  583.         if not v64 then
  584.             v64 = v1.Assets.UI.Teleport.Area:Clone();
  585.             v64.LayoutOrder = v53;
  586.             v64.Name = u1;
  587.             v64.Parent = l__Holder__48;
  588.             v64:SetAttribute("World", u1);
  589.             v1.GUIFX.ButtonFX(v64);
  590.             v64.Activated:Connect(function()
  591.                 if not u5 then
  592.                     u5 = true;
  593.                     RealmClicked(u1);
  594.                     u5 = false;
  595.                 end;
  596.             end);
  597.         end;
  598.         v65 = u1 == "Hardcore" and v35.HardcoreUnlocked or v35.OwnsTradingPlaza;
  599.         v66 = u1 == "Hardcore" and v35.HardcoreUnlocked or v35.OwnsTradingPlaza;
  600.         v64.ImageColor3 = v65 and Color3.new(1, 1, 1) or Color3.fromRGB(120, 120, 120);
  601.         v64.Title.Text = u1;
  602.         if v65 then
  603.             if not v66 then
  604.                 v67 = "rbxassetid://7045637286";
  605.             else
  606.                 v67 = "rbxassetid://6869680115";
  607.             end;
  608.         else
  609.             v67 = "rbxassetid://6869680115";
  610.         end;
  611.         v64.Image = v67;
  612.         if v65 then
  613.             if not v66 then
  614.                 v68 = "rbxassetid://7045637411";
  615.             else
  616.                 v68 = "rbxassetid://6903539993";
  617.             end;
  618.         else
  619.             v68 = "rbxassetid://6903539993";
  620.         end;
  621.         v64.HoverImage = v68;
  622.         if not v65 then
  623.             v64.Icon.Image = "rbxassetid://7255478600";
  624.         elseif not v66 then
  625.             v64.Icon.Image = "rbxassetid://7255478657";
  626.         elseif v66 then
  627.             if v65 then
  628.                 v64.Icon.Image = "rbxassetid://6708234702";
  629.             end;
  630.         end;
  631.     end;
  632.     Scrolling(l__Holder__48);
  633. end;
  634. function UpdateRealms()
  635.     local v69 = v1.Save.Get();
  636.     if not v69 then
  637.         return;
  638.     end;
  639.     assert(v69);
  640.     local l__Holder__70 = l__Teleport__2.Gui.Frame.LeftContainer.Holder;
  641.     local l__WorldTemplate__71 = l__Holder__70.WorldTemplate;
  642.     if v69.HardcoreUnlocked then
  643.         if not l__IsHardcore__6 then
  644.             if not l__Holder__70:FindFirstChild("Hardcore") then
  645.                 local v72 = l__WorldTemplate__71:Clone();
  646.                 v72.Parent = l__Holder__70;
  647.                 v72.Visible = true;
  648.                 v72.Name = "Hardcore";
  649.                 v72.Title.Text = "Hardcore Mode";
  650.                 v72.ImageLabel.Image = "rbxassetid://12447471006";
  651.                 v72.LayoutOrder = #v4 + 2;
  652.                 v1.GUIFX.ButtonFX(v72);
  653.                 v72.Activated:Connect(function()
  654.                     if not u5 then
  655.                         u5 = true;
  656.                         ClickedWorld("Hardcore");
  657.                         u5 = false;
  658.                     end;
  659.                 end);
  660.             end;
  661.         elseif l__IsHardcore__6 then
  662.             if not l__Holder__70:FindFirstChild("Normal") then
  663.                 local v73 = l__WorldTemplate__71:Clone();
  664.                 v73.Parent = l__Holder__70;
  665.                 v73.Visible = true;
  666.                 v73.Name = "Normal";
  667.                 v73.Title.Text = "Normal Mode";
  668.                 v73.ImageLabel.Image = "rbxassetid://12447471006";
  669.                 v73.LayoutOrder = #v4 + 2;
  670.                 v1.GUIFX.ButtonFX(v73);
  671.                 v73.Activated:Connect(function()
  672.                     if not u5 then
  673.                         u5 = true;
  674.                         ClickedWorld("Normal");
  675.                         u5 = false;
  676.                     end;
  677.                 end);
  678.             end;
  679.         end;
  680.     elseif l__IsHardcore__6 then
  681.         if not l__Holder__70:FindFirstChild("Normal") then
  682.             v73 = l__WorldTemplate__71:Clone();
  683.             v73.Parent = l__Holder__70;
  684.             v73.Visible = true;
  685.             v73.Name = "Normal";
  686.             v73.Title.Text = "Normal Mode";
  687.             v73.ImageLabel.Image = "rbxassetid://12447471006";
  688.             v73.LayoutOrder = #v4 + 2;
  689.             v1.GUIFX.ButtonFX(v73);
  690.             v73.Activated:Connect(function()
  691.                 if not u5 then
  692.                     u5 = true;
  693.                     ClickedWorld("Normal");
  694.                     u5 = false;
  695.                 end;
  696.             end);
  697.         end;
  698.     end;
  699.     if v69.OwnsTradingPlaza then
  700.         if not l__Holder__70:FindFirstChild("Trading Plaza") then
  701.             local v74 = l__WorldTemplate__71:Clone();
  702.             v74.Parent = l__Holder__70;
  703.             v74.Visible = true;
  704.             v74.Name = "Trading Plaza";
  705.             v74.Title.Text = "Trading Plaza";
  706.             v74.ImageLabel.Image = "rbxassetid://12447471127";
  707.             v74.LayoutOrder = #v4 + 3;
  708.             v1.GUIFX.ButtonFX(v74);
  709.             v74.Activated:Connect(function()
  710.                 if not u5 then
  711.                     u5 = true;
  712.                     ClickedWorld("Trading Plaza");
  713.                     u5 = false;
  714.                 end;
  715.             end);
  716.         end;
  717.     end;
  718. end;
  719. function UpdateAreas()
  720.     local v75 = v1.Save.Get();
  721.     if not v75 then
  722.         return;
  723.     end;
  724.     assert(v75);
  725.     local l__Holder__76 = l__Teleport__2.Gui.Frame.RightContainer.Holder;
  726.     local v77, v78, v79 = ipairs(l__Holder__76:GetChildren());
  727.     while true do
  728.         v77(v78, v79);
  729.         if v77 then
  730.  
  731.         else
  732.             break;
  733.         end;
  734.         v79 = v77;
  735.         if v78:GetAttribute("World") then
  736.             if v78:GetAttribute("World") ~= u1 then
  737.                 v78:Destroy();
  738.             end;
  739.         end;   
  740.     end;
  741.     local l__AreaTemplate__80 = l__Holder__76.AreaTemplate;
  742.     local v81 = 1;
  743.     if u1 ~= "Hardcore" then
  744.         if u1 ~= "Trading Plaza" then
  745.             if u1 ~= "Normal" then
  746.                 local v82, v83, v84 = ipairs(v3);
  747.                 while true do
  748.                     v82(v83, v84);
  749.                     if v82 then
  750.  
  751.                     else
  752.                         break;
  753.                     end;
  754.                     v84 = v82;
  755.                     local v85 = v1.Directory.Areas[v83];
  756.                     if v85.world == u1 then
  757.                         if v83 == "VIP" then
  758.                             if v1.Gamepasses.Owns(l__ID__7) then
  759.                                 local v86 = l__Holder__76:FindFirstChild(v83);
  760.                                 if not v86 then
  761.                                     v86 = v1.Assets.UI.Teleport.Area:Clone();
  762.                                     v86.LayoutOrder = v81;
  763.                                     if v83 == "Easter" then
  764.                                         v86.LayoutOrder = 0;
  765.                                     end;
  766.                                     v81 = v81 + 1;
  767.                                     v86.Name = v83;
  768.                                     v86.Parent = l__Holder__76;
  769.                                     v86:SetAttribute("World", v85.world);
  770.                                     v1.GUIFX.ButtonFX(v86);
  771.                                     v86.Activated:Connect(function()
  772.                                         if not u5 then
  773.                                             if v1.WorldCmds.HasArea(v83) then
  774.                                                 u5 = true;
  775.                                                 Clicked(v83);
  776.                                                 u5 = false;
  777.                                             end;
  778.                                         end;
  779.                                     end);
  780.                                 end;
  781.                                 local v87 = v1.WorldCmds.HasArea(v83);
  782.                                 local v88 = v1.WorldCmds.HasTeleport(v83);
  783.                                 local v89 = GetTeleportIcon(v85.tpIcon);
  784.                                 if not v89 then
  785.                                     if v85.isShop then
  786.                                         v89 = "rbxassetid://7255478767";
  787.                                     else
  788.                                         v89 = "rbxassetid://6708234702";
  789.                                     end;
  790.                                 end;
  791.                                 v86.ImageColor3 = v87 and Color3.new(1, 1, 1) or Color3.fromRGB(120, 120, 120);
  792.                                 v86.Title.Text = v87 and v85.name or "???";
  793.                                 if v87 then
  794.                                     if not v88 then
  795.                                         local v90 = "rbxassetid://7045637286";
  796.                                     else
  797.                                         v90 = "rbxassetid://6869680115";
  798.                                     end;
  799.                                 else
  800.                                     v90 = "rbxassetid://6869680115";
  801.                                 end;
  802.                                 v86.Image = v90;
  803.                                 if v87 then
  804.                                     if not v88 then
  805.                                         local v91 = "rbxassetid://7045637411";
  806.                                     else
  807.                                         v91 = "rbxassetid://6903539993";
  808.                                     end;
  809.                                 else
  810.                                     v91 = "rbxassetid://6903539993";
  811.                                 end;
  812.                                 v86.HoverImage = v91;
  813.                                 if not v87 then
  814.                                     v86.Icon.Image = "rbxassetid://7255478600";
  815.                                 elseif not v88 then
  816.                                     v86.Icon.Image = "rbxassetid://7255478657";
  817.                                 elseif v88 then
  818.                                     if v87 then
  819.                                         v86.Icon.Image = v89;
  820.                                     end;
  821.                                 end;
  822.                             end;
  823.                         else
  824.                             v86 = l__Holder__76:FindFirstChild(v83);
  825.                             if not v86 then
  826.                                 v86 = v1.Assets.UI.Teleport.Area:Clone();
  827.                                 v86.LayoutOrder = v81;
  828.                                 if v83 == "Easter" then
  829.                                     v86.LayoutOrder = 0;
  830.                                 end;
  831.                                 v81 = v81 + 1;
  832.                                 v86.Name = v83;
  833.                                 v86.Parent = l__Holder__76;
  834.                                 v86:SetAttribute("World", v85.world);
  835.                                 v1.GUIFX.ButtonFX(v86);
  836.                                 v86.Activated:Connect(function()
  837.                                     if not u5 then
  838.                                         if v1.WorldCmds.HasArea(v83) then
  839.                                             u5 = true;
  840.                                             Clicked(v83);
  841.                                             u5 = false;
  842.                                         end;
  843.                                     end;
  844.                                 end);
  845.                             end;
  846.                             v87 = v1.WorldCmds.HasArea(v83);
  847.                             v88 = v1.WorldCmds.HasTeleport(v83);
  848.                             v89 = GetTeleportIcon(v85.tpIcon);
  849.                             if not v89 then
  850.                                 if v85.isShop then
  851.                                     v89 = "rbxassetid://7255478767";
  852.                                 else
  853.                                     v89 = "rbxassetid://6708234702";
  854.                                 end;
  855.                             end;
  856.                             v86.ImageColor3 = v87 and Color3.new(1, 1, 1) or Color3.fromRGB(120, 120, 120);
  857.                             v86.Title.Text = v87 and v85.name or "???";
  858.                             if v87 then
  859.                                 if not v88 then
  860.                                     v90 = "rbxassetid://7045637286";
  861.                                 else
  862.                                     v90 = "rbxassetid://6869680115";
  863.                                 end;
  864.                             else
  865.                                 v90 = "rbxassetid://6869680115";
  866.                             end;
  867.                             v86.Image = v90;
  868.                             if v87 then
  869.                                 if not v88 then
  870.                                     v91 = "rbxassetid://7045637411";
  871.                                 else
  872.                                     v91 = "rbxassetid://6903539993";
  873.                                 end;
  874.                             else
  875.                                 v91 = "rbxassetid://6903539993";
  876.                             end;
  877.                             v86.HoverImage = v91;
  878.                             if not v87 then
  879.                                 v86.Icon.Image = "rbxassetid://7255478600";
  880.                             elseif not v88 then
  881.                                 v86.Icon.Image = "rbxassetid://7255478657";
  882.                             elseif v88 then
  883.                                 if v87 then
  884.                                     v86.Icon.Image = v89;
  885.                                 end;
  886.                             end;
  887.                         end;
  888.                     end;               
  889.                 end;
  890.             else
  891.                 local v92 = l__Holder__76:FindFirstChild(u1);
  892.                 if not v92 then
  893.                     v92 = v1.Assets.UI.Teleport.Area:Clone();
  894.                     v92.LayoutOrder = v81;
  895.                     v92.Name = u1;
  896.                     v92.Parent = l__Holder__76;
  897.                     v92:SetAttribute("World", u1);
  898.                     v1.GUIFX.ButtonFX(v92);
  899.                     v92.Activated:Connect(function()
  900.                         if not u5 then
  901.                             u5 = true;
  902.                             RealmClicked(u1);
  903.                             u5 = false;
  904.                         end;
  905.                     end);
  906.                 end;
  907.                 local v93 = nil;
  908.                 local v94 = nil;
  909.                 if u1 ~= "Hardcore" then
  910.                     if u1 == "Normal" then
  911.                         v93 = v75.HardcoreUnlocked;
  912.                         v94 = v75.HardcoreUnlocked;
  913.                     elseif u1 == "Trading Plaza" then
  914.                         v93 = v75.HardcoreUnlocked;
  915.                         v94 = v75.HardcoreUnlocked;
  916.                     end;
  917.                 else
  918.                     v93 = v75.HardcoreUnlocked;
  919.                     v94 = v75.HardcoreUnlocked;
  920.                 end;
  921.                 v92.ImageColor3 = v93 and Color3.new(1, 1, 1) or Color3.fromRGB(120, 120, 120);
  922.                 v92.Title.Text = u1;
  923.                 if v93 then
  924.                     if not v94 then
  925.                         local v95 = "rbxassetid://7045637286";
  926.                     else
  927.                         v95 = "rbxassetid://6869680115";
  928.                     end;
  929.                 else
  930.                     v95 = "rbxassetid://6869680115";
  931.                 end;
  932.                 v92.Image = v95;
  933.                 if v93 then
  934.                     if not v94 then
  935.                         local v96 = "rbxassetid://7045637411";
  936.                     else
  937.                         v96 = "rbxassetid://6903539993";
  938.                     end;
  939.                 else
  940.                     v96 = "rbxassetid://6903539993";
  941.                 end;
  942.                 v92.HoverImage = v96;
  943.                 if not v93 then
  944.                     v92.Icon.Image = "rbxassetid://7255478600";
  945.                 elseif not v94 then
  946.                     v92.Icon.Image = "rbxassetid://7255478657";
  947.                 elseif v94 then
  948.                     if v93 then
  949.                         v92.Icon.Image = "rbxassetid://6708234702";
  950.                     end;
  951.                 end;
  952.             end;
  953.         else
  954.             v92 = l__Holder__76:FindFirstChild(u1);
  955.             if not v92 then
  956.                 v92 = v1.Assets.UI.Teleport.Area:Clone();
  957.                 v92.LayoutOrder = v81;
  958.                 v92.Name = u1;
  959.                 v92.Parent = l__Holder__76;
  960.                 v92:SetAttribute("World", u1);
  961.                 v1.GUIFX.ButtonFX(v92);
  962.                 v92.Activated:Connect(function()
  963.                     if not u5 then
  964.                         u5 = true;
  965.                         RealmClicked(u1);
  966.                         u5 = false;
  967.                     end;
  968.                 end);
  969.             end;
  970.             v93 = nil;
  971.             v94 = nil;
  972.             if u1 ~= "Hardcore" then
  973.                 if u1 == "Normal" then
  974.                     v93 = v75.HardcoreUnlocked;
  975.                     v94 = v75.HardcoreUnlocked;
  976.                 elseif u1 == "Trading Plaza" then
  977.                     v93 = v75.HardcoreUnlocked;
  978.                     v94 = v75.HardcoreUnlocked;
  979.                 end;
  980.             else
  981.                 v93 = v75.HardcoreUnlocked;
  982.                 v94 = v75.HardcoreUnlocked;
  983.             end;
  984.             v92.ImageColor3 = v93 and Color3.new(1, 1, 1) or Color3.fromRGB(120, 120, 120);
  985.             v92.Title.Text = u1;
  986.             if v93 then
  987.                 if not v94 then
  988.                     v95 = "rbxassetid://7045637286";
  989.                 else
  990.                     v95 = "rbxassetid://6869680115";
  991.                 end;
  992.             else
  993.                 v95 = "rbxassetid://6869680115";
  994.             end;
  995.             v92.Image = v95;
  996.             if v93 then
  997.                 if not v94 then
  998.                     v96 = "rbxassetid://7045637411";
  999.                 else
  1000.                     v96 = "rbxassetid://6903539993";
  1001.                 end;
  1002.             else
  1003.                 v96 = "rbxassetid://6903539993";
  1004.             end;
  1005.             v92.HoverImage = v96;
  1006.             if not v93 then
  1007.                 v92.Icon.Image = "rbxassetid://7255478600";
  1008.             elseif not v94 then
  1009.                 v92.Icon.Image = "rbxassetid://7255478657";
  1010.             elseif v94 then
  1011.                 if v93 then
  1012.                     v92.Icon.Image = "rbxassetid://6708234702";
  1013.                 end;
  1014.             end;
  1015.         end;
  1016.     else
  1017.         v92 = l__Holder__76:FindFirstChild(u1);
  1018.         if not v92 then
  1019.             v92 = v1.Assets.UI.Teleport.Area:Clone();
  1020.             v92.LayoutOrder = v81;
  1021.             v92.Name = u1;
  1022.             v92.Parent = l__Holder__76;
  1023.             v92:SetAttribute("World", u1);
  1024.             v1.GUIFX.ButtonFX(v92);
  1025.             v92.Activated:Connect(function()
  1026.                 if not u5 then
  1027.                     u5 = true;
  1028.                     RealmClicked(u1);
  1029.                     u5 = false;
  1030.                 end;
  1031.             end);
  1032.         end;
  1033.         v93 = nil;
  1034.         v94 = nil;
  1035.         if u1 ~= "Hardcore" then
  1036.             if u1 == "Normal" then
  1037.                 v93 = v75.HardcoreUnlocked;
  1038.                 v94 = v75.HardcoreUnlocked;
  1039.             elseif u1 == "Trading Plaza" then
  1040.                 v93 = v75.HardcoreUnlocked;
  1041.                 v94 = v75.HardcoreUnlocked;
  1042.             end;
  1043.         else
  1044.             v93 = v75.HardcoreUnlocked;
  1045.             v94 = v75.HardcoreUnlocked;
  1046.         end;
  1047.         v92.ImageColor3 = v93 and Color3.new(1, 1, 1) or Color3.fromRGB(120, 120, 120);
  1048.         v92.Title.Text = u1;
  1049.         if v93 then
  1050.             if not v94 then
  1051.                 v95 = "rbxassetid://7045637286";
  1052.             else
  1053.                 v95 = "rbxassetid://6869680115";
  1054.             end;
  1055.         else
  1056.             v95 = "rbxassetid://6869680115";
  1057.         end;
  1058.         v92.Image = v95;
  1059.         if v93 then
  1060.             if not v94 then
  1061.                 v96 = "rbxassetid://7045637411";
  1062.             else
  1063.                 v96 = "rbxassetid://6903539993";
  1064.             end;
  1065.         else
  1066.             v96 = "rbxassetid://6903539993";
  1067.         end;
  1068.         v92.HoverImage = v96;
  1069.         if not v93 then
  1070.             v92.Icon.Image = "rbxassetid://7255478600";
  1071.         elseif not v94 then
  1072.             v92.Icon.Image = "rbxassetid://7255478657";
  1073.         elseif v94 then
  1074.             if v93 then
  1075.                 v92.Icon.Image = "rbxassetid://6708234702";
  1076.             end;
  1077.         end;
  1078.     end;
  1079.     Scrolling(l__Holder__76);
  1080. end;
  1081. function Scrolling(p13)
  1082.     local v97 = p13:FindFirstChildOfClass("UIListLayout");
  1083.     local v98 = p13:FindFirstChildOfClass("UIPadding");
  1084.     v97:ApplyLayout();
  1085.     p13.CanvasSize = UDim2.new(0, 0, 0, v97.AbsoluteContentSize.Y + v98.PaddingBottom.Offset + v98.PaddingTop.Offset);
  1086. end;
  1087. local l__ID__8 = v1.Directory.Gamepasses.Teleport.ID;
  1088. function UpdateBottom()
  1089.     local v99 = v1.Gamepasses.Owns(l__ID__8);
  1090.     l__Teleport__2.UnlockAll.Visible = not v99;
  1091.     if v99 then
  1092.         local v100 = 1;
  1093.     else
  1094.         v100 = 0.85;
  1095.     end;
  1096.     if v99 then
  1097.         local v101 = 20;
  1098.     else
  1099.         v101 = 0;
  1100.     end;
  1101.     l__Teleport__2.RightContainer.Size = UDim2.new(0.6, 32, v100, v101);
  1102.     Scrolling(l__Teleport__2.Gui.Frame.RightContainer.Holder);
  1103. end;
  1104. v1.GUIFX.ButtonFX(l__Teleport__2);
  1105. v1.GUIFX.Tooltip(l__Teleport__2, "Teleport");
  1106. l__Teleport__2.Activated:Connect(function()
  1107.     if not u5 then
  1108.         u5 = true;
  1109.         if v1.Shared.IsTradingPlaza then
  1110.             local u9 = false;
  1111.             pcall(function()
  1112.                 u9 = v1.VoiceChatService:IsVoiceEnabledForUserIdAsync(v1.LocalPlayer.UserId);
  1113.             end);
  1114.             v1.Signal.Fire("Show Trading Plaza Choice", u9);
  1115.         else
  1116.             l__Teleport__2.Gui.Enabled = not l__Teleport__2.Gui.Enabled;
  1117.         end;
  1118.         u5 = false;
  1119.     end;
  1120. end);
  1121. v1.GUIFX.ButtonFX(l__Teleport__2.Close);
  1122. l__Teleport__2.Close.Activated:Connect(function()
  1123.     if not u5 then
  1124.         u5 = true;
  1125.         l__Teleport__2.Gui.Enabled = false;
  1126.         u5 = false;
  1127.     end;
  1128. end);
  1129. v1.GUIFX.ButtonFX(l__Teleport__2.UnlockAll.Buy);
  1130. l__Teleport__2.UnlockAll.Buy.Robux.Text = "???";
  1131. task.spawn(function()
  1132.     local v102, v103 = v1.Functions.GetPrice(l__ID__8);
  1133.     if v103 then
  1134.         l__Teleport__2.UnlockAll.Buy.Robux.Text = v1.Functions.Commas(v102);
  1135.     end;
  1136. end);
  1137. l__Teleport__2.UnlockAll.Buy.Activated:Connect(function()
  1138.     if not u5 then
  1139.         u5 = true;
  1140.         v1.Shared.PromptPurchase(l__ID__8, false);
  1141.         u5 = false;
  1142.     end;
  1143. end);
  1144. Setup();
  1145. if v1.Shared.IsTradingPlaza then
  1146.     return;
  1147. end;
  1148. UpdateBottom();
  1149. v1.Signal.Fired("Stat Changed"):Connect(function(p14)
  1150.     if p14 == "AreasUnlocked" or p14 == "TeleportsUnlocked" or p14 == "Gamepasses" then
  1151.         UpdateBottom();
  1152.         UpdateAreas();
  1153.         return;
  1154.     end;
  1155.     if p14 == "Hardcore" or p14 == "OwnsTradingPlaza" then
  1156.         UpdateRealms();
  1157.         UpdateAreas();
  1158.     end;
  1159. end);
  1160. v1.Signal.Fired("Resolution Changed"):Connect(function()
  1161.     task.defer(function()
  1162.         Scrolling(l__Teleport__2.Gui.Frame.LeftContainer.Holder);
  1163.         Scrolling(l__Teleport__2.Gui.Frame.RightContainer.Holder);
  1164.     end);
  1165. end);
  1166. coroutine.wrap(function()
  1167.     while true do
  1168.         if l__Teleport__2.Gui.Enabled then
  1169.             Scrolling(l__Teleport__2.Gui.Frame.LeftContainer.Holder);
  1170.             Scrolling(l__Teleport__2.Gui.Frame.RightContainer.Holder);
  1171.         end;
  1172.         v1.Heartbeat(30);  
  1173.     end;
  1174. end)();
  1175.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement