forked from bombsquad-community/plugin-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsorry.py
68 lines (60 loc) · 1.78 KB
/
sorry.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import babase
import bauiv1 as bui
import bauiv1lib.party
import random
import bascenev1 as bs
from bascenev1 import screenmessage as push
# "%" random from sory
# "$" random from cash
sory = ["Sorry", "Sry", "Sryyy", "Sorryy"]
cash = ["My bad", "My fault", "My mistake", "My apologize"]
lmao = [
"Oops %",
"% didn't mean to",
"%, that happens",
"$, apologies!",
"Ah I slipped, very %",
"$, didn't mean to.",
"Ah, % about that",
"A- I did that $",
"%, didn't mean to.",
"$, forgive the slip",
"%, didn't mean to mess up",
"Ah % $",
"$, forgive the error",
"%, $ entirely"
]
class SorryPW(bauiv1lib.party.PartyWindow):
def __init__(s, *args, **kwargs):
super().__init__(*args, **kwargs)
s._delay = s._a = 50 # 5 seconds
s._btn = bui.buttonwidget(
parent=s._root_widget,
size=(50, 35),
scale=0.7,
label='Sorry',
button_type='square',
position=(s._width - 60, s._height - 83),
on_activate_call=s._apologize
)
def _ok(s, a):
if s._btn.exists():
bui.buttonwidget(edit=s._btn, label=str((s._delay - a) / 10)
if a != s._delay else 'Sorry')
s._a = a
else:
return
def _apologize(s):
if s._a != s._delay:
push("Too fast!")
return
else:
bs.chatmessage(random.choice(lmao).replace(
'%', random.choice(sory)).replace('$', random.choice(cash)))
for i in range(10, s._delay+1):
bs.apptimer((i-10)/10, bs.Call(s._ok, i))
# ba_meta require api 8
# ba_meta export plugin
class byBordd(babase.Plugin):
def __init__(s):
bauiv1lib.party.PartyWindow = SorryPW