You can put it into a function to make it easier.
set text opaque
` Passwords need to be all highercase (or lowercase). "A" and "a" are two different letters
Password$="PIZZA"
` Make a$ = the string returned from the GetPassword function
a$=GetPassword()
` Check if user input is anything but the password
if a$<>Password$
text 0,20,"Wrong!"
wait key
end
endif
` Password right... program goes on.
text 0,20,"Correct!"
wait key
end
function GetPassword()
do
text 0,0,"User Input: "+Star$+" "
a$=inkey$()
` Check if a key was pressed
if a$<>""
` Loop till the user lets go of the key
repeat
b$=inkey$()
until b$=""
endif
` Backspace
if a$=chr$(8)
Pass$ = left$(Pass$,len(Pass$)-1)
a$=""
endif
if a$=chr$(13) then exit
if a$<>"" then Pass$ = Pass$ + a$
` Create the *'s
Star$=""
for t=1 to len(Pass$)
Star$=Star$+"*"
next t
loop
` Make password uppercase (so it's not case sensitive)
Pass$=upper$(Pass$)
` Return Pass$ so it is seen on the outside of the function
endfunction Pass$