GithubHelp home page GithubHelp logo

[REQ] about bloxstrap HOT 3 CLOSED

Mustwey avatar Mustwey commented on June 18, 2024
[REQ]

from bloxstrap.

Comments (3)

Mustwey avatar Mustwey commented on June 18, 2024
import psutil
import webbrowser
import time

def find_process_by_name(name):
    for process in psutil.process_iter(['name']):
        if process.info['name'].lower() == name.lower():
            return process
    return None

def kill_process_tree(pid):    
    try:
        parent = psutil.Process(pid)
        for child in parent.children(recursive=True):
            child.kill()
        parent.kill()
    except psutil.NoSuchProcess:
        pass

def launch_roblox_game(game_url):
    webbrowser.open(game_url)

def check_and_manage_roblox(game_url):
    roblox_process = find_process_by_name("Roblox Game Client")

    if roblox_process:
        if find_process_by_name("Krampus Crash"):
            print("Found 'Krampus Crash' process. Terminating Roblox...")
            kill_process_tree(roblox_process.pid)
            time.sleep(5)
            print("Launching specific Roblox game...")
            launch_roblox_game(game_url)
        else:
            print("Roblox is running without issues.")
    else:
        print("Roblox is not running. Launching the game...")
        launch_roblox_game(game_url)

def main():
    game_url = "roblox://placeId=8737899170"
    
    while True:
        check_and_manage_roblox(game_url)
        print("Waiting for the next check...")
        time.sleep(60)

if __name__ == "__main__":
    main()

from bloxstrap.

Mustwey avatar Mustwey commented on June 18, 2024

and could you also make it an option that relaunches roblox if u notices it crashed?

from bloxstrap.

Mustwey avatar Mustwey commented on June 18, 2024

nvm, i figured it out

from bloxstrap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.