Advertisement
kill21_2

key sistem

May 20th, 2025 (edited)
22,802
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.48 KB | None | 0 0
  1. -- Настройки GUI
  2. local guiEnabled = true
  3. local dragSpeed = 0.25 -- Скорость перемещения GUI
  4. local isEnglish = false -- Флаг для перевода
  5.  
  6. -- Создаем основной GUI
  7. local ScreenGui = Instance.new("ScreenGui")
  8. ScreenGui.Name = "KeySystemGUI"
  9. ScreenGui.ResetOnSpawn = false
  10. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  11.  
  12. -- Главный фрейм
  13. local MainFrame = Instance.new("Frame")
  14. MainFrame.Name = "MainFrame"
  15. MainFrame.Size = UDim2.new(0, 350, 0, 450) -- Увеличили высоту для новой кнопки
  16. MainFrame.Position = UDim2.new(0.5, -175, 0.5, -225)
  17. MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  18. MainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
  19. MainFrame.BorderSizePixel = 0
  20. MainFrame.Active = true
  21. MainFrame.Draggable = true
  22. MainFrame.Selectable = true
  23.  
  24. -- Скругление углов
  25. local UICorner = Instance.new("UICorner")
  26. UICorner.CornerRadius = UDim.new(0, 8)
  27. UICorner.Parent = MainFrame
  28.  
  29. -- Тень
  30. local UIStroke = Instance.new("UIStroke")
  31. UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  32. UIStroke.Color = Color3.fromRGB(60, 60, 80)
  33. UIStroke.LineJoinMode = Enum.LineJoinMode.Round
  34. UIStroke.Thickness = 2
  35. UIStroke.Parent = MainFrame
  36.  
  37. -- Заголовок
  38. local TitleLabel = Instance.new("TextLabel")
  39. TitleLabel.Name = "TitleLabel"
  40. TitleLabel.Size = UDim2.new(1, 0, 0, 50)
  41. TitleLabel.Position = UDim2.new(0, 0, 0, 0)
  42. TitleLabel.BackgroundTransparency = 1
  43. TitleLabel.Text = "KEY SYSTEM"
  44. TitleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  45. TitleLabel.Font = Enum.Font.GothamBold
  46. TitleLabel.TextSize = 24
  47. TitleLabel.TextStrokeTransparency = 0.7
  48.  
  49. -- Подзаголовок
  50. local SubTitleLabel = Instance.new("TextLabel")
  51. SubTitleLabel.Name = "SubTitleLabel"
  52. SubTitleLabel.Size = UDim2.new(1, 0, 0, 20)
  53. SubTitleLabel.Position = UDim2.new(0, 0, 0, 40)
  54. SubTitleLabel.BackgroundTransparency = 1
  55. SubTitleLabel.Text = "Введите ключ для доступа к премиум версии"
  56. SubTitleLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  57. SubTitleLabel.Font = Enum.Font.Gotham
  58. SubTitleLabel.TextSize = 14
  59.  
  60. -- Поле для ввода ключа
  61. local KeyInput = Instance.new("TextBox")
  62. KeyInput.Name = "KeyInput"
  63. KeyInput.Size = UDim2.new(0.8, 0, 0, 40)
  64. KeyInput.Position = UDim2.new(0.1, 0, 0, 80)
  65. KeyInput.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
  66. KeyInput.TextColor3 = Color3.fromRGB(255, 255, 255)
  67. KeyInput.Font = Enum.Font.Gotham
  68. KeyInput.TextSize = 16
  69. KeyInput.PlaceholderText = "Введите ключ..."
  70. KeyInput.PlaceholderColor3 = Color3.fromRGB(150, 150, 150)
  71. KeyInput.ClearTextOnFocus = false
  72. KeyInput.Text = ""
  73.  
  74. -- Скругление для поля ввода
  75. local InputCorner = Instance.new("UICorner")
  76. InputCorner.CornerRadius = UDim.new(0, 6)
  77. InputCorner.Parent = KeyInput
  78.  
  79. -- Кнопка активации ключа
  80. local ActivateButton = Instance.new("TextButton")
  81. ActivateButton.Name = "ActivateButton"
  82. ActivateButton.Size = UDim2.new(0.8, 0, 0, 40)
  83. ActivateButton.Position = UDim2.new(0.1, 0, 0, 130)
  84. ActivateButton.BackgroundColor3 = Color3.fromRGB(70, 120, 200)
  85. ActivateButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  86. ActivateButton.Font = Enum.Font.GothamBold
  87. ActivateButton.Text = "АКТИВИРОВАТЬ КЛЮЧ"
  88. ActivateButton.TextSize = 16
  89.  
  90. -- Скругление для кнопки
  91. local ButtonCorner = Instance.new("UICorner")
  92. ButtonCorner.CornerRadius = UDim.new(0, 6)
  93. ButtonCorner.Parent = ActivateButton
  94.  
  95. -- Эффект при наведении на кнопку
  96. ActivateButton.MouseEnter:Connect(function()
  97. game:GetService("TweenService"):Create(
  98. ActivateButton,
  99. TweenInfo.new(0.2),
  100. {BackgroundColor3 = Color3.fromRGB(90, 140, 220)}
  101. ):Play()
  102. end)
  103.  
  104. ActivateButton.MouseLeave:Connect(function()
  105. game:GetService("TweenService"):Create(
  106. ActivateButton,
  107. TweenInfo.new(0.2),
  108. {BackgroundColor3 = Color3.fromRGB(70, 120, 200)}
  109. ):Play()
  110. end)
  111.  
  112. -- Разделитель
  113. local Divider = Instance.new("Frame")
  114. Divider.Name = "Divider"
  115. Divider.Size = UDim2.new(0.8, 0, 0, 1)
  116. Divider.Position = UDim2.new(0.1, 0, 0, 190)
  117. Divider.BackgroundColor3 = Color3.fromRGB(60, 60, 80)
  118. Divider.BorderSizePixel = 0
  119.  
  120. -- Кнопка бесплатной версии
  121. local FreeButton = Instance.new("TextButton")
  122. FreeButton.Name = "FreeButton"
  123. FreeButton.Size = UDim2.new(0.8, 0, 0, 40)
  124. FreeButton.Position = UDim2.new(0.1, 0, 0, 200)
  125. FreeButton.BackgroundColor3 = Color3.fromRGB(80, 180, 80)
  126. FreeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  127. FreeButton.Font = Enum.Font.GothamBold
  128. FreeButton.Text = "БЕСПЛАТНАЯ ВЕРСИЯ"
  129. FreeButton.TextSize = 16
  130.  
  131. -- Скругление для кнопки
  132. local FreeButtonCorner = Instance.new("UICorner")
  133. FreeButtonCorner.CornerRadius = UDim.new(0, 6)
  134. FreeButtonCorner.Parent = FreeButton
  135.  
  136. -- Эффект при наведении на кнопку
  137. FreeButton.MouseEnter:Connect(function()
  138. game:GetService("TweenService"):Create(
  139. FreeButton,
  140. TweenInfo.new(0.2),
  141. {BackgroundColor3 = Color3.fromRGB(100, 200, 100)}
  142. ):Play()
  143. end)
  144.  
  145. FreeButton.MouseLeave:Connect(function()
  146. game:GetService("TweenService"):Create(
  147. FreeButton,
  148. TweenInfo.new(0.2),
  149. {BackgroundColor3 = Color3.fromRGB(80, 180, 80)}
  150. ):Play()
  151. end)
  152.  
  153. -- Кнопка получения кода
  154. local GetCodeButton = Instance.new("TextButton")
  155. GetCodeButton.Name = "GetCodeButton"
  156. GetCodeButton.Size = UDim2.new(0.8, 0, 0, 40)
  157. GetCodeButton.Position = UDim2.new(0.1, 0, 0, 250)
  158. GetCodeButton.BackgroundColor3 = Color3.fromRGB(180, 100, 200)
  159. GetCodeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  160. GetCodeButton.Font = Enum.Font.GothamBold
  161. GetCodeButton.Text = "ПОЛУЧИТЬ КОД"
  162. GetCodeButton.TextSize = 16
  163.  
  164. -- Скругление для кнопки
  165. local GetCodeButtonCorner = Instance.new("UICorner")
  166. GetCodeButtonCorner.CornerRadius = UDim.new(0, 6)
  167. GetCodeButtonCorner.Parent = GetCodeButton
  168.  
  169. -- Эффект при наведении на кнопку
  170. GetCodeButton.MouseEnter:Connect(function()
  171. game:GetService("TweenService"):Create(
  172. GetCodeButton,
  173. TweenInfo.new(0.2),
  174. {BackgroundColor3 = Color3.fromRGB(200, 120, 220)}
  175. ):Play()
  176. end)
  177.  
  178. GetCodeButton.MouseLeave:Connect(function()
  179. game:GetService("TweenService"):Create(
  180. GetCodeButton,
  181. TweenInfo.new(0.2),
  182. {BackgroundColor3 = Color3.fromRGB(180, 100, 200)}
  183. ):Play()
  184. end)
  185.  
  186. -- Кнопка перевода на английский
  187. local TranslateButton = Instance.new("TextButton")
  188. TranslateButton.Name = "TranslateButton"
  189. TranslateButton.Size = UDim2.new(0.8, 0, 0, 40)
  190. TranslateButton.Position = UDim2.new(0.1, 0, 0, 300)
  191. TranslateButton.BackgroundColor3 = Color3.fromRGB(200, 160, 60)
  192. TranslateButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  193. TranslateButton.Font = Enum.Font.GothamBold
  194. TranslateButton.Text = "ENGLISH VERSION"
  195. TranslateButton.TextSize = 16
  196.  
  197. -- Скругление для кнопки
  198. local TranslateButtonCorner = Instance.new("UICorner")
  199. TranslateButtonCorner.CornerRadius = UDim.new(0, 6)
  200. TranslateButtonCorner.Parent = TranslateButton
  201.  
  202. -- Эффект при наведении на кнопку
  203. TranslateButton.MouseEnter:Connect(function()
  204. game:GetService("TweenService"):Create(
  205. TranslateButton,
  206. TweenInfo.new(0.2),
  207. {BackgroundColor3 = Color3.fromRGB(220, 180, 80)}
  208. ):Play()
  209. end)
  210.  
  211. TranslateButton.MouseLeave:Connect(function()
  212. game:GetService("TweenService"):Create(
  213. TranslateButton,
  214. TweenInfo.new(0.2),
  215. {BackgroundColor3 = Color3.fromRGB(200, 160, 60)}
  216. ):Play()
  217. end)
  218.  
  219. -- Кнопка выключения
  220. local CloseButton = Instance.new("TextButton")
  221. CloseButton.Name = "CloseButton"
  222. CloseButton.Size = UDim2.new(0, 30, 0, 30)
  223. CloseButton.Position = UDim2.new(1, -35, 0, 10)
  224. CloseButton.BackgroundColor3 = Color3.fromRGB(200, 60, 60)
  225. CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  226. CloseButton.Font = Enum.Font.GothamBold
  227. CloseButton.Text = "X"
  228. CloseButton.TextSize = 16
  229. CloseButton.ZIndex = 2
  230.  
  231. -- Скругление для кнопки
  232. local CloseButtonCorner = Instance.new("UICorner")
  233. CloseButtonCorner.CornerRadius = UDim.new(0, 15)
  234. CloseButtonCorner.Parent = CloseButton
  235.  
  236. -- Эффект при наведении на кнопку
  237. CloseButton.MouseEnter:Connect(function()
  238. game:GetService("TweenService"):Create(
  239. CloseButton,
  240. TweenInfo.new(0.2),
  241. {BackgroundColor3 = Color3.fromRGB(220, 80, 80)}
  242. ):Play()
  243. end)
  244.  
  245. CloseButton.MouseLeave:Connect(function()
  246. game:GetService("TweenService"):Create(
  247. CloseButton,
  248. TweenInfo.new(0.2),
  249. {BackgroundColor3 = Color3.fromRGB(200, 60, 60)}
  250. ):Play()
  251. end)
  252.  
  253. -- Собираем GUI
  254. TitleLabel.Parent = MainFrame
  255. SubTitleLabel.Parent = MainFrame
  256. KeyInput.Parent = MainFrame
  257. ActivateButton.Parent = MainFrame
  258. Divider.Parent = MainFrame
  259. FreeButton.Parent = MainFrame
  260. GetCodeButton.Parent = MainFrame
  261. TranslateButton.Parent = MainFrame
  262. CloseButton.Parent = MainFrame
  263. MainFrame.Parent = ScreenGui
  264. ScreenGui.Parent = game:GetService("CoreGui")
  265.  
  266. -- Функция для уведомлений
  267. local function Notify(text)
  268. game.StarterGui:SetCore("SendNotification", {
  269. Title = isEnglish and "Key System" or "Система ключей",
  270. Text = text,
  271. Duration = 5
  272. })
  273. end
  274.  
  275. -- Функция для копирования в буфер обмена
  276. local function CopyToClipboard(text)
  277. local ClipBoard = setclipboard or toclipboard or set_clipboard or (Clipboard and Clipboard.set)
  278. if ClipBoard then
  279. ClipBoard(text)
  280. Notify(isEnglish and "You copied Discord server: "..text or "Вы скопировали Discord сервер: "..text)
  281. else
  282. Notify(isEnglish and "Failed to copy link. Copy manually: "..text or "Не удалось скопировать ссылку. Скопируйте вручную: "..text)
  283. end
  284. end
  285.  
  286. -- Функция для перевода интерфейса
  287. local function ToggleLanguage()
  288. isEnglish = not isEnglish
  289.  
  290. if isEnglish then
  291. -- Перевод на английский
  292. SubTitleLabel.Text = "Enter the key to access the premium version"
  293. KeyInput.PlaceholderText = "Enter key..."
  294. ActivateButton.Text = "ACTIVATE KEY"
  295. FreeButton.Text = "FREE VERSION"
  296. GetCodeButton.Text = "GET CODE"
  297. TranslateButton.Text = "RUSSIAN VERSION"
  298. else
  299. -- Возврат к русскому
  300. SubTitleLabel.Text = "Введите ключ для доступа к премиум версии"
  301. KeyInput.PlaceholderText = "Введите ключ..."
  302. ActivateButton.Text = "АКТИВИРОВАТЬ КЛЮЧ"
  303. FreeButton.Text = "БЕСПЛАТНАЯ ВЕРСИЯ"
  304. GetCodeButton.Text = "ПОЛУЧИТЬ КОД"
  305. TranslateButton.Text = "ENGLISH VERSION"
  306. end
  307. end
  308.  
  309. -- Обработка активации ключа
  310. ActivateButton.MouseButton1Click:Connect(function()
  311. local key = KeyInput.Text:gsub("%s+", ""):upper()
  312.  
  313. if key == "1Q" then
  314. Notify(isEnglish and "Key activated! Loading premium version..." or "Ключ активирован! Загружаем премиум версию...")
  315. loadstring(game:HttpGet("https://pastebin.com/raw/ytxP54RV"))()
  316. else
  317. Notify(isEnglish and "Invalid key! Try again." or "Неверный ключ! Попробуйте снова.")
  318. end
  319. end)
  320.  
  321. -- Обработка бесплатной версии
  322. FreeButton.MouseButton1Click:Connect(function()
  323. Notify(isEnglish and "Loading free version..." or "Загружаем бесплатную версию...")
  324. loadstring(game:HttpGet("https://pastebin.com/raw/cBnhcVkZ"))()
  325. end)
  326.  
  327. -- Обработка получения кода
  328. GetCodeButton.MouseButton1Click:Connect(function()
  329. CopyToClipboard("https://discord.gg/Z9EuZUY67g")
  330. end)
  331.  
  332. -- Обработка перевода
  333. TranslateButton.MouseButton1Click:Connect(function()
  334. ToggleLanguage()
  335. end)
  336.  
  337. -- Обработка закрытия GUI
  338. CloseButton.MouseButton1Click:Connect(function()
  339. ScreenGui:Destroy()
  340. guiEnabled = false
  341. end)
  342.  
  343. -- Функция для плавного перемещения GUI
  344. local dragging
  345. local dragInput
  346. local dragStart
  347. local startPos
  348.  
  349. local function update(input)
  350. local delta = input.Position - dragStart
  351. MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  352. end
  353.  
  354. MainFrame.InputBegan:Connect(function(input)
  355. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  356. dragging = true
  357. dragStart = input.Position
  358. startPos = MainFrame.Position
  359.  
  360. input.Changed:Connect(function()
  361. if input.UserInputState == Enum.UserInputState.End then
  362. dragging = false
  363. end
  364. end)
  365. end
  366. end)
  367.  
  368. MainFrame.InputChanged:Connect(function(input)
  369. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  370. dragInput = input
  371. end
  372. end)
  373.  
  374. game:GetService("UserInputService").InputChanged:Connect(function(input)
  375. if input == dragInput and dragging then
  376. update(input)
  377. end
  378. end)
  379.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement