Skip to content

Instantly share code, notes, and snippets.

@davidsaccavino
Last active May 8, 2018 15:12
Show Gist options
  • Save davidsaccavino/1360f052f0df5641c3ad90dc5efadf75 to your computer and use it in GitHub Desktop.
Save davidsaccavino/1360f052f0df5641c3ad90dc5efadf75 to your computer and use it in GitHub Desktop.
#! 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