Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = pc --password = passwordchange
- x = 50 --this is for the colors at the end.
- y = 100 --this too
- z = 255 --and also this
- n = tpt.get_name() --this gets the user's name
- tpt.message_box("The default password is: Password") --tells you the default password
- s = tpt.input("Authentication required.","Please authenticate that you are "..n,"Password") --asks it
- if s == p then --if s is equal to the input password, then
- c = tpt.input("Change password?","Y/N") --it asks to change password
- end
- if s == "Password" and pc == nil then--if it is the default pass and pc = nil then let you pass *
- pc = tpt.input("Password Change.","Enter new password here:") --prompts you for a new pass
- end
- if s ~= p then--if the password is incorrect, display a message saying so.
- tpt.message_box("Authentication failed.", "Your authentication is incorrect. Try again.")
- os.exit() --then quit when you press OK
- end
- if c == "Y" then --checks if you answered Y to the password change.
- pc = tpt.input("Password Change.","Enter new password here:") --if so it asks for a new password
- end
- function Text()
- tpt.fillrect(237, 188, tpt.textwidth("Welcome, "..n.." to The Powder Toy!") + 5, 13, x, x, x) --making back
- tpt.drawtext(240, 191, "Welcome, "..n.." to The Powder Toy!", y, y, z) --adding text
- x = x - .1 --decay rates
- y = y - .2 --more
- z = z - .4 --more
- if z == 0 then--delete the box when all color is gone, otherwise it would hide part of the screen.
- tpt.unregister_step(Text) --same thing going on
- end
- end
- tpt.register_step(Text) --run the function "Text" every frame
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement