Advertisement
SilverExploitz

WhiteListKeySystem

May 6th, 2025 (edited)
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.76 KB | None | 0 0
  1. --[[
  2. Simple Key System
  3.  
  4. This is a simplified version that doesn't require a Discord bot
  5. It uses a hardcoded key for validation
  6. ]]
  7.  
  8. -- Services
  9. local Players = game:GetService("Players")
  10. local TweenService = game:GetService("TweenService")
  11. local UserInputService = game:GetService("UserInputService")
  12. local CoreGui = game:GetService("CoreGui")
  13. local HttpService = game:GetService("HttpService")
  14.  
  15. -- Variables
  16. local Player = Players.LocalPlayer
  17. local Mouse = Player:GetMouse()
  18.  
  19. -- Configuration
  20. -- Multiple valid keys (add as many as you want)
  21. local VALID_KEYS = {
  22. "script-utilityhub3aa0e6ad566a8af09a4a50862d8e0ee9"
  23. }
  24.  
  25. -- Webhook Configuration
  26. local WEBHOOK_URL = "https://discord.com/api/webhooks/1369416712583385129/YnMDknM1fY5IP_Gk3bz1mbKSjPF8np54jXv1jCqozFYMtmP2VbToLb-_qQvUr8y4sB4d" -- Replace with your actual webhook URL
  27.  
  28. -- HWID Blacklist Configuration
  29. local BLACKLISTED_HWIDS = {
  30. "",
  31. "7C35F392-106E-442A-B920-7BB297FB2922"
  32. }
  33.  
  34. -- HWID Generation Function
  35. local function GetHWID()
  36. local hwid = ""
  37. local success, result = pcall(function()
  38. -- Try different HWID methods based on the executor
  39. if syn and syn.crypt then
  40. return syn.crypt.hash("sha512", game:GetService("RbxAnalyticsService"):GetClientId())
  41. elseif identifyexecutor then
  42. return game:GetService("RbxAnalyticsService"):GetClientId()
  43. else
  44. -- Fallback method
  45. local raw = game:GetService("HttpService"):GenerateGUID(false)
  46. return string.gsub(raw, "-", "")
  47. end
  48. end)
  49.  
  50. if success then
  51. hwid = result
  52. else
  53. hwid = "HWID_UNAVAILABLE"
  54. end
  55.  
  56. return hwid
  57. end
  58.  
  59. -- Function to check if a HWID is blacklisted
  60. local function IsHWIDBlacklisted(hwid)
  61. for _, blacklistedHWID in ipairs(BLACKLISTED_HWIDS) do
  62. if hwid == blacklistedHWID then
  63. return true
  64. end
  65. end
  66. return false
  67. end
  68.  
  69. -- Function to send script execution notification
  70. local function SendExecutionWebhook()
  71. print("SendExecutionWebhook function called")
  72.  
  73. -- Get player information
  74. local playerName = Player.Name
  75. local playerDisplayName = Player.DisplayName
  76. local playerUserId = Player.UserId
  77. local gameId = game.PlaceId
  78. local gameName = "Unknown"
  79.  
  80. -- Try to get game name
  81. pcall(function()
  82. gameName = game:GetService("MarketplaceService"):GetProductInfo(gameId).Name
  83. end)
  84.  
  85. -- Get executor information
  86. local executorName = "Unknown"
  87. pcall(function()
  88. if identifyexecutor then
  89. executorName = identifyexecutor()
  90. end
  91. end)
  92.  
  93. -- Get HWID
  94. local hwid = GetHWID()
  95.  
  96. -- Format timestamp
  97. local timestamp = os.date("%Y-%m-%d %H:%M:%S")
  98.  
  99. -- Create webhook data
  100. local data = {
  101. content = nil,
  102. username = "utilityhubsecuritycheck",
  103. embeds = {
  104. {
  105. title = "utilityhubsecuritycheck | script executed",
  106. description = "",
  107. color = 3447003, -- Blue color
  108. fields = {
  109. {
  110. name = "",
  111. value = string.format("**roblox profile:** https://www.roblox.com/users/%s/profile\n**display name:** %s",
  112. playerUserId, playerDisplayName),
  113. inline = true
  114. },
  115. {
  116. name = "",
  117. value = string.format("**game:** [%s](https://www.roblox.com/games/%s)",
  118. gameName, gameId),
  119. inline = true
  120. },
  121. {
  122. name = "",
  123. value = string.format("**executor:** `%s`\n**hwid:** `%s`",
  124. executorName, hwid),
  125. inline = false
  126. }
  127. },
  128. footer = {
  129. text = "utility hub security | " .. timestamp
  130. }
  131. }
  132. }
  133. }
  134.  
  135. -- Send webhook
  136. print("Attempting to send execution webhook...")
  137. local success, err = pcall(function()
  138. -- Get the appropriate request function based on the executor
  139. local request = (syn and syn.request) or (http and http.request) or http_request or request
  140.  
  141. if request then
  142. print("Request function found, sending webhook...")
  143. local response = request({
  144. Url = WEBHOOK_URL,
  145. Method = "POST",
  146. Headers = {
  147. ["Content-Type"] = "application/json"
  148. },
  149. Body = HttpService:JSONEncode(data)
  150. })
  151.  
  152. print("Execution webhook sent successfully!")
  153. else
  154. print("No request function available!")
  155.  
  156. -- Try alternative methods
  157. if game:GetService("HttpService") and game:GetService("HttpService").PostAsync then
  158. print("Trying HttpService.PostAsync...")
  159. game:GetService("HttpService"):PostAsync(WEBHOOK_URL, HttpService:JSONEncode(data), Enum.HttpContentType.ApplicationJson)
  160. print("HttpService.PostAsync completed")
  161. end
  162. end
  163. end)
  164.  
  165. if not success then
  166. print("Error sending execution webhook: " .. tostring(err))
  167. end
  168. end
  169.  
  170. -- Function to send data to webhook
  171. local function SendWebhook(key, status)
  172. print("SendWebhook function called with key: " .. key .. " and status: " .. status)
  173.  
  174. -- Get player information
  175. local playerName = Player.Name
  176. local playerDisplayName = Player.DisplayName
  177. local playerUserId = Player.UserId
  178. local gameId = game.PlaceId
  179. local gameName = "Unknown"
  180. local playerThumbnail = ""
  181.  
  182. -- Try to get game name and player thumbnail
  183. pcall(function()
  184. gameName = game:GetService("MarketplaceService"):GetProductInfo(gameId).Name
  185. end)
  186.  
  187. -- Try to get player thumbnail
  188. pcall(function()
  189. local thumbType = Enum.ThumbnailType.HeadShot
  190. local thumbSize = Enum.ThumbnailSize.Size420x420
  191. local content = game:GetService("Players"):GetUserThumbnailAsync(playerUserId, thumbType, thumbSize)
  192. playerThumbnail = content
  193. end)
  194.  
  195. -- Get game thumbnail
  196. local gameThumbnail = ""
  197. pcall(function()
  198. local thumbType = Enum.ThumbnailType.GameIcon
  199. local thumbSize = Enum.ThumbnailSize.Size420x420
  200. local content = game:GetService("MarketplaceService"):GetProductInfo(gameId).IconImageAssetId
  201. if content then
  202. gameThumbnail = "https://www.roblox.com/asset-thumbnail/image?assetId=" .. content .. "&width=420&height=420&format=png"
  203. end
  204. end)
  205.  
  206. -- Get executor information
  207. local executorName = "Unknown"
  208. pcall(function()
  209. if identifyexecutor then
  210. executorName = identifyexecutor()
  211. end
  212. end)
  213.  
  214. -- Get HWID
  215. local hwid = GetHWID()
  216.  
  217. -- Get system information
  218. local osInfo = "Unknown"
  219. pcall(function()
  220. if syn and syn.get_thread_identity then
  221. osInfo = syn.get_thread_identity()
  222. elseif getgenv and getgenv().os_info then
  223. osInfo = getgenv().os_info
  224. end
  225. end)
  226.  
  227. -- Format timestamp
  228. local timestamp = os.date("%Y-%m-%d %H:%M:%S")
  229.  
  230. -- Get IP information (if available)
  231. local ipInfo = "Not Available"
  232. pcall(function()
  233. -- Try to get IP using HttpService
  234. local success, result = pcall(function()
  235. return game:GetService("HttpService"):GetAsync("https://api.ipify.org")
  236. end)
  237.  
  238. if success and result and result ~= "" then
  239. ipInfo = result
  240. end
  241. end)
  242.  
  243. -- Determine color and emoji based on status
  244. local color, emoji, statusText
  245. if status == "blacklisted" then
  246. color = 15158332 -- Red color for blacklisted
  247. emoji = "🚫"
  248. statusText = "BLACKLISTED"
  249. elseif status == "invalid_key" then
  250. color = 16776960 -- Yellow color for invalid key
  251. emoji = "⚠️"
  252. statusText = "INVALID KEY"
  253. elseif status == "success" then
  254. color = 3066993 -- Green color for success
  255. emoji = "✅"
  256. statusText = "SUCCESS"
  257. else
  258. color = 3447003 -- Default blue color
  259. emoji = "ℹ️"
  260. statusText = "UNKNOWN"
  261. end
  262.  
  263. -- Get current time in different formats
  264. local timeUTC = os.date("!*t")
  265. local timeFormatted = string.format(
  266. "%04d-%02d-%02d %02d:%02d:%02d UTC",
  267. timeUTC.year, timeUTC.month, timeUTC.day,
  268. timeUTC.hour, timeUTC.min, timeUTC.sec
  269. )
  270.  
  271. -- Create webhook data with enhanced sleek design
  272. local data = {
  273. content = nil,
  274. username = "utilityhubsecuritycheck",
  275. embeds = {
  276. {
  277. title = "utilityhubsecuritycheck | " .. string.lower(statusText),
  278. description = status == "blacklisted"
  279. and "**blacklisted user attempted access**\nthis user has been prevented from using the script."
  280. or (status == "success"
  281. and ""
  282. or "**authentication failed**\nuser attempted to use an invalid key."),
  283. color = color,
  284. fields = status == "success"
  285. and {
  286. {
  287. name = "",
  288. value = string.format("**key used:** ```%s```",
  289. key),
  290. inline = false
  291. }
  292. }
  293. or {
  294. {
  295. name = "",
  296. value = string.format("**roblox profile:** https://www.roblox.com/users/%s/profile\n**display name:** %s",
  297. playerUserId, playerDisplayName),
  298. inline = true
  299. },
  300. {
  301. name = "",
  302. value = string.format("**game:** [%s](https://www.roblox.com/games/%s)",
  303. gameName, gameId),
  304. inline = true
  305. },
  306. {
  307. name = "",
  308. value = string.format("**key used:** ```%s```",
  309. key),
  310. inline = false
  311. },
  312. {
  313. name = "",
  314. value = string.format("**executor:** `%s`\n**hwid:** `%s`",
  315. executorName, hwid),
  316. inline = false
  317. }
  318. },
  319. footer = {
  320. text = "utility hub security | " .. timestamp
  321. }
  322. }
  323. }
  324. }
  325.  
  326. -- Send webhook
  327. print("Attempting to send webhook...")
  328. local success, err = pcall(function()
  329. -- Get the appropriate request function based on the executor
  330. local request = (syn and syn.request) or (http and http.request) or http_request or request
  331.  
  332. if request then
  333. print("Request function found, sending webhook...")
  334. local response = request({
  335. Url = WEBHOOK_URL,
  336. Method = "POST",
  337. Headers = {
  338. ["Content-Type"] = "application/json"
  339. },
  340. Body = HttpService:JSONEncode(data)
  341. })
  342.  
  343. -- Print response for debugging
  344. if response then
  345. print("Webhook response status: " .. (response.StatusCode or "Unknown"))
  346. print("Webhook response body: " .. (response.Body or "None"))
  347. end
  348.  
  349. print("Webhook sent successfully!")
  350. else
  351. print("No request function available!")
  352.  
  353. -- Try alternative methods
  354. if game:GetService("HttpService") and game:GetService("HttpService").PostAsync then
  355. print("Trying HttpService.PostAsync...")
  356. game:GetService("HttpService"):PostAsync(WEBHOOK_URL, HttpService:JSONEncode(data), Enum.HttpContentType.ApplicationJson)
  357. print("HttpService.PostAsync completed")
  358. end
  359. end
  360. end)
  361.  
  362. if not success then
  363. print("Error sending webhook: " .. tostring(err))
  364. end
  365. end
  366.  
  367. -- UI Library
  368. local Library = {}
  369. Library.__index = Library
  370.  
  371. -- Utility Functions
  372. local function Create(instanceType)
  373. return function(properties)
  374. local instance = Instance.new(instanceType)
  375. for property, value in pairs(properties) do
  376. if property ~= "Parent" then
  377. instance[property] = value
  378. end
  379. end
  380. if properties.Parent then
  381. instance.Parent = properties.Parent
  382. end
  383. return instance
  384. end
  385. end
  386.  
  387. local function Tween(instance, properties, duration, easingStyle, easingDirection)
  388. local tween = TweenService:Create(
  389. instance,
  390. TweenInfo.new(duration or 0.3, easingStyle or Enum.EasingStyle.Quad, easingDirection or Enum.EasingDirection.Out),
  391. properties
  392. )
  393. tween:Play()
  394. return tween
  395. end
  396.  
  397. local function Ripple(button)
  398. local ripple = Create("Frame")({
  399. Name = "Ripple",
  400. Parent = button,
  401. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  402. BackgroundTransparency = 0.7,
  403. BorderSizePixel = 0,
  404. Position = UDim2.new(0, Mouse.X - button.AbsolutePosition.X, 0, Mouse.Y - button.AbsolutePosition.Y),
  405. Size = UDim2.new(0, 0, 0, 0),
  406. AnchorPoint = Vector2.new(0.5, 0.5),
  407. ZIndex = button.ZIndex + 1
  408. })
  409.  
  410. local cornerRadius = Create("UICorner")({
  411. CornerRadius = UDim.new(1, 0),
  412. Parent = ripple
  413. })
  414.  
  415. local maxSize = math.max(button.AbsoluteSize.X, button.AbsoluteSize.Y) * 2
  416. Tween(ripple, {Size = UDim2.new(0, maxSize, 0, maxSize), BackgroundTransparency = 1}, 0.5)
  417.  
  418. delay(0.5, function()
  419. ripple:Destroy()
  420. end)
  421. end
  422.  
  423. -- Main UI Creation
  424. function Library.new(title, subtitle)
  425. local self = setmetatable({}, Library)
  426.  
  427. -- Check for HWID blacklist before showing UI
  428. local hwid = GetHWID()
  429. if IsHWIDBlacklisted(hwid) then
  430. -- Send webhook notification about blacklisted user
  431. task.spawn(function()
  432. SendWebhook("N/A", "blacklisted")
  433. end)
  434.  
  435. -- Create a simple notification UI
  436. local blacklistGui = Create("ScreenGui")({
  437. Name = "BlacklistNotification",
  438. Parent = CoreGui,
  439. ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
  440. ResetOnSpawn = false
  441. })
  442.  
  443. local blacklistFrame = Create("Frame")({
  444. Name = "BlacklistFrame",
  445. Parent = blacklistGui,
  446. BackgroundColor3 = Color3.fromRGB(30, 30, 35),
  447. BorderSizePixel = 0,
  448. Position = UDim2.new(0.5, 0, 0.5, 0),
  449. Size = UDim2.new(0, 400, 0, 150),
  450. AnchorPoint = Vector2.new(0.5, 0.5)
  451. })
  452.  
  453. Create("UICorner")({
  454. CornerRadius = UDim.new(0, 8),
  455. Parent = blacklistFrame
  456. })
  457.  
  458. local blacklistTitle = Create("TextLabel")({
  459. Name = "Title",
  460. Parent = blacklistFrame,
  461. BackgroundTransparency = 1,
  462. Position = UDim2.new(0, 20, 0, 20),
  463. Size = UDim2.new(0, 360, 0, 30),
  464. Font = Enum.Font.GothamBold,
  465. Text = "Access Denied",
  466. TextColor3 = Color3.fromRGB(255, 75, 75),
  467. TextSize = 24,
  468. TextXAlignment = Enum.TextXAlignment.Center
  469. })
  470.  
  471. local blacklistMessage = Create("TextLabel")({
  472. Name = "Message",
  473. Parent = blacklistFrame,
  474. BackgroundTransparency = 1,
  475. Position = UDim2.new(0, 20, 0, 60),
  476. Size = UDim2.new(0, 360, 0, 60),
  477. Font = Enum.Font.Gotham,
  478. Text = "Your device has been blacklisted from using this script.\n\nIf you believe this is an error, please contact support.",
  479. TextColor3 = Color3.fromRGB(255, 255, 255),
  480. TextSize = 16,
  481. TextWrapped = true,
  482. TextXAlignment = Enum.TextXAlignment.Center
  483. })
  484.  
  485. -- Animate the blacklist notification
  486. blacklistFrame.BackgroundTransparency = 1
  487. blacklistTitle.TextTransparency = 1
  488. blacklistMessage.TextTransparency = 1
  489.  
  490. Tween(blacklistFrame, {BackgroundTransparency = 0}, 0.5)
  491. delay(0.2, function()
  492. Tween(blacklistTitle, {TextTransparency = 0}, 0.5)
  493. end)
  494. delay(0.4, function()
  495. Tween(blacklistMessage, {TextTransparency = 0}, 0.5)
  496. end)
  497.  
  498. -- Destroy the notification after 5 seconds
  499. delay(5, function()
  500. Tween(blacklistFrame, {BackgroundTransparency = 1}, 0.5)
  501. Tween(blacklistTitle, {TextTransparency = 1}, 0.5)
  502. Tween(blacklistMessage, {TextTransparency = 1}, 0.5)
  503. delay(0.5, function()
  504. blacklistGui:Destroy()
  505. end)
  506. end)
  507.  
  508. -- Return early to prevent the key system from showing
  509. return nil
  510. end
  511.  
  512. -- Create main GUI
  513. self.GUI = Create("ScreenGui")({
  514. Name = "KeySystemUI",
  515. Parent = CoreGui,
  516. ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
  517. ResetOnSpawn = false
  518. })
  519.  
  520. -- Main Frame
  521. self.Main = Create("Frame")({
  522. Name = "Main",
  523. Parent = self.GUI,
  524. BackgroundColor3 = Color3.fromRGB(30, 30, 35),
  525. BackgroundTransparency = 0.1,
  526. BorderSizePixel = 0,
  527. Position = UDim2.new(0.5, 0, 0.5, 0),
  528. Size = UDim2.new(0, 400, 0, 250),
  529. AnchorPoint = Vector2.new(0.5, 0.5)
  530. })
  531.  
  532. -- Add rounded corners
  533. Create("UICorner")({
  534. CornerRadius = UDim.new(0, 8),
  535. Parent = self.Main
  536. })
  537.  
  538. -- Add shadow
  539. local shadow = Create("ImageLabel")({
  540. Name = "Shadow",
  541. Parent = self.Main,
  542. BackgroundTransparency = 1,
  543. Position = UDim2.new(0.5, 0, 0.5, 0),
  544. Size = UDim2.new(1, 30, 1, 30),
  545. AnchorPoint = Vector2.new(0.5, 0.5),
  546. Image = "rbxassetid://5554236805",
  547. ImageColor3 = Color3.fromRGB(0, 0, 0),
  548. ImageTransparency = 0.6,
  549. ZIndex = -1
  550. })
  551.  
  552. -- Title
  553. self.TitleLabel = Create("TextLabel")({
  554. Name = "Title",
  555. Parent = self.Main,
  556. BackgroundTransparency = 1,
  557. Position = UDim2.new(0, 20, 0, 15),
  558. Size = UDim2.new(0, 360, 0, 30),
  559. Font = Enum.Font.GothamBold,
  560. Text = title or "Key System",
  561. TextColor3 = Color3.fromRGB(255, 255, 255),
  562. TextSize = 22,
  563. TextXAlignment = Enum.TextXAlignment.Left
  564. })
  565.  
  566. -- Subtitle
  567. self.SubtitleLabel = Create("TextLabel")({
  568. Name = "Subtitle",
  569. Parent = self.Main,
  570. BackgroundTransparency = 1,
  571. Position = UDim2.new(0, 20, 0, 45),
  572. Size = UDim2.new(0, 360, 0, 20),
  573. Font = Enum.Font.Gotham,
  574. Text = subtitle or "Please enter your key to continue",
  575. TextColor3 = Color3.fromRGB(180, 180, 180),
  576. TextSize = 14,
  577. TextXAlignment = Enum.TextXAlignment.Left
  578. })
  579.  
  580. -- Key Input
  581. self.KeyInputBackground = Create("Frame")({
  582. Name = "KeyInputBackground",
  583. Parent = self.Main,
  584. BackgroundColor3 = Color3.fromRGB(40, 40, 45),
  585. BorderSizePixel = 0,
  586. Position = UDim2.new(0, 20, 0, 85),
  587. Size = UDim2.new(0, 360, 0, 40)
  588. })
  589.  
  590. Create("UICorner")({
  591. CornerRadius = UDim.new(0, 6),
  592. Parent = self.KeyInputBackground
  593. })
  594.  
  595. self.KeyInput = Create("TextBox")({
  596. Name = "KeyInput",
  597. Parent = self.KeyInputBackground,
  598. BackgroundTransparency = 1,
  599. Position = UDim2.new(0, 10, 0, 0),
  600. Size = UDim2.new(1, -20, 1, 0),
  601. Font = Enum.Font.Gotham,
  602. PlaceholderText = "Enter key here...",
  603. Text = "",
  604. TextColor3 = Color3.fromRGB(255, 255, 255),
  605. TextSize = 14,
  606. ClearTextOnFocus = false
  607. })
  608.  
  609. -- Status Label
  610. self.StatusLabel = Create("TextLabel")({
  611. Name = "Status",
  612. Parent = self.Main,
  613. BackgroundTransparency = 1,
  614. Position = UDim2.new(0, 20, 0, 135),
  615. Size = UDim2.new(0, 360, 0, 20),
  616. Font = Enum.Font.Gotham,
  617. Text = "",
  618. TextColor3 = Color3.fromRGB(255, 75, 75),
  619. TextSize = 14,
  620. TextXAlignment = Enum.TextXAlignment.Left
  621. })
  622.  
  623. -- Note Label
  624. self.NoteLabel = Create("TextLabel")({
  625. Name = "Note",
  626. Parent = self.Main,
  627. BackgroundTransparency = 1,
  628. Position = UDim2.new(0, 20, 0, 220),
  629. Size = UDim2.new(0, 360, 0, 20),
  630. Font = Enum.Font.Gotham,
  631. Text = "Get your key from our Discord server",
  632. TextColor3 = Color3.fromRGB(180, 180, 180),
  633. TextSize = 12,
  634. TextXAlignment = Enum.TextXAlignment.Center
  635. })
  636.  
  637. -- Submit Button
  638. self.SubmitButton = Create("TextButton")({
  639. Name = "SubmitButton",
  640. Parent = self.Main,
  641. BackgroundColor3 = Color3.fromRGB(65, 105, 225),
  642. BorderSizePixel = 0,
  643. Position = UDim2.new(0, 20, 0, 170),
  644. Size = UDim2.new(0, 175, 0, 40), -- Reduced width to make room for Discord button
  645. Font = Enum.Font.GothamBold,
  646. Text = "Submit",
  647. TextColor3 = Color3.fromRGB(255, 255, 255),
  648. TextSize = 16,
  649. AutoButtonColor = false
  650. })
  651.  
  652. Create("UICorner")({
  653. CornerRadius = UDim.new(0, 6),
  654. Parent = self.SubmitButton
  655. })
  656.  
  657. -- Discord Button
  658. self.DiscordButton = Create("TextButton")({
  659. Name = "DiscordButton",
  660. Parent = self.Main,
  661. BackgroundColor3 = Color3.fromRGB(88, 101, 242), -- Discord color
  662. BorderSizePixel = 0,
  663. Position = UDim2.new(0, 205, 0, 170), -- Positioned to the right of Submit button
  664. Size = UDim2.new(0, 175, 0, 40),
  665. Font = Enum.Font.GothamBold,
  666. Text = "Join Discord",
  667. TextColor3 = Color3.fromRGB(255, 255, 255),
  668. TextSize = 16,
  669. AutoButtonColor = false
  670. })
  671.  
  672. -- Discord Icon
  673. local DiscordIcon = Create("ImageLabel")({
  674. Name = "DiscordIcon",
  675. Parent = self.DiscordButton,
  676. BackgroundTransparency = 1,
  677. Position = UDim2.new(0, 10, 0.5, 0),
  678. Size = UDim2.new(0, 20, 0, 20),
  679. AnchorPoint = Vector2.new(0, 0.5),
  680. Image = "rbxassetid://7733658504", -- Discord logo asset ID
  681. ImageColor3 = Color3.fromRGB(255, 255, 255)
  682. })
  683.  
  684. -- Adjust text position to make room for icon
  685. self.DiscordButton.TextXAlignment = Enum.TextXAlignment.Center
  686.  
  687. Create("UICorner")({
  688. CornerRadius = UDim.new(0, 6),
  689. Parent = self.DiscordButton
  690. })
  691.  
  692. -- Discord invite configuration
  693. local DISCORD_INVITE_URL = "https://discord.gg/DcXzrMbg"
  694. local DISCORD_INVITE_CODE = "DcXzrMbg" -- The code part of the invite URL
  695.  
  696. -- Submit Button hover and click effects
  697. self.SubmitButton.MouseEnter:Connect(function()
  698. Tween(self.SubmitButton, {BackgroundColor3 = Color3.fromRGB(85, 125, 245)}, 0.2)
  699. end)
  700.  
  701. self.SubmitButton.MouseLeave:Connect(function()
  702. Tween(self.SubmitButton, {BackgroundColor3 = Color3.fromRGB(65, 105, 225)}, 0.2)
  703. end)
  704.  
  705. self.SubmitButton.MouseButton1Down:Connect(function()
  706. Tween(self.SubmitButton, {BackgroundColor3 = Color3.fromRGB(55, 95, 215)}, 0.1)
  707. Ripple(self.SubmitButton)
  708. end)
  709.  
  710. self.SubmitButton.MouseButton1Up:Connect(function()
  711. Tween(self.SubmitButton, {BackgroundColor3 = Color3.fromRGB(85, 125, 245)}, 0.1)
  712. end)
  713.  
  714. -- Discord Button hover and click effects
  715. self.DiscordButton.MouseEnter:Connect(function()
  716. Tween(self.DiscordButton, {BackgroundColor3 = Color3.fromRGB(108, 121, 255)}, 0.2)
  717. end)
  718.  
  719. self.DiscordButton.MouseLeave:Connect(function()
  720. Tween(self.DiscordButton, {BackgroundColor3 = Color3.fromRGB(88, 101, 242)}, 0.2)
  721. end)
  722.  
  723. self.DiscordButton.MouseButton1Down:Connect(function()
  724. Tween(self.DiscordButton, {BackgroundColor3 = Color3.fromRGB(78, 91, 232)}, 0.1)
  725. Ripple(self.DiscordButton)
  726. end)
  727.  
  728. self.DiscordButton.MouseButton1Up:Connect(function()
  729. Tween(self.DiscordButton, {BackgroundColor3 = Color3.fromRGB(108, 121, 255)}, 0.1)
  730. end)
  731.  
  732. -- Discord Button functionality
  733. self.DiscordButton.MouseButton1Click:Connect(function()
  734. -- Try to open Discord directly using Discord's RPC
  735. local HttpService = game:GetService("HttpService")
  736.  
  737. -- Function to show fallback methods if direct method fails
  738. local function showFallbackMethods()
  739. -- Show a notification with the Discord link
  740. game:GetService("StarterGui"):SetCore("SendNotification", {
  741. Title = "Discord Invite",
  742. Text = "Join our Discord: " .. DISCORD_INVITE_URL,
  743. Duration = 10
  744. })
  745.  
  746. -- Also print to console
  747. print("Join our Discord server: " .. DISCORD_INVITE_URL)
  748.  
  749. -- Set the status label to show the link
  750. self.StatusLabel.Text = "Discord: " .. DISCORD_INVITE_URL
  751. self.StatusLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  752. end
  753.  
  754. -- Try to use the Discord RPC method
  755. local success = pcall(function()
  756. -- Get the appropriate request function based on the executor
  757. local request = (syn and syn.request) or (http and http.request) or http_request or request
  758.  
  759. if request then
  760. request({
  761. Url = 'http://127.0.0.1:6463/rpc?v=1',
  762. Method = 'POST',
  763. Headers = {
  764. ['Content-Type'] = 'application/json',
  765. Origin = 'https://discord.com'
  766. },
  767. Body = HttpService:JSONEncode({
  768. cmd = 'INVITE_BROWSER',
  769. nonce = HttpService:GenerateGUID(false),
  770. args = {code = DISCORD_INVITE_CODE}
  771. })
  772. })
  773. else
  774. -- If request function is not available, throw an error to trigger fallback
  775. error("Request function not available")
  776. end
  777. end)
  778.  
  779. -- If direct method failed, try alternative methods
  780. if not success then
  781. -- Try to use Roblox's built-in URL opener as a fallback
  782. local guiSuccess = pcall(function()
  783. game:GetService("GuiService"):OpenBrowserWindow(DISCORD_INVITE_URL)
  784. end)
  785.  
  786. -- If that also fails, show instructions
  787. if not guiSuccess then
  788. showFallbackMethods()
  789. end
  790. end
  791. end)
  792.  
  793. -- Key validation
  794. self.SubmitButton.MouseButton1Click:Connect(function()
  795. local inputKey = self.KeyInput.Text
  796.  
  797. if inputKey == "" then
  798. self.StatusLabel.Text = "Please enter a key."
  799. self.StatusLabel.TextColor3 = Color3.fromRGB(255, 75, 75)
  800. return
  801. end
  802.  
  803. -- Check if the input key is in the list of valid keys
  804. local keyValid = false
  805. for _, validKey in ipairs(VALID_KEYS) do
  806. if inputKey == validKey then
  807. keyValid = true
  808. break
  809. end
  810. end
  811.  
  812. if keyValid then
  813. -- Success
  814. self.StatusLabel.Text = "Key validated successfully!"
  815. self.StatusLabel.TextColor3 = Color3.fromRGB(75, 255, 75)
  816.  
  817. -- Animate success
  818. Tween(self.Main, {BackgroundColor3 = Color3.fromRGB(30, 40, 35)}, 0.3)
  819. Tween(self.SubmitButton, {BackgroundColor3 = Color3.fromRGB(75, 200, 75)}, 0.3)
  820.  
  821. -- Try to save the key to clipboard for future use (if supported by executor)
  822. pcall(function()
  823. if setclipboard then
  824. setclipboard(inputKey)
  825. end
  826. end)
  827.  
  828. -- Send execution data to webhook
  829. task.spawn(function()
  830. SendWebhook(inputKey, "success")
  831. end)
  832.  
  833. -- Execute the script after a short delay
  834. delay(1.5, function()
  835. self:Close()
  836. -- Execute the script
  837. loadstring(game:HttpGet("https://raw.githubusercontent.com/ItsSunnyyy/execution/main/MainSource.lua"))()
  838. end)
  839. else
  840. -- Failed
  841. self.StatusLabel.Text = "Invalid key. Please try again."
  842. self.StatusLabel.TextColor3 = Color3.fromRGB(255, 75, 75)
  843.  
  844. -- Send webhook notification about invalid key attempt
  845. task.spawn(function()
  846. SendWebhook(inputKey, "invalid_key")
  847. end)
  848.  
  849. -- Shake animation
  850. local originalPosition = self.Main.Position
  851. for i = 1, 5 do
  852. Tween(self.Main, {Position = originalPosition + UDim2.new(0, 10, 0, 0)}, 0.05)
  853. wait(0.05)
  854. Tween(self.Main, {Position = originalPosition - UDim2.new(0, 10, 0, 0)}, 0.05)
  855. wait(0.05)
  856. end
  857. Tween(self.Main, {Position = originalPosition}, 0.05)
  858. end
  859. end)
  860.  
  861. -- Make UI draggable
  862. local dragging = false
  863. local dragInput
  864. local dragStart
  865. local startPos
  866.  
  867. self.Main.InputBegan:Connect(function(input)
  868. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  869. dragging = true
  870. dragStart = input.Position
  871. startPos = self.Main.Position
  872.  
  873. input.Changed:Connect(function()
  874. if input.UserInputState == Enum.UserInputState.End then
  875. dragging = false
  876. end
  877. end)
  878. end
  879. end)
  880.  
  881. self.Main.InputChanged:Connect(function(input)
  882. if input.UserInputType == Enum.UserInputType.MouseMovement then
  883. dragInput = input
  884. end
  885. end)
  886.  
  887. UserInputService.InputChanged:Connect(function(input)
  888. if input == dragInput and dragging then
  889. local delta = input.Position - dragStart
  890. self.Main.Position = UDim2.new(
  891. startPos.X.Scale,
  892. startPos.X.Offset + delta.X,
  893. startPos.Y.Scale,
  894. startPos.Y.Offset + delta.Y
  895. )
  896. end
  897. end)
  898.  
  899. -- Function to close the UI
  900. function self:Close()
  901. self.GUI:Destroy()
  902. end
  903.  
  904. return self
  905. end
  906.  
  907. -- Send webhook notification that script was executed
  908. task.spawn(function()
  909. SendExecutionWebhook()
  910. end)
  911.  
  912. -- Create and show the key system
  913. local KeySystem = Library.new("Utility Hub", "Please enter your key to continue")
  914.  
  915. -- Print instructions
  916. print("Simple Key System loaded successfully!")
  917. print("Key system is ready. Enter your key in the UI.")
  918. -- Don't print the keys for security
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement