I haven't used this one for ages. An automatic letter scrambler. I was into anagrams for a while.
It's crude, but it did the job. I've added a count to show the tries it takes to fill all the gaps, as it's random.
It handles up to 26 letters, as I made it originally to handle the alphabet.
Put your word straight into the a$ speech marks.
a$=""
open window 640,512
le=len(a$)
label again
ct=0
clear window
pause .25
ac=15
ab=100
aa=230
1 ct=ct+1
a=int(ran(le))+1
text (a*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,1,1)
2 ct=ct+1
b=int(ran(le))+1
if b=a goto 2
text (b*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,2,1)
3 ct=ct+1
c=int(ran(le))+1
if c=b or c=a goto 3
text (c*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,3,1)
if le=3 goto fin
4 ct=ct+1
d=int(ran(le))+1
if d=c or d=b or d=a goto 4
text (d*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,4,1)
if le=4 goto fin
5 ct=ct+1
e=int(ran(le))+1
if e=d or e=c or e=b or e=a goto 5
text (e*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,5,1)
if le=5 goto fin
6 ct=ct+1
f=int(ran(le))+1
if f=e or f=d or f=c or f=b or f=a goto 6
text (f*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,6,1)
if le=6 goto fin
7 ct=ct+1
g=int(ran(le))+1
if g=f or g=e or g=d or g=c or g=b or g=a goto 7
text (g*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,7,1)
if le=7 goto fin
8 ct=ct+1
h=int(ran(le))+1
if h=g or h=f or h=e or h=d or h=c or h=b or h=a goto 8
text (h*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,8,1)
if le=8 goto fin
9 ct=ct+1
i=int(ran(le))+1
if i=h or i=g or i=f or i=e or i=d or i=c or i=b or i=a goto 9
text (i*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,9,1)
if le=9 goto fin
10 ct=ct+1
j=int(ran(le))+1
if j=i or j=h or j=g or j=f or j=e or j=d or j=c or j=b or j=a goto 10
text (j*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,10,1)
if le=10 goto fin
11 ct=ct+1
k=int(ran(le))+1
if k=j or k=i or k=h or k=g or k=f or k=e or k=d or k=c or k=b or k=a goto 11
text (k*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,11,1)
if le=11 goto fin
12 ct=ct+1
l=int(ran(le))+1
if l=k or l=j or l=i or l=h or l=g or l=f or l=e or l=d or l=c or l=b or l=a goto 12
text (l*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,12,1)
if le=12 goto fin
13 ct=ct+1
m=int(ran(le))+1
if m=l or m=k or m=j or m=i or m=h or m=g or m=f or m=e or m=d or m=c or m=b or m=a goto 13
text (m*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,13,1)
if le=13 goto fin
14 ct=ct+1
n=int(ran(le))+1
if n=m or n=l or n=k or n=j or n=i or n=h or n=g or n=f or n=e or n=d or n=c or n=b or n=a goto 14
text (n*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,14,1)
if le=14 goto fin
15 ct=ct+1
o=int(ran(le))+1
if o=n or o=m or o=l or o=k or o=j or o=i or o=h or o=g or o=f or o=e or o=d or o=c or o=b or o=a goto 15
text (o*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,15,1)
if le=15 goto fin
16 ct=ct+1
p=int(ran(le))+1
if p=o or p=n or p=m or p=l or p=k or p=j or p=i or p=h or p=g or p=f or p=e or p=d or p=c or p=b or p=a goto 16
text (p*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,16,1)
if le=16 goto fin
17 ct=ct+1
q=int(ran(le))+1
if q=p or q=o or q=n or q=m or q=l or q=k or q=j or q=i or q=h or q=g or q=f or q=e or q=d or q=c or q=b or q=a goto 17
text (q*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,17,1)
if le=17 goto fin
18 ct=ct+1
r=int(ran(le))+1
if r=q or r=p or r=o or r=n or r=m or r=l or r=k or r=j or r=i or r=h or r=g or r=f or r=e or r=d or r=c or r=b or r=a goto 18
text (r*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,18,1)
if le=18 goto fin
19 ct=ct+1
s=int(ran(le))+1
if s=r or s=q or s=p or s=o or s=n or s=m or s=l or s=k or s=j or s=i or s=h or s=g or s=f or s=e or s=d or s=c or s=b or s=a goto 19
text (s*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,19,1)
if le=19 goto fin
20 ct=ct+1
t=int(ran(le))+1
if t=s or t=r or t=q or t=p or t=o or t=n or t=m or t=l or t=k or t=j or t=i or t=h or t=g or t=f or t=e or t=d or t=c or t=b or t=a goto 20
text (t*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,20,1)
if le=20 goto fin
21 ct=ct+1
u=int(ran(le))+1
if u=t or u=s or u=r or u=q or u=p or u=o or u=n or u=m or u=l or u=k or u=j or u=i or u=h or u=g or u=f or u=e or u=d or u=c or u=b or u=a goto 21
text (u*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,21,1)
if le=21 goto fin
22 ct=ct+1
v=int(ran(le))+1
if v=u or v=t or v=s or v=r or v=q or v=p or v=o or v=n or v=m or v=l or v=k or v=j or v=i or v=h or v=g or v=f or v=e or v=d or v=c or v=b or v=a goto 22
text (v*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,22,1)
if le=22 goto fin
23 ct=ct+1
w=int(ran(le))+1
if w=v or w=u or w=t or w=s or w=r or w=q or w=p or w=o or w=n or w=m or w=l or w=k or w=j or w=i or w=h or w=g or w=f or w=e or w=d or w=c or w=b or w=a goto 23
text (w*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,23,1)
if le=23 goto fin
24 ct=ct+1
x=int(ran(le))+1
if x=w or x=v or x=u or x=t or x=s or x=r or x=q or x=p or x=o or x=n or x=m or x=l or x=k or x=j or x=i or x=h or x=g or x=f or x=e or x=d or x=c or x=b or x=a goto 24
text (x*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,24,1)
if le=24 goto fin
25 ct=ct+1
y=int(ran(le))+1
if y=x or y=w or y=v or y=u or y=t or y=s or y=r or y=q or y=p or y=o or y=n or y=m or y=l or y=k or y=j or y=i or y=h or y=g or y=f or y=e or y=d or y=c or y=b or y=a goto 25
text (y*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,25,1)
if le=25 goto fin
26 ct=ct+1
z=int(ran(le))+1
if z=y or z=x or z=w or z=v or z=u or z=t or z=s or z=r or z=q or z=p or z=o or z=n or z=m or z=l or z=k or z=j or z=i or z=h or z=g or z=f or z=e or z=d or z=c or z=b or z=a goto 26
text (z*ac)+(((26-le)/2)*ac)+ab,aa,mid$(a$,26,1)
label fin
text 240,260,str$(ct)+" loop counts."
inkey$
goto again
Have a Yahappy day.