Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function createInstance(className, classProperties)
- local newClass = Instance.new(className);
- if (not classProperties) then return newClass end;
- for propertyName, propertyValue in next, classProperties do
- newClass[propertyName] = propertyValue
- end
- return newClass;
- end
- local mainUI = createInstance("ScreenGui", {
- Name = "mainUI",
- Parent = game.CoreGui,
- ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- })
- local backFrame = createInstance("Frame", {
- Name = "backFrame",
- Parent = mainUI,
- Position = UDim2.new(0.5, -187, 0.5, -65),
- Size = UDim2.new(0, 375, 0, 28),
- Active = true,
- BackgroundColor = BrickColor.new("Black"),
- BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471),
- BorderSizePixel = 0
- })
- local mainlogin = createInstance("Frame", {
- Name = "mainlogin",
- Parent = backFrame,
- Position = UDim2.new(0, 0, 1, 0),
- Size = UDim2.new(0, 375, 0, 72),
- BackgroundColor = BrickColor.new("Black metallic"),
- BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647),
- BorderSizePixel = 0
- })
- local token = createInstance("TextBox", {
- Name = "token",
- Parent = mainlogin,
- Position = UDim2.new(0.5, -181, 0.333333343, -11),
- Size = UDim2.new(0, 362, 0, 23),
- BackgroundColor = BrickColor.new("Black"),
- BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471),
- BorderSizePixel = 0,
- Font = Enum.Font.SourceSans,
- FontSize = Enum.FontSize.Size18,
- Text = "",
- TextColor = BrickColor.new("Institutional white"),
- TextColor3 = Color3.new(1, 1, 1),
- TextSize = 15,
- TextWrap = true,
- TextWrapped = true,
- PlaceholderColor3 = Color3.new(1, 1, 1),
- PlaceholderText = "enter token here.."
- })
- local check = createInstance("TextButton", {
- Name = "check",
- Parent = mainlogin,
- Position = UDim2.new(0.0160000026, 0, 0.555555522, 0),
- Size = UDim2.new(0, 125, 0, 23),
- BackgroundColor = BrickColor.new("Black"),
- BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471),
- BorderSizePixel = 0,
- Font = Enum.Font.SourceSans,
- FontSize = Enum.FontSize.Size14,
- Text = "Check",
- TextColor = BrickColor.new("Institutional white"),
- TextColor3 = Color3.new(1, 1, 1),
- TextSize = 14,
- TextStrokeColor3 = Color3.new(1, 1, 1)
- })
- local rememberCheckBox = createInstance("ImageButton", {
- Name = "rememberCheckBox",
- Parent = mainlogin,
- Position = UDim2.new(0, 345, 0, 40),
- Size = UDim2.new(0, 23, 0, 23),
- BackgroundColor = BrickColor.new("Institutional white"),
- BackgroundColor3 = Color3.new(0.972549, 0.972549, 0.972549),
- BackgroundTransparency = 1,
- BorderSizePixel = 0,
- Image = "http://www.roblox.com/asset/?id=4530318781",
- ImageColor3 = Color3.new(0.368627, 0.368627, 0.368627),
- ScaleType = Enum.ScaleType.Slice
- })
- local innerCheckBox = createInstance("ImageLabel", {
- Name = "innerCheckBox",
- Parent = rememberCheckBox,
- Position = UDim2.new(0.5, 0, 0.5, 0),
- Visible = false,
- Size = UDim2.new(1, -6, 1, -6),
- AnchorPoint = Vector2.new(0.5, 0.5),
- BackgroundColor = BrickColor.new("Institutional white"),
- BackgroundColor3 = Color3.new(0.972549, 0.972549, 0.972549),
- BackgroundTransparency = 1,
- BorderSizePixel = 0,
- Image = "http://www.roblox.com/asset/?id=4530318781",
- ImageColor3 = Color3.new(0.803922, 0.211765, 0.247059),
- ScaleType = Enum.ScaleType.Slice
- })
- local rememberTextLabel = createInstance("TextLabel", {
- Name = "rememberTextLabel",
- Parent = rememberCheckBox,
- Position = UDim2.new(0, -108, 0, 1),
- Size = UDim2.new(0, 100, 0, 20),
- BackgroundColor = BrickColor.new("Institutional white"),
- BackgroundColor3 = Color3.new(0.972549, 0.972549, 0.972549),
- BackgroundTransparency = 1,
- BorderSizePixel = 0,
- Font = Enum.Font.SourceSansLight,
- FontSize = Enum.FontSize.Size18,
- Text = "Remember Key",
- TextColor = BrickColor.new("Institutional white"),
- TextColor3 = Color3.new(0.972549, 0.972549, 0.972549),
- TextSize = 16
- })
- local nameTitle = createInstance("TextLabel", {
- Name = "name",
- Parent = backFrame,
- Size = UDim2.new(0, 375, 0, 28),
- BackgroundColor = BrickColor.new("Institutional white"),
- BackgroundColor3 = Color3.new(1, 1, 1),
- BackgroundTransparency = 1,
- Font = Enum.Font.SourceSansLight,
- FontSize = Enum.FontSize.Size18,
- Text = "LunariHub Authentication",
- TextColor = BrickColor.new("Institutional white"),
- TextColor3 = Color3.new(1, 1, 1),
- TextSize = 18
- })
- local fingerPrint = createInstance("ImageLabel", {
- Name = "fingerPrint",
- Parent = backFrame,
- Size = UDim2.new(0, 28, 0, 28),
- BackgroundTransparency = 1,
- Image = "rbxassetid://3944703587",
- ImageColor3 = Color3.new(0.701961, 0.701961, 0.701961),
- ScaleType = Enum.ScaleType.Fit
- })
- local config = {};
- local http_service = game:GetService("HttpService");
- pcall(function()
- config = http_service:JSONDecode(readfile("SCRIPT_PROTECT.json"));
- end);
- if config["rememberKey"] and ( config["rememberKey"] == "true" or config["rememberKey"] == true ) then
- if config["key"] then
- token.Text = tostring(config["key"]);
- end;
- innerCheckBox.Visible = true;
- end;
- check.MouseButton1Click:Connect(function()
- if (config["rememberKey"]) then
- config["key"] = tostring(token.Text);
- if (writefile) then
- writefile("SCRIPT_PROTECT.json", http_service:JSONEncode(config));
- else warn("writefile doesnt exist")
- end
- end
- end);
- rememberCheckBox.MouseButton1Click:Connect(function()
- innerCheckBox.Visible = not innerCheckBox.Visible;
- config["rememberKey"] = tostring(innerCheckBox.Visible);
- config["key"] = tostring(token.Text);
- if (writefile) then
- writefile("SCRIPT_PROTECT.json", http_service:JSONEncode(config));
- else warn("writefile doesnt exist")
- end
- end);
- return {
- ["GUI"] = mainUI,
- ["TEXTBOX"] = token,
- ["BUTTON"] = check
- }
Add Comment
Please, Sign In to add comment