Guest User

Untitled

a guest
Oct 15th, 2026
112
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.74 KB | None | 0 0
  1. word = ''
  2.  
  3. def onValueChange(channel: Channel, sampleIndex, val, prev):
  4.  
  5. guesser = []
  6. gate = False
  7. global word
  8.  
  9. letter = ''
  10.  
  11. if (
  12. op('null175')['h1:index_finger_tip:x'] > op('null175')['h1:middle_finger_tip:x']
  13. and 0.4 < op('null175')['h1:index_finger_tip:y'] <1
  14. and 0.4 < op('null175')['h1:middle_finger_tip:y'] <1
  15. and 0.4 < op('null175')['h1:ring_finger_tip:y'] <1
  16. and 0.4 < op('null175')['h1:pinky_tip:y'] <1
  17. and op('null175')['h1:index_finger_tip:x'] < op('null175')['h1:thumb_tip:x'] <1.2
  18. and op('null175')['h1:thumb_ip:y'] < op('null175')['h1:thumb_tip:y']
  19. and op('logic2')['kj'] == 1
  20. and op('logic4')['kz'] == 1
  21. ): letter = 'a'
  22.  
  23. if (
  24. op('null1')['h1:index_finger_tip:y'] > 1.2
  25. and 1.2 < op('null1')['h1:thumb_tip:x'] < 1.6
  26. and op('null1')['h1:thumb_tip:y'] > 0.8
  27. and op('null1')['h1:index_finger_tip:y'] > op('null1')['h1:index_finger_pip:y']
  28. and op('null1')['h1:middle_finger_tip:y'] > 1.2
  29. and op('null1')['h1:ring_finger_tip:y'] > 1.2
  30. and op('null1')['h1:pinky_tip:y'] > 1.2
  31. and op('logic2')['kj'] == 1
  32. and op('logic4')['kz'] == 1
  33. ): letter = 'b'
  34.  
  35. if (
  36. op('null7')['h1:middle_finger_pip:y'] > op('null7')['h1:middle_finger_tip:y']
  37. and 0.85 < op('null7')['h1:middle_finger_tip:y'] < 1.4
  38. and 0.85 < op('null7')['h1:index_finger_tip:y'] < 1.4
  39. and 0.85 < op('null7')['h1:ring_finger_tip:y'] < 1.4
  40. and 0.85 < op('null7')['h1:pinky_tip:y'] < 1.4
  41. and 0.5 < op('null7')['h1:thumb_tip:y'] < 0.7
  42. and op('logic2')['kj'] == 1
  43. and op('logic4')['kz'] == 1
  44. ): letter = 'c'
  45.  
  46. if (
  47. op('null13')['h1:middle_finger_pip:y'] > op('null13')['h1:middle_finger_tip:y']
  48. and op('null13')['h1:index_finger_tip:y'] > 1.4
  49. and op('null13')['h1:index_finger_dip:y'] < op('null13')['h1:index_finger_tip:y']
  50. and op('null13')['h1:middle_finger_tip:y'] < 0.9
  51. and op('null13')['h1:ring_finger_tip:y'] < 0.9
  52. and op('null13')['h1:pinky_tip:y'] < 0.9
  53. and 0.9 > op('null13')['h1:thumb_tip:y'] >0.5
  54. and 0.1 < op('null13')['h1:thumb_tip:x'] < 0.6
  55. and op('logic2')['kj'] == 1
  56. and op('logic4')['kz'] == 1
  57. ): letter = 'd'
  58.  
  59. if (
  60. 0.8 < op('null23')['h1:index_finger_tip:y'] <1.1
  61. and 0.8 < op('null23')['h1:middle_finger_tip:y'] <1.1
  62. and 0.8 < op('null23')['h1:ring_finger_tip:y'] <1.1
  63. and 0.8 < op('null23')['h1:pinky_tip:y'] <1.1
  64. and op('null23')['h1:middle_finger_tip:x'] > op('null23')['h1:thumb_tip:x'] < 0.6
  65. and op('null23')['h1:index_finger_tip:y'] > op('null23')['h1:thumb_tip:y']
  66. and op('logic2')['kj'] == 1
  67. and op('logic4')['kz'] == 1
  68. ): letter = 'e'
  69.  
  70. if (
  71. op('null68')['h1:middle_finger_pip:y'] < op('null68')['h1:middle_finger_tip:y']
  72. and 0.5< op('null68')['h1:index_finger_tip:y'] < 0.9
  73. and op('null68')['h1:thumb_tip:x'] < 0.8
  74. and op('null68')['h1:middle_finger_tip:y'] > 1.2
  75. and op('null68')['h1:ring_finger_tip:y'] > 1.2
  76. and op('null68')['h1:pinky_tip:y'] > 1.2
  77. and op('logic2')['kj'] == 1
  78. and op('logic4')['kz'] == 1
  79. ): letter = 'f'
  80.  
  81. if (
  82. op('null25')['h1:middle_finger_pip:x'] > op('null25')['h1:middle_finger_tip:x']
  83. and op('null25')['h1:middle_finger_tip:x'] < 0.6
  84. and op('null25')['h1:ring_finger_tip:x'] < 0.6
  85. and op('null25')['h1:pinky_tip:x'] < 0.6
  86. and op('null25')['h1:index_finger_tip:x'] <1.1
  87. and op('null25')['h1:pinky_pip:y'] < 0.7
  88. and op('null25')['h1:thumb_tip:x'] < 1
  89. and op('null25')['h1:pinky_tip:y'] < op('null25')['h1:ring_finger_tip:y']
  90. and op('logic2')['kj'] == 1
  91. and op('logic4')['kz'] == 1
  92. ): letter = 'g'
  93.  
  94. if (
  95. op('null30')['h1:ring_finger_pip:x'] > op('null30')['h1:ring_finger_tip:x']
  96. and op('null30')['h1:ring_finger_tip:x'] < 0.6
  97. and op('null30')['h1:pinky_tip:x'] < 0.6
  98. and op('null30')['h1:pinky_tip:y'] < op('null30')['h1:ring_finger_tip:y']
  99. and op('null30')['h1:pinky_pip:y'] < 0.7
  100. and op('null30')['h1:middle_finger_tip:x'] > 0.6
  101. and op('null30')['h1:index_finger_tip:x'] > 0.6
  102. and op('null30')['h1:index_finger_tip:y'] < 1.2
  103. and op('null30')['h1:thumb_tip:x'] < 1
  104. and op('logic2')['kj'] == 1
  105. and op('logic4')['kz'] == 1
  106. ): letter = 'h'
  107.  
  108. if (
  109. op('null2')['h1:middle_finger_tip:y'] < 1
  110. and op('null2')['h1:ring_finger_tip:y'] < 1
  111. and op('null2')['h1:index_finger_tip:y'] < 1
  112. and op('null2')['h1:middle_finger_pip:y'] > op('null2')['h1:middle_finger_tip:y']
  113. and op('null2')['h1:pinky_tip:y'] > 1.3
  114. and 0.9 > op('null2')['h1:thumb_tip:y'] >0.5
  115. and op('logic2')['kj'] == 1
  116. and op('logic4')['kz'] == 1
  117. ): letter = 'i'
  118.  
  119. if (
  120. op('merge1')['h1:pinky_tip:x']
  121. and op('merge1')['h1:pinky_tip:y']
  122. and op('merge1')['h1:pinky_tip:y']
  123. and op('merge1')['h1:pinky_tip:x'] >3.5
  124. and op('logic1')['kj']
  125. ): letter = 'j'
  126.  
  127. if (
  128. op('null39')['h1:ring_finger_pip:y'] > op('null39')['h1:ring_finger_tip:y']
  129. and op('null39')['h1:ring_finger_tip:y'] < 0.7
  130. and op('null39')['h1:pinky_tip:y'] < 0.7
  131. and op('null39')['h1:middle_finger_tip:y'] > 0.7
  132. and op('null39')['h1:index_finger_tip:y'] >1.2
  133. and op('null39')['h1:thumb_tip:y'] > 0.85
  134. and op('logic2')['kj'] == 1
  135. and op('logic4')['kz'] == 1
  136. ): letter = 'k'
  137.  
  138. if (
  139. op('null3')['h1:middle_finger_tip:y'] < 0.9
  140. and op('null3')['h1:ring_finger_tip:y'] < 0.9
  141. and op('null3')['h1:pinky_tip:y'] < 0.9
  142. and op('null3')['h1:middle_finger_pip:y'] > op('null3')['h1:middle_finger_tip:y']
  143. and op('null3')['h1:index_finger_tip:y'] > 1.4
  144. and 0.5 < op('null3')['h1:thumb_tip:x'] < 1.2
  145. and op('logic2')['kj'] == 1
  146. and op('logic4')['kz'] == 1
  147. ): letter = 'l'
  148.  
  149. if (
  150. 0.7 < op('null52')['h1:index_finger_tip:y'] <1.1
  151. and 0.7 < op('null52')['h1:middle_finger_tip:y'] <1.1
  152. and 0.7 < op('null52')['h1:ring_finger_tip:y'] <1.1
  153. and op('null52')['h1:ring_finger_pip:y'] > op('null52')['h1:thumb_tip:y'] > op('null52')['h1:pinky_pip:y']
  154. and 0.5 < op('null52')['h1:pinky_tip:y'] < 1
  155. and op('null52')['h1:ring_finger_tip:x'] > op('null52')['h1:thumb_tip:x']
  156. and op('logic2')['kj'] == 1
  157. and op('logic4')['kz'] == 1
  158. ): letter = 'm'
  159.  
  160. if (
  161. 0.7 < op('null58')['h1:index_finger_tip:y'] <1.1
  162. and 0.7 < op('null58')['h1:middle_finger_tip:y'] <1.1
  163. and op('null58')['h1:ring_finger_tip:y'] < 1
  164. and op('null58')['h1:pinky_tip:y'] < 1
  165. and 0.2 < op('null58')['h1:thumb_tip:x'] < op('null58')['h1:middle_finger_tip:x']
  166. and op('null58')['h1:index_finger_tip:y'] < op('null58')['h1:thumb_tip:y']
  167. and op('null58')['h1:ring_finger_pip:y'] < op('null58')['h1:thumb_tip:y']
  168. and op('logic2')['kj'] == 1
  169. and op('logic4')['kz'] == 1
  170. ): letter = 'n'
  171.  
  172. if (
  173. 1.2 > op('null4')['h1:index_finger_tip:y'] > 0.8
  174. and 1.2 > op('null4')['h1:middle_finger_tip:y'] > 0.8
  175. and 1.2 > op('null4')['h1:ring_finger_tip:y'] > 0.8
  176. and 1.2 > op('null4')['h1:pinky_tip:y'] > 0.8
  177. and op('null4')['h1:middle_finger_pip:y'] > op('null4')['h1:middle_finger_tip:y']
  178. and 0.7 < op('null4')['h1:thumb_tip:y'] < 1
  179. and op('null4')['h1:thumb_tip:x'] > op('null4')['h1:middle_finger_tip:x']
  180. and op('logic2')['kj'] == 1
  181. and op('logic4')['kz'] == 1
  182. ): letter = 'o'
  183.  
  184. if (
  185. op('null69')['h1:ring_finger_pip:y'] < op('null69')['h1:ring_finger_tip:y']
  186. and op('null69')['h1:ring_finger_pip:y'] < 1
  187. and op('null69')['h1:pinky_pip:y'] < 1
  188. and op('null69')['h1:middle_finger_tip:y'] < 0.6
  189. and op('null69')['h1:index_finger_tip:y'] < 0.8
  190. and op('null69')['h1:thumb_tip:y'] < 1
  191. and op('logic2')['kj'] == 1
  192. and op('logic4')['kz'] == 1
  193. ): letter = 'p'
  194.  
  195. if (
  196. op('null75')['h1:ring_finger_pip:y'] < op('null75')['h1:ring_finger_tip:y']
  197. and op('null75')['h1:ring_finger_pip:y'] < 1
  198. and op('null75')['h1:pinky_pip:y'] < 1
  199. and op('null75')['h1:middle_finger_tip:y'] > 0.7
  200. and op('null75')['h1:index_finger_tip:y'] < 0.6
  201. and op('null75')['h1:thumb_tip:y'] < 1
  202. and op('logic2')['kj'] == 1
  203. and op('logic4')['kz'] == 1
  204. ): letter = 'q'
  205.  
  206. if (
  207. op('null81')['h1:ring_finger_pip:y'] > op('null81')['h1:ring_finger_tip:y']
  208. and op('null81')['h1:ring_finger_tip:y'] < 0.8
  209. and op('null81')['h1:pinky_tip:y'] < 0.8
  210. and op('null81')['h1:middle_finger_tip:y'] >1
  211. and op('null81')['h1:index_finger_tip:y'] >1.2
  212. and op('null81')['h1:thumb_tip:x'] < 0.6
  213. and op('null81')['h1:middle_finger_tip:x'] > op('null81')['h1:index_finger_tip:x']
  214. and op('null81')['h1:thumb_tip:y'] < op('null81')['h1:index_finger_mcp:y']
  215. and op('logic2')['kj'] == 1
  216. and op('logic4')['kz'] == 1
  217. ): letter = 'r'
  218.  
  219. if (
  220. 0.8 < op('null89')['h1:index_finger_tip:y'] <1.1
  221. and 0.8 < op('null89')['h1:middle_finger_tip:y'] <1.1
  222. and op('null89')['h1:pinky_tip:y'] < 1
  223. and op('null89')['h1:ring_finger_tip:y'] < 1
  224. and 0.7 > op('null89')['h1:thumb_tip:x'] > 0.2
  225. and op('null89')['h1:index_finger_tip:y'] < op('null89')['h1:thumb_tip:y'] < op('null89')['h1:pinky_pip:y']
  226. and op('null89')['h1:ring_finger_pip:y'] > op('null89')['h1:thumb_tip:y']
  227. and op('logic2')['kj'] == 1
  228. and op('logic4')['kz'] == 1
  229. ): letter = 's'
  230.  
  231. if (
  232. 0.5 < op('null98')['h1:index_finger_tip:y'] <1.1
  233. and 0.5 < op('null98')['h1:middle_finger_tip:y'] <1.1
  234. and op('null98')['h1:ring_finger_tip:y'] < 1
  235. and op('null98')['h1:pinky_tip:y'] < 1
  236. and op('null98')['h1:index_finger_dip:x'] > op('null98')['h1:thumb_tip:x'] > 0.2
  237. and op('null98')['h1:index_finger_tip:y'] < op('null98')['h1:thumb_tip:y']
  238. and op('null98')['h1:middle_finger_pip:y'] < op('null98')['h1:thumb_tip:y']
  239. and op('null98')['h1:pinky_pip:y'] > 0.7
  240. and op('null98')['h1:thumb_ip:y'] < op('null98')['h1:thumb_tip:y']
  241. and op('logic2')['kj'] == 1
  242. and op('logic4')['kz'] == 1
  243. ): letter = 't'
  244.  
  245. if (
  246. op('null106')['h1:ring_finger_pip:y'] > op('null106')['h1:ring_finger_tip:y']
  247. and op('null106')['h1:ring_finger_tip:y'] < 0.8
  248. and op('null106')['h1:pinky_tip:y'] < 0.8
  249. and op('null106')['h1:middle_finger_tip:y'] >1
  250. and op('null106')['h1:middle_finger_mcp:y'] > op('null106')['h1:thumb_tip:y']
  251. and op('null106')['h1:index_finger_tip:y'] >1.2
  252. and op('null106')['h1:thumb_tip:x'] < 0.5
  253. and 0.3 < op('null106')['h1:middle_finger_tip:x'] < op('null106')['h1:index_finger_tip:x']
  254. and op('logic2')['kj'] == 1
  255. and op('logic4')['kz'] == 1
  256. ): letter = 'u'
  257.  
  258. if (
  259. op('null114')['h1:ring_finger_pip:y'] > op('null114')['h1:ring_finger_tip:y']
  260. and op('null114')['h1:middle_finger_mcp:y'] > op('null114')['h1:thumb_tip:y']
  261. and op('null114')['h1:ring_finger_tip:y'] < 0.8
  262. and op('null114')['h1:pinky_tip:y']
  263. and op('null114')['h1:middle_finger_tip:y'] >1
  264. and op('null114')['h1:index_finger_tip:y'] >1.2
  265. and op('null114')['h1:thumb_tip:x'] < 0.5
  266. and op('null114')['h1:middle_finger_tip:x'] < op('null114')['h1:index_finger_tip:x']
  267. and op('null114')['h1:middle_finger_tip:x'] < 0.3
  268. and op('logic2')['kj'] == 1
  269. and op('logic4')['kz'] == 1
  270. ): letter = 'v'
  271.  
  272. if (
  273. op('null124')['h1:ring_finger_pip:y'] < op('null124')['h1:ring_finger_tip:y']
  274. and op('null124')['h1:ring_finger_tip:y'] > 1
  275. and op('null124')['h1:pinky_tip:y'] < 0.8
  276. and op('null124')['h1:middle_finger_tip:y'] >1
  277. and op('null124')['h1:index_finger_tip:y'] >1.2
  278. and op('null124')['h1:thumb_tip:x'] < 0.6
  279. and op('null124')['h1:middle_finger_tip:x'] < op('null124')['h1:index_finger_tip:x']
  280. and op('logic2')['kj'] == 1
  281. and op('logic4')['kz'] == 1
  282. ): letter = 'w'
  283.  
  284. if (
  285. op('null6')['h1:middle_finger_pip:y'] > op('null6')['h1:middle_finger_tip:y']
  286. and op('null6')['h1:middle_finger_tip:y'] < op('null6')['h1:index_finger_pip:y']
  287. and op('null6')['h1:pinky_pip:y'] > 0.7
  288. and op('null6')['h1:index_finger_dip:y'] > op('null6')['h1:index_finger_tip:y'] > 1
  289. and op('null6')['h1:middle_finger_tip:y'] < 0.9
  290. and op('null6')['h1:ring_finger_tip:y'] < 0.9
  291. and op('null6')['h1:pinky_tip:y'] < 0.9
  292. and 0.9 > op('null6')['h1:thumb_tip:y'] >0.5
  293. and op('null6')['h1:thumb_tip:x'] < 0.6
  294. and op('logic2')['kj'] == 1
  295. and op('logic4')['kz'] == 1
  296. ): letter = 'x'
  297.  
  298. if (
  299. 0.4 < op('null9')['h1:index_finger_tip:y'] <0.9
  300. and 0.4 < op('null9')['h1:middle_finger_tip:y'] <0.9
  301. and 0.4 < op('null9')['h1:ring_finger_tip:y'] <0.9
  302. and op('null9')['h1:pinky_tip:y'] > 0.9
  303. and 0.7 < op('null9')['h1:thumb_tip:x'] <1.2
  304. and op('logic2')['kj'] == 1
  305. and op('logic4')['kz'] == 1
  306. ): letter = 'y'
  307.  
  308. if (
  309. op('merge2')['h1:index_finger_tip:x']
  310. and op('merge2')['h1:index_finger_tip:y']
  311. and op('merge2')['h1:index_finger_tip:x']
  312. and op('merge2')['h1:index_finger_tip:y']
  313. and op('merge2')['h1:index_finger_tip:x']
  314. and op('merge2')['h1:index_finger_tip:y'] >5.5
  315. and op('logic3')['kz']
  316. ): letter = 'z'
  317.  
  318. guesser.append(letter)
  319. if me.time.frame % (60) == 0:
  320. check = getMostFrequent(guesser)
  321.  
  322. if check != False:
  323. word += getMostFrequent(guesser)
  324.  
  325. guesser = []
  326.  
  327. print(word)
  328.  
  329. """
  330. print(letter)
  331. """
  332. return
  333.  
  334. from functools import reduce
  335.  
  336.  
  337. def getMostFrequent(arr):
  338. hashmap = {}
  339.  
  340. for value in arr:
  341. hashmap[value] = hashmap.get(value, 0) + 1
  342.  
  343. return reduce(
  344. lambda a, b: a if hashmap[a] > hashmap[b] else b,
  345. hashmap
  346. )
  347.  
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment