Advertisement
zumhad

Gui By Zumhad

Feb 25th, 2025 (edited)
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Autohotkey 13.88 KB | Source Code | 0 0
  1. local ScreenGui = Instance.new("ScreenGui")
  2. local Frame = Instance.new("Frame")
  3. local UICorner = Instance.new("UICorner")
  4. local CloseButton = Instance.new("TextButton")
  5. local MinimizeButton = Instance.new("TextButton")
  6. local UserInputService = game:GetService("UserInputService")
  7. local TweenService = game:GetService("TweenService")
  8. local isMinimized = false
  9. local isFollowMenuOpen = false
  10. local isFollowing = false
  11.  
  12. -- Настройка GUI
  13. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  14.  
  15. Frame.Parent = ScreenGui
  16. Frame.Size = UDim2.new(0, 250, 0, 285) -- Размер окна
  17. Frame.Position = UDim2.new(0.5, -100, 0.5, -50) -- Размещение в центре
  18. Frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  19. Frame.BackgroundTransparency = 0.15
  20. Frame.BorderSizePixel = 0
  21. Frame.Visible = false
  22.  
  23. UICorner.Parent = Frame
  24. UICorner.CornerRadius = UDim.new(0, 15)
  25.  
  26. local GUIHeader = Instance.new("TextLabel")
  27. GUIHeader.Parent = Frame
  28. GUIHeader.Size = UDim2.new(1, 0, 0, 30)
  29. GUIHeader.Position = UDim2.new(0, 0, 0, 0)
  30. GUIHeader.Text = "GUI by Zumhad"
  31. GUIHeader.TextColor3 = Color3.fromRGB(255, 255, 255)
  32. GUIHeader.Font = Enum.Font.SourceSansBold
  33. GUIHeader.TextSize = 20
  34. GUIHeader.BackgroundTransparency = 1
  35.  
  36. -- Функция анимации появления
  37. local function fadeIn()
  38.     Frame.Visible = true
  39.     local tween = TweenService:Create(Frame, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {BackgroundTransparency = 0.15})
  40.     tween:Play()
  41. end
  42.  
  43. -- Функция анимации сворачивания
  44. local function fadeOut()
  45.     local tween = TweenService:Create(Frame, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {BackgroundTransparency = 1})
  46.     tween:Play()
  47.     tween.Completed:Connect(function()
  48.         Frame.Visible = false
  49.     end)
  50. end
  51.  
  52. fadeIn()
  53.  
  54. -- Кнопка Close
  55. CloseButton.Parent = Frame
  56. CloseButton.Size = UDim2.new(1, 0, 0, 40)
  57. CloseButton.Position = UDim2.new(0, 0, 1, -40)
  58. CloseButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  59. CloseButton.BackgroundTransparency = 0.15
  60. CloseButton.BorderSizePixel = 0
  61. CloseButton.Text = "CLOSE"
  62. CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  63. CloseButton.Font = Enum.Font.SourceSansBold
  64. CloseButton.TextSize = 20
  65. CloseButton.MouseButton1Click:Connect(function()
  66.     ScreenGui:Destroy()
  67.    
  68.         isFollowing = false
  69.    
  70.     local character = game.Players.LocalPlayer.Character
  71.     if character and character:FindFirstChild("Humanoid") then
  72.         character.Humanoid:Move(Vector3.new(0, 0, 0)) -- Останавливаем движение
  73.     end
  74. end)
  75.  
  76. -- Кнопка свернуть
  77. MinimizeButton.Parent = Frame
  78. MinimizeButton.Size = UDim2.new(0, 30, 0, 30)
  79. MinimizeButton.Position = UDim2.new(1, -35, 0, 5)
  80. MinimizeButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  81. MinimizeButton.BackgroundTransparency = 0.15
  82. MinimizeButton.BorderSizePixel = 0
  83. MinimizeButton.Text = "-"
  84. MinimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  85. MinimizeButton.Font = Enum.Font.SourceSansBold
  86. MinimizeButton.TextSize = 35
  87. MinimizeButton.MouseButton1Click:Connect(function()
  88.     fadeOut()
  89.     isMinimized = true
  90. end)
  91.  
  92. UserInputService.InputBegan:Connect(function(input, gameProcessed)
  93.     if not gameProcessed and input.KeyCode == Enum.KeyCode.LeftControl then
  94.         if Frame.Visible then
  95.             fadeOut()
  96.         else
  97.             fadeIn()
  98.         end
  99.     end
  100. end)
  101.  
  102. -- Кнопка MoveSpeed
  103. local MoveSpeedButton = Instance.new("TextButton")
  104. MoveSpeedButton.Parent = Frame
  105. MoveSpeedButton.Size = UDim2.new(1, 0, 0, 40)
  106. MoveSpeedButton.Position = UDim2.new(0, 0, 1, -140)
  107. MoveSpeedButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  108. MoveSpeedButton.BackgroundTransparency = 0.15
  109. MoveSpeedButton.BorderSizePixel = 0
  110. MoveSpeedButton.Text = "MOVESPEED"
  111. MoveSpeedButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  112. MoveSpeedButton.Font = Enum.Font.SourceSansBold
  113. MoveSpeedButton.TextSize = 20
  114.  
  115. local MoveSpeedSettings = Instance.new("Frame")
  116. MoveSpeedSettings.Parent = Frame
  117. MoveSpeedSettings.Size = UDim2.new(0, 200, 0, 140)
  118. MoveSpeedSettings.Position = UDim2.new(0, MoveSpeedButton.Position.X.Offset - 210, 1, -140)
  119. MoveSpeedSettings.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  120. MoveSpeedSettings.BackgroundTransparency = 0.15
  121. MoveSpeedSettings.Visible = false
  122.  
  123. local MoveSpeedButtonLabel = Instance.new("TextLabel")
  124. MoveSpeedButtonLabel.Parent = MoveSpeedSettings
  125. MoveSpeedButtonLabel.Size = UDim2.new(1, 0, 0, 30)
  126. MoveSpeedButtonLabel.Position = UDim2.new(0, 0, 0, 5)
  127. MoveSpeedButtonLabel.Text = "MoveSpeed Settings"
  128. MoveSpeedButtonLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  129. MoveSpeedButtonLabel.Font = Enum.Font.SourceSansBold
  130. MoveSpeedButtonLabel.TextSize = 20
  131. MoveSpeedButtonLabel.BackgroundTransparency = 1
  132.  
  133. local CurrentSpeedLabel = Instance.new("TextLabel")
  134. CurrentSpeedLabel.Parent = MoveSpeedSettings
  135. CurrentSpeedLabel.Size = UDim2.new(1, 0, 0, 30)
  136. CurrentSpeedLabel.Position = UDim2.new(0, 0, 0, 40)
  137. CurrentSpeedLabel.Text = "Current Speed: " .. tostring(game.Players.LocalPlayer.Character.Humanoid.WalkSpeed)
  138. CurrentSpeedLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  139. CurrentSpeedLabel.Font = Enum.Font.SourceSansBold
  140. CurrentSpeedLabel.TextSize = 18
  141. CurrentSpeedLabel.BackgroundTransparency = 1
  142.  
  143. local IncreaseSpeedButton = Instance.new("TextButton")
  144. IncreaseSpeedButton.Parent = MoveSpeedSettings
  145. IncreaseSpeedButton.Size = UDim2.new(0, 80, 0, 30)
  146. IncreaseSpeedButton.Position = UDim2.new(0.5, -90, 0, 80)
  147. IncreaseSpeedButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  148. IncreaseSpeedButton.Text = "+1"
  149. IncreaseSpeedButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  150. IncreaseSpeedButton.Font = Enum.Font.SourceSansBold
  151. IncreaseSpeedButton.TextSize = 18
  152.  
  153. local DecreaseSpeedButton = Instance.new("TextButton")
  154. DecreaseSpeedButton.Parent = MoveSpeedSettings
  155. DecreaseSpeedButton.Size = UDim2.new(0, 80, 0, 30)
  156. DecreaseSpeedButton.Position = UDim2.new(0.5, 10, 0, 80)
  157. DecreaseSpeedButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  158. DecreaseSpeedButton.Text = "-1"
  159. DecreaseSpeedButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  160. DecreaseSpeedButton.Font = Enum.Font.SourceSansBold
  161. DecreaseSpeedButton.TextSize = 18
  162.  
  163. IncreaseSpeedButton.MouseButton1Click:Connect(function()
  164.     local humanoid = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("Humanoid")
  165.     if humanoid then
  166.         humanoid.WalkSpeed = humanoid.WalkSpeed + 1
  167.         CurrentSpeedLabel.Text = "Current Speed: " .. tostring(humanoid.WalkSpeed)
  168.     end
  169. end)
  170.  
  171. DecreaseSpeedButton.MouseButton1Click:Connect(function()
  172.     local humanoid = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("Humanoid")
  173.     if humanoid then
  174.         humanoid.WalkSpeed = humanoid.WalkSpeed - 1
  175.         CurrentSpeedLabel.Text = "Current Speed: " .. tostring(humanoid.WalkSpeed)
  176.     end
  177. end)
  178.  
  179. MoveSpeedButton.MouseButton1Click:Connect(function()
  180.     MoveSpeedSettings.Visible = not MoveSpeedSettings.Visible
  181.     CurrentSpeedLabel.Text = "Current Speed: " .. tostring(game.Players.LocalPlayer.Character.Humanoid.WalkSpeed)
  182. end)
  183.  
  184. -- Кнопка FOLLOW
  185. local FollowButton = Instance.new("TextButton")
  186. FollowButton.Parent = Frame
  187. FollowButton.Size = UDim2.new(1, 0, 0, 40)
  188. FollowButton.Position = UDim2.new(0, 0, 1, -90)
  189. FollowButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  190. FollowButton.BackgroundTransparency = 0.15
  191. FollowButton.BorderSizePixel = 0
  192. FollowButton.Text = "FOLLOW"
  193. FollowButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  194. FollowButton.Font = Enum.Font.SourceSansBold
  195. FollowButton.TextSize = 20
  196.  
  197. -- Окно настроек FOLLOW (расположено справа от FOLLOW)
  198. local FollowSettings = Instance.new("Frame")
  199. FollowSettings.Parent = Frame
  200. FollowSettings.Size = UDim2.new(0, 200, 0, 140)
  201. FollowSettings.Position = UDim2.new(0, FollowButton.Position.X.Offset + 260, 1, -140)
  202. FollowSettings.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  203. FollowSettings.BackgroundTransparency = 0.15
  204. FollowSettings.Visible = false
  205.  
  206. local StatusLabel = Instance.new("TextLabel")
  207. StatusLabel.Parent = FollowSettings
  208. StatusLabel.Size = UDim2.new(1, 0, 0, 30)
  209. StatusLabel.Position = UDim2.new(0, 0, 0, 5)
  210. StatusLabel.Text = isFollowing and "STATUS ON" or "STATUS OFF"
  211. StatusLabel.TextColor3 = isFollowing and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0)
  212. StatusLabel.Font = Enum.Font.SourceSansBold
  213. StatusLabel.TextSize = 20
  214. StatusLabel.BackgroundTransparency = 1
  215.  
  216. FollowButton.MouseButton1Click:Connect(function()
  217.     isFollowMenuOpen = not isFollowMenuOpen
  218.     FollowSettings.Visible = isFollowMenuOpen
  219. end)
  220.  
  221. -- Поле для ввода никнейма
  222. local UsernameInput = Instance.new("TextBox")
  223. UsernameInput.Parent = FollowSettings
  224. UsernameInput.Size = UDim2.new(0, 180, 0, 30)
  225. UsernameInput.Position = UDim2.new(0.5, -90, 0, 80)
  226. UsernameInput.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  227. UsernameInput.TextColor3 = Color3.fromRGB(255, 255, 255)
  228. UsernameInput.Font = Enum.Font.SourceSansBold
  229. UsernameInput.TextSize = 18
  230. UsernameInput.PlaceholderText = "Enter username"
  231. UsernameInput.Text = ""
  232.  
  233. -- Поле для вывода статуса
  234. local StatusMessage = Instance.new("TextLabel")
  235. StatusMessage.Parent = FollowSettings
  236. StatusMessage.Size = UDim2.new(1, 0, 0, 30)
  237. StatusMessage.Position = UDim2.new(0, 0, 0, 115)
  238. StatusMessage.Text = ""
  239. StatusMessage.TextColor3 = Color3.fromRGB(255, 255, 255)
  240. StatusMessage.Font = Enum.Font.SourceSansBold
  241. StatusMessage.TextSize = 18
  242. StatusMessage.BackgroundTransparency = 1
  243.  
  244.  
  245. local function moveToPlayer(targetPlayer)
  246.     local character = game.Players.LocalPlayer.Character
  247.     if not character or not character:FindFirstChild("HumanoidRootPart") then return end
  248.    
  249.     local hrp = character.HumanoidRootPart
  250.     local targetChar = targetPlayer.Character
  251.     if not targetChar or not targetChar:FindFirstChild("HumanoidRootPart") then return end
  252.    
  253.     local targetHrp = targetChar.HumanoidRootPart
  254.    
  255.     -- Разворачиваемся в сторону игрока
  256.     hrp.CFrame = CFrame.new(hrp.Position, targetHrp.Position)
  257.    
  258.     -- Двигаемся к цели
  259.     local humanoid = character:FindFirstChild("Humanoid")
  260.     if humanoid then
  261.         humanoid:MoveTo(targetHrp.Position)
  262.         humanoid.MoveToFinished:Wait() -- Ждем завершения движения, чтобы избежать остановок
  263.     end
  264. end
  265.  
  266. -- Кнопка ON
  267. local FollowOnButton = Instance.new("TextButton")
  268. FollowOnButton.Parent = FollowSettings
  269. FollowOnButton.Size = UDim2.new(0, 80, 0, 30)
  270. FollowOnButton.Position = UDim2.new(0.5, -90, 0, 35)
  271. FollowOnButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  272. FollowOnButton.Text = "ON"
  273. FollowOnButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  274. FollowOnButton.Font = Enum.Font.SourceSansBold
  275. FollowOnButton.TextSize = 18
  276.  
  277. -- Кнопка OFF
  278. local FollowOffButton = Instance.new("TextButton")
  279. FollowOffButton.Parent = FollowSettings
  280. FollowOffButton.Size = UDim2.new(0, 80, 0, 30)
  281. FollowOffButton.Position = UDim2.new(0.5, 10, 0, 35)
  282. FollowOffButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  283. FollowOffButton.Text = "OFF"
  284. FollowOffButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  285. FollowOffButton.Font = Enum.Font.SourceSansBold
  286. FollowOffButton.TextSize = 18
  287.  
  288. FollowOnButton.MouseButton1Click:Connect(function()
  289.     local username = UsernameInput.Text
  290.     local targetPlayer = nil
  291.    
  292.     for _, player in pairs(game.Players:GetPlayers()) do
  293.         if player.Name == username then
  294.             targetPlayer = player
  295.             break
  296.         end
  297.     end
  298.    
  299.     if targetPlayer then
  300.         StatusLabel.Text = "STATUS ON"
  301.         StatusLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
  302.         isFollowing = true
  303.        
  304.         StatusMessage.Text = "Player is online!"
  305.         StatusMessage.TextColor3 = Color3.fromRGB(0, 255, 0)
  306.        
  307.         -- Запускаем перемещение в сторону игрока
  308.         while isFollowing and targetPlayer and targetPlayer.Character do
  309.             moveToPlayer(targetPlayer)
  310.             wait(0.1) -- Обновляем позицию чаще, чтобы избежать задержек
  311.         end
  312.     else
  313.         StatusLabel.Text = "STATUS OFF"
  314.         StatusLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
  315.         isFollowing = false
  316.        
  317.         StatusMessage.Text = "Player is not on the server!"
  318.         StatusMessage.TextColor3 = Color3.fromRGB(255, 0, 0)
  319.     end
  320. end)
  321.  
  322. FollowOffButton.MouseButton1Click:Connect(function()
  323.     StatusLabel.Text = "STATUS OFF"
  324.     StatusLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
  325.     isFollowing = false
  326.    
  327.     local character = game.Players.LocalPlayer.Character
  328.     if character and character:FindFirstChild("Humanoid") then
  329.         character.Humanoid:Move(Vector3.new(0, 0, 0)) -- Останавливаем движение
  330.     end
  331. end)
  332.  
  333.  
  334. local dragging, dragInput, dragStart, startPos
  335.  
  336. Frame.InputBegan:Connect(function(input)
  337.     if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  338.         dragging = true
  339.         dragStart = input.Position
  340.         startPos = Frame.Position
  341.         input.Changed:Connect(function()
  342.             if input.UserInputState == Enum.UserInputState.End then
  343.                 dragging = false
  344.             end
  345.         end)
  346.     end
  347. end)
  348.  
  349. Frame.InputChanged:Connect(function(input)
  350.     if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  351.         dragInput = input
  352.     end
  353. end)
  354.  
  355. UserInputService.InputChanged:Connect(function(input)
  356.     if input == dragInput and dragging then
  357.         local delta = input.Position - dragStart
  358.         Frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  359.     end
  360. end)
  361.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement