local function createKeySystem() local secretKey = "E" local discordLink = "https://discord.com/invite/Qj8R42rzpE" local scriptUrl = "https://pastefy.app/0Ml2iFFz/raw" -- Get services local Players = game:GetService("Players") local RunService = game:GetService("RunService") local HttpService = game:GetService("HttpService") local localPlayer = Players.LocalPlayer -- Create main GUI local screenGui = Instance.new("ScreenGui") screenGui.Name = "BAR1S & DEFFENDERS" screenGui.ResetOnSpawn = false screenGui.Parent = localPlayer:WaitForChild("PlayerGui") -- Main frame local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 400, 0, 150) mainFrame.Position = UDim2.new(0.5, -200, 0.5, -75) mainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 20) mainFrame.BorderSizePixel = 0 mainFrame.Active = true mainFrame.Draggable = true mainFrame.Parent = screenGui -- Corner radius local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 10) corner.Parent = mainFrame -- Border stroke with rainbow effect local borderStroke = Instance.new("UIStroke") borderStroke.Thickness = 3 borderStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border borderStroke.LineJoinMode = Enum.LineJoinMode.Round borderStroke.Parent = mainFrame -- Rainbow animation for border local hue = 0 RunService.RenderStepped:Connect(function(deltaTime) hue = (hue + deltaTime * 0.15) % 1 borderStroke.Color = Color3.fromHSV(hue, 1, 1) end) -- Title label local titleLabel = Instance.new("TextLabel") titleLabel.Size = UDim2.new(1, 0, 0, 25) titleLabel.Position = UDim2.new(0, 10, 0, 5) titleLabel.BackgroundTransparency = 1 titleLabel.Font = Enum.Font.GothamBold titleLabel.TextSize = 16 titleLabel.TextXAlignment = Enum.TextXAlignment.Center titleLabel.Text = "BAR1S - DEFFENDERS CRACKED" titleLabel.Parent = mainFrame -- Rainbow text animation RunService.RenderStepped:Connect(function() local time = tick() * 0.25 % 1 local color = Color3.fromHSV(time, 1, 1) local r = math.floor(color.R * 255) local g = math.floor(color.G * 255) local b = math.floor(color.B * 255) titleLabel.Text = string.format("BAR1S - DEFFENDERS CRACKED", r, g, b) titleLabel.RichText = true end) -- Key input box local keyInput = Instance.new("TextBox") keyInput.PlaceholderText = "the key is ''E''" keyInput.Size = UDim2.new(1, -20, 0, 35) keyInput.Position = UDim2.new(0, 10, 0, 35) keyInput.BackgroundColor3 = Color3.fromRGB(240, 240, 240) keyInput.TextColor3 = Color3.fromRGB(20, 20, 20) keyInput.Text = "" keyInput.Font = Enum.Font.Gotham keyInput.TextSize = 16 keyInput.BorderSizePixel = 0 keyInput.Parent = mainFrame local inputCorner = Instance.new("UICorner") inputCorner.CornerRadius = UDim.new(0, 6) inputCorner.Parent = keyInput -- Verify button local verifyButton = Instance.new("TextButton") verifyButton.Size = UDim2.new(0, 180, 0, 35) verifyButton.Position = UDim2.new(0, 10, 0, 80) verifyButton.Text = "Verify Key" verifyButton.Font = Enum.Font.GothamBold verifyButton.TextSize = 15 verifyButton.TextColor3 = Color3.fromRGB(255, 255, 255) verifyButton.BackgroundColor3 = Color3.fromRGB(120, 120, 120) verifyButton.BorderSizePixel = 0 verifyButton.Parent = mainFrame local verifyCorner = Instance.new("UICorner") verifyCorner.CornerRadius = UDim.new(0, 6) verifyCorner.Parent = verifyButton -- Discord button local discordButton = Instance.new("TextButton") discordButton.Size = UDim2.new(0, 180, 0, 35) discordButton.Position = UDim2.new(1, -190, 0, 80) discordButton.Text = "Discord (Copy Invite)" discordButton.Font = Enum.Font.GothamBold discordButton.TextSize = 15 discordButton.TextColor3 = Color3.fromRGB(255, 255, 255) discordButton.BackgroundColor3 = Color3.fromRGB(88, 101, 242) discordButton.BorderSizePixel = 0 discordButton.Parent = mainFrame local discordCorner = Instance.new("UICorner") discordCorner.CornerRadius = UDim.new(0, 6) discordCorner.Parent = discordButton -- Instruction label local instructionLabel = Instance.new("TextLabel") instructionLabel.Text = "Join my Discord" instructionLabel.Size = UDim2.new(1, -20, 0, 20) instructionLabel.Position = UDim2.new(0, 10, 0, 120) instructionLabel.BackgroundTransparency = 1 instructionLabel.Font = Enum.Font.Gotham instructionLabel.TextSize = 13 instructionLabel.TextColor3 = Color3.fromRGB(220, 220, 220) instructionLabel.TextXAlignment = Enum.TextXAlignment.Left instructionLabel.Parent = mainFrame -- Status label local statusLabel = Instance.new("TextLabel") statusLabel.Text = "Status: waiting..." statusLabel.Size = UDim2.new(1, -20, 0, 20) statusLabel.Position = UDim2.new(0, 10, 1, -20) statusLabel.BackgroundTransparency = 1 statusLabel.Font = Enum.Font.Gotham statusLabel.TextSize = 13 statusLabel.TextColor3 = Color3.fromRGB(190, 190, 190) statusLabel.TextXAlignment = Enum.TextXAlignment.Left statusLabel.Parent = mainFrame -- Function to update status local function updateStatus(message, color) statusLabel.Text = "Status: " .. message if color then statusLabel.TextColor3 = color end end -- Function to copy to clipboard local function copyToClipboard(text) if setclipboard then pcall(setclipboard, text) elseif syn and syn.set_clipboard then pcall(syn.set_clipboard, text) elseif toclipboard then pcall(toclipboard, text) else -- Fallback: try to use the new clipboard service pcall(function() local Clipboard = game:GetService("Clipboard") Clipboard:SetString(text) end) end end -- Function to load and execute external script local function loadExternalScript() local success, result = pcall(function() -- Use game:HttpGet for better compatibility local scriptContent = game:HttpGet(scriptUrl) if scriptContent then local loadedFunction = loadstring(scriptContent) if loadedFunction then loadedFunction() return true else return false, "Failed to load script content" end else return false, "Failed to fetch script from URL" end end) return success, result end -- Discord button click discordButton.MouseButton1Click:Connect(function() copyToClipboard(discordLink) updateStatus("Invite copied! Join the Discord.", Color3.fromRGB(100, 255, 100)) end) -- Key input validation keyInput:GetPropertyChangedSignal("Text"):Connect(function() local inputText = keyInput.Text:lower() local correctKey = secretKey:lower() if inputText == correctKey then verifyButton.Active = true verifyButton.BackgroundColor3 = Color3.fromRGB(52, 170, 85) else verifyButton.Active = false verifyButton.BackgroundColor3 = Color3.fromRGB(120, 120, 120) end end) -- Verify button click verifyButton.MouseButton1Click:Connect(function() if not verifyButton.Active then return end local inputText = keyInput.Text:lower() local correctKey = secretKey:lower() if inputText == correctKey then updateStatus("Key valid! Launching script...", Color3.fromRGB(100, 255, 100)) task.wait(0.3) -- Load and execute the external script local success, result = loadExternalScript() if success then updateStatus("Script loaded successfully!", Color3.fromRGB(100, 255, 100)) task.wait(1) screenGui:Destroy() else updateStatus("Failed to load script: " .. tostring(result), Color3.fromRGB(255, 120, 120)) warn("Failed to load external script: " .. tostring(result)) end else updateStatus("Invalid key. Please join the Discord.", Color3.fromRGB(255, 120, 120)) end end) verifyButton.Active = false end -- Initialize the system createKeySystem()