import os, sys, re, json
try:
  import pystyle
  import requests
  import googletrans
  import bs4
except:
  os.system('pip install requests && pip install pystyle && pip install googletrans && pip install bs4')
from datetime import datetime
import datetime,base64
import threading
from time import sleep
import requests,re,json,random,sys,os
from time import sleep
from time import sleep
from datetime import datetime
import random
import requests, os, sys, re, json
from threading import Thread
import threading
import time
from random import choice, randint, shuffle
#hoclaiGDCDdi
def ra(text):
   for i in range(len(text)):
       sys.stdout.write(text[i])
       sys.stdout.flush()
       sleep(0.001)
   print()
#bome sinh ra m de may lam chuyen an cap an trom nhu nay ak
import pystyle
from pystyle import Add, Center, Anime, Colors, Colorate, Write, System
from datetime import date
dem = 1
r = "\033[1;92m: \033[1;93m"
def jayzchay():
   a= "\033[1;97m- "*31
   for i in range(len(a)):
     sys.stdout.write(a[i])
     sys.stdout.flush()
     sleep(0.001)
   print()
os.system("cls" if os.name == "nt" else "clear")
jayzthanh="\033[1;37m- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"
jayztrick="\033[1;91m[\033[1;92m×͜×\033[1;91m] \033[1;97m=>  \033[1;92m"
sr = "\033[1;91m〘\033[1;92mHải-\033[1;96mMa\033[1;93mgi\033[1;97mc\033[1;91m〙 \033[1;33m"
def banner():
 banner = f"""
{jayztrick}\033[1;35mTOOL BUFF LIKE MACHINE-LIKER ĐA LUỒNG VIP 
{jayztrick}\033[1;34mCopyRight © : \033[1;33mAN ORIN
{jayztrick}\033[1;36mZalo: \033[1;32m 0903284709
{jayztrick}\033[1;35mMua Mail Cổ Tại: \033[1;37manorintool.tk
{jayzthanh}
"""
 for X in banner:
  sys.stdout.write(X)
  sys.stdout.flush() 
  sleep(0.00125)



"""banner();
time = datetime.now()
a=time.strftime("%d")
h=int(time.strftime("%d"))
ngày_trc=h-1
b=time.strftime("%m")
day=time.strftime("%d-%m-%Y")
today=time.strftime("%d-%m-%Y")
d=time.strftime("%d-%m")
encodedBytes = base64.b64encode(d.encode("utf-8"))
key = str(encodedBytes, "utf-8")
long_url=(f"https://jayztool.tk/jayzkey.php/?key={key}")
api_token='2e2a3c8b826e0a9eaa1358125dbf4fb1006120f7'
url=requests.get(f'https://link1s.com/api?api={api_token}&url={long_url}').json()
status=url['status']
link=url['shortenedUrl']
file_key=f'key-ngày{a}.txt'
file_key_cũ=f'key-ngày{ngày_trc}.txt'
check_file_key=os.path.exists(file_key)
if check_file_key == False:
   print("\033[1;91m[\033[1;92m×͜×\033[1;91m] \033[1;97m=> \033[1;91m ĐÂY LÀ TOOL FREE NÊN KEY SẼ TỰ ĐỘNG THAY ĐỔI MỖI NGÀY")
   print(f'{jayztrick}\033[1;32m  Link Lấy Key Free : \033[1;36m{link} ')
   print(f' \033[1;34m┌─[\033[1;37m\033[1;42mVui Lòng Nhập Key Đã Vượt Link\033[0m\033[1;34m]')
   while(True):
      ma=input(f" \033[1;34m└──╼ \033[1;35m❯\033[1;36m❯\033[1;31m❯\033[1;32m Nhập Key\033[1;32m Ngày\033[1;37m {today}:\033[1;33m")
      if ma == key:
         print('\033[1;32m API Key Chính Xác')
         luu=open(file_key, 'a+')
         luu.write(ma)
         luu.close()
         break
      elif ma != key:
         print('\033[1;31m API Key Sai')
elif check_file_key == True:
  print('\033[1;91m  ●  Đang Kiểm Tra Key Đã Nhập Trước Đó ...  ●',end='\r')
  sleep(2)
  k=open(file_key, 'r')
  ma=k.read()
  k.close()
  if ma == key:
    print('\033[1;96m  ●  Key Chính Xác Đang Chuyển Hướng Vào Tool  ●       ',end='\r')
    sleep(2)
  elif ma != key:
    if os.path.exists(file_key_cũ) == True:
      os.system(f'rm {file_key_cũ}')
    os.system(f'rm {file_key}')
    print('\033[1;31m API Key Sai         ')
    while(True):
      ma=input(f"\033[1;37m[\033[1;31m✓\033[1;37m]\033[1;37m =>\033[1;32m Nhập API Key\033[1;32mNgày \033[1;37m{today}: \033[1;33m")
      if ma == key:
        print('\033[1;32m API Key Chính Xác')
        luu=open(file_key, 'a+')
        luu.write(ma)
        luu.close()
        break
      elif ma != key:
        print('\033[1;31m API Key Sai           ')"""
os.system("cls" if os.name == "nt" else "clear")
banner();
user = input(jayztrick+"Nhập My-User-Agent "+r+" ")
jayzchay()
list_ck = []
list_link = []
for i in range(99999):
	ck = input(jayztrick+"Nhập Cookie MachineLike\033[1;91m Thứ "+str(i+1)+" "+r+" ")
	if ck != '':
		list_ck.append(ck)
		link = input(jayztrick+"Nhập Link Bài Viết\033[1;91m Thứ "+str(i+1)+" "+r+" ")
		if link != '':
			list_link.append(link)
			jayzchay()
		else:
			exit()
	else:
		break
sleep(0.2)
os.system("cls" if os.name == "nt" else "clear")
banner();
print(jayztrick+"\033[1;92mCHỌN \033[1;91m[\033[1;93m1\033[1;91m] \033[1;92mBuff Reaction LIKE  [👍]")
print(jayztrick+"\033[1;92mCHỌN \033[1;91m[\033[1;93m2\033[1;91m] \033[1;92mBuff Reaction WOW   [😲]")
print(jayztrick+"\033[1;92mCHỌN \033[1;91m[\033[1;93m3\033[1;91m] \033[1;92mBuff Reaction LOVE  [❤️]")
print(jayztrick+"\033[1;92mCHỌN \033[1;91m[\033[1;93m4\033[1;91m] \033[1;92mBuff Reaction HAHA  [😂]")
print(jayztrick+"\033[1;92mCHỌN \033[1;91m[\033[1;93m5\033[1;91m] \033[1;92mBuff Reaction SAD   [😭]")
print(jayztrick+"\033[1;92mCHỌN \033[1;91m[\033[1;93m6\033[1;91m] \033[1;92mBuff Reaction ANGRY [😡]")
print(jayztrick+"\033[1;92mCHỌN \033[1;91m[\033[1;93m7\033[1;91m] \033[1;92mBuff Reaction DEAR  [🥰]")
jayzchay()
type=input(jayztrick+"Nhập Cảm Xúc Muốn Buff \033[1;91mP/s(1,2,3,..)"+r+" ")
jayzchay()
dem = 1
dl=int(650)
def delay(dl):
  try:
    for i in range(dl, -1, -1):
       print('\033[1;31m● Vui lòng chờ <~> AN ORIN\033[1;37m〘\033[1;31m▉\033[1;32m■\033[1;33m■\033[1;34m■\033[1;35m■\033[1;37m〙 '+str(i)+' Giây  ',end='\r')
       sleep(0.2)
       print('\033[1;32m● Vui lòng chờ <~> AN ORIN\033[1;37m〘\033[1;33m■\033[1;34m▉\033[1;35m■\033[1;36m■\033[1;31m■\033[1;37m〙 '+str(i)+' Giây  ',end='\r')
       sleep(0.2)
       print('\033[1;33m● Vui lòng chờ <~> AN ORIN\033[1;37m〘\033[1;34m■\033[1;35m■\033[1;36m▉\033[1;31m■\033[1;33m■\033[1;37m〙 '+str(i)+' Giây  ',end='\r')
       sleep(0.2)
       print('\033[1;35m● Vui lòng chờ <~> AN ORIN\033[1;37m〘\033[1;35m■\033[1;36m■\033[1;31m■\033[1;33m▉\033[1;34m■\033[1;37m〙 '+str(i)+' Giây  ',end='\r')
       sleep(0.2)
       print('\033[1;36m● Vui lòng chờ <~> AN ORIN\033[1;37m〘\033[1;33m■\033[1;32m■\033[1;31m■\033[1;35m■\033[1;36m▉\033[1;37m〙 '+str(i)+' Giây  ',end='\r')
       sleep(0.2)
  except:
     sleep(dl)
     print(dl,end='\r')
def like(user,ck,link,dem):
  while True:
   a=requests.post("https://www.machine-liker.com/api/get-post-info/", headers={"Host":"www.machine-liker.com","x-requested-with":"XMLHttpRequest","user-agent":user,"origin":"https://www.machine-liker.com","content-type":"application/x-www-form-urlencoded; charset=UTF-8","referer":"https://www.machine-liker.com/auto-reactions/","cookie":ck},data={"url":link})
   try:
       hjsbs = json.loads(a.text)
       break
   except:
       print(jayztrick+"\033[1;91m〘 ERROR 〙Đã Bị Ăn Cloud Flare Vui Lòng Đợi...","\r")
       delay(int(37))
  if "post" in a.text:
     id=a.json()["post"]["id"]
     st=a.json()["post"]["story"]
  else:
     print(a.json())
     exit(jayztrick+"\033[1;91m〘 ERROR 〙Cookie Die Hoặc Nhập Sai Link")
  url1=f"https://www.machine-liker.com/send-reactions/?post_id={id}&story={st}"
  a=requests.get(url1,headers={"Host":"www.machine-liker.com","x-requested-with":"XMLHttpRequest","user-agent":user,"origin":"https://www.machine-liker.com","content-type":"application/x-www-form-urlencoded; charset=UTF-8","referer":"https://www.machine-liker.com/auto-reactions/","cookie":ck})
  obj=a.text.split('name="object_id" value="')[1].split('"')[0]
  d=0
  viendepchai=requests.post("https://www.machine-liker.com/api/send-reactions/",headers={"Host":"www.machine-liker.com","x-requested-with":"XMLHttpRequest","user-agent":user,"origin":"https://www.machine-liker.com","content-type":"application/x-www-form-urlencoded; charset=UTF-8","referer":"https://www.machine-liker.com/auto-reactions/","cookie":ck},data={"object_id":obj,"reactions":type,"limit":"150"})
  if "info" in viendepchai.text:
   cong=viendepchai.text.split('message": "')[1].split(' reactions')[0]
   tong=viendepchai.json()["info"]["total_reactions"]
   t=datetime.now().strftime('%H:%M:%S')
   ra("\033[1;91m[\033[1;93m"+str(dem)+"\033[1;91m] \033[1;91m● \033[1;96m"+str(t)+" \033[1;91m● \033[1;97m"+str(id)+" \033[1;91m●\033[1;93m +\033[1;93m"+str(cong)+" \033[1;92mCảm Xúc \033[1;91m● \033[1;92mTổng\033[1;93m "+str(tong)+" \033[1;92mCảm Xúc")
  else:
   t=datetime.now().strftime('%H:%M:%S')
   print(jayztrick+viendepchai.text)
while True:
 for k in range(len(list_link)):
   print("Đang Buff ",end="\r")
   like(user,list_ck[k],list_link[k],dem);
   dem += 1
 delay(dl)
