sbfashfbsajfhsbafbas

Lunari UI

Jun 3rd, 2020
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.61 KB | None | 0 0
  1.  
  2. local function createInstance(className, classProperties)
  3. local newClass = Instance.new(className);
  4. if (not classProperties) then return newClass end;
  5. for propertyName, propertyValue in next, classProperties do
  6. newClass[propertyName] = propertyValue
  7. end
  8. return newClass;
  9. end
  10.  
  11. local mainUI = createInstance("ScreenGui", {
  12. Name = "mainUI",
  13. Parent = game.CoreGui,
  14. ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  15. })
  16. local backFrame = createInstance("Frame", {
  17. Name = "backFrame",
  18. Parent = mainUI,
  19. Position = UDim2.new(0.5, -187, 0.5, -65),
  20. Size = UDim2.new(0, 375, 0, 28),
  21. Active = true,
  22. BackgroundColor = BrickColor.new("Black"),
  23. BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471),
  24. BorderSizePixel = 0
  25. })
  26. local mainlogin = createInstance("Frame", {
  27. Name = "mainlogin",
  28. Parent = backFrame,
  29. Position = UDim2.new(0, 0, 1, 0),
  30. Size = UDim2.new(0, 375, 0, 72),
  31. BackgroundColor = BrickColor.new("Black metallic"),
  32. BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647),
  33. BorderSizePixel = 0
  34. })
  35. local token = createInstance("TextBox", {
  36. Name = "token",
  37. Parent = mainlogin,
  38. Position = UDim2.new(0.5, -181, 0.333333343, -11),
  39. Size = UDim2.new(0, 362, 0, 23),
  40. BackgroundColor = BrickColor.new("Black"),
  41. BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471),
  42. BorderSizePixel = 0,
  43. Font = Enum.Font.SourceSans,
  44. FontSize = Enum.FontSize.Size18,
  45. Text = "",
  46. TextColor = BrickColor.new("Institutional white"),
  47. TextColor3 = Color3.new(1, 1, 1),
  48. TextSize = 15,
  49. TextWrap = true,
  50. TextWrapped = true,
  51. PlaceholderColor3 = Color3.new(1, 1, 1),
  52. PlaceholderText = "enter token here.."
  53. })
  54. local check = createInstance("TextButton", {
  55. Name = "check",
  56. Parent = mainlogin,
  57. Position = UDim2.new(0.0160000026, 0, 0.555555522, 0),
  58. Size = UDim2.new(0, 125, 0, 23),
  59. BackgroundColor = BrickColor.new("Black"),
  60. BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471),
  61. BorderSizePixel = 0,
  62. Font = Enum.Font.SourceSans,
  63. FontSize = Enum.FontSize.Size14,
  64. Text = "Check",
  65. TextColor = BrickColor.new("Institutional white"),
  66. TextColor3 = Color3.new(1, 1, 1),
  67. TextSize = 14,
  68. TextStrokeColor3 = Color3.new(1, 1, 1)
  69. })
  70. local rememberCheckBox = createInstance("ImageButton", {
  71. Name = "rememberCheckBox",
  72. Parent = mainlogin,
  73. Position = UDim2.new(0, 345, 0, 40),
  74. Size = UDim2.new(0, 23, 0, 23),
  75. BackgroundColor = BrickColor.new("Institutional white"),
  76. BackgroundColor3 = Color3.new(0.972549, 0.972549, 0.972549),
  77. BackgroundTransparency = 1,
  78. BorderSizePixel = 0,
  79. Image = "http://www.roblox.com/asset/?id=4530318781",
  80. ImageColor3 = Color3.new(0.368627, 0.368627, 0.368627),
  81. ScaleType = Enum.ScaleType.Slice
  82. })
  83. local innerCheckBox = createInstance("ImageLabel", {
  84. Name = "innerCheckBox",
  85. Parent = rememberCheckBox,
  86. Position = UDim2.new(0.5, 0, 0.5, 0),
  87. Visible = false,
  88. Size = UDim2.new(1, -6, 1, -6),
  89. AnchorPoint = Vector2.new(0.5, 0.5),
  90. BackgroundColor = BrickColor.new("Institutional white"),
  91. BackgroundColor3 = Color3.new(0.972549, 0.972549, 0.972549),
  92. BackgroundTransparency = 1,
  93. BorderSizePixel = 0,
  94. Image = "http://www.roblox.com/asset/?id=4530318781",
  95. ImageColor3 = Color3.new(0.803922, 0.211765, 0.247059),
  96. ScaleType = Enum.ScaleType.Slice
  97. })
  98. local rememberTextLabel = createInstance("TextLabel", {
  99. Name = "rememberTextLabel",
  100. Parent = rememberCheckBox,
  101. Position = UDim2.new(0, -108, 0, 1),
  102. Size = UDim2.new(0, 100, 0, 20),
  103. BackgroundColor = BrickColor.new("Institutional white"),
  104. BackgroundColor3 = Color3.new(0.972549, 0.972549, 0.972549),
  105. BackgroundTransparency = 1,
  106. BorderSizePixel = 0,
  107. Font = Enum.Font.SourceSansLight,
  108. FontSize = Enum.FontSize.Size18,
  109. Text = "Remember Key",
  110. TextColor = BrickColor.new("Institutional white"),
  111. TextColor3 = Color3.new(0.972549, 0.972549, 0.972549),
  112. TextSize = 16
  113. })
  114. local nameTitle = createInstance("TextLabel", {
  115. Name = "name",
  116. Parent = backFrame,
  117. Size = UDim2.new(0, 375, 0, 28),
  118. BackgroundColor = BrickColor.new("Institutional white"),
  119. BackgroundColor3 = Color3.new(1, 1, 1),
  120. BackgroundTransparency = 1,
  121. Font = Enum.Font.SourceSansLight,
  122. FontSize = Enum.FontSize.Size18,
  123. Text = "LunariHub Authentication",
  124. TextColor = BrickColor.new("Institutional white"),
  125. TextColor3 = Color3.new(1, 1, 1),
  126. TextSize = 18
  127. })
  128. local fingerPrint = createInstance("ImageLabel", {
  129. Name = "fingerPrint",
  130. Parent = backFrame,
  131. Size = UDim2.new(0, 28, 0, 28),
  132. BackgroundTransparency = 1,
  133. Image = "rbxassetid://3944703587",
  134. ImageColor3 = Color3.new(0.701961, 0.701961, 0.701961),
  135. ScaleType = Enum.ScaleType.Fit
  136. })
  137.  
  138. local config = {};
  139. local http_service = game:GetService("HttpService");
  140.  
  141. pcall(function()
  142. config = http_service:JSONDecode(readfile("SCRIPT_PROTECT.json"));
  143. end);
  144.  
  145. if config["rememberKey"] and ( config["rememberKey"] == "true" or config["rememberKey"] == true ) then
  146. if config["key"] then
  147. token.Text = tostring(config["key"]);
  148. end;
  149. innerCheckBox.Visible = true;
  150. end;
  151.  
  152. check.MouseButton1Click:Connect(function()
  153. if (config["rememberKey"]) then
  154. config["key"] = tostring(token.Text);
  155. if (writefile) then
  156. writefile("SCRIPT_PROTECT.json", http_service:JSONEncode(config));
  157. else warn("writefile doesnt exist")
  158. end
  159. end
  160. end);
  161.  
  162. rememberCheckBox.MouseButton1Click:Connect(function()
  163. innerCheckBox.Visible = not innerCheckBox.Visible;
  164. config["rememberKey"] = tostring(innerCheckBox.Visible);
  165. config["key"] = tostring(token.Text);
  166. if (writefile) then
  167. writefile("SCRIPT_PROTECT.json", http_service:JSONEncode(config));
  168. else warn("writefile doesnt exist")
  169. end
  170. end);
  171.  
  172. return {
  173. ["GUI"] = mainUI,
  174. ["TEXTBOX"] = token,
  175. ["BUTTON"] = check
  176. }
Add Comment
Please, Sign In to add comment