Last active
January 29, 2021 18:20
-
-
Save davidsaccavino/738af49a9e2c64d6fd13efbac464b498 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! python 3 | |
# griff.py - Makes fortnite unplayable between 9am until 2pm and not after 10pm on weekdays. | |
import datetime, os, time | |
dt = datetime.datetime.now() | |
while True: | |
if dt.weekday() < 5: | |
try: | |
if dt.hour >= 9 and dt.hour < 14: | |
os.rename("C:\Program Files\Epic Games\Fortnite\FortniteGame\Binaries\Win64\FortniteLauncher.exe", "C:\Program Files\Epic Games\Fortnite\FortniteGame\Binaries\Win64\FortniteLauncher.old") | |
elif dt.hour > 22: | |
os.rename("C:\Program Files\Epic Games\Fortnite\FortniteGame\Binaries\Win64\FortniteLauncher.exe", "C:\Program Files\Epic Games\Fortnite\FortniteGame\Binaries\Win64\FortniteLauncher.old") | |
else: | |
os.rename("C:\Program Files\Epic Games\Fortnite\FortniteGame\Binaries\Win64\FortniteLauncher.old", "C:\Program Files\Epic Games\Fortnite\FortniteGame\Binaries\Win64\FortniteLauncher.exe") | |
except PermissionError: | |
time.sleep(300) | |
time.sleep(300) | |
else: | |
time.sleep(43200) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment