Sombody101

Untitled

Mar 1st, 2024 (edited)
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 15.44 KB | None | 0 0
  1. // Decompiled with JetBrains decompiler
  2. // Type: Tundra.MainUI
  3. // Assembly: Tundra, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  4. // MVID: FFD9AC46-9F96-4437-AA52-5AD0FC45FFFF
  5. // Assembly location: Z:\Tundra\Tundra\Tundra-cleaned.exe
  6.  
  7. using ExploitDLL;
  8. using FastColoredTextBoxNS;
  9. using System;
  10. using System.ComponentModel;
  11. using System.Diagnostics;
  12. using System.Drawing;
  13. using System.IO;
  14. using System.Windows.Forms;
  15.  
  16. namespace Tundra
  17. {
  18.     public class MainUI : Form
  19.     {
  20.         private Injector Exploit = new Injector();
  21.         private IContainer components;
  22.         private Button ExecuteButton;
  23.         private Button ClearButton;
  24.         private Button OpenFileButton;
  25.         private Button SaveFileButton;
  26.         private MenuStrip TopBar;
  27.         private ToolStripMenuItem SettingsTab;
  28.         private ToolStripMenuItem TopmostToggle;
  29.         private ToolStripMenuItem KillROBLOXButton;
  30.         private ToolStripMenuItem SupportTab;
  31.         private ToolStripMenuItem JoinDiscordButton;
  32.         private FastColoredTextBox ScriptBox;
  33.         private ToolStripMenuItem AutoInjectToggle;
  34.         private ListBox ScriptListBox;
  35.         private Button AttachButton;
  36.         private ContextMenuStrip ScriptsContextMenuStrip;
  37.         private ToolStripMenuItem RefreshScriptsButton;
  38.  
  39.         public MainUI()
  40.         {
  41.             InitializeComponent();
  42.             LoadScripts();
  43.         }
  44.  
  45.         private void JoinDiscordButton_Click(object sender, EventArgs e) => Process.Start("https://discord.gg/q7N9ypmTWG");
  46.  
  47.         private void TopmostToggle_Click(object sender, EventArgs e) => TopMost = TopmostToggle.Checked;
  48.  
  49.         private void KillROBLOXButton_Click(object sender, EventArgs e)
  50.         {
  51.             foreach (Process process in Process.GetProcessesByName("RobloxPlayerBeta"))
  52.             {
  53.                 if (process.ProcessName.Equals("RobloxPlayerBeta", StringComparison.OrdinalIgnoreCase))
  54.                 {
  55.                     process.Kill();
  56.                     break;
  57.                 }
  58.             }
  59.         }
  60.  
  61.         private void ClearButton_Click(object sender, EventArgs e)
  62.             => ScriptBox.Clear();
  63.  
  64.         private async void ExecuteButton_Click(object sender, EventArgs e)
  65.         {
  66.             MainUI mainUi = this;
  67.             string str = await mainUi.Exploit.Execute(mainUi.ScriptBox.Text);
  68.             mainUi.Text = "Tundra [Status: " + str + "]";
  69.         }
  70.  
  71.         private void OpenFileButton_Click(object sender, EventArgs e)
  72.         {
  73.             using (OpenFileDialog openFileDialog = new OpenFileDialog())
  74.             {
  75.                 openFileDialog.Filter = "Lua Files (*.lua)|*.lua|Text Files (*.txt)|*.txt";
  76.                 openFileDialog.Title = "Load File as a Script";
  77.                 if (openFileDialog.ShowDialog() != DialogResult.OK)
  78.                     return;
  79.                 ScriptBox.Text = File.ReadAllText(openFileDialog.FileName);
  80.             }
  81.         }
  82.  
  83.         private void SaveFileButton_Click_1(object sender, EventArgs e)
  84.         {
  85.             using (SaveFileDialog saveFileDialog = new SaveFileDialog())
  86.             {
  87.                 saveFileDialog.Filter = "Lua Files (*.lua)|*.lua|Text Files (*.txt)|*.txt";
  88.                 saveFileDialog.Title = "Save Script as a File";
  89.                 if (saveFileDialog.ShowDialog() != DialogResult.OK)
  90.                     return;
  91.                 File.WriteAllText(saveFileDialog.FileName, ScriptBox.Text);
  92.             }
  93.         }
  94.  
  95.         private void AttachButton_Click_1(object sender, EventArgs e)
  96.             => Text = "Tundra [Status: " + Exploit.Attach() + "]";
  97.  
  98.         private void LoadScripts()
  99.         {
  100.             try
  101.             {
  102.                 ScriptListBox.Items.Clear();
  103.                 string[] files1 = Directory.GetFiles("scripts", "*.txt");
  104.                 string[] files2 = Directory.GetFiles("scripts", "*.lua");
  105.                 string[] destinationArray = new string[files1.Length + files2.Length];
  106.                 Array.Copy((Array)files1, (Array)destinationArray, files1.Length);
  107.                 Array.Copy((Array)files2, 0, (Array)destinationArray, files1.Length, files2.Length);
  108.                 foreach (string path in destinationArray)
  109.                     ScriptListBox.Items.Add((object)Path.GetFileName(path));
  110.             }
  111.             catch
  112.             {
  113.             }
  114.         }
  115.  
  116.         private void ScriptListBox_SelectedIndexChanged(object sender, EventArgs e)
  117.         {
  118.             try
  119.             {
  120.                 string path2 = ScriptListBox.SelectedItem.ToString();
  121.                 if (path2 == null)
  122.                     return;
  123.                 ScriptBox.Text = File.ReadAllText(Path.Combine("scripts", path2));
  124.             }
  125.             catch
  126.             {
  127.             }
  128.         }
  129.  
  130.         private void ScriptListBox_MouseDown(object sender, MouseEventArgs e)
  131.         {
  132.             if (e.Button != MouseButtons.Right)
  133.                 return;
  134.             ScriptsContextMenuStrip.Show((Control)ScriptListBox, e.Location);
  135.         }
  136.  
  137.         private void RefreshScriptsButton_Click(object sender, EventArgs e) => LoadScripts();
  138.  
  139.         protected override void Dispose(bool disposing)
  140.         {
  141.             if (disposing && components != null)
  142.                 components.Dispose();
  143.             base.Dispose(disposing);
  144.         }
  145.  
  146.         private void InitializeComponent()
  147.         {
  148.             components = (IContainer)new Container();
  149.             ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(MainUI));
  150.             ExecuteButton = new Button();
  151.             ClearButton = new Button();
  152.             OpenFileButton = new Button();
  153.             SaveFileButton = new Button();
  154.             TopBar = new MenuStrip();
  155.             SettingsTab = new ToolStripMenuItem();
  156.             TopmostToggle = new ToolStripMenuItem();
  157.             AutoInjectToggle = new ToolStripMenuItem();
  158.             KillROBLOXButton = new ToolStripMenuItem();
  159.             SupportTab = new ToolStripMenuItem();
  160.             JoinDiscordButton = new ToolStripMenuItem();
  161.             ScriptBox = new FastColoredTextBox();
  162.             ScriptListBox = new ListBox();
  163.             AttachButton = new Button();
  164.             ScriptsContextMenuStrip = new ContextMenuStrip(components);
  165.             RefreshScriptsButton = new ToolStripMenuItem();
  166.             TopBar.SuspendLayout();
  167.             ((ISupportInitialize)ScriptBox).BeginInit();
  168.             ScriptsContextMenuStrip.SuspendLayout();
  169.             SuspendLayout();
  170.             ExecuteButton.FlatAppearance.BorderColor = Color.White;
  171.             ExecuteButton.FlatStyle = FlatStyle.System;
  172.             ExecuteButton.Font = new Font("Segoe UI", 9.75f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
  173.             ExecuteButton.Location = new Point(12, 424);
  174.             ExecuteButton.Name = "ExecuteButton";
  175.             ExecuteButton.Size = new Size(100, 30);
  176.             ExecuteButton.TabIndex = 0;
  177.             ExecuteButton.Text = "Execute";
  178.             ExecuteButton.UseVisualStyleBackColor = true;
  179.             ExecuteButton.Click += new EventHandler(ExecuteButton_Click);
  180.             ClearButton.FlatAppearance.BorderColor = Color.White;
  181.             ClearButton.FlatStyle = FlatStyle.System;
  182.             ClearButton.Font = new Font("Segoe UI", 9.75f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
  183.             ClearButton.Location = new Point(118, 424);
  184.             ClearButton.Name = "ClearButton";
  185.             ClearButton.Size = new Size(100, 30);
  186.             ClearButton.TabIndex = 0;
  187.             ClearButton.Text = "Clear";
  188.             ClearButton.UseVisualStyleBackColor = true;
  189.             ClearButton.Click += new EventHandler(ClearButton_Click);
  190.             OpenFileButton.FlatAppearance.BorderColor = Color.White;
  191.             OpenFileButton.FlatStyle = FlatStyle.System;
  192.             OpenFileButton.Font = new Font("Segoe UI", 9.75f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
  193.             OpenFileButton.Location = new Point(224, 424);
  194.             OpenFileButton.Name = "OpenFileButton";
  195.             OpenFileButton.Size = new Size(100, 30);
  196.             OpenFileButton.TabIndex = 0;
  197.             OpenFileButton.Text = "Open File";
  198.             OpenFileButton.UseVisualStyleBackColor = true;
  199.             OpenFileButton.Click += new EventHandler(OpenFileButton_Click);
  200.             SaveFileButton.FlatAppearance.BorderColor = Color.White;
  201.             SaveFileButton.FlatStyle = FlatStyle.System;
  202.             SaveFileButton.Font = new Font("Segoe UI", 9.75f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
  203.             SaveFileButton.Location = new Point(330, 424);
  204.             SaveFileButton.Name = "SaveFileButton";
  205.             SaveFileButton.Size = new Size(100, 30);
  206.             SaveFileButton.TabIndex = 0;
  207.             SaveFileButton.Text = "Save File";
  208.             SaveFileButton.UseVisualStyleBackColor = true;
  209.             SaveFileButton.Click += new EventHandler(SaveFileButton_Click_1);
  210.             TopBar.BackColor = Color.Transparent;
  211.             TopBar.Items.AddRange(new ToolStripItem[2]
  212.             {
  213.         (ToolStripItem) SettingsTab,
  214.         (ToolStripItem) SupportTab
  215.             });
  216.             TopBar.Location = new Point(0, 0);
  217.             TopBar.Name = "TopBar";
  218.             TopBar.Size = new Size(850, 24);
  219.             TopBar.TabIndex = 1;
  220.             TopBar.Text = "menuStrip1";
  221.             SettingsTab.DropDownItems.AddRange(new ToolStripItem[3]
  222.             {
  223.         (ToolStripItem) TopmostToggle,
  224.         (ToolStripItem) AutoInjectToggle,
  225.         (ToolStripItem) KillROBLOXButton
  226.             });
  227.             SettingsTab.Name = "SettingsTab";
  228.             SettingsTab.Size = new Size(61, 20);
  229.             SettingsTab.Text = "Settings";
  230.             TopmostToggle.CheckOnClick = true;
  231.             TopmostToggle.Name = "TopmostToggle";
  232.             TopmostToggle.Size = new Size(180, 22);
  233.             TopmostToggle.Text = "Toggle Topmost";
  234.             TopmostToggle.Click += new EventHandler(TopmostToggle_Click);
  235.             AutoInjectToggle.CheckOnClick = true;
  236.             AutoInjectToggle.Name = "AutoInjectToggle";
  237.             AutoInjectToggle.Size = new Size(180, 22);
  238.             AutoInjectToggle.Text = "Auto-Inject";
  239.             KillROBLOXButton.Name = "KillROBLOXButton";
  240.             KillROBLOXButton.Size = new Size(180, 22);
  241.             KillROBLOXButton.Text = "Kill ROBLOX";
  242.             KillROBLOXButton.Click += new EventHandler(KillROBLOXButton_Click);
  243.             SupportTab.DropDownItems.AddRange(new ToolStripItem[1]
  244.             {
  245.         (ToolStripItem) JoinDiscordButton
  246.             });
  247.             SupportTab.Name = "SupportTab";
  248.             SupportTab.Size = new Size(61, 20);
  249.             SupportTab.Text = "Support";
  250.             JoinDiscordButton.Name = "JoinDiscordButton";
  251.             JoinDiscordButton.Size = new Size(180, 22);
  252.             JoinDiscordButton.Text = "Join Discord";
  253.             JoinDiscordButton.Click += new EventHandler(JoinDiscordButton_Click);
  254.             ScriptBox.AutoCompleteBrackets = true;
  255.             ScriptBox.AutoCompleteBracketsList = new char[10]
  256.             {
  257.         '(',
  258.         ')',
  259.         '{',
  260.         '}',
  261.         '[',
  262.         ']',
  263.         '"',
  264.         '"',
  265.         '\'',
  266.         '\''
  267.             };
  268.             ScriptBox.AutoIndentCharsPatterns = "\r\n^\\s*[\\w\\.]+(\\s\\w+)?\\s*(?<range>=)\\s*(?<range>.+)\r\n";
  269.             ScriptBox.AutoScrollMinSize = new Size(27, 14);
  270.             ScriptBox.BackBrush = (Brush)null;
  271.             ScriptBox.BracketsHighlightStrategy = BracketsHighlightStrategy.Strategy2;
  272.             ScriptBox.CharHeight = 14;
  273.             ScriptBox.CharWidth = 8;
  274.             ScriptBox.CommentPrefix = "--";
  275.             ScriptBox.Cursor = Cursors.IBeam;
  276.             ScriptBox.DisabledColor = Color.FromArgb(100, 180, 180, 180);
  277.             ScriptBox.Font = new Font("Courier New", 9.75f);
  278.             ScriptBox.IsReplaceMode = false;
  279.             ScriptBox.Language = Language.Lua;
  280.             ScriptBox.LeftBracket = '(';
  281.             ScriptBox.LeftBracket2 = '{';
  282.             ScriptBox.Location = new Point(12, 27);
  283.             ScriptBox.Name = "ScriptBox";
  284.             ScriptBox.Paddings = new Padding(0);
  285.             ScriptBox.RightBracket = ')';
  286.             ScriptBox.RightBracket2 = '}';
  287.             ScriptBox.SelectionColor = Color.FromArgb(60, 0, 0, (int)byte.MaxValue);
  288.             ScriptBox.ServiceColors = (ServiceColors)componentResourceManager.GetObject("ScriptBox.ServiceColors");
  289.             ScriptBox.Size = new Size(678, 391);
  290.             ScriptBox.TabIndex = 2;
  291.             ScriptBox.Zoom = 100;
  292.             ScriptListBox.Font = new Font("Segoe UI", 9.75f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
  293.             ScriptListBox.FormattingEnabled = true;
  294.             ScriptListBox.HorizontalScrollbar = true;
  295.             ScriptListBox.ItemHeight = 17;
  296.             ScriptListBox.Location = new Point(696, 25);
  297.             ScriptListBox.Name = "ScriptListBox";
  298.             ScriptListBox.Size = new Size(142, 429);
  299.             ScriptListBox.Sorted = true;
  300.             ScriptListBox.TabIndex = 3;
  301.             ScriptListBox.SelectedIndexChanged += new EventHandler(ScriptListBox_SelectedIndexChanged);
  302.             ScriptListBox.MouseDown += new MouseEventHandler(ScriptListBox_MouseDown);
  303.             AttachButton.FlatAppearance.BorderColor = Color.White;
  304.             AttachButton.FlatStyle = FlatStyle.System;
  305.             AttachButton.Font = new Font("Segoe UI", 9.75f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
  306.             AttachButton.Location = new Point(590, 424);
  307.             AttachButton.Name = "AttachButton";
  308.             AttachButton.Size = new Size(100, 30);
  309.             AttachButton.TabIndex = 0;
  310.             AttachButton.Text = "Attach";
  311.             AttachButton.UseVisualStyleBackColor = true;
  312.             AttachButton.Click += new EventHandler(AttachButton_Click_1);
  313.             ScriptsContextMenuStrip.Items.AddRange(new ToolStripItem[1]
  314.             {
  315.         (ToolStripItem) RefreshScriptsButton
  316.             });
  317.             ScriptsContextMenuStrip.Name = "ScriptsContextMenuStrip";
  318.             ScriptsContextMenuStrip.Size = new Size(114, 26);
  319.             RefreshScriptsButton.Name = "RefreshScriptsButton";
  320.             RefreshScriptsButton.Size = new Size(113, 22);
  321.             RefreshScriptsButton.Text = "Refresh";
  322.             RefreshScriptsButton.Click += new EventHandler(RefreshScriptsButton_Click);
  323.             AutoScaleDimensions = new SizeF(6f, 13f);
  324.             AutoScaleMode = AutoScaleMode.Font;
  325.             ClientSize = new Size(850, 461);
  326.             Controls.Add((Control)ScriptListBox);
  327.             Controls.Add((Control)ScriptBox);
  328.             Controls.Add((Control)AttachButton);
  329.             Controls.Add((Control)SaveFileButton);
  330.             Controls.Add((Control)OpenFileButton);
  331.             Controls.Add((Control)ClearButton);
  332.             Controls.Add((Control)ExecuteButton);
  333.             Controls.Add((Control)TopBar);
  334.             FormBorderStyle = FormBorderStyle.FixedSingle;
  335.             Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
  336.             MainMenuStrip = TopBar;
  337.             MaximizeBox = false;
  338.             Name = nameof(MainUI);
  339.             Text = "Tundra [Status: Waiting]";
  340.             TopBar.ResumeLayout(false);
  341.             TopBar.PerformLayout();
  342.             ((ISupportInitialize)ScriptBox).EndInit();
  343.             ScriptsContextMenuStrip.ResumeLayout(false);
  344.             ResumeLayout(false);
  345.             PerformLayout();
  346.         }
  347.     }
  348. }
  349.  
Add Comment
Please, Sign In to add comment