Last active
May 8, 2018 15:12
-
-
Save davidsaccavino/1360f052f0df5641c3ad90dc5efadf75 to your computer and use it in GitHub Desktop.
This file contains hidden or 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