Advertisement
kill21_2

инжектор

May 23rd, 2025
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.78 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local UserInputService = game:GetService("UserInputService")
  3.  
  4. local player = Players.LocalPlayer
  5. local gui = Instance.new("ScreenGui")
  6. gui.Name = "ScriptExecutorGUI"
  7. gui.ResetOnSpawn = false
  8. gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  9. gui.Parent = player:WaitForChild("PlayerGui")
  10.  
  11. -- Основной фрейм
  12. local mainFrame = Instance.new("Frame")
  13. mainFrame.Name = "MainFrame"
  14. mainFrame.Size = UDim2.new(0, 400, 0, 350)
  15. mainFrame.Position = UDim2.new(0.5, -200, 0.5, -175)
  16. mainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  17. mainFrame.BackgroundColor3 = Color3.fromRGB(18, 18, 18)
  18. mainFrame.BorderColor3 = Color3.fromRGB(75, 0, 130)
  19. mainFrame.BorderSizePixel = 2
  20. mainFrame.Parent = gui
  21.  
  22. -- Заголовок
  23. local title = Instance.new("TextLabel")
  24. title.Name = "Title"
  25. title.Size = UDim2.new(1, 0, 0, 40)
  26. title.Position = UDim2.new(0, 0, 0, 0)
  27. title.BackgroundColor3 = Color3.fromRGB(30, 0, 50)
  28. title.BorderSizePixel = 0
  29. title.Text = "SCRIPT EXECUTOR"
  30. title.TextColor3 = Color3.fromRGB(200, 180, 255)
  31. title.Font = Enum.Font.GothamBold
  32. title.TextSize = 18
  33. title.Parent = mainFrame
  34.  
  35. -- Поле для ввода скрипта
  36. local scriptBox = Instance.new("TextBox")
  37. scriptBox.Name = "ScriptBox"
  38. scriptBox.Size = UDim2.new(0.9, 0, 0, 220)
  39. scriptBox.Position = UDim2.new(0.05, 0, 0.15, 0)
  40. scriptBox.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  41. scriptBox.BorderColor3 = Color3.fromRGB(80, 0, 120)
  42. scriptBox.TextColor3 = Color3.fromRGB(220, 220, 220)
  43. scriptBox.TextXAlignment = Enum.TextXAlignment.Left
  44. scriptBox.TextYAlignment = Enum.TextYAlignment.Top
  45. scriptBox.PlaceholderText = "Введите ваш Lua скрипт здесь..."
  46. scriptBox.Font = Enum.Font.Code
  47. scriptBox.TextSize = 14
  48. scriptBox.MultiLine = true
  49. scriptBox.TextWrapped = true
  50. scriptBox.ClearTextOnFocus = false
  51. scriptBox.Parent = mainFrame
  52.  
  53. -- Кнопка запуска
  54. local executeButton = Instance.new("TextButton")
  55. executeButton.Name = "ExecuteButton"
  56. executeButton.Size = UDim2.new(0.4, 0, 0, 35)
  57. executeButton.Position = UDim2.new(0.05, 0, 0.85, 0)
  58. executeButton.BackgroundColor3 = Color3.fromRGB(80, 0, 120)
  59. executeButton.BorderSizePixel = 0
  60. executeButton.Text = "ЗАПУСТИТЬ"
  61. executeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  62. executeButton.Font = Enum.Font.GothamBold
  63. executeButton.TextSize = 14
  64. executeButton.Parent = mainFrame
  65.  
  66. -- Эффект при наведении на кнопку
  67. executeButton.MouseEnter:Connect(function()
  68. executeButton.BackgroundColor3 = Color3.fromRGB(120, 0, 180)
  69. end)
  70.  
  71. executeButton.MouseLeave:Connect(function()
  72. executeButton.BackgroundColor3 = Color3.fromRGB(80, 0, 120)
  73. end)
  74.  
  75. -- Кнопка очистки
  76. local clearButton = Instance.new("TextButton")
  77. clearButton.Name = "ClearButton"
  78. clearButton.Size = UDim2.new(0.4, 0, 0, 35)
  79. clearButton.Position = UDim2.new(0.55, 0, 0.85, 0)
  80. clearButton.BackgroundColor3 = Color3.fromRGB(50, 0, 80)
  81. clearButton.BorderSizePixel = 0
  82. clearButton.Text = "ОЧИСТИТЬ"
  83. clearButton.TextColor3 = Color3.fromRGB(200, 180, 255)
  84. clearButton.Font = Enum.Font.GothamBold
  85. clearButton.TextSize = 14
  86. clearButton.Parent = mainFrame
  87.  
  88. -- Эффект при наведении на кнопку
  89. clearButton.MouseEnter:Connect(function()
  90. clearButton.BackgroundColor3 = Color3.fromRGB(80, 0, 130)
  91. end)
  92.  
  93. clearButton.MouseLeave:Connect(function()
  94. clearButton.BackgroundColor3 = Color3.fromRGB(50, 0, 80)
  95. end)
  96.  
  97. -- Кнопка закрытия
  98. local closeButton = Instance.new("TextButton")
  99. closeButton.Name = "CloseButton"
  100. closeButton.Size = UDim2.new(0, 30, 0, 30)
  101. closeButton.Position = UDim2.new(1, -35, 0, 5)
  102. closeButton.BackgroundColor3 = Color3.fromRGB(200, 0, 0)
  103. closeButton.BorderSizePixel = 0
  104. closeButton.Text = "X"
  105. closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  106. closeButton.Font = Enum.Font.GothamBold
  107. closeButton.TextSize = 16
  108. closeButton.Parent = mainFrame
  109.  
  110. -- Эффект при наведении на кнопку
  111. closeButton.MouseEnter:Connect(function()
  112. closeButton.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
  113. end)
  114.  
  115. closeButton.MouseLeave:Connect(function()
  116. closeButton.BackgroundColor3 = Color3.fromRGB(200, 0, 0)
  117. end)
  118.  
  119. -- Функционал кнопок
  120. executeButton.MouseButton1Click:Connect(function()
  121. local scriptText = scriptBox.Text
  122. if scriptText == "" then
  123. game:GetService("StarterGui"):SetCore("SendNotification", {
  124. Title = "Ошибка",
  125. Text = "Введите скрипт для выполнения!",
  126. Duration = 3
  127. })
  128. return
  129. end
  130.  
  131. -- Защита от потенциально опасных операций
  132. local protectedScript = scriptText:gsub("shutdown()", "-- blocked")
  133. protectedScript = protectedScript:gsub("game:Destroy()", "-- blocked")
  134. protectedScript = protectedScript:gsub("while true do", "-- blocked")
  135.  
  136. -- Выполнение скрипта
  137. local success, err = pcall(function()
  138. local func, compileError = loadstring(protectedScript)
  139. if func then
  140. func()
  141. else
  142. error(compileError)
  143. end
  144. end)
  145.  
  146. if not success then
  147. game:GetService("StarterGui"):SetCore("SendNotification", {
  148. Title = "Ошибка выполнения",
  149. Text = tostring(err),
  150. Duration = 5
  151. })
  152. else
  153. game:GetService("StarterGui"):SetCore("SendNotification", {
  154. Title = "Успешно",
  155. Text = "Скрипт выполнен!",
  156. Duration = 3
  157. })
  158. end
  159. end)
  160.  
  161. clearButton.MouseButton1Click:Connect(function()
  162. scriptBox.Text = ""
  163. end)
  164.  
  165. closeButton.MouseButton1Click:Connect(function()
  166. gui:Destroy()
  167. end)
  168.  
  169. -- Функционал перемещения окна
  170. local dragging
  171. local dragInput
  172. local dragStart
  173. local startPos
  174.  
  175. local function update(input)
  176. local delta = input.Position - dragStart
  177. mainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  178. end
  179.  
  180. title.InputBegan:Connect(function(input)
  181. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  182. dragging = true
  183. dragStart = input.Position
  184. startPos = mainFrame.Position
  185.  
  186. input.Changed:Connect(function()
  187. if input.UserInputState == Enum.UserInputState.End then
  188. dragging = false
  189. end
  190. end)
  191. end
  192. end)
  193.  
  194. title.InputChanged:Connect(function(input)
  195. if input.UserInputType == Enum.UserInputType.MouseMovement then
  196. dragInput = input
  197. end
  198. end)
  199.  
  200. UserInputService.InputChanged:Connect(function(input)
  201. if input == dragInput and dragging then
  202. update(input)
  203. end
  204. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement