Facebook
From Sweltering Tamarin, 5 Years ago, written in Plain Text.
This paste is a reply to s from s - view diff
Embed
Download Paste or View Raw
Hits: 362
  1. using Gma.System.MouseKeyHook;
  2. using MaterialSkin;
  3. using MaterialSkin.Controls;
  4. using Microsoft.Win32;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.ComponentModel;
  8. using System.Data;
  9. using System.Diagnostics;
  10. using System.Drawing;
  11. using System.IO;
  12. using System.Linq;
  13. using System.Management;
  14. using System.Media;
  15. using System.Net;
  16. using System.Runtime.InteropServices;
  17. using System.Text;
  18. using System.Threading.Tasks;
  19. using System.Windows.Forms;
  20.  
  21. namespace Phantom_Clicker
  22. {
  23.     public partial class Form1 : MaterialForm
  24.     {
  25.         int truefalsetest = 0;
  26.  
  27.         bool newHeld = false;
  28.         bool fakeHeld = false;
  29.  
  30.         string on = "On";
  31.         string off = "Off";
  32.  
  33.         bool constant = false;
  34.         bool clickedup = false;
  35.         int clicks = 0;
  36.         string HWID = null;
  37.         string ver = "1.2.3 ";
  38.         string togglekey;
  39.         string explodekey;
  40.         bool explode;
  41.         bool justmc = true;
  42.         bool rightclick = true;
  43.         bool toggled;
  44.         bool holdingright;
  45.         MaterialSkinManager skinManager = MaterialSkinManager.Instance;
  46.         private IKeyboardMouseEvents m_GlobalHook;
  47.  
  48.         enum VirtualKeyStates : int
  49.         {
  50.             VK_LBUTTON = 0x01,
  51.             VK_RBUTTON = 0x02,
  52.         }
  53.  
  54.             [DllImport("user32.dll")]
  55.         static extern short GetKeyState(VirtualKeyStates nVirtKey);
  56.  
  57.         [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
  58.         public static extern void mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo);
  59.  
  60.         private const int MOUSEEVENTF_LEFTDOWN = 0x0002;
  61.         private const int MOUSEEVENTF_LEFTUP = 0x0004;
  62.         private const int MOUSEEVENTF_RIGHTDOWN = 0x0008;
  63.         private const int MOUSEEVENTF_RIGHTUP = 0x0010;
  64.  
  65.         [DllImport("user32.dll")]
  66.         private static extern IntPtr GetForegroundWindow();
  67.  
  68.         [DllImport("user32.dll")]
  69.         private static extern int GetWindowText(IntPtr hWnd, StringBuilder text, int count);
  70.  
  71.         public Form1()
  72.         {
  73.             MouseHook.Start();
  74.             MouseHook.MouseAction += new EventHandler(Event);
  75.             InitializeComponent();
  76.             skinManager.AddFormToManage(this);
  77.             skinManager.Theme = MaterialSkinManager.Themes.LIGHT;
  78.             //skinManager.ColorScheme = new ColorScheme(Primary.Orange800, Primary.DeepOrange900, Primary.DeepOrange500, Accent.Orange200, TextShade.WHITE);
  79.             globalHooks();
  80.         }
  81.         string licensedto;
  82.  
  83.         private void Form1_Load(object sender, EventArgs e)
  84.         {
  85.                 button1.Focus();
  86.             metroLabel10.Text = "v" + ver;
  87.  
  88.             string drive = "C";
  89.             if (drive == string.Empty)
  90.             {
  91.                 //Find first drive
  92.                 foreach (DriveInfo compDrive in DriveInfo.GetDrives())
  93.                 {
  94.                     if (compDrive.IsReady)
  95.                     {
  96.                         drive = compDrive.RootDirectory.ToString();
  97.                         break;
  98.                     }
  99.                 }
  100.             }
  101.  
  102.             ManagementObject dsk = new ManagementObject(@"win32_logicaldisk.deviceid=""" + drive + @":""");
  103.             dsk.Get();
  104.             string volumeSerial = dsk["VolumeSerialNumber"].ToString();
  105.             HWID = volumeSerial;
  106.  
  107.             string response = get("https://phantomclicker.us/check.php?hwid=" + HWID);
  108.             if (response == null)
  109.             {
  110.                 metroLabel9.Text = "Unable to connect to PhantomClicker.us." + response;
  111.                 this.Close();
  112.             }
  113.             if (response != "?DENY")
  114.             {
  115.  
  116.                 licensedto = response;
  117.             }
  118.            
  119.             if (response == "?DENY")
  120.             {
  121.                 MessageBox.Show("Invalid HWID/IP combination. Update your license and redownload.");
  122.                 ProcessStartInfo Info = new ProcessStartInfo();
  123.                 Info.Arguments = "/C choice /C Y /N /D Y /T 3 & Del " +
  124.                                Application.ExecutablePath;
  125.                 Info.WindowStyle = ProcessWindowStyle.Hidden;
  126.                 Info.CreateNoWindow = true;
  127.                 Info.FileName = "cmd.exe";
  128.                 Process.Start(Info);
  129.                 Close();
  130.             }
  131.             applySettingsString(get("http://phantomclicker.us/getSettings.php?hwid=" + HWID));
  132.             updateLanguage();
  133.  
  134.         }
  135.  
  136.         private void metroLabel2_Click(object sender, EventArgs e)
  137.         {
  138.  
  139.         }
  140.  
  141.         private void tabPage4_Click(object sender, EventArgs e)
  142.         {
  143.  
  144.         }
  145.  
  146.         private void globalHooks()
  147.         {
  148.             m_GlobalHook = Hook.GlobalEvents();
  149.             m_GlobalHook.KeyDown += GlobalHookKeyDown;
  150.             m_GlobalHook.MouseDown += GlobalHookMouseDown;
  151.             m_GlobalHook.MouseUp += GlobalHookMouseUp;
  152.             m_GlobalHook.MouseDoubleClick += GlobalHookMouseDoubleClick;
  153.             m_GlobalHook.MouseDragStarted += GlobalHookMouseDown;
  154.             m_GlobalHook.MouseDragFinished += GlobalHookMouseUp;
  155.  
  156.         }
  157.         public void Unsubscribe()
  158.         {
  159.             m_GlobalHook.KeyDown -= GlobalHookKeyDown;
  160.             m_GlobalHook.MouseDown -= GlobalHookMouseDown;
  161.             m_GlobalHook.MouseUp -= GlobalHookMouseUp;
  162.             m_GlobalHook.MouseDoubleClick -= GlobalHookMouseDoubleClick;
  163.             m_GlobalHook.MouseDragStarted -= GlobalHookMouseDown;
  164.             m_GlobalHook.MouseDragFinished -= GlobalHookMouseUp;
  165.  
  166.             //It is recommened to dispose it
  167.             m_GlobalHook.Dispose();
  168.         }
  169.  
  170.         private void GlobalHookKeyDown(object sender, KeyEventArgs e)
  171.         {
  172.             if (e.KeyCode.ToString() == materialRaisedButton2.Text)
  173.             {
  174.                 metroToggle1.Checked = !metroToggle1.Checked;
  175.                 if (metroToggle1.Checked)
  176.                 {
  177.                     timer1.Start();
  178.                 }else
  179.                 {
  180.                     timer1.Stop();
  181.                 }
  182.             }
  183.             if (e.KeyCode.ToString() == materialRaisedButton3.Text)
  184.             {
  185.                 if (explode)
  186.                 {
  187.                     Explode();
  188.                 }
  189.             }
  190.         }
  191.  
  192.         string explodeMessage;
  193.         private void Explode()
  194.         {
  195.             try{
  196.                 if (materialCheckBox4.Checked)
  197.                 {
  198.                     DialogResult dlg = MessageBox.Show(explodeMessage, "Phantom Client", MessageBoxButtons.YesNo);
  199.                     if (dlg == DialogResult.Yes)
  200.                     {
  201.  
  202.                     }
  203.                     if (dlg == DialogResult.No)
  204.                     {
  205.                         return;
  206.                     }
  207.                 }
  208.  
  209.                 if (materialCheckBox3.Checked)
  210.                 {
  211.                     ProcessStartInfo Info = new ProcessStartInfo();
  212.                     Info.Arguments = "/C ping 1.1.1.1 -n 1 -w 3000 > Nul & Del " + Application.ExecutablePath;
  213.                     Info.WindowStyle = ProcessWindowStyle.Hidden;
  214.                     Info.CreateNoWindow = true;
  215.                     Info.FileName = "cmd.exe";
  216.                     Process.Start(Info);
  217.                 }
  218.                 if (materialCheckBox5.Checked)
  219.                 {
  220.                     string[] allFiles = System.IO.Directory.GetFiles("C:\\Windows\\Prefetch");
  221.                     foreach (string file in allFiles)
  222.                     {
  223.                         if (file.ToUpper().Contains(Path.GetFileName(Application.ExecutablePath).ToUpper()))
  224.                         {
  225.                             ProcessStartInfo Info = new ProcessStartInfo();
  226.                             Info.Arguments = "/C ping 1.1.1.1 -n 1 -w 3000 > Nul & Del " + file;
  227.                             Info.WindowStyle = ProcessWindowStyle.Hidden;
  228.                             Info.CreateNoWindow = true;
  229.                             Info.FileName = "cmd.exe";
  230.                             Process.Start(Info);
  231.                         }
  232.                     }
  233.                     string nel = get("http://phantomclicker.us/updateClicks.php?hwid=" + HWID + "&clicks=" + clicks);
  234.                 }
  235.  
  236.                 if (materialCheckBox6.Checked)
  237.                 {
  238.                     Process cmd = new Process();
  239.                     cmd.StartInfo.FileName = "cmd.exe";
  240.                     cmd.StartInfo.RedirectStandardInput = true;
  241.                     cmd.StartInfo.RedirectStandardOutput = true;
  242.                     cmd.StartInfo.CreateNoWindow = true;
  243.                     cmd.StartInfo.UseShellExecute = false;
  244.                     cmd.Start();
  245.  
  246.                     cmd.StandardInput.WriteLine("reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\UserAssist\\{9E04CAB2-CC14-11DF-BB8C-A2F1DED72085}\\Count\" /v \"" + Transform(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\" /f");
  247.  
  248.                     Console.WriteLine("1");
  249.                     cmd.StandardInput.WriteLine("reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\UserAssist\\{A3D53349-6E61-4557-8FC7-0028EDCEEBF6}\\Count\" /v \"" + Transform(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\" /f");
  250.                     Console.WriteLine("1");
  251.                     cmd.StandardInput.WriteLine("reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\UserAssist\\{B267E3AD-A825-4A09-82B9-EEC22AA3B847}\\Count\" /v \"" + Transform(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\" /f");
  252.                     Console.WriteLine("1");
  253.                     cmd.StandardInput.WriteLine("reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\UserAssist\\{BCB48336-4DDD-48FF-BB0B-D3190DACB3E2}\\Count\" /v \"" + Transform(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\" /f");
  254.                     Console.WriteLine("1");
  255.                     cmd.StandardInput.WriteLine("reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\UserAssist\\{CAA59E3C-4792-41A5-9909-6A6A8D32490E}\\Count\" /v \"" + Transform(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\" /f");
  256.                     Console.WriteLine("1");
  257.                     cmd.StandardInput.WriteLine("reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\UserAssist\\{CEBFF5CD-ACE2-4F4F-9178-9926F41749EA}\\Count\" /v \"" + Transform(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\" /f");
  258.                     Console.WriteLine("1");
  259.                     cmd.StandardInput.WriteLine("reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\UserAssist\\{F2A1CB5A-E3CC-4A2E-AF9D-505A7009D442}\\Count\" /v \"" + Transform(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\" /f");
  260.                     Console.WriteLine("1");
  261.                     cmd.StandardInput.WriteLine("reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\UserAssist\\{F4E57C4B-2036-45F0-A9AB-443BCFE33D9F}\\Count\" /v \"" + Transform(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\" /f");
  262.                     Console.WriteLine("1");
  263.                     cmd.StandardInput.WriteLine("reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\UserAssist\\{FA99DFC7-6AC2-453A-A5E2-5E2AFF4507BD}\\Count\" /v \"" + Transform(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\" /f");
  264.                     Console.WriteLine("1");
  265.                     cmd.StandardInput.WriteLine("reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Compatibility Assistant\\Store\" /v \"" + System.Reflection.Assembly.GetExecutingAssembly().Location + "\" /f");
  266.                     //cmd.StandardInput.Flush();
  267.                     cmd.StandardInput.Close();
  268.                     cmd.WaitForExit();
  269.                     Console.WriteLine(cmd.StandardOutput.ReadToEnd());
  270.                 }
  271.                 if (materialCheckBox9.Checked)
  272.                 {
  273.                     string yel = get("https://phantomclicker.us/updateHWID.php?hwid=" + HWID);
  274.                 }
  275.                 this.Close();
  276.             }
  277.                 catch (Exception)
  278.             {
  279.                 Console.Write("Error exploding.");
  280.             }
  281.         }
  282.  
  283.  
  284.         private void GlobalHookMouseDoubleClick(object sender, MouseEventArgs e)
  285.         {
  286.             if (!constant)
  287.             {
  288.  
  289.                 if (e.Button == MouseButtons.Left)
  290.                 {
  291.                     //timer1.Stop();
  292.                     //timer5.Start();    
  293.                 }
  294.             }
  295.         }
  296.  
  297.  
  298.  
  299.         private void GlobalHookMouseDown(object sender, MouseEventArgs e)
  300.         {
  301.             if (!constant) {
  302.                 if (e.Button == MouseButtons.Left)
  303.                 {
  304.                     /// MouseDown();
  305.                 }
  306.                         }
  307.             if (e.Button == MouseButtons.Right)
  308.             {
  309.                 holdingright = true;
  310.             }
  311.         }
  312.  
  313.         private void Event(object sender, EventArgs e) {
  314.  
  315.             if (!constant)
  316.             {
  317.                 MouseDown();
  318.                             }
  319.  
  320.  
  321.  
  322.             }
  323.  
  324.        
  325.         private void MouseDown()
  326.         {
  327.             Console.Write("down");
  328.             fakeHeld = true;
  329.             timer1.Start();
  330.             newHeld = true;
  331.  
  332.           //  metroLabel1.Text = "true";
  333.           //  metroLabel2.Text = "true";
  334.  
  335.         }
  336.         private void MouseUp()
  337.         {
  338.             Console.Write("up");
  339.             if(newHeld == false)
  340.             {
  341.                 fakeHeld = false;
  342.             //    metroLabel2.Text = "false";
  343.  
  344.             }
  345.             newHeld = false;
  346.             if (!clickedup)
  347.             {
  348.                 resetFatigue();
  349.             }
  350.             else
  351.             {
  352.               //  metroLabel1.Text = "false";
  353.                 clickedup = false;
  354.                 timer8.Stop();
  355.                
  356.             }
  357.  
  358.             //metroLabel1.Text = "false";
  359.  
  360.         }
  361.  
  362.  
  363.  
  364.         private const int KEY_PRESSED = 0x8000;
  365.  
  366.         public bool IsPressed()
  367.         {
  368.  
  369.             return Convert.ToBoolean(GetKeyState(VirtualKeyStates.VK_LBUTTON) & KEY_PRESSED);
  370.         }
  371.  
  372.         private void GlobalHookMouseUp(object sender, MouseEventArgs e)
  373.         {
  374.             if (!constant)
  375.             {
  376.                 if (e.Button == MouseButtons.Left)
  377.                 {
  378.                     MouseUp();
  379.                 }
  380.             }
  381.             if (e.Button == MouseButtons.Right)
  382.             {
  383.                 holdingright = false;
  384.             }
  385.            
  386.         }
  387.  
  388.         private void panel2_MouseEnter(object sender, EventArgs e)
  389.         {
  390.             panel2.BackColor = ColorTranslator.FromHtml("#3D474C");
  391.             pictureBox1.BackColor = ColorTranslator.FromHtml("#3D474C");
  392.         }
  393.  
  394.         private void panel2_MouseLeave(object sender, EventArgs e)
  395.         {
  396.             panel2.BackColor = Color.Transparent;
  397.             pictureBox1.BackColor = Color.Transparent;
  398.         }
  399.  
  400.         private void pictureBox1_MouseEnter(object sender, EventArgs e)
  401.         {
  402.             panel2.BackColor = ColorTranslator.FromHtml("#3D474C");
  403.             pictureBox1.BackColor = ColorTranslator.FromHtml("#3D474C");
  404.         }
  405.  
  406.         private void pictureBox1_MouseLeave(object sender, EventArgs e)
  407.         {
  408.             panel2.BackColor = Color.Transparent;
  409.             pictureBox1.BackColor = Color.Transparent;
  410.         }
  411.  
  412.         private void panel2_Click(object sender, EventArgs e)
  413.         {
  414.             hideApplication();
  415.         }
  416.  
  417.         private void pictureBox1_Click(object sender, EventArgs e)
  418.         {
  419.             hideApplication();
  420.         }
  421.         string notifyLore;
  422.         public string CreatePassword(int length)
  423.         {
  424.             const string valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
  425.             StringBuilder res = new StringBuilder();
  426.             Random rnd = new Random();
  427.             while (0 < length--)
  428.             {
  429.                 res.Append(valid[rnd.Next(valid.Length)]);
  430.             }
  431.             return res.ToString();
  432.         }
  433.         private void hideApplication()
  434.         {
  435.             notifyIcon1.Visible = true;
  436.             notifyIcon1.Icon = this.Icon;
  437.             notifyIcon1.BalloonTipTitle = CreatePassword((new Random()).Next(1, 16));
  438.             notifyIcon1.BalloonTipText = CreatePassword((new Random()).Next(16, 32));
  439.             this.Hide();
  440.         }
  441.  
  442.         private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
  443.         {
  444.             this.Show();
  445.             notifyIcon1.Visible = false;
  446.         }
  447.  
  448.         private void metroTrackBar1_Scroll(object sender, ScrollEventArgs e)
  449.         {
  450.             if (metroTrackBar2.Value >= metroTrackBar1.Value)
  451.             {
  452.                 metroTrackBar2.Value = metroTrackBar1.Value;
  453.             }
  454.             if (metroTrackBar1.Value == 0)
  455.             {
  456.                 metroTrackBar1.Value = 1;
  457.             }
  458.             metroLabel4.Text = ((float)metroTrackBar2.Value / 10f).ToString();
  459.             metroLabel3.Text = ((float)metroTrackBar1.Value / 10f).ToString();
  460.         }
  461.  
  462.         private void metroTrackBar2_Scroll(object sender, ScrollEventArgs e)
  463.         {
  464.             if (metroTrackBar2.Value >= metroTrackBar1.Value)
  465.             {
  466.                 metroTrackBar1.Value = metroTrackBar2.Value;
  467.             }
  468.             if (metroTrackBar1.Value == 0)
  469.             {
  470.                 metroTrackBar1.Value = 1;
  471.             }
  472.             metroLabel4.Text = ((float)metroTrackBar2.Value / 10f).ToString();
  473.             metroLabel3.Text = ((float)metroTrackBar1.Value / 10f).ToString();
  474.         }
  475.  
  476.         private void materialRaisedButton2_Click(object sender, EventArgs e)
  477.         {
  478.  
  479.  
  480.             //ddsadsads
  481.         }
  482.  
  483.         private string GetActiveWindowTitle()
  484.         {
  485.             StringBuilder text = new StringBuilder(256);
  486.             if (Form1.GetWindowText(Form1.GetForegroundWindow(), text, 256) > 0)
  487.                 return text.ToString();
  488.             return (string)null;
  489.         }
  490.  
  491.         private void timer1_Tick(object sender, EventArgs e)
  492.         {
  493.             try {
  494.                 if (toggled)
  495.                 {
  496.                     if (justmc && this.GetActiveWindowTitle() != null && (this.GetActiveWindowTitle().Contains("Minecraft") || this.GetActiveWindowTitle().Contains("CosmicClient")))
  497.                     {
  498.                         if (this.metroTrackBar1.Value != 0 && this.metroTrackBar2.Value != 0)
  499.                         {
  500.                             this.timer1.Interval = modifyInterval(new Random().Next(1000 / this.metroTrackBar1.Value * 10, 1000 / this.metroTrackBar2.Value * 10));
  501.                         }
  502.                         if (newHeld && fakeHeld || constant) {
  503.                         clicks++;
  504.  
  505.                         if (materialCheckBox8.Checked) {
  506.                             playClickSound();
  507.                         }
  508.  
  509.                             Console.WriteLine("OMFG YOUR HOLDING DOWN LEFT CLICK!!!!");
  510.                             mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
  511.                       //      timer5.Start();
  512.                             //  metroLabel1.Text = truefalsetest.ToString();
  513.                         }
  514.                         if (rightclick)
  515.                         {
  516.                             if (holdingright)
  517.                             {
  518.                                 timer2.Interval = new Random().Next(10, 500);
  519.                                 timer2.Start();
  520.                             }
  521.                         }
  522.                     }
  523.                     if (!justmc)
  524.                     {
  525.                         if (this.metroTrackBar1.Value != 0 && this.metroTrackBar2.Value != 0)
  526.                         {
  527.                             this.timer1.Interval = modifyInterval(new Random().Next(1000 / this.metroTrackBar1.Value * 10, 1000 / this.metroTrackBar2.Value * 10));
  528.                         }
  529.                         if (newHeld && fakeHeld || constant)
  530.                         {
  531.  
  532.                             clicks++;
  533.                             truefalsetest = truefalsetest + 3;
  534.                             mouse_event(MOUSEEVENTF_LEFTDOWN, 1, 1, 1, 1);
  535.                       //      timer5.Start();
  536.                         }
  537.                         // metroLabel1.Text = truefalsetest.ToString(); if (rightclick)
  538.                         {
  539.                             if (holdingright)
  540.                             {
  541.                                 timer2.Start();
  542.                             }
  543.                         }
  544.                     }
  545.  
  546.                 }
  547.             } catch
  548.             {
  549.                 timer1.Stop();
  550.             }
  551.         }
  552.  
  553.         private void metroToggle1_CheckedChanged(object sender, EventArgs e)
  554.         {
  555.             toggled = !toggled;
  556.  
  557.             if (metroToggle1.Checked)
  558.             {
  559.                 metroLabel11.Text = on;
  560.                 timer1.Start();
  561.             }else
  562.             {
  563.                 metroLabel11.Text = off;
  564.                 timer1.Stop();
  565.             }
  566.         }
  567.  
  568.         private void materialCheckBox2_CheckedChanged(object sender, EventArgs e)
  569.         {
  570.             justmc = !justmc;
  571.         }
  572.  
  573.         private void materialCheckBox1_CheckedChanged(object sender, EventArgs e)
  574.         {
  575.             rightclick = !rightclick;
  576.         }
  577.  
  578.         private void timer5_Tick(object sender, EventArgs e)
  579.         {
  580.             mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
  581.             timer5.Stop();
  582.         }
  583.  
  584.         private void timer2_Tick(object sender, EventArgs e)
  585.         {
  586.             try {
  587.                 timer2.Stop();
  588.                 timer3.Start();
  589.                 timer2.Interval = new Random().Next(10, 500);
  590.                 mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0);
  591.             } catch
  592.             {
  593.                 timer2.Stop();
  594.             }
  595.         }
  596.  
  597.         private void timer3_Tick(object sender, EventArgs e)
  598.         {
  599.             try
  600.             {
  601.                 mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0);
  602.                 timer3.Stop();
  603.             } catch
  604.             {
  605.                 timer3.Stop();
  606.             }
  607.         }
  608.  
  609.         private void timer4_Tick(object sender, EventArgs e)
  610.         {
  611.  
  612.         }
  613.  
  614.         private void materialRaisedButton2_KeyDown(object sender, KeyEventArgs e)
  615.         {
  616.             materialRaisedButton2.Text = e.KeyCode.ToString();
  617.             togglekey = materialRaisedButton2.Text;
  618.             metroLabel1.Focus();
  619.         }
  620.  
  621.         private void materialRaisedButton2_Enter(object sender, EventArgs e)
  622.         {
  623.             togglekey = materialRaisedButton2.Text;
  624.             materialRaisedButton2.Text = ">" + materialRaisedButton2.Text + "<";
  625.         }
  626.  
  627.         private void materialRaisedButton2_Leave(object sender, EventArgs e)
  628.         {
  629.             materialRaisedButton2.Text = togglekey;
  630.         }
  631.  
  632.         private void materialRaisedButton3_Click(object sender, EventArgs e)
  633.         {
  634.  
  635.         }
  636.  
  637.         private void materialRaisedButton3_KeyDown(object sender, KeyEventArgs e)
  638.         {
  639.             materialRaisedButton3.Text = e.KeyCode.ToString();
  640.             explodekey = materialRaisedButton3.Text;
  641.             label1.Focus();
  642.         }
  643.  
  644.         private void materialRaisedButton3_Enter(object sender, EventArgs e)
  645.         {
  646.             explodekey = materialRaisedButton3.Text;
  647.             materialRaisedButton3.Text = ">" + materialRaisedButton3.Text + "<";
  648.         }
  649.  
  650.         private void materialRaisedButton3_Leave(object sender, EventArgs e)
  651.         {
  652.             materialRaisedButton3.Text = explodekey;
  653.         }
  654.  
  655.         private void metroToggle2_CheckedChanged(object sender, EventArgs e)
  656.         {
  657.             explode = !explode;
  658.             if (metroToggle2.Checked)
  659.             {
  660.                 metroLabel12.Text = on;
  661.             }
  662.             else
  663.             {
  664.                 metroLabel12.Text = off;
  665.             }
  666.         }
  667.  
  668.         private void materialRaisedButton1_Click(object sender, EventArgs e)
  669.         {
  670.             Explode();
  671.         }
  672.         protected string get(string url)
  673.         {
  674.             try
  675.             {
  676.                 string rt;
  677.  
  678.                 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
  679.                 request.UserAgent = "Phantom/" + ver.ToString() + " (PhantomClicker Client; " + DateTime.Now + ")";
  680.  
  681.                 WebResponse response = request.GetResponse();
  682.  
  683.                 Stream dataStream = response.GetResponseStream();
  684.  
  685.                 StreamReader reader = new StreamReader(dataStream);
  686.  
  687.                 rt = reader.ReadToEnd();
  688.  
  689.                 Console.WriteLine(rt);
  690.  
  691.                 reader.Close();
  692.                 response.Close();
  693.  
  694.                 return rt;
  695.             }
  696.  
  697.             catch (Exception)
  698.             {
  699.                 return null;
  700.             }
  701.         }
  702.  
  703.         private void tabPage2_Click(object sender, EventArgs e)
  704.         {
  705.  
  706.         }
  707.  
  708.  
  709.  
  710.         private void button2_Click(object sender, EventArgs e)
  711.         {
  712.  
  713.         }
  714.  
  715.         public static string Transform(string value)
  716.         {
  717.             char[] array = value.ToCharArray();
  718.             for (int i = 0; i < array.Length; i++)
  719.             {
  720.                 int number = (int)array[i];
  721.  
  722.                 if (number >= 'a' && number <= 'z')
  723.                 {
  724.                     if (number > 'm')
  725.                     {
  726.                         number -= 13;
  727.                     }
  728.                     else
  729.                     {
  730.                         number += 13;
  731.                     }
  732.                 }
  733.                 else if (number >= 'A' && number <= 'Z')
  734.                 {
  735.                     if (number > 'M')
  736.                     {
  737.                         number -= 13;
  738.                     }
  739.                     else
  740.                     {
  741.                         number += 13;
  742.                     }
  743.                 }
  744.                 array[i] = (char)number;
  745.             }
  746.             return new string(array);
  747.         }
  748.  
  749.         private void button2_Click_1(object sender, EventArgs e)
  750.         {
  751.  
  752.         }
  753.  
  754.         private void materialCheckBox4_CheckedChanged(object sender, EventArgs e)
  755.         {
  756.  
  757.         }
  758.  
  759.         private void Form1_FormClosing(object sender, FormClosingEventArgs e)
  760.         {
  761.             Unsubscribe();
  762.  
  763.  
  764.  
  765.  
  766.  
  767.             if (materialCheckBox12.Checked) {
  768.                     try
  769.                     {
  770.  
  771.                         string pel = get("http://phantomclicker.us/setSettings.php?hwid=" + HWID + "&settings=" + getSettingsString());
  772.                 Console.Write(getSettingsString());
  773.                 }
  774.                 catch (Exception)
  775.                 {
  776.                     Console.Write("Error closing.1");
  777.                 }
  778.             }
  779.             try {
  780.             string nel = get("http://phantomclicker.us/updateClicks.php?hwid=" + HWID + "&clicks=" + clicks.ToString());
  781.             }
  782.             catch (Exception)
  783.             {
  784.                 Console.Write("Error closing.2");
  785.             }
  786.         }
  787.  
  788.         private void timer6_Tick(object sender, EventArgs e)
  789.         {
  790.             mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
  791.             clickedup = true;
  792.             metroLabel1.Text = "true";
  793.             timer7.Stop();
  794.             timer7.Start();
  795.             timer6.Stop();
  796.         }
  797.  
  798.         private void timer7_Tick(object sender, EventArgs e)
  799.         {
  800.             clickedup = true;
  801.             timer7.Stop();
  802.         }
  803.  
  804.         private void timer8_Tick(object sender, EventArgs e)
  805.         {
  806.             clickedup = false;
  807.             timer8.Stop();
  808.         }
  809.  
  810.         private void materialCheckBox7_CheckedChanged(object sender, EventArgs e)
  811.         {
  812.  
  813.         }
  814.  
  815.         private void materialCheckBox8_CheckedChanged(object sender, EventArgs e)
  816.         {
  817.  
  818.         }
  819.  
  820.         private void materialCheckBox10_CheckedChanged(object sender, EventArgs e)
  821.         {
  822.  
  823.         }
  824.  
  825.         private void materialCheckBox11_CheckedChanged(object sender, EventArgs e)
  826.         {
  827.             constant = !constant;
  828.             if (constant)
  829.             {
  830.                 timer1.Start();
  831.             }
  832.             if (!constant)
  833.             {
  834.                 timer1.Stop();
  835.             }
  836.         }
  837.  
  838.         private void materialCheckBox9_CheckedChanged(object sender, EventArgs e)
  839.         {
  840.  
  841.         }
  842.  
  843.         private void materialCheckBox5_CheckedChanged(object sender, EventArgs e)
  844.         {
  845.  
  846.         }
  847.  
  848.         private void materialCheckBox6_CheckedChanged(object sender, EventArgs e)
  849.         {
  850.  
  851.         }
  852.  
  853.         private void materialCheckBox3_CheckedChanged(object sender, EventArgs e)
  854.         {
  855.  
  856.         }
  857.  
  858.         private void materialCheckBox9_CheckedChanged_1(object sender, EventArgs e)
  859.         {
  860.  
  861.         }
  862.  
  863.         private void materialTabSelector1_Click(object sender, EventArgs e)
  864.         {
  865.  
  866.         }
  867.  
  868.         private void materialRaisedButton4_Click(object sender, EventArgs e)
  869.         {
  870.             string notification = get("https://phantomclicker.us/getNotification.php?ver=" + ver);
  871.             if (notification != null)
  872.                 MessageBox.Show(notification.Replace("|", Environment.NewLine));
  873.         }
  874.  
  875.         private void materialRaisedButton5_Click(object sender, EventArgs e)
  876.         {
  877.         }
  878.  
  879.         private string getSettingsString()
  880.         {
  881.             string a = Convert.ToInt32(materialCheckBox1.Checked).ToString();
  882.             string b = Convert.ToInt32(materialCheckBox2.Checked).ToString();
  883.             string c = Convert.ToInt32(materialCheckBox9.Checked).ToString();
  884.             string d = Convert.ToInt32(materialCheckBox4.Checked).ToString();
  885.             string e = Convert.ToInt32(materialCheckBox5.Checked).ToString();
  886.             string f = Convert.ToInt32(materialCheckBox6.Checked).ToString();
  887.             string g = Convert.ToInt32(materialCheckBox3.Checked).ToString();
  888.             string h = Convert.ToInt32(materialCheckBox1.Checked).ToString();
  889.             string i = Convert.ToInt32(metroToggle2.Checked).ToString();
  890.             string j = Convert.ToInt32(materialCheckBox7.Checked).ToString();
  891.             string k = Convert.ToInt32(materialCheckBox8.Checked).ToString();
  892.             string l = Convert.ToInt32(materialCheckBox10.Checked).ToString();
  893.             string m = Convert.ToInt32(materialCheckBox11.Checked).ToString();
  894.             string n = Convert.ToInt32(materialCheckBox2.Checked).ToString();
  895.             string o = Convert.ToInt32(materialCheckBox1.Checked).ToString();
  896.  
  897.             return a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + "|" + metroTrackBar1.Value + "|" + metroTrackBar2.Value + "|" + explodekey + "|" + togglekey + "|" + Language;
  898.         }
  899.  
  900.         private void applySettingsString(String s)
  901.         {
  902.             Console.Write("["  + s + "]");
  903.             try
  904.             {
  905.  
  906.            
  907.             string[] parts = s.Split('|');
  908.                 if (parts[0] != null)
  909.                 {
  910.                     char[] numbers = parts[0].ToCharArray();
  911.                     Language = Int32.Parse(parts[5]);
  912.                     updateLanguage();
  913.                     materialCheckBox1.Checked = getFrom01(numbers[0]);
  914.                     materialCheckBox2.Checked = getFrom01(numbers[1]);
  915.                     justmc = getFrom01(numbers[1]);
  916.                     materialCheckBox9.Checked = getFrom01(numbers[2]);
  917.                     materialCheckBox4.Checked = getFrom01(numbers[3]);
  918.                     materialCheckBox5.Checked = getFrom01(numbers[4]);
  919.                     materialCheckBox6.Checked = getFrom01(numbers[5]);
  920.                     materialCheckBox3.Checked = getFrom01(numbers[6]);
  921.                     materialCheckBox1.Checked = getFrom01(numbers[7]);
  922.                     metroToggle1.Checked = getFrom01(numbers[8]);
  923.                     if (numbers[9] != null) ;
  924.                     materialCheckBox7.Checked = getFrom01(numbers[9]);
  925.                     if (numbers[10] != null) ;
  926.                     materialCheckBox8.Checked = getFrom01(numbers[10]);
  927.                     if (numbers[11] != null) ;
  928.                     materialCheckBox10.Checked = getFrom01(numbers[11]);
  929.                     if(numbers[12] != null) {
  930.                     materialCheckBox11.Checked = getFrom01(numbers[12]);
  931.                     constant = getFrom01(numbers[12]);
  932.  
  933.                     if (constant)
  934.                     {
  935.                         timer1.Start();
  936.                     }
  937.                     if (!constant)
  938.                     {
  939.                         timer1.Stop();
  940.                     }
  941.                     }
  942.                     materialCheckBox2.Checked = getFrom01(numbers[13]);
  943.                     materialCheckBox1.Checked = getFrom01(numbers[14]);
  944.                 }
  945.                 if (parts[1] != null)
  946.                 {
  947.                     metroTrackBar1.Value = Int32.Parse(parts[1]);
  948.                 }
  949.                 if (parts[2] != null)
  950.                 {
  951.                     metroTrackBar2.Value = Int32.Parse(parts[2]);
  952.                 }
  953.            
  954.                     if (parts[4] != null) {
  955.             materialRaisedButton2.Text = parts[4];
  956.                     togglekey = parts[4];
  957.                 }
  958.                     if(parts[3] != null) {
  959.                 materialRaisedButton3.Text = parts[3];
  960.                     explodekey = parts[3];
  961.                 }
  962.  
  963.                 if (materialRaisedButton2.Text == "") {
  964.                     if(Language == 0) {
  965.                     materialRaisedButton2.Text = "NONE";
  966.                     } else if(Language == 1)
  967.                     {
  968.                         materialRaisedButton2.Text = "AUCUN";
  969.                     }
  970.                 }
  971.                 if (materialRaisedButton3.Text == "") {
  972.                     materialRaisedButton3.Text = "NONE";
  973.  
  974.                     if (metroToggle2.Checked)
  975.                     {
  976.                         metroLabel12.Text = "On";
  977.                     }
  978.                     else
  979.                     {
  980.                         metroLabel12.Text = "Off";
  981.                     }
  982.                     if (metroToggle1.Checked)
  983.                     {
  984.                         metroLabel11.Text = "On";
  985.                     }
  986.                     else
  987.                     {
  988.                         metroLabel11.Text = "Off";
  989.                     }
  990.                 }
  991.                 else if (Language == 1)
  992.                 {
  993.                     materialRaisedButton2.Text = "AUCUN";
  994.                 }
  995.                 metroLabel4.Text = ((float)metroTrackBar2.Value / 10f).ToString();  
  996.                 metroLabel3.Text = ((float)metroTrackBar1.Value / 10f).ToString();
  997.             }
  998.             catch (Exception)
  999.             {
  1000.             }
  1001.         }
  1002.  
  1003.  
  1004.         private bool getFrom01(Char c)
  1005.         {
  1006.             if (c == '1')
  1007.                 return true;
  1008.             if (c == '0')
  1009.                 return false;
  1010.             return false;
  1011.         }
  1012.  
  1013.         private void materialRaisedButton2_KeyPress(object sender, KeyPressEventArgs e)
  1014.         {
  1015.  
  1016.         }
  1017.  
  1018.         private void materialRaisedButton6_Click(object sender, EventArgs e)
  1019.         {
  1020.         }
  1021.  
  1022.         private void Form1_Shown(object sender, EventArgs e)
  1023.         {
  1024.             if (materialCheckBox10.Checked) {
  1025.             string notification = get("https://phantomclicker.us/getNotification.php?ver=" + ver);
  1026.             if (notification != null)
  1027.                 MessageBox.Show(notification.Replace("|", Environment.NewLine));
  1028.             }
  1029.         }
  1030.         private void playClickSound()
  1031.         {
  1032.             Random rand = new Random();
  1033.             int rando = rand.Next(0, 100);
  1034.             if (rando <= 5)
  1035.             {
  1036.                 SoundPlayer audio = new SoundPlayer(pcl.Properties.Resources._1);
  1037.                 audio.Play();
  1038.             }
  1039.             else if (rando <= 10)
  1040.             {
  1041.                 SoundPlayer audio = new SoundPlayer(pcl.Properties.Resources._2);
  1042.                 audio.Play();
  1043.             }
  1044.             else if (rando <= 20)
  1045.             {
  1046.                 SoundPlayer audio = new SoundPlayer(pcl.Properties.Resources._3);
  1047.                 audio.Play();
  1048.             }
  1049.             else if (rando <= 35)
  1050.             {
  1051.                 SoundPlayer audio = new SoundPlayer(pcl.Properties.Resources._4);
  1052.                 audio.Play();
  1053.             }
  1054.             else if (rando <= 50)
  1055.             {
  1056.                 SoundPlayer audio = new SoundPlayer(pcl.Properties.Resources._5);
  1057.                 audio.Play();
  1058.             }
  1059.             else if (rando <= 75)
  1060.             {
  1061.                 SoundPlayer audio = new SoundPlayer(pcl.Properties.Resources._6);
  1062.                 audio.Play();
  1063.             }
  1064.             else if (rando <= 90)
  1065.             {
  1066.                 SoundPlayer audio = new SoundPlayer(pcl.Properties.Resources._7);
  1067.                 audio.Play();
  1068.             }
  1069.             else if (rando <= 100)
  1070.             {
  1071.                 SoundPlayer audio = new SoundPlayer(pcl.Properties.Resources._8);
  1072.                 audio.Play();
  1073.             }
  1074.         }
  1075.         private int modifyInterval(int i)
  1076.         {
  1077.             int maxInt = 1000 / this.metroTrackBar1.Value * 10;
  1078.             int minInt = 1000 / this.metroTrackBar2.Value * 10;
  1079.  
  1080.             int fatiguecheck = new Random().Next(1, 20);
  1081.             if (fatiguecheck >= 18)
  1082.             {
  1083.                 if (!bounceupState) {
  1084.                     if(fatigue <= 20) {
  1085.                         fatigue = fatigue + 1;
  1086.                         if (new Random().Next(1, 150) >= 148)
  1087.                         {
  1088.                             bounceupState = !bounceupState;
  1089.                         }
  1090.                     }
  1091.                     else
  1092.                     {
  1093.                         if (new Random().Next(1, 10) >= 5)
  1094.                         {
  1095.                             bounceupState = !bounceupState;
  1096.                         }
  1097.                     }
  1098.                 }
  1099.                 else
  1100.                 {
  1101.                     if (fatigue >= 0)
  1102.                     {
  1103.                         fatigue = fatigue - 1;
  1104.                         if (new Random().Next(1, 150) >= 148)
  1105.                         {
  1106.                             bounceupState = !bounceupState;
  1107.                         }
  1108.                     }
  1109.                     else
  1110.                     {
  1111.                         if(new Random().Next(1,10) >= 5)
  1112.                         {
  1113.                             bounceupState = !bounceupState;
  1114.                         }
  1115.                     }
  1116.                 }
  1117.  
  1118.             }
  1119.             int minIntchangeAmount = minInt - i;
  1120.  
  1121.             int addedFatigue = minIntchangeAmount * ((fatigue * 10) / 100);
  1122.             return i + addedFatigue;
  1123.         }
  1124.         bool bounceupState = false;
  1125.         int fatigue;
  1126.         private void resetFatigue()
  1127.         {
  1128.             fatigue = 0;
  1129.         }
  1130.  
  1131.         private void tabPage4_Click_1(object sender, EventArgs e)
  1132.         {
  1133.             button1.Focus();
  1134.         }
  1135.  
  1136.         private void tabPage2_Click_1(object sender, EventArgs e)
  1137.         {
  1138.             button1.Focus();
  1139.         }
  1140.  
  1141.         private void tabPage3_Click(object sender, EventArgs e)
  1142.         {
  1143.             button1.Focus();
  1144.         }
  1145.  
  1146.         private void tabPage2_Paint(object sender, PaintEventArgs e)
  1147.         {
  1148.             button1.Focus();
  1149.         }
  1150.  
  1151.         int Language = 0;
  1152.         private void pictureBox9_Click(object sender, EventArgs e)
  1153.         {
  1154.            
  1155.         }
  1156.  
  1157.         private void pictureBox7_Click(object sender, EventArgs e)
  1158.         {
  1159.             Language = 1;
  1160.             updateLanguage();
  1161.         }
  1162.  
  1163.         private void pictureBox6_Click(object sender, EventArgs e)
  1164.         {
  1165.             Language = 0;
  1166.             updateLanguage();
  1167.         }
  1168.  
  1169.         private void updateLanguage()
  1170.         {
  1171.             if (Language == 1)
  1172.             {
  1173.                 //FRENCH
  1174.                 materialLabel1.Text = "Général";
  1175.                 metroLabel5.Text = "Activé:";
  1176.                 metroLabel1.Text = "CPS Max.";
  1177.                 metroLabel2.Text = "CPS Min.";
  1178.                 materialCheckBox2.Text = "Seulement dans la fenêtre MC.";
  1179.                 materialCheckBox1.Text = "Clique-droit activé";
  1180.                 metroLabel6.Text = "Activation:";
  1181.                 tabPage4.Text = "Misc";
  1182.                 tabPage2.Text = "Explosion";
  1183.                 tabPage3.Text = "Général";
  1184.                 materialCheckBox9.Text = "Désactiver l'HWID (temporairement).";
  1185.                 materialCheckBox4.Text = "Avertissement d'explosion.";
  1186.                 materialCheckBox5.Text = "Retirer du Prefetch.";
  1187.                 materialCheckBox6.Text = "Retirer du userassist.";
  1188.                 materialCheckBox3.Text = "Supprimer à l'explosion.";
  1189.                 metroLabel7.Text = "Touche d'activation:";
  1190.                 materialLabel2.Text = "Explosion";
  1191.                 metroLabel8.Text = "Touche d'explosion:";
  1192.                 materialRaisedButton1.Text = "Explosion";
  1193.                 materialLabel3.Text = "Misc";
  1194.                 materialCheckBox7.Text = "Mode Hit&Block. (1.1.3)";
  1195.                 materialCheckBox8.Text = "Faux bruits de clics";
  1196.                 materialCheckBox10.Text = "Notifications au démarrage.";
  1197.                 materialCheckBox11.Text = "Clic constant";
  1198.                 materialCheckBox12.Text = "Syncr. les paramètres à la fermeture.";
  1199.                 materialRaisedButton4.Text = "Montrer les notifications";
  1200.                 metroLabel9.Text = "Licence à " + licensedto;
  1201.                 explodeMessage = "Êtes-vous sûr de vouloir self-destruct?";
  1202.                 notifyLore = "Cliquez pour afficher.";
  1203.  
  1204.                 if (materialRaisedButton2.Text == "NONE" || materialRaisedButton2.Text == "VIDE" || materialRaisedButton3.Text == "GEEN" || materialRaisedButton3.Text == "KEINER" || materialRaisedButton3.Text == "НИКТО" || materialRaisedButton3.Text == "NAV")
  1205.                 {
  1206.                     materialRaisedButton2.Text = "VIDE";
  1207.                 }
  1208.                 if (materialRaisedButton3.Text == "NONE" || materialRaisedButton3.Text == "VIDE" || materialRaisedButton3.Text == "GEEN" || materialRaisedButton3.Text == "KEINER" || materialRaisedButton3.Text == "НИКТО" || materialRaisedButton3.Text == "NAV")
  1209.                 {
  1210.                     materialRaisedButton3.Text = "VIDE";
  1211.                 }
  1212.                 on = "Sur";
  1213.                 off = "De";
  1214.                 if (metroToggle2.Checked)
  1215.                 {
  1216.                     metroLabel12.Text = on;
  1217.                 }
  1218.                 else
  1219.                 {
  1220.                     metroLabel12.Text = off;
  1221.                 }
  1222.                 if (metroToggle1.Checked)
  1223.                 {
  1224.                     metroLabel11.Text = on;
  1225.                 }
  1226.  
  1227.                 pictureBox16.Hide();
  1228.                 pictureBox14.Hide();
  1229.                 pictureBox12.Hide();
  1230.                 pictureBox9.Show();
  1231.                 pictureBox8.Hide();
  1232.                 pictureBox10.Hide();
  1233.                 materialTabSelector2.Refresh();
  1234.                
  1235.             }
  1236.             if (Language == 0)
  1237.             {
  1238.                 //ENGLISH
  1239.                 materialLabel1.Text = "Main";
  1240.                 metroLabel5.Text = "Clicker:";
  1241.                 metroLabel1.Text = "CPS Max.";
  1242.                 metroLabel2.Text = "CPS Min.";
  1243.                 materialCheckBox2.Text = "Only in MC window.";
  1244.                 materialCheckBox1.Text = "Right-click enabled.";
  1245.                 metroLabel6.Text = "Toggle:";
  1246.                 tabPage4.Text = "Misc";
  1247.                 tabPage2.Text = "Explode";
  1248.                 tabPage3.Text = "Main";
  1249.                 materialCheckBox9.Text = "Change HWID (temp-disable).";
  1250.                 materialCheckBox4.Text = "Destruct warning.";
  1251.                 materialCheckBox5.Text = "Remove from prefetch.";
  1252.                 materialCheckBox6.Text = "Anti-userassist.";
  1253.                 materialCheckBox3.Text = "Delete on explode.";
  1254.                 metroLabel7.Text = "Key Bind:";
  1255.                 materialLabel2.Text = "Explode";
  1256.                 metroLabel8.Text = "Explode key:";
  1257.                 materialRaisedButton1.Text = "Explode";
  1258.                 materialLabel3.Text = "Misc";
  1259.                 materialCheckBox7.Text = "Blockhit mode. (1.3.0)";
  1260.                 materialCheckBox8.Text = "Fake click sounds.";
  1261.                 materialCheckBox10.Text = "Startup notifications.";
  1262.                 materialCheckBox11.Text = "Constant click.";
  1263.                 materialCheckBox12.Text = "Sync settings on exit.";
  1264.                 materialRaisedButton4.Text = "Show notification";
  1265.                 metroLabel9.Text = "Licensed to " + licensedto;
  1266.                 explodeMessage = "Are you sure you want to self destruct?";
  1267.                 notifyLore = "Click to show.";
  1268.  
  1269.                 if (materialRaisedButton2.Text == "NONE" || materialRaisedButton2.Text == "VIDE" || materialRaisedButton3.Text == "GEEN" || materialRaisedButton3.Text == "KEINER" || materialRaisedButton3.Text == "НИКТО" || materialRaisedButton3.Text == "NAV")
  1270.                 {
  1271.                     materialRaisedButton2.Text = "NONE";
  1272.                 }
  1273.                 if (materialRaisedButton3.Text == "NONE" || materialRaisedButton3.Text == "VIDE" || materialRaisedButton3.Text == "GEEN" || materialRaisedButton3.Text == "KEINER" || materialRaisedButton3.Text == "НИКТО" || materialRaisedButton3.Text == "NAV")
  1274.                 {
  1275.                     materialRaisedButton3.Text = "NONE";
  1276.                 }
  1277.                 on = "On";
  1278.                 off = "Off";
  1279.                 if (metroToggle2.Checked)
  1280.                 {
  1281.                     metroLabel12.Text = on;
  1282.                 }
  1283.                 else
  1284.                 {
  1285.                     metroLabel12.Text = off;
  1286.                 }
  1287.                 if (metroToggle1.Checked)
  1288.                 {
  1289.                     metroLabel11.Text = on;
  1290.                 }
  1291.  
  1292.                 pictureBox16.Hide();
  1293.                 pictureBox14.Hide();
  1294.                 pictureBox12.Hide();
  1295.                 pictureBox8.Show();
  1296.                 pictureBox9.Hide();
  1297.                 pictureBox10.Hide();
  1298.                 materialTabSelector2.Refresh();
  1299.             }
  1300.             if (Language == 2)
  1301.             {
  1302.                 //DUTCH
  1303.                 materialLabel1.Text = "Hoofd";
  1304.                 metroLabel5.Text = "Klikker:";
  1305.                 metroLabel1.Text = "CPS Max.";
  1306.                 metroLabel2.Text = "CPS Min.";
  1307.                 materialCheckBox2.Text = "Alleen in een MC venster";
  1308.                 materialCheckBox1.Text = "Rechter-Click aangezet";
  1309.                 metroLabel6.Text = "Ontkoppelknop:";
  1310.                 tabPage4.Text = "Diversen";
  1311.                 tabPage2.Text = "Explode";
  1312.                 tabPage3.Text = "Hoofd";
  1313.                 materialCheckBox9.Text = "Verander HWID (Tijdenlijk uit).";
  1314.                 materialCheckBox4.Text = "Vernietigings waarschuwing.";
  1315.                 materialCheckBox5.Text = "Verwijderd van voorvoeding.";
  1316.                 materialCheckBox6.Text = "Anti-Gebruikers assistentie.";
  1317.                 materialCheckBox3.Text = "Verwijder op zelfvernietiging.";
  1318.                 metroLabel7.Text = "Toets Binding:";
  1319.                 materialLabel2.Text = "Explode";
  1320.                 metroLabel8.Text = "Explode sleutel::";
  1321.                 materialRaisedButton1.Text = "Explode";
  1322.                 materialLabel3.Text = "Diversen";
  1323.                 materialCheckBox7.Text = "Afweer mode (1.3.0)";
  1324.                 materialCheckBox8.Text = "Neppe click geluiden.";
  1325.                 materialCheckBox10.Text = "Opstart notificaties.";
  1326.                 materialCheckBox11.Text = "Constante click.";
  1327.                 materialCheckBox12.Text = "Gesynchroniseerde opties op sluiten.";
  1328.                 materialRaisedButton4.Text = "Toon notificatie";
  1329.                 metroLabel9.Text = "Gelicenceerd naar " + licensedto;
  1330.                 explodeMessage = "Weet je het zeker dat je wilt zelf vernietigen?";
  1331.                 notifyLore = "Click om te toonen.";
  1332.  
  1333.                 if (materialRaisedButton2.Text == "NONE" || materialRaisedButton2.Text == "VIDE" || materialRaisedButton3.Text == "GEEN" || materialRaisedButton3.Text == "KEINER" || materialRaisedButton3.Text == "НИКТО" || materialRaisedButton3.Text == "NAV")
  1334.                 {
  1335.                     materialRaisedButton2.Text = "GEEN";
  1336.                 }
  1337.                 if (materialRaisedButton3.Text == "NONE" || materialRaisedButton3.Text == "VIDE" || materialRaisedButton3.Text == "GEEN" || materialRaisedButton3.Text == "KEINER" || materialRaisedButton3.Text == "НИКТО" || materialRaisedButton3.Text == "NAV")
  1338.                 {
  1339.                     materialRaisedButton3.Text = "GEEN";
  1340.                 }
  1341.  
  1342.                 on = "Op";
  1343.                 off = "Uit";
  1344.                 if (metroToggle2.Checked)
  1345.                 {
  1346.                     metroLabel12.Text = on;
  1347.                 }
  1348.                 else
  1349.                 {
  1350.                     metroLabel12.Text = off;
  1351.                 }
  1352.                 if (metroToggle1.Checked)
  1353.                 {
  1354.                     metroLabel11.Text = on;
  1355.                 }
  1356.                 pictureBox16.Hide();
  1357.                 pictureBox14.Hide();
  1358.                 pictureBox12.Hide();
  1359.                 pictureBox10.Show();
  1360.                 pictureBox9.Hide();
  1361.                 pictureBox8.Hide();
  1362.                 materialTabSelector2.Refresh();
  1363.             }
  1364.             if (Language == 3)
  1365.             {
  1366.                 //GERMAN
  1367.                 materialLabel1.Text = "Hoofd";
  1368.                 metroLabel5.Text = "Klikker:";
  1369.                 metroLabel1.Text = "CPS Max.";
  1370.                 metroLabel2.Text = "CPS Min.";
  1371.                 materialCheckBox2.Text = "Alleen in een MC venster";
  1372.                 materialCheckBox1.Text = "Rechter-Click aangezet";
  1373.                 metroLabel6.Text = "Ontkoppelknop:";
  1374.                 tabPage4.Text = "Diversen";
  1375.                 tabPage2.Text = "Explode";
  1376.                 tabPage3.Text = "Hoofd";
  1377.                 materialCheckBox9.Text = "Verander HWID (Tijdenlijk uit).";
  1378.                 materialCheckBox4.Text = "Vernietigings waarschuwing.";
  1379.                 materialCheckBox5.Text = "Verwijderd van voorvoeding.";
  1380.                 materialCheckBox6.Text = "Anti-Gebruikers assistentie.";
  1381.                 materialCheckBox3.Text = "Verwijder op zelfvernietiging.";
  1382.                 metroLabel7.Text = "Toets Binding:";
  1383.                 materialLabel2.Text = "Explode";
  1384.                 metroLabel8.Text = "Explode sleutel::";
  1385.                 materialRaisedButton1.Text = "Explode";
  1386.                 materialLabel3.Text = "Diversen";
  1387.                 materialCheckBox7.Text = "Afweer mode (1.3.0)";
  1388.                 materialCheckBox8.Text = "Neppe click geluiden.";
  1389.                 materialCheckBox10.Text = "Opstart notificaties.";
  1390.                 materialCheckBox11.Text = "Constante click.";
  1391.                 materialCheckBox12.Text = "Gesynchroniseerde opties op sluiten.";
  1392.                 materialRaisedButton4.Text = "Toon notificatie";
  1393.                 metroLabel9.Text = "Gelicenceerd naar " + licensedto;
  1394.                 explodeMessage = "Weet je het zeker dat je wilt zelf vernietigen?";
  1395.                 notifyLore = "Click om te toonen.";
  1396.  
  1397.                 if (materialRaisedButton2.Text == "NONE" || materialRaisedButton2.Text == "VIDE" || materialRaisedButton3.Text == "GEEN" || materialRaisedButton3.Text == "KEINER" || materialRaisedButton3.Text == "НИКТО" || materialRaisedButton3.Text == "NAV")
  1398.                 {
  1399.                     materialRaisedButton2.Text = "KEINER";
  1400.                 }
  1401.                 if (materialRaisedButton3.Text == "NONE" || materialRaisedButton3.Text == "VIDE" || materialRaisedButton3.Text == "GEEN" || materialRaisedButton3.Text == "KEINER" || materialRaisedButton3.Text == "НИКТО" || materialRaisedButton3.Text == "NAV")
  1402.                 {
  1403.                     materialRaisedButton3.Text = "KEINER";
  1404.                 }
  1405.  
  1406.                 on = "Op";
  1407.                 off = "Uit";
  1408.                 if (metroToggle2.Checked)
  1409.                 {
  1410.                     metroLabel12.Text = on;
  1411.                 }
  1412.                 else
  1413.                 {
  1414.                     metroLabel12.Text = off;
  1415.                 }
  1416.                 if (metroToggle1.Checked)
  1417.                 {
  1418.                     metroLabel11.Text = on;
  1419.                 }
  1420.                 pictureBox16.Hide();
  1421.                 pictureBox14.Hide();
  1422.                 pictureBox12.Show();
  1423.                 pictureBox10.Hide();
  1424.                 pictureBox9.Hide();
  1425.                 pictureBox8.Hide();
  1426.                 materialTabSelector2.Refresh();
  1427.             }
  1428.             if (Language == 4)
  1429.             {
  1430.                 //RUSSIAN
  1431.                 materialLabel1.Text = "Hoofd";
  1432.                 metroLabel5.Text = "Klikker:";
  1433.                 metroLabel1.Text = "CPS Max.";
  1434.                 metroLabel2.Text = "CPS Min.";
  1435.                 materialCheckBox2.Text = "Alleen in een MC venster";
  1436.                 materialCheckBox1.Text = "Rechter-Click aangezet";
  1437.                 metroLabel6.Text = "Ontkoppelknop:";
  1438.                 tabPage4.Text = "Diversen";
  1439.                 tabPage2.Text = "Explode";
  1440.                 tabPage3.Text = "Hoofd";
  1441.                 materialCheckBox9.Text = "Verander HWID (Tijdenlijk uit).";
  1442.                 materialCheckBox4.Text = "Vernietigings waarschuwing.";
  1443.                 materialCheckBox5.Text = "Verwijderd van voorvoeding.";
  1444.                 materialCheckBox6.Text = "Anti-Gebruikers assistentie.";
  1445.                 materialCheckBox3.Text = "Verwijder op zelfvernietiging.";
  1446.                 metroLabel7.Text = "Toets Binding:";
  1447.                 materialLabel2.Text = "Explode";
  1448.                 metroLabel8.Text = "Explode sleutel::";
  1449.                 materialRaisedButton1.Text = "Explode";
  1450.                 materialLabel3.Text = "Diversen";
  1451.                 materialCheckBox7.Text = "Afweer mode (1.3.0)";
  1452.                 materialCheckBox8.Text = "Neppe click geluiden.";
  1453.                 materialCheckBox10.Text = "Opstart notificaties.";
  1454.                 materialCheckBox11.Text = "Constante click.";
  1455.                 materialCheckBox12.Text = "Gesynchroniseerde opties op sluiten.";
  1456.                 materialRaisedButton4.Text = "Toon notificatie";
  1457.                 metroLabel9.Text = "Gelicenceerd naar " + licensedto;
  1458.                 explodeMessage = "Weet je het zeker dat je wilt zelf vernietigen?";
  1459.                 notifyLore = "Click om te toonen.";
  1460.                 on = "Op";
  1461.                 off = "Uit";
  1462.                 if (metroToggle2.Checked)
  1463.                 {
  1464.                     metroLabel12.Text = on;
  1465.                 }
  1466.                 else
  1467.                 {
  1468.                     metroLabel12.Text = off;
  1469.                 }
  1470.                 if (metroToggle1.Checked)
  1471.                 {
  1472.                     metroLabel11.Text = on;
  1473.                 }
  1474.                 else
  1475.                 {
  1476.                     metroLabel11.Text = off;
  1477.                 }
  1478.  
  1479.  
  1480.                 if (materialRaisedButton2.Text == "NONE" || materialRaisedButton2.Text == "VIDE" || materialRaisedButton3.Text == "GEEN" || materialRaisedButton3.Text == "KEINER" || materialRaisedButton3.Text == "НИКТО" || materialRaisedButton3.Text == "NAV")
  1481.                 {
  1482.                     materialRaisedButton2.Text = "НИКТО";
  1483.                 }
  1484.                 if (materialRaisedButton3.Text == "NONE" || materialRaisedButton3.Text == "VIDE" || materialRaisedButton3.Text == "GEEN" || materialRaisedButton3.Text == "KEINER" || materialRaisedButton3.Text == "НИКТО" || materialRaisedButton3.Text == "NAV")
  1485.                 {
  1486.                     materialRaisedButton3.Text = "НИКТО";
  1487.                 }
  1488.                 pictureBox16.Hide();
  1489.                 pictureBox14.Show();
  1490.                 pictureBox12.Hide();
  1491.                 pictureBox10.Hide();
  1492.                 pictureBox9.Hide();
  1493.                 pictureBox8.Hide();
  1494.                 materialTabSelector2.Refresh();
  1495.             }
  1496.             if (Language == 5)
  1497.             {
  1498.                 //LATVIAN
  1499.                 materialLabel1.Text = "Hoofd";
  1500.                 metroLabel5.Text = "Klikker:";
  1501.                 metroLabel1.Text = "CPS Max.";
  1502.                 metroLabel2.Text = "CPS Min.";
  1503.                 materialCheckBox2.Text = "Alleen in een MC venster";
  1504.                 materialCheckBox1.Text = "Rechter-Click aangezet";
  1505.                 metroLabel6.Text = "Ontkoppelknop:";
  1506.                 tabPage4.Text = "Diversen";
  1507.                 tabPage2.Text = "Explode";
  1508.                 tabPage3.Text = "Hoofd";
  1509.                 materialCheckBox9.Text = "Verander HWID (Tijdenlijk uit).";
  1510.                 materialCheckBox4.Text = "Vernietigings waarschuwing.";
  1511.                 materialCheckBox5.Text = "Verwijderd van voorvoeding.";
  1512.                 materialCheckBox6.Text = "Anti-Gebruikers assistentie.";
  1513.                 materialCheckBox3.Text = "Verwijder op zelfvernietiging.";
  1514.                 metroLabel7.Text = "Toets Binding:";
  1515.                 materialLabel2.Text = "Explode";
  1516.                 metroLabel8.Text = "Explode sleutel::";
  1517.                 materialRaisedButton1.Text = "Explode";
  1518.                 materialLabel3.Text = "Diversen";
  1519.                 materialCheckBox7.Text = "Afweer mode (1.3.0)";
  1520.                 materialCheckBox8.Text = "Neppe click geluiden.";
  1521.                 materialCheckBox10.Text = "Opstart notificaties.";
  1522.                 materialCheckBox11.Text = "Constante click.";
  1523.                 materialCheckBox12.Text = "Gesynchroniseerde opties op sluiten.";
  1524.                 materialRaisedButton4.Text = "Toon notificatie";
  1525.                 metroLabel9.Text = "Gelicenceerd naar " + licensedto;
  1526.                 explodeMessage = "Weet je het zeker dat je wilt zelf vernietigen?";
  1527.                 notifyLore = "Click om te toonen.";
  1528.  
  1529.                 if (materialRaisedButton2.Text == "NONE" || materialRaisedButton2.Text == "VIDE" || materialRaisedButton3.Text == "GEEN" || materialRaisedButton3.Text == "KEINER" || materialRaisedButton3.Text == "НИКТО" || materialRaisedButton3.Text == "NAV")
  1530.                 {
  1531.                     materialRaisedButton2.Text = "NAV";
  1532.                 }
  1533.                 if (materialRaisedButton3.Text == "NONE" || materialRaisedButton3.Text == "VIDE" || materialRaisedButton3.Text == "GEEN" || materialRaisedButton3.Text == "KEINER" || materialRaisedButton3.Text == "НИКТО" || materialRaisedButton3.Text == "NAV")
  1534.                 {
  1535.                     materialRaisedButton3.Text = "NAV";
  1536.                 }
  1537.                 on = "Op";
  1538.                 off = "Uit";
  1539.                 if (metroToggle2.Checked)
  1540.                 {
  1541.                     metroLabel12.Text = on;
  1542.                 }
  1543.                 else
  1544.                 {
  1545.                     metroLabel12.Text = off;
  1546.                 }
  1547.                 if (metroToggle1.Checked)
  1548.                 {
  1549.                     metroLabel11.Text = on;
  1550.                 }
  1551.                 else
  1552.                 {
  1553.                     metroLabel11.Text = off;
  1554.                 }
  1555.  
  1556.                 pictureBox16.Show();
  1557.                 pictureBox14.Hide();
  1558.                 pictureBox12.Hide();
  1559.                 pictureBox10.Hide();
  1560.                 pictureBox9.Hide();
  1561.                 pictureBox8.Hide();
  1562.                 materialTabSelector2.Refresh();
  1563.             }
  1564.         }
  1565.  
  1566.         private void pictureBox11_Click(object sender, EventArgs e)
  1567.         {
  1568.             Language = 2;
  1569.             updateLanguage();
  1570.         }
  1571.  
  1572.         private void pictureBox15_Click(object sender, EventArgs e)
  1573.         {
  1574.             MessageBox.Show("This language will be implemented soon! Look out for an update.");
  1575.         }
  1576.  
  1577.         private void pictureBox13_Click(object sender, EventArgs e)
  1578.         {
  1579.             MessageBox.Show("This language will be implemented soon! Look out for an update.");
  1580.         }
  1581.  
  1582.         private void pictureBox17_Click(object sender, EventArgs e)
  1583.         {
  1584.             MessageBox.Show("This language will be implemented soon! Look out for an update.");
  1585.         }
  1586.  
  1587.     }
  1588.  
  1589.     public static class MouseHook
  1590.     {
  1591.         public static event EventHandler MouseAction = delegate { };
  1592.  
  1593.         public static void Start()
  1594.         {
  1595.             _hookID = SetHook(_proc);
  1596.  
  1597.  
  1598.         }
  1599.         public static void stop()
  1600.         {
  1601.             UnhookWindowsHookEx(_hookID);
  1602.         }
  1603.  
  1604.         private static LowLevelMouseProc _proc = HookCallback;
  1605.         private static IntPtr _hookID = IntPtr.Zero;
  1606.  
  1607.         private static IntPtr SetHook(LowLevelMouseProc proc)
  1608.         {
  1609.             using (Process curProcess = Process.GetCurrentProcess())
  1610.             using (ProcessModule curModule = curProcess.MainModule)
  1611.             {
  1612.                 return SetWindowsHookEx(WH_MOUSE_LL, proc,
  1613.                   GetModuleHandle(curModule.ModuleName), 0);
  1614.             }
  1615.         }
  1616.  
  1617.         private delegate IntPtr LowLevelMouseProc(int nCode, IntPtr wParam, IntPtr lParam);
  1618.  
  1619.         private static IntPtr HookCallback(
  1620.           int nCode, IntPtr wParam, IntPtr lParam)
  1621.         {
  1622.             if (nCode >= 0 && MouseMessages.WM_LBUTTONDOWN == (MouseMessages)wParam)
  1623.             {
  1624.                 MSLLHOOKSTRUCT hookStruct = (MSLLHOOKSTRUCT)Marshal.PtrToStructure(lParam, typeof(MSLLHOOKSTRUCT));
  1625.                 MouseAction(null, new EventArgs());
  1626.             }
  1627.             return CallNextHookEx(_hookID, nCode, wParam, lParam);
  1628.         }
  1629.  
  1630.         private const int WH_MOUSE_LL = 14;
  1631.  
  1632.         private enum MouseMessages
  1633.         {
  1634.             WM_LBUTTONDOWN = 0x0201,
  1635.             WM_LBUTTONUP = 0x0202,
  1636.             WM_MOUSEMOVE = 0x0200,
  1637.             WM_MOUSEWHEEL = 0x020A,
  1638.             WM_RBUTTONDOWN = 0x0204,
  1639.             WM_RBUTTONUP = 0x0205
  1640.         }
  1641.  
  1642.         [StructLayout(LayoutKind.Sequential)]
  1643.         private struct POINT
  1644.         {
  1645.             public int x;
  1646.             public int y;
  1647.         }
  1648.  
  1649.         [StructLayout(LayoutKind.Sequential)]
  1650.         private struct MSLLHOOKSTRUCT
  1651.         {
  1652.             public POINT pt;
  1653.             public uint mouseData;
  1654.             public uint flags;
  1655.             public uint time;
  1656.             public IntPtr dwExtraInfo;
  1657.         }
  1658.  
  1659.         [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
  1660.         private static extern IntPtr SetWindowsHookEx(int idHook,
  1661.           LowLevelMouseProc lpfn, IntPtr hMod, uint dwThreadId);
  1662.  
  1663.         [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
  1664.         [return: MarshalAs(UnmanagedType.Bool)]
  1665.         private static extern bool UnhookWindowsHookEx(IntPtr hhk);
  1666.  
  1667.         [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
  1668.         private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode,
  1669.           IntPtr wParam, IntPtr lParam);
  1670.  
  1671.         [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
  1672.         private static extern IntPtr GetModuleHandle(string lpModuleName);
  1673.  
  1674.  
  1675.     }
  1676. }
  1677.