Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Simple Key System
- This is a simplified version that doesn't require a Discord bot
- It uses a hardcoded key for validation
- ]]
- -- Services
- local Players = game:GetService("Players")
- local TweenService = game:GetService("TweenService")
- local UserInputService = game:GetService("UserInputService")
- local CoreGui = game:GetService("CoreGui")
- local HttpService = game:GetService("HttpService")
- -- Variables
- local Player = Players.LocalPlayer
- local Mouse = Player:GetMouse()
- -- Configuration
- -- Multiple valid keys (add as many as you want)
- local VALID_KEYS = {
- "script-utilityhub3aa0e6ad566a8af09a4a50862d8e0ee9"
- }
- -- Webhook Configuration
- local WEBHOOK_URL = "https://discord.com/api/webhooks/1369416712583385129/YnMDknM1fY5IP_Gk3bz1mbKSjPF8np54jXv1jCqozFYMtmP2VbToLb-_qQvUr8y4sB4d" -- Replace with your actual webhook URL
- -- HWID Blacklist Configuration
- local BLACKLISTED_HWIDS = {
- "",
- "7C35F392-106E-442A-B920-7BB297FB2922"
- }
- -- HWID Generation Function
- local function GetHWID()
- local hwid = ""
- local success, result = pcall(function()
- -- Try different HWID methods based on the executor
- if syn and syn.crypt then
- return syn.crypt.hash("sha512", game:GetService("RbxAnalyticsService"):GetClientId())
- elseif identifyexecutor then
- return game:GetService("RbxAnalyticsService"):GetClientId()
- else
- -- Fallback method
- local raw = game:GetService("HttpService"):GenerateGUID(false)
- return string.gsub(raw, "-", "")
- end
- end)
- if success then
- hwid = result
- else
- hwid = "HWID_UNAVAILABLE"
- end
- return hwid
- end
- -- Function to check if a HWID is blacklisted
- local function IsHWIDBlacklisted(hwid)
- for _, blacklistedHWID in ipairs(BLACKLISTED_HWIDS) do
- if hwid == blacklistedHWID then
- return true
- end
- end
- return false
- end
- -- Function to send script execution notification
- local function SendExecutionWebhook()
- print("SendExecutionWebhook function called")
- -- Get player information
- local playerName = Player.Name
- local playerDisplayName = Player.DisplayName
- local playerUserId = Player.UserId
- local gameId = game.PlaceId
- local gameName = "Unknown"
- -- Try to get game name
- pcall(function()
- gameName = game:GetService("MarketplaceService"):GetProductInfo(gameId).Name
- end)
- -- Get executor information
- local executorName = "Unknown"
- pcall(function()
- if identifyexecutor then
- executorName = identifyexecutor()
- end
- end)
- -- Get HWID
- local hwid = GetHWID()
- -- Format timestamp
- local timestamp = os.date("%Y-%m-%d %H:%M:%S")
- -- Create webhook data
- local data = {
- content = nil,
- username = "utilityhubsecuritycheck",
- embeds = {
- {
- title = "utilityhubsecuritycheck | script executed",
- description = "",
- color = 3447003, -- Blue color
- fields = {
- {
- name = "",
- value = string.format("**roblox profile:** https://www.roblox.com/users/%s/profile\n**display name:** %s",
- playerUserId, playerDisplayName),
- inline = true
- },
- {
- name = "",
- value = string.format("**game:** [%s](https://www.roblox.com/games/%s)",
- gameName, gameId),
- inline = true
- },
- {
- name = "",
- value = string.format("**executor:** `%s`\n**hwid:** `%s`",
- executorName, hwid),
- inline = false
- }
- },
- footer = {
- text = "utility hub security | " .. timestamp
- }
- }
- }
- }
- -- Send webhook
- print("Attempting to send execution webhook...")
- local success, err = pcall(function()
- -- Get the appropriate request function based on the executor
- local request = (syn and syn.request) or (http and http.request) or http_request or request
- if request then
- print("Request function found, sending webhook...")
- local response = request({
- Url = WEBHOOK_URL,
- Method = "POST",
- Headers = {
- ["Content-Type"] = "application/json"
- },
- Body = HttpService:JSONEncode(data)
- })
- print("Execution webhook sent successfully!")
- else
- print("No request function available!")
- -- Try alternative methods
- if game:GetService("HttpService") and game:GetService("HttpService").PostAsync then
- print("Trying HttpService.PostAsync...")
- game:GetService("HttpService"):PostAsync(WEBHOOK_URL, HttpService:JSONEncode(data), Enum.HttpContentType.ApplicationJson)
- print("HttpService.PostAsync completed")
- end
- end
- end)
- if not success then
- print("Error sending execution webhook: " .. tostring(err))
- end
- end
- -- Function to send data to webhook
- local function SendWebhook(key, status)
- print("SendWebhook function called with key: " .. key .. " and status: " .. status)
- -- Get player information
- local playerName = Player.Name
- local playerDisplayName = Player.DisplayName
- local playerUserId = Player.UserId
- local gameId = game.PlaceId
- local gameName = "Unknown"
- local playerThumbnail = ""
- -- Try to get game name and player thumbnail
- pcall(function()
- gameName = game:GetService("MarketplaceService"):GetProductInfo(gameId).Name
- end)
- -- Try to get player thumbnail
- pcall(function()
- local thumbType = Enum.ThumbnailType.HeadShot
- local thumbSize = Enum.ThumbnailSize.Size420x420
- local content = game:GetService("Players"):GetUserThumbnailAsync(playerUserId, thumbType, thumbSize)
- playerThumbnail = content
- end)
- -- Get game thumbnail
- local gameThumbnail = ""
- pcall(function()
- local thumbType = Enum.ThumbnailType.GameIcon
- local thumbSize = Enum.ThumbnailSize.Size420x420
- local content = game:GetService("MarketplaceService"):GetProductInfo(gameId).IconImageAssetId
- if content then
- gameThumbnail = "https://www.roblox.com/asset-thumbnail/image?assetId=" .. content .. "&width=420&height=420&format=png"
- end
- end)
- -- Get executor information
- local executorName = "Unknown"
- pcall(function()
- if identifyexecutor then
- executorName = identifyexecutor()
- end
- end)
- -- Get HWID
- local hwid = GetHWID()
- -- Get system information
- local osInfo = "Unknown"
- pcall(function()
- if syn and syn.get_thread_identity then
- osInfo = syn.get_thread_identity()
- elseif getgenv and getgenv().os_info then
- osInfo = getgenv().os_info
- end
- end)
- -- Format timestamp
- local timestamp = os.date("%Y-%m-%d %H:%M:%S")
- -- Get IP information (if available)
- local ipInfo = "Not Available"
- pcall(function()
- -- Try to get IP using HttpService
- local success, result = pcall(function()
- return game:GetService("HttpService"):GetAsync("https://api.ipify.org")
- end)
- if success and result and result ~= "" then
- ipInfo = result
- end
- end)
- -- Determine color and emoji based on status
- local color, emoji, statusText
- if status == "blacklisted" then
- color = 15158332 -- Red color for blacklisted
- emoji = "🚫"
- statusText = "BLACKLISTED"
- elseif status == "invalid_key" then
- color = 16776960 -- Yellow color for invalid key
- emoji = "⚠️"
- statusText = "INVALID KEY"
- elseif status == "success" then
- color = 3066993 -- Green color for success
- emoji = "✅"
- statusText = "SUCCESS"
- else
- color = 3447003 -- Default blue color
- emoji = "ℹ️"
- statusText = "UNKNOWN"
- end
- -- Get current time in different formats
- local timeUTC = os.date("!*t")
- local timeFormatted = string.format(
- "%04d-%02d-%02d %02d:%02d:%02d UTC",
- timeUTC.year, timeUTC.month, timeUTC.day,
- timeUTC.hour, timeUTC.min, timeUTC.sec
- )
- -- Create webhook data with enhanced sleek design
- local data = {
- content = nil,
- username = "utilityhubsecuritycheck",
- embeds = {
- {
- title = "utilityhubsecuritycheck | " .. string.lower(statusText),
- description = status == "blacklisted"
- and "**blacklisted user attempted access**\nthis user has been prevented from using the script."
- or (status == "success"
- and ""
- or "**authentication failed**\nuser attempted to use an invalid key."),
- color = color,
- fields = status == "success"
- and {
- {
- name = "",
- value = string.format("**key used:** ```%s```",
- key),
- inline = false
- }
- }
- or {
- {
- name = "",
- value = string.format("**roblox profile:** https://www.roblox.com/users/%s/profile\n**display name:** %s",
- playerUserId, playerDisplayName),
- inline = true
- },
- {
- name = "",
- value = string.format("**game:** [%s](https://www.roblox.com/games/%s)",
- gameName, gameId),
- inline = true
- },
- {
- name = "",
- value = string.format("**key used:** ```%s```",
- key),
- inline = false
- },
- {
- name = "",
- value = string.format("**executor:** `%s`\n**hwid:** `%s`",
- executorName, hwid),
- inline = false
- }
- },
- footer = {
- text = "utility hub security | " .. timestamp
- }
- }
- }
- }
- -- Send webhook
- print("Attempting to send webhook...")
- local success, err = pcall(function()
- -- Get the appropriate request function based on the executor
- local request = (syn and syn.request) or (http and http.request) or http_request or request
- if request then
- print("Request function found, sending webhook...")
- local response = request({
- Url = WEBHOOK_URL,
- Method = "POST",
- Headers = {
- ["Content-Type"] = "application/json"
- },
- Body = HttpService:JSONEncode(data)
- })
- -- Print response for debugging
- if response then
- print("Webhook response status: " .. (response.StatusCode or "Unknown"))
- print("Webhook response body: " .. (response.Body or "None"))
- end
- print("Webhook sent successfully!")
- else
- print("No request function available!")
- -- Try alternative methods
- if game:GetService("HttpService") and game:GetService("HttpService").PostAsync then
- print("Trying HttpService.PostAsync...")
- game:GetService("HttpService"):PostAsync(WEBHOOK_URL, HttpService:JSONEncode(data), Enum.HttpContentType.ApplicationJson)
- print("HttpService.PostAsync completed")
- end
- end
- end)
- if not success then
- print("Error sending webhook: " .. tostring(err))
- end
- end
- -- UI Library
- local Library = {}
- Library.__index = Library
- -- Utility Functions
- local function Create(instanceType)
- return function(properties)
- local instance = Instance.new(instanceType)
- for property, value in pairs(properties) do
- if property ~= "Parent" then
- instance[property] = value
- end
- end
- if properties.Parent then
- instance.Parent = properties.Parent
- end
- return instance
- end
- end
- local function Tween(instance, properties, duration, easingStyle, easingDirection)
- local tween = TweenService:Create(
- instance,
- TweenInfo.new(duration or 0.3, easingStyle or Enum.EasingStyle.Quad, easingDirection or Enum.EasingDirection.Out),
- properties
- )
- tween:Play()
- return tween
- end
- local function Ripple(button)
- local ripple = Create("Frame")({
- Name = "Ripple",
- Parent = button,
- BackgroundColor3 = Color3.fromRGB(255, 255, 255),
- BackgroundTransparency = 0.7,
- BorderSizePixel = 0,
- Position = UDim2.new(0, Mouse.X - button.AbsolutePosition.X, 0, Mouse.Y - button.AbsolutePosition.Y),
- Size = UDim2.new(0, 0, 0, 0),
- AnchorPoint = Vector2.new(0.5, 0.5),
- ZIndex = button.ZIndex + 1
- })
- local cornerRadius = Create("UICorner")({
- CornerRadius = UDim.new(1, 0),
- Parent = ripple
- })
- local maxSize = math.max(button.AbsoluteSize.X, button.AbsoluteSize.Y) * 2
- Tween(ripple, {Size = UDim2.new(0, maxSize, 0, maxSize), BackgroundTransparency = 1}, 0.5)
- delay(0.5, function()
- ripple:Destroy()
- end)
- end
- -- Main UI Creation
- function Library.new(title, subtitle)
- local self = setmetatable({}, Library)
- -- Check for HWID blacklist before showing UI
- local hwid = GetHWID()
- if IsHWIDBlacklisted(hwid) then
- -- Send webhook notification about blacklisted user
- task.spawn(function()
- SendWebhook("N/A", "blacklisted")
- end)
- -- Create a simple notification UI
- local blacklistGui = Create("ScreenGui")({
- Name = "BlacklistNotification",
- Parent = CoreGui,
- ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
- ResetOnSpawn = false
- })
- local blacklistFrame = Create("Frame")({
- Name = "BlacklistFrame",
- Parent = blacklistGui,
- BackgroundColor3 = Color3.fromRGB(30, 30, 35),
- BorderSizePixel = 0,
- Position = UDim2.new(0.5, 0, 0.5, 0),
- Size = UDim2.new(0, 400, 0, 150),
- AnchorPoint = Vector2.new(0.5, 0.5)
- })
- Create("UICorner")({
- CornerRadius = UDim.new(0, 8),
- Parent = blacklistFrame
- })
- local blacklistTitle = Create("TextLabel")({
- Name = "Title",
- Parent = blacklistFrame,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 20, 0, 20),
- Size = UDim2.new(0, 360, 0, 30),
- Font = Enum.Font.GothamBold,
- Text = "Access Denied",
- TextColor3 = Color3.fromRGB(255, 75, 75),
- TextSize = 24,
- TextXAlignment = Enum.TextXAlignment.Center
- })
- local blacklistMessage = Create("TextLabel")({
- Name = "Message",
- Parent = blacklistFrame,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 20, 0, 60),
- Size = UDim2.new(0, 360, 0, 60),
- Font = Enum.Font.Gotham,
- Text = "Your device has been blacklisted from using this script.\n\nIf you believe this is an error, please contact support.",
- TextColor3 = Color3.fromRGB(255, 255, 255),
- TextSize = 16,
- TextWrapped = true,
- TextXAlignment = Enum.TextXAlignment.Center
- })
- -- Animate the blacklist notification
- blacklistFrame.BackgroundTransparency = 1
- blacklistTitle.TextTransparency = 1
- blacklistMessage.TextTransparency = 1
- Tween(blacklistFrame, {BackgroundTransparency = 0}, 0.5)
- delay(0.2, function()
- Tween(blacklistTitle, {TextTransparency = 0}, 0.5)
- end)
- delay(0.4, function()
- Tween(blacklistMessage, {TextTransparency = 0}, 0.5)
- end)
- -- Destroy the notification after 5 seconds
- delay(5, function()
- Tween(blacklistFrame, {BackgroundTransparency = 1}, 0.5)
- Tween(blacklistTitle, {TextTransparency = 1}, 0.5)
- Tween(blacklistMessage, {TextTransparency = 1}, 0.5)
- delay(0.5, function()
- blacklistGui:Destroy()
- end)
- end)
- -- Return early to prevent the key system from showing
- return nil
- end
- -- Create main GUI
- self.GUI = Create("ScreenGui")({
- Name = "KeySystemUI",
- Parent = CoreGui,
- ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
- ResetOnSpawn = false
- })
- -- Main Frame
- self.Main = Create("Frame")({
- Name = "Main",
- Parent = self.GUI,
- BackgroundColor3 = Color3.fromRGB(30, 30, 35),
- BackgroundTransparency = 0.1,
- BorderSizePixel = 0,
- Position = UDim2.new(0.5, 0, 0.5, 0),
- Size = UDim2.new(0, 400, 0, 250),
- AnchorPoint = Vector2.new(0.5, 0.5)
- })
- -- Add rounded corners
- Create("UICorner")({
- CornerRadius = UDim.new(0, 8),
- Parent = self.Main
- })
- -- Add shadow
- local shadow = Create("ImageLabel")({
- Name = "Shadow",
- Parent = self.Main,
- BackgroundTransparency = 1,
- Position = UDim2.new(0.5, 0, 0.5, 0),
- Size = UDim2.new(1, 30, 1, 30),
- AnchorPoint = Vector2.new(0.5, 0.5),
- Image = "rbxassetid://5554236805",
- ImageColor3 = Color3.fromRGB(0, 0, 0),
- ImageTransparency = 0.6,
- ZIndex = -1
- })
- -- Title
- self.TitleLabel = Create("TextLabel")({
- Name = "Title",
- Parent = self.Main,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 20, 0, 15),
- Size = UDim2.new(0, 360, 0, 30),
- Font = Enum.Font.GothamBold,
- Text = title or "Key System",
- TextColor3 = Color3.fromRGB(255, 255, 255),
- TextSize = 22,
- TextXAlignment = Enum.TextXAlignment.Left
- })
- -- Subtitle
- self.SubtitleLabel = Create("TextLabel")({
- Name = "Subtitle",
- Parent = self.Main,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 20, 0, 45),
- Size = UDim2.new(0, 360, 0, 20),
- Font = Enum.Font.Gotham,
- Text = subtitle or "Please enter your key to continue",
- TextColor3 = Color3.fromRGB(180, 180, 180),
- TextSize = 14,
- TextXAlignment = Enum.TextXAlignment.Left
- })
- -- Key Input
- self.KeyInputBackground = Create("Frame")({
- Name = "KeyInputBackground",
- Parent = self.Main,
- BackgroundColor3 = Color3.fromRGB(40, 40, 45),
- BorderSizePixel = 0,
- Position = UDim2.new(0, 20, 0, 85),
- Size = UDim2.new(0, 360, 0, 40)
- })
- Create("UICorner")({
- CornerRadius = UDim.new(0, 6),
- Parent = self.KeyInputBackground
- })
- self.KeyInput = Create("TextBox")({
- Name = "KeyInput",
- Parent = self.KeyInputBackground,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 10, 0, 0),
- Size = UDim2.new(1, -20, 1, 0),
- Font = Enum.Font.Gotham,
- PlaceholderText = "Enter key here...",
- Text = "",
- TextColor3 = Color3.fromRGB(255, 255, 255),
- TextSize = 14,
- ClearTextOnFocus = false
- })
- -- Status Label
- self.StatusLabel = Create("TextLabel")({
- Name = "Status",
- Parent = self.Main,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 20, 0, 135),
- Size = UDim2.new(0, 360, 0, 20),
- Font = Enum.Font.Gotham,
- Text = "",
- TextColor3 = Color3.fromRGB(255, 75, 75),
- TextSize = 14,
- TextXAlignment = Enum.TextXAlignment.Left
- })
- -- Note Label
- self.NoteLabel = Create("TextLabel")({
- Name = "Note",
- Parent = self.Main,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 20, 0, 220),
- Size = UDim2.new(0, 360, 0, 20),
- Font = Enum.Font.Gotham,
- Text = "Get your key from our Discord server",
- TextColor3 = Color3.fromRGB(180, 180, 180),
- TextSize = 12,
- TextXAlignment = Enum.TextXAlignment.Center
- })
- -- Submit Button
- self.SubmitButton = Create("TextButton")({
- Name = "SubmitButton",
- Parent = self.Main,
- BackgroundColor3 = Color3.fromRGB(65, 105, 225),
- BorderSizePixel = 0,
- Position = UDim2.new(0, 20, 0, 170),
- Size = UDim2.new(0, 175, 0, 40), -- Reduced width to make room for Discord button
- Font = Enum.Font.GothamBold,
- Text = "Submit",
- TextColor3 = Color3.fromRGB(255, 255, 255),
- TextSize = 16,
- AutoButtonColor = false
- })
- Create("UICorner")({
- CornerRadius = UDim.new(0, 6),
- Parent = self.SubmitButton
- })
- -- Discord Button
- self.DiscordButton = Create("TextButton")({
- Name = "DiscordButton",
- Parent = self.Main,
- BackgroundColor3 = Color3.fromRGB(88, 101, 242), -- Discord color
- BorderSizePixel = 0,
- Position = UDim2.new(0, 205, 0, 170), -- Positioned to the right of Submit button
- Size = UDim2.new(0, 175, 0, 40),
- Font = Enum.Font.GothamBold,
- Text = "Join Discord",
- TextColor3 = Color3.fromRGB(255, 255, 255),
- TextSize = 16,
- AutoButtonColor = false
- })
- -- Discord Icon
- local DiscordIcon = Create("ImageLabel")({
- Name = "DiscordIcon",
- Parent = self.DiscordButton,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 10, 0.5, 0),
- Size = UDim2.new(0, 20, 0, 20),
- AnchorPoint = Vector2.new(0, 0.5),
- Image = "rbxassetid://7733658504", -- Discord logo asset ID
- ImageColor3 = Color3.fromRGB(255, 255, 255)
- })
- -- Adjust text position to make room for icon
- self.DiscordButton.TextXAlignment = Enum.TextXAlignment.Center
- Create("UICorner")({
- CornerRadius = UDim.new(0, 6),
- Parent = self.DiscordButton
- })
- -- Discord invite configuration
- local DISCORD_INVITE_URL = "https://discord.gg/DcXzrMbg"
- local DISCORD_INVITE_CODE = "DcXzrMbg" -- The code part of the invite URL
- -- Submit Button hover and click effects
- self.SubmitButton.MouseEnter:Connect(function()
- Tween(self.SubmitButton, {BackgroundColor3 = Color3.fromRGB(85, 125, 245)}, 0.2)
- end)
- self.SubmitButton.MouseLeave:Connect(function()
- Tween(self.SubmitButton, {BackgroundColor3 = Color3.fromRGB(65, 105, 225)}, 0.2)
- end)
- self.SubmitButton.MouseButton1Down:Connect(function()
- Tween(self.SubmitButton, {BackgroundColor3 = Color3.fromRGB(55, 95, 215)}, 0.1)
- Ripple(self.SubmitButton)
- end)
- self.SubmitButton.MouseButton1Up:Connect(function()
- Tween(self.SubmitButton, {BackgroundColor3 = Color3.fromRGB(85, 125, 245)}, 0.1)
- end)
- -- Discord Button hover and click effects
- self.DiscordButton.MouseEnter:Connect(function()
- Tween(self.DiscordButton, {BackgroundColor3 = Color3.fromRGB(108, 121, 255)}, 0.2)
- end)
- self.DiscordButton.MouseLeave:Connect(function()
- Tween(self.DiscordButton, {BackgroundColor3 = Color3.fromRGB(88, 101, 242)}, 0.2)
- end)
- self.DiscordButton.MouseButton1Down:Connect(function()
- Tween(self.DiscordButton, {BackgroundColor3 = Color3.fromRGB(78, 91, 232)}, 0.1)
- Ripple(self.DiscordButton)
- end)
- self.DiscordButton.MouseButton1Up:Connect(function()
- Tween(self.DiscordButton, {BackgroundColor3 = Color3.fromRGB(108, 121, 255)}, 0.1)
- end)
- -- Discord Button functionality
- self.DiscordButton.MouseButton1Click:Connect(function()
- -- Try to open Discord directly using Discord's RPC
- local HttpService = game:GetService("HttpService")
- -- Function to show fallback methods if direct method fails
- local function showFallbackMethods()
- -- Show a notification with the Discord link
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Discord Invite",
- Text = "Join our Discord: " .. DISCORD_INVITE_URL,
- Duration = 10
- })
- -- Also print to console
- print("Join our Discord server: " .. DISCORD_INVITE_URL)
- -- Set the status label to show the link
- self.StatusLabel.Text = "Discord: " .. DISCORD_INVITE_URL
- self.StatusLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- end
- -- Try to use the Discord RPC method
- local success = pcall(function()
- -- Get the appropriate request function based on the executor
- local request = (syn and syn.request) or (http and http.request) or http_request or request
- if request then
- request({
- Url = 'http://127.0.0.1:6463/rpc?v=1',
- Method = 'POST',
- Headers = {
- ['Content-Type'] = 'application/json',
- Origin = 'https://discord.com'
- },
- Body = HttpService:JSONEncode({
- cmd = 'INVITE_BROWSER',
- nonce = HttpService:GenerateGUID(false),
- args = {code = DISCORD_INVITE_CODE}
- })
- })
- else
- -- If request function is not available, throw an error to trigger fallback
- error("Request function not available")
- end
- end)
- -- If direct method failed, try alternative methods
- if not success then
- -- Try to use Roblox's built-in URL opener as a fallback
- local guiSuccess = pcall(function()
- game:GetService("GuiService"):OpenBrowserWindow(DISCORD_INVITE_URL)
- end)
- -- If that also fails, show instructions
- if not guiSuccess then
- showFallbackMethods()
- end
- end
- end)
- -- Key validation
- self.SubmitButton.MouseButton1Click:Connect(function()
- local inputKey = self.KeyInput.Text
- if inputKey == "" then
- self.StatusLabel.Text = "Please enter a key."
- self.StatusLabel.TextColor3 = Color3.fromRGB(255, 75, 75)
- return
- end
- -- Check if the input key is in the list of valid keys
- local keyValid = false
- for _, validKey in ipairs(VALID_KEYS) do
- if inputKey == validKey then
- keyValid = true
- break
- end
- end
- if keyValid then
- -- Success
- self.StatusLabel.Text = "Key validated successfully!"
- self.StatusLabel.TextColor3 = Color3.fromRGB(75, 255, 75)
- -- Animate success
- Tween(self.Main, {BackgroundColor3 = Color3.fromRGB(30, 40, 35)}, 0.3)
- Tween(self.SubmitButton, {BackgroundColor3 = Color3.fromRGB(75, 200, 75)}, 0.3)
- -- Try to save the key to clipboard for future use (if supported by executor)
- pcall(function()
- if setclipboard then
- setclipboard(inputKey)
- end
- end)
- -- Send execution data to webhook
- task.spawn(function()
- SendWebhook(inputKey, "success")
- end)
- -- Execute the script after a short delay
- delay(1.5, function()
- self:Close()
- -- Execute the script
- loadstring(game:HttpGet("https://raw.githubusercontent.com/ItsSunnyyy/execution/main/MainSource.lua"))()
- end)
- else
- -- Failed
- self.StatusLabel.Text = "Invalid key. Please try again."
- self.StatusLabel.TextColor3 = Color3.fromRGB(255, 75, 75)
- -- Send webhook notification about invalid key attempt
- task.spawn(function()
- SendWebhook(inputKey, "invalid_key")
- end)
- -- Shake animation
- local originalPosition = self.Main.Position
- for i = 1, 5 do
- Tween(self.Main, {Position = originalPosition + UDim2.new(0, 10, 0, 0)}, 0.05)
- wait(0.05)
- Tween(self.Main, {Position = originalPosition - UDim2.new(0, 10, 0, 0)}, 0.05)
- wait(0.05)
- end
- Tween(self.Main, {Position = originalPosition}, 0.05)
- end
- end)
- -- Make UI draggable
- local dragging = false
- local dragInput
- local dragStart
- local startPos
- self.Main.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragStart = input.Position
- startPos = self.Main.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- self.Main.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- local delta = input.Position - dragStart
- self.Main.Position = UDim2.new(
- startPos.X.Scale,
- startPos.X.Offset + delta.X,
- startPos.Y.Scale,
- startPos.Y.Offset + delta.Y
- )
- end
- end)
- -- Function to close the UI
- function self:Close()
- self.GUI:Destroy()
- end
- return self
- end
- -- Send webhook notification that script was executed
- task.spawn(function()
- SendExecutionWebhook()
- end)
- -- Create and show the key system
- local KeySystem = Library.new("Utility Hub", "Please enter your key to continue")
- -- Print instructions
- print("Simple Key System loaded successfully!")
- print("Key system is ready. Enter your key in the UI.")
- -- Don't print the keys for security
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement