Vladislav829

Script universal

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