Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- variables
- local frame = script.Parent.Frame
- local password = frame.Pass
- local username = frame.User
- local main = frame.Main
- local eframe = frame.EffectFrame
- local player = script.Parent.Parent.Parent
- local accountuser = game.ReplicatedStorage.PlayerAccount.UserUsername
- local accountpass = game.ReplicatedStorage.PlayerAccount.UserPassword
- local signup = frame.SignUp
- local usersign = signup.UserSignUp
- local passsign = signup.PassSignUp
- local UserInputService = game:GetService("UserInputService")
- effectNum = 50
- waitTime = 0.5
- usercheck = false
- passcheck = false
- newuser = game.ReplicatedStorage.PlayerAccount.NewUser
- -- login
- function newuserlogin()
- if accountpass.Value == "BLANK" and accountuser.Value == "BLANK" then
- password.Visible = false
- username.Visible = false
- signup.Visible = true
- newuser.Value = true
- end
- accountuser.Value = usersign.Text
- accountpass.Value = passsign.Text
- end
- -- input functions
- function enterPressed(input,gameProcessed)
- -- input.KeyCode == Enum.KeyCode.Return
- if password.Text == accountpass.Value and username.Text == accountuser.Value and input.KeyCode == Enum.KeyCode.Return then
- print("A")
- end
- local userlen = string.len(usersign.Text)
- local passlen = string.len(passsign.Text)
- if userlen <= 3 and input.KeyCode == Enum.KeyCode.Return then
- usersign.Text = "Username must be longer than 3 characters."
- wait(2)
- usersign.Text = "Enter Username Here"
- elseif userlen >= 25 and input.KeyCode == Enum.KeyCode.Return then
- usersign.Text = "Username must be shorter than 25 characters."
- wait(2)
- usersign.Text = "Enter Username Here"
- end
- if passlen <= 3 and input.KeyCode == Enum.KeyCode.Return then
- passsign.Text = "Password must be longer than 3 characters."
- wait(2)
- passsign.Text = "Enter Password Here"
- elseif passlen >= 25 and input.KeyCode == Enum.KeyCode.Return then
- passsign.Text = "Password must be shorter than 25 characters."
- wait(2)
- passsign.Text = "Enter Password Here"
- end
- if userlen >= 3 and userlen <= 25 and usersign.Text == "Enter Username Here" == false and passlen >= 3 and passlen <= 25 and passsign.Text == "Enter Password Here" == false and input.KeyCode == Enum.KeyCode.Return then
- signup.Visible = false
- password.Visible = true
- username.Visible = true
- newuser.Value = false
- end
- if gameProcessed then
- print("\tThis input began on top of a GuiObject!")
- else
- print("\tThis input did not begin on top of a GuiObject!")
- end
- end
- UserInputService.InputBegan:connect(enterPressed)
- -- background effects
- function createEffect()
- local effect = Instance.new("Frame")
- effect.Name = "effect"
- effect.Parent = eframe
- effect.Size = UDim2.new(0, 20, 0, 20)
- effect.BackgroundColor3 = Color3.new(math.random(0, 255)/255, math.random(0, 255)/255, math.random(0, 255)/255)
- effect.BorderSizePixel = 0
- effect.BackgroundTransparency = math.random()
- effect.Position = UDim2.new(0, math.random(0, 1100), 0, math.random(0, 550))
- effect:TweenPosition(UDim2.new(0, math.random(1100), 0, math.random(550)), "Out", "Linear", 5, false)
- effect.Rotation = spawn(function ()
- while wait(0.1) do
- effect.Rotation = effect.Rotation + 10
- end
- end)
- return effect
- end
- -- functions
- spawn(function ()
- repeat wait(0.1)
- newuserlogin()
- until newuser.Value == false
- end)
- spawn (function ()
- while true do wait(0.1)
- for i = 1,effectNum do
- game:GetService("Debris"):AddItem(createEffect(),effectNum*waitTime)
- wait(waitTime)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement