Advertisement
PareX

efef

Aug 12th, 2019
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.76 KB | None | 0 0
  1. using System;
  2. using System.Diagnostics;
  3. using System.Windows.Forms;
  4.  
  5. namespace Synapse_X
  6. {
  7.     public partial class Options : Form
  8.     {
  9.         public Options()
  10.         {
  11.             InitializeComponent();
  12.         }
  13.         bool attach;
  14.         private void Button4_Click(object sender, EventArgs e)
  15.         {
  16.             Environment.Exit(0);
  17.         }
  18.  
  19.         private void Button1_Click(object sender, EventArgs e)
  20.         {
  21.             this.WindowState = FormWindowState.Minimized;
  22.         }
  23.  
  24.         private void CheckBox1_CheckedChanged(object sender, EventArgs e)
  25.         {
  26.             if (checkBox1.Checked)
  27.             {
  28.                 this.TopMost = true;
  29.             }
  30.             else
  31.             {
  32.                 this.TopMost = false;
  33.             }
  34.         }
  35.  
  36.         private void Timer1_Tick(object sender, EventArgs e)
  37.         {
  38.            
  39.         }
  40.  
  41.         private void Launcher2_Tick(object sender, EventArgs e)
  42.         {
  43.            
  44.         }
  45.  
  46.         private void Timer3_Tick(object sender, EventArgs e)
  47.         {
  48.             if (attach)
  49.             {
  50.                 Process[] roblox = Process.GetProcessesByName("RobloxPlayerBeta.exe");
  51.                 if (roblox.Length > 0)
  52.                 {
  53.                     MessageBox.Show("WORKS");
  54.                     attach = false;
  55.                 }
  56.                 else
  57.                 {
  58.                     timer4.Start();
  59.                     attach = true;
  60.                 }
  61.             }
  62.             else
  63.             {
  64.                 timer3.Stop();
  65.                 timer4.Stop();
  66.             }
  67.         }
  68.  
  69.         private void Timer4_Tick(object sender, EventArgs e)
  70.         {
  71.             if (attach)
  72.             {
  73.                 Process[] roblox = Process.GetProcessesByName("RobloxPlayerBeta.exe");
  74.                 if (roblox.Length > 0)
  75.                 {
  76.                     MessageBox.Show("WORKS");
  77.                     attach = false;
  78.                 }
  79.                 else
  80.                 {
  81.                     timer3.Start();
  82.                     attach = true;
  83.                 }
  84.             }
  85.             else
  86.             {
  87.                 timer3.Stop();
  88.                 timer4.Stop();
  89.             }
  90.         }
  91.  
  92.         private void CheckBox2_CheckedChanged(object sender, EventArgs e)
  93.         {
  94.             if (checkBox2.Checked)
  95.             {
  96.                 timer1.Start();
  97.             }
  98.             else
  99.             {
  100.                 timer1.Stop();
  101.                 timer2.Stop();
  102.             }
  103.         }
  104.  
  105.         private void Timer1_Tick_1(object sender, EventArgs e)
  106.         {
  107.             if (!NamedPipes.NamedPipeExist(NamedPipes.luapipename))
  108.             {
  109.                 Process[] roblox = Process.GetProcessesByName("RobloxPlayerBeta.exe");
  110.                 if(roblox.Length > 0)
  111.                 {
  112.                     timer3.Start();
  113.                 }
  114.                 else
  115.                 {
  116.                     timer2.Start();
  117.                 }
  118.             }
  119.             else if (NamedPipes.NamedPipeExist(NamedPipes.luapipename))
  120.             {
  121.                 attach = false;
  122.             }
  123.         }
  124.  
  125.         private void Timer2_Tick(object sender, EventArgs e)
  126.         {
  127.             if (!NamedPipes.NamedPipeExist(NamedPipes.luapipename))
  128.             {
  129.                 Process[] roblox = Process.GetProcessesByName("RobloxPlayerBeta.exe");
  130.                 if (roblox.Length > 0)
  131.                 {
  132.                     timer3.Start();
  133.                 }
  134.                 else
  135.                 {
  136.                     timer1.Start();
  137.                 }
  138.             }
  139.             else if (NamedPipes.NamedPipeExist(NamedPipes.luapipename))
  140.             {
  141.                 attach = false;
  142.             }
  143.         }
  144.     }
  145. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement