Ilan1009

Untitled

Apr 18th, 2022
1,852
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #MaxThreadsPerHotkey 4
  2.  
  3. F4::
  4. Toggle := !Toggle
  5. If Toggle {
  6.     MsgBox, "ON"
  7. Click, Down
  8. } else {
  9.     MsgBox, "OFF"
  10. Click, Up
  11. }
  12. loop
  13. {
  14.     If not Toggle
  15.         break
  16.     RandomMouseMove()
  17.     RandSleep(10000,20000) ;sleep a random length of time
  18. }
  19.  
  20. RandSleep(x,y) {
  21. Random, rand, %x%, %y%
  22. Sleep %rand%
  23. }
  24.  
  25. RandomMouseMove(){
  26.     MouseGetPos, xpos, ypos
  27.     x   := Rand(0, A_ScreenWidth / 1.1)
  28.     y   := Rand(0, A_ScreenHeight)
  29.     time := "T" + Rand(5000,6000)
  30.     OT := " OT" + Rand(62,173)
  31.     OB := " OB" + Rand(62,173)
  32.     OL := " OL" + Rand(62,173)
  33.     OR := " OR" + Rand(62,173)
  34.     P := " P19"
  35.     option = %time%%OT%%OB%%OL%%OR%%P%
  36.     RandomBezier(xpos, ypos, x, y, option)
  37.     Return
  38. }
  39.  
  40. RandomBezier( X0, Y0, Xf, Yf, O="" ) {
  41.     Time := RegExMatch(O,"i)T(\d+)",M)&&(M1>0)? M1: 200
  42.     RO := InStr(O,"RO",0) , RD := InStr(O,"RD",0)
  43.     N:=!RegExMatch(O,"i)P(\d+)(-(\d+))?",M)||(M1<2)? 2: (M1>19)? 19: M1
  44.     If ((M:=(M3!="")? ((M3<2)? 2: ((M3>19)? 19: M3)): ((M1=="")? 5: ""))!="")
  45.         Random, N, %N%, %M%
  46.     OfT:=RegExMatch(O,"i)OT(-?\d+)",M)? M1: 100, OfB:=RegExMatch(O,"i)OB(-?\d+)",M)? M1: 100
  47.     OfL:=RegExMatch(O,"i)OL(-?\d+)",M)? M1: 100, OfR:=RegExMatch(O,"i)OR(-?\d+)",M)? M1: 100
  48.     MouseGetPos, XM, YM
  49.     If ( RO )
  50.         X0 += XM, Y0 += YM
  51.     If ( RD )
  52.         Xf += XM, Yf += YM
  53.     If ( X0 < Xf )
  54.         sX := X0-OfL, bX := Xf+OfR
  55.     Else
  56.         sX := Xf-OfL, bX := X0+OfR
  57.     If ( Y0 < Yf )
  58.         sY := Y0-OfT, bY := Yf+OfB
  59.     Else
  60.         sY := Yf-OfT, bY := Y0+OfB
  61.     Loop, % (--N)-1 {
  62.         Random, X%A_Index%, %sX%, %bX%
  63.         Random, Y%A_Index%, %sY%, %bY%
  64.     }
  65.     X%N% := Xf, Y%N% := Yf, E := ( I := A_TickCount ) + Time
  66.     While ( A_TickCount < E ) {
  67.         U := 1 - (T := (A_TickCount-I)/Time)
  68.         Loop, % N + 1 + (X := Y := 0) {
  69.             Loop, % Idx := A_Index - (F1 := F2 := F3 := 1)
  70.                 F2 *= A_Index, F1 *= A_Index
  71.             Loop, % D := N-Idx
  72.                 F3 *= A_Index, F1 *= A_Index+Idx
  73.             M:=(F1/(F2*F3))*((T+0.000001)**Idx)*((U-0.000001)**D), X+=M*X%Idx%, Y+=M*Y%Idx%
  74.         }
  75.         MouseMove, %X%, %Y%, 0
  76.         Sleep, 1
  77.     }
  78.     MouseMove, X%N%, Y%N%, 0
  79.     Return N+1
  80. }
  81.  
  82. Rand(min, max){
  83.     Random, rand, % min, % max
  84.     Return rand
  85. }
Advertisement
Add Comment
Please, Sign In to add comment