Vladislav829

Script universal 1.0

Jan 31st, 2025
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.18 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local RunService = game:GetService("RunService")
  3. local UserInputService = game:GetService("UserInputService")
  4. local LocalPlayer = Players.LocalPlayer
  5.  
  6. -- Создание главного GUI
  7. local ScreenGui = Instance.new("ScreenGui")
  8. ScreenGui.Parent = game.CoreGui
  9.  
  10. local MainFrame = Instance.new("Frame")
  11. MainFrame.Size = UDim2.new(0, 300, 0, 400)
  12. MainFrame.Position = UDim2.new(0, 50, 0, 50)
  13. MainFrame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  14. MainFrame.Parent = ScreenGui
  15. MainFrame.ClipsDescendants = true
  16.  
  17. local ToggleButton = Instance.new("TextButton")
  18. ToggleButton.Size = UDim2.new(0, 300, 0, 30)
  19. ToggleButton.Position = UDim2.new(0, 0, 0, 0)
  20. ToggleButton.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3)
  21. ToggleButton.Text = "Свернуть"
  22. ToggleButton.Parent = MainFrame
  23.  
  24. -- Вкладки
  25. local Tabs = Instance.new("Frame")
  26. Tabs.Size = UDim2.new(1, 0, 0, 30)
  27. Tabs.Position = UDim2.new(0, 0, 0, 30)
  28. Tabs.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3)
  29. Tabs.Parent = MainFrame
  30.  
  31. local TPButton = Instance.new("TextButton")
  32. TPButton.Size = UDim2.new(0, 100, 1, 0)
  33. TPButton.Position = UDim2.new(0, 0, 0, 0)
  34. TPButton.Text = "TP"
  35. TPButton.Parent = Tabs
  36.  
  37. local PlayerButton = Instance.new("TextButton")
  38. PlayerButton.Size = UDim2.new(0, 100, 1, 0)
  39. PlayerButton.Position = UDim2.new(0, 100, 0, 0)
  40. PlayerButton.Text = "Player"
  41. PlayerButton.Parent = Tabs
  42.  
  43. local UniversalButton = Instance.new("TextButton")
  44. UniversalButton.Size = UDim2.new(0, 100, 1, 0)
  45. UniversalButton.Position = UDim2.new(0, 200, 0, 0)
  46. UniversalButton.Text = "Universal"
  47. UniversalButton.Parent = Tabs
  48.  
  49. -- Контейнер для содержимого вкладок
  50. local TabContent = Instance.new("Frame")
  51. TabContent.Size = UDim2.new(1, 0, 1, -60)
  52. TabContent.Position = UDim2.new(0, 0, 0, 60)
  53. TabContent.BackgroundTransparency = 1
  54. TabContent.Parent = MainFrame
  55.  
  56. -- Содержимое вкладки TP
  57. local TPFrame = Instance.new("ScrollingFrame")
  58. TPFrame.Size = UDim2.new(1, 0, 1, 0)
  59. TPFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
  60. TPFrame.ScrollBarThickness = 10
  61. TPFrame.Visible = true
  62. TPFrame.Parent = TabContent
  63.  
  64. local UIListLayoutTP = Instance.new("UIListLayout")
  65. UIListLayoutTP.Padding = UDim.new(0, 5)
  66. UIListLayoutTP.Parent = TPFrame
  67.  
  68. local function UpdateTPList()
  69.     for _, child in ipairs(TPFrame:GetChildren()) do
  70.         if child:IsA("TextButton") then
  71.             child:Destroy()
  72.         end
  73.     end
  74.  
  75.     for _, player in ipairs(Players:GetPlayers()) do
  76.         if player ~= LocalPlayer then
  77.             local TPButton = Instance.new("TextButton")
  78.             TPButton.Size = UDim2.new(1, -20, 0, 30)
  79.             TPButton.Text = player.Name
  80.             TPButton.BackgroundColor3 = Color3.new(0.4, 0.4, 0.4)
  81.             TPButton.Parent = TPFrame
  82.  
  83.             TPButton.MouseButton1Click:Connect(function()
  84.                 if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  85.                     LocalPlayer.Character.HumanoidRootPart.CFrame = player.Character.HumanoidRootPart.CFrame
  86.                 end
  87.             end)
  88.         end
  89.     end
  90.     TPFrame.CanvasSize = UDim2.new(0, 0, 0, UIListLayoutTP.AbsoluteContentSize.Y)
  91. end
  92.  
  93. Players.PlayerAdded:Connect(UpdateTPList)
  94. Players.PlayerRemoving:Connect(UpdateTPList)
  95. UpdateTPList()
  96.  
  97. -- Содержимое вкладки Player
  98. local PlayerFrame = Instance.new("Frame")
  99. PlayerFrame.Size = UDim2.new(1, 0, 1, 0)
  100. PlayerFrame.Visible = false
  101. PlayerFrame.Parent = TabContent
  102.  
  103. local SpeedInput = Instance.new("TextBox")
  104. SpeedInput.Size = UDim2.new(0, 200, 0, 30)
  105. SpeedInput.Position = UDim2.new(0, 50, 0, 50)
  106. SpeedInput.Text = "16"
  107. SpeedInput.BackgroundColor3 = Color3.new(0.4, 0.4, 0.4)
  108. SpeedInput.TextColor3 = Color3.new(1, 1, 1)
  109. SpeedInput.ClearTextOnFocus = true
  110. SpeedInput.Parent = PlayerFrame
  111.  
  112. local ApplySpeedButton = Instance.new("TextButton")
  113. ApplySpeedButton.Size = UDim2.new(0, 200, 0, 30)
  114. ApplySpeedButton.Position = UDim2.new(0, 50, 0, 90)
  115. ApplySpeedButton.Text = "Применить скорость"
  116. ApplySpeedButton.BackgroundColor3 = Color3.new(0.4, 0.4, 0.4)
  117. ApplySpeedButton.Parent = PlayerFrame
  118.  
  119. ApplySpeedButton.MouseButton1Click:Connect(function()
  120.     local speed = tonumber(SpeedInput.Text)
  121.     if speed then
  122.         LocalPlayer.Character.Humanoid.WalkSpeed = speed
  123.     end
  124. end)
  125.  
  126. local NoclipButton = Instance.new("TextButton")
  127. NoclipButton.Size = UDim2.new(0, 200, 0, 30)
  128. NoclipButton.Position = UDim2.new(0, 50, 0, 130)
  129. NoclipButton.Text = "Ноклип: Выкл"
  130. NoclipButton.BackgroundColor3 = Color3.new(0.4, 0.4, 0.4)
  131. NoclipButton.Parent = PlayerFrame
  132.  
  133. local noclip = false
  134. RunService.Stepped:Connect(function()
  135.     if noclip and LocalPlayer.Character then
  136.         for _, part in ipairs(LocalPlayer.Character:GetDescendants()) do
  137.             if part:IsA("BasePart") and part.CanCollide then
  138.                 part.CanCollide = false
  139.             end
  140.         end
  141.     end
  142. end)
  143.  
  144. NoclipButton.MouseButton1Click:Connect(function()
  145.     noclip = not noclip
  146.     NoclipButton.Text = "Ноклип: " .. (noclip and "Вкл" or "Выкл")
  147. end)
  148.  
  149. local FlyButton = Instance.new("TextButton")
  150. FlyButton.Size = UDim2.new(0, 200, 0, 30)
  151. FlyButton.Position = UDim2.new(0, 50, 0, 170)
  152. FlyButton.Text = "Полёт: Выкл"
  153. FlyButton.BackgroundColor3 = Color3.new(0.4, 0.4, 0.4)
  154. FlyButton.Parent = PlayerFrame
  155.  
  156. local flying = false
  157. local flySpeed = 50
  158. FlyButton.MouseButton1Click:Connect(function()
  159.     flying = not flying
  160.     FlyButton.Text = "Полёт: " .. (flying and "Вкл" or "Выкл")
  161.  
  162.     if flying then
  163.         while flying do
  164.             LocalPlayer.Character.HumanoidRootPart.Velocity = Vector3.new(0, flySpeed, 0)
  165.             RunService.Heartbeat:Wait()
  166.         end
  167.     end
  168. end)
  169.  
  170. -- Содержимое вкладки Universal
  171. local UniversalFrame = Instance.new("Frame")
  172. UniversalFrame.Size = UDim2.new(1, 0, 1, 0)
  173. UniversalFrame.Visible = false
  174. UniversalFrame.Parent = TabContent
  175.  
  176. local ESPButton = Instance.new("TextButton")
  177. ESPButton.Size = UDim2.new(0, 200, 0, 30)
  178. ESPButton.Position = UDim2.new(0, 50, 0, 50)
  179. ESPButton.Text = "ESP: Выкл"
  180. ESPButton.BackgroundColor3 = Color3.new(0.4, 0.4, 0.4)
  181. ESPButton.Parent = UniversalFrame
  182.  
  183. local espEnabled = false
  184. local function toggleESP()
  185.     espEnabled = not espEnabled
  186.     ESPButton.Text = "ESP: " .. (espEnabled and "Вкл" or "Выкл")
  187.  
  188.     for _, player in ipairs(Players:GetPlayers()) do
  189.         if player ~= LocalPlayer then
  190.             local character = player.Character
  191.             if character and character:FindFirstChild("HumanoidRootPart") then
  192.                 local highlight = character:FindFirstChild("Highlight")
  193.                 if espEnabled then
  194.                     if not highlight then
  195.                         highlight = Instance.new("Highlight")
  196.                         highlight.Parent = character
  197.                         highlight.FillTransparency = 0.5
  198.                         highlight.OutlineTransparency = 0
  199.                     end
  200.                 else
  201.                     if highlight then
  202.                         highlight:Destroy()
  203.                     end
  204.                 end
  205.             end
  206.         end
  207.     end
  208. end
  209.  
  210. ESPButton.MouseButton1Click:Connect(toggleESP)
  211.  
  212. -- Логика переключения вкладок
  213. local function ShowTab(tab)
  214.     TPFrame.Visible = false
  215.     PlayerFrame.Visible = false
  216.     UniversalFrame.Visible = false
  217.  
  218.     if tab == "TP" then
  219.         TPFrame.Visible = true
  220.     elseif tab == "Player" then
  221.         PlayerFrame.Visible = true
  222.     elseif tab == "Universal" then
  223.         UniversalFrame.Visible = true
  224.     end
  225. end
  226.  
  227. TPButton.MouseButton1Click:Connect(function() ShowTab("TP") end)
  228. PlayerButton.MouseButton1Click:Connect(function() ShowTab("Player") end)
  229. UniversalButton.MouseButton1Click:Connect(function() ShowTab("Universal") end)
  230.  
  231. -- Перемещение окна
  232. local dragging = false
  233. local dragStart, startPos
  234.  
  235. ToggleButton.InputBegan:Connect(function(input)
  236.     if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  237.         dragging = true
  238.         dragStart = input.Position
  239.         startPos = MainFrame.Position
  240.     end
  241. end)
  242.  
  243. ToggleButton.InputChanged:Connect(function(input)
  244.     if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
  245.         local delta = input.Position - dragStart
  246.         MainFrame.Position = UDim2.new(
  247.             startPos.X.Scale,
  248.             startPos.X.Offset + delta.X,
  249.             startPos.Y.Scale,
  250.             startPos.Y.Offset + delta.Y
  251.         )
  252.     end
  253. end)
  254.  
  255. ToggleButton.InputEnded:Connect(function(input)
  256.     if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  257.         dragging = false
  258.     end
  259. end)
  260.  
  261. -- Логика сворачивания окна
  262. local isCollapsed = false
  263. ToggleButton.MouseButton1Click:Connect(function()
  264.     isCollapsed = not isCollapsed
  265.     MainFrame.Size = isCollapsed and UDim2.new(0, 300, 0, 30) or UDim2.new(0, 300, 0, 400)
  266.     ToggleButton.Text = isCollapsed and "Развернуть" or "Свернуть"
  267. end)
  268.  
Add Comment
Please, Sign In to add comment