using System.Runtime.InteropServices;
using System.Windows.Forms;
public partial class MainForm : Form
private bool dragging = false;
private Point dragCursorPoint;
private Point dragFormPoint;
private void InitCustomUI()
this.FormBorderStyle = FormBorderStyle.None;
this.BackColor = Color.FromArgb(180, 60, 0, 90);
this.DoubleBuffered = true;
this.MinimumSize = new Size(900, 600);
this.MouseDown += MainForm_MouseDown;
this.MouseUp += MainForm_MouseUp;
this.MouseMove += MainForm_MouseMove;
var font = new Font("Segoe UI", 10);
this.ForeColor = Color.White;
Button btnClose = new Button()
FlatStyle = FlatStyle.Flat,
BackColor = Color.Transparent,
Location = new Point(this.ClientSize.Width - 40, 10),
Font = new Font("Segoe UI", 12, FontStyle.Bold),
btnClose.FlatAppearance.BorderSize = 0;
btnClose.Click += (s, e) => this.Close();
btnClose.Anchor = AnchorStyles.Top | AnchorStyles.Right;
this.Controls.Add(btnClose);
Button btnMin = new Button()
FlatStyle = FlatStyle.Flat,
BackColor = Color.Transparent,
Location = new Point(this.ClientSize.Width - 80, 10),
Font = new Font("Segoe UI", 12, FontStyle.Bold),
btnMin.FlatAppearance.BorderSize = 0;
btnMin.Click += (s, e) => this.WindowState = FormWindowState.Minimized;
btnMin.Anchor = AnchorStyles.Top | AnchorStyles.Right;
this.Controls.Add(btnMin);
Label lblTitle = new Label()
Font = new Font("Segoe UI", 20, FontStyle.Bold),
Location = new Point(20, 10),
this.Controls.Add(lblTitle);
TabControl tabControl = new TabControl()
Location = new Point(20, 60),
Size = new Size(this.ClientSize.Width - 40, this.ClientSize.Height - 80),
Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right,
DrawMode = TabDrawMode.OwnerDrawFixed,
ItemSize = new Size(150, 30)
tabControl.DrawItem += TabControl_DrawItem;
this.Controls.Add(tabControl);
TabPage tabMain = new TabPage("Executor");
TabPage tabSettings = new TabPage("Settings");
tabControl.TabPages.Add(tabMain);
tabControl.TabPages.Add(tabSettings);
RichTextBox txtScript = new RichTextBox()
Height = tabMain.ClientSize.Height - 130,
Font = new Font("Consolas", 12),
BackColor = Color.FromArgb(40, 30, 40),
BorderStyle = BorderStyle.FixedSingle
txtScript.Text = "Welcome to vmp.gg";
txtScript.Enter += (s, e) =>
if (txtScript.Text == "Welcome to vmp.gg")
txtScript.Leave += (s, e) =>
if (string.IsNullOrWhiteSpace(txtScript.Text))
txtScript.Text = "Welcome to vmp.gg";
tabMain.Controls.Add(txtScript);
FlowLayoutPanel panelButtons = new FlowLayoutPanel()
FlowDirection = FlowDirection.LeftToRight,
Padding = new Padding(10),
BackColor = Color.Transparent
tabMain.Controls.Add(panelButtons);
Button btnAttach = new Button()
BackColor = Color.FromArgb(120, 60, 0, 90),
FlatStyle = FlatStyle.Flat,
btnAttach.FlatAppearance.BorderSize = 0;
panelButtons.Controls.Add(btnAttach);
Button btnExecute = new Button()
BackColor = Color.FromArgb(120, 60, 0, 90),
FlatStyle = FlatStyle.Flat,
btnExecute.FlatAppearance.BorderSize = 0;
panelButtons.Controls.Add(btnExecute);
Button btnClear = new Button()
BackColor = Color.FromArgb(120, 60, 0, 90),
FlatStyle = FlatStyle.Flat,
btnClear.FlatAppearance.BorderSize = 0;
panelButtons.Controls.Add(btnClear);
Label lblStatus = new Label()
TextAlign = ContentAlignment.MiddleLeft,
ForeColor = Color.LightGray,
Font = new Font("Segoe UI", 9),
tabMain.Controls.Add(lblStatus);
CheckBox cbAutoInject = new CheckBox()
Text = "Auto Inject on Start",
Location = new Point(20, 20),
tabSettings.Controls.Add(cbAutoInject);
CheckBox cbShowConsole = new CheckBox()
Text = "Show Console Window",
Location = new Point(20, 50),
tabSettings.Controls.Add(cbShowConsole);
CheckBox cbDiscordRPC = new CheckBox()
Text = "Enable Discord RPC",
Location = new Point(20, 80),
tabSettings.Controls.Add(cbDiscordRPC);
btnAttach.Click += (s, e) =>
lblStatus.Text = "Status: Injected successfully";
lblStatus.Text = "Status: Injection failed - " + ex.Message;
btnExecute.Click += (s, e) =>
string script = txtScript.Text;
if (string.IsNullOrWhiteSpace(script) || script == "Welcome to vmp.gg")
lblStatus.Text = "Status: Please enter a script";
lblStatus.Text = "Status: Script executed";
lblStatus.Text = "Status: Execution failed - " + ex.Message;
btnClear.Click += (s, e) =>
lblStatus.Text = "Status: Cleared script";
btnClose.Location = new Point(this.ClientSize.Width - 40, 10);
btnMin.Location = new Point(this.ClientSize.Width - 80, 10);
this.ClientSize = new Size(900, 600);
private void TabControl_DrawItem(object sender, DrawItemEventArgs e)
TabControl tabControl = sender as TabControl;
Brush backBrush = new SolidBrush(Color.FromArgb(140, 70, 0, 140));
Brush foreBrush = Brushes.White;
Font font = new Font("Segoe UI", 10, FontStyle.Bold);
e.Graphics.FillRectangle(backBrush, e.Bounds);
Rectangle paddedBounds = e.Bounds;
int yOffset = (e.Bounds.Height - (int)e.Graphics.MeasureString(tabControl.TabPages[e.Index].Text, font).Height) / 2;
paddedBounds.Y += yOffset;
e.Graphics.DrawString(tabControl.TabPages[e.Index].Text, font, foreBrush, paddedBounds.Left + 10, paddedBounds.Top);
private void MainForm_MouseDown(object sender, MouseEventArgs e)
dragCursorPoint = Cursor.Position;
dragFormPoint = this.Location;
private void MainForm_MouseUp(object sender, MouseEventArgs e)
private void MainForm_MouseMove(object sender, MouseEventArgs e)
Point dif = Point.Subtract(Cursor.Position, new Size(dragCursorPoint));
this.Location = Point.Add(dragFormPoint, new Size(dif));
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());