Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local CloseButton = Instance.new("TextButton")
- local MinimizeButton = Instance.new("TextButton")
- local UserInputService = game:GetService("UserInputService")
- local TweenService = game:GetService("TweenService")
- local isMinimized = false
- local isFollowMenuOpen = false
- local isFollowing = false
- -- Настройка GUI
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- Frame.Parent = ScreenGui
- Frame.Size = UDim2.new(0, 250, 0, 285) -- Размер окна
- Frame.Position = UDim2.new(0.5, -100, 0.5, -50) -- Размещение в центре
- Frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- Frame.BackgroundTransparency = 0.15
- Frame.BorderSizePixel = 0
- Frame.Visible = false
- UICorner.Parent = Frame
- UICorner.CornerRadius = UDim.new(0, 15)
- local GUIHeader = Instance.new("TextLabel")
- GUIHeader.Parent = Frame
- GUIHeader.Size = UDim2.new(1, 0, 0, 30)
- GUIHeader.Position = UDim2.new(0, 0, 0, 0)
- GUIHeader.Text = "GUI by Zumhad"
- GUIHeader.TextColor3 = Color3.fromRGB(255, 255, 255)
- GUIHeader.Font = Enum.Font.SourceSansBold
- GUIHeader.TextSize = 20
- GUIHeader.BackgroundTransparency = 1
- -- Функция анимации появления
- local function fadeIn()
- Frame.Visible = true
- local tween = TweenService:Create(Frame, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {BackgroundTransparency = 0.15})
- tween:Play()
- end
- -- Функция анимации сворачивания
- local function fadeOut()
- local tween = TweenService:Create(Frame, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {BackgroundTransparency = 1})
- tween:Play()
- tween.Completed:Connect(function()
- Frame.Visible = false
- end)
- end
- fadeIn()
- -- Кнопка Close
- CloseButton.Parent = Frame
- CloseButton.Size = UDim2.new(1, 0, 0, 40)
- CloseButton.Position = UDim2.new(0, 0, 1, -40)
- CloseButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- CloseButton.BackgroundTransparency = 0.15
- CloseButton.BorderSizePixel = 0
- CloseButton.Text = "CLOSE"
- CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- CloseButton.Font = Enum.Font.SourceSansBold
- CloseButton.TextSize = 20
- CloseButton.MouseButton1Click:Connect(function()
- ScreenGui:Destroy()
- isFollowing = false
- local character = game.Players.LocalPlayer.Character
- if character and character:FindFirstChild("Humanoid") then
- character.Humanoid:Move(Vector3.new(0, 0, 0)) -- Останавливаем движение
- end
- end)
- -- Кнопка свернуть
- MinimizeButton.Parent = Frame
- MinimizeButton.Size = UDim2.new(0, 30, 0, 30)
- MinimizeButton.Position = UDim2.new(1, -35, 0, 5)
- MinimizeButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- MinimizeButton.BackgroundTransparency = 0.15
- MinimizeButton.BorderSizePixel = 0
- MinimizeButton.Text = "-"
- MinimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- MinimizeButton.Font = Enum.Font.SourceSansBold
- MinimizeButton.TextSize = 35
- MinimizeButton.MouseButton1Click:Connect(function()
- fadeOut()
- isMinimized = true
- end)
- UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if not gameProcessed and input.KeyCode == Enum.KeyCode.LeftControl then
- if Frame.Visible then
- fadeOut()
- else
- fadeIn()
- end
- end
- end)
- -- Кнопка MoveSpeed
- local MoveSpeedButton = Instance.new("TextButton")
- MoveSpeedButton.Parent = Frame
- MoveSpeedButton.Size = UDim2.new(1, 0, 0, 40)
- MoveSpeedButton.Position = UDim2.new(0, 0, 1, -140)
- MoveSpeedButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- MoveSpeedButton.BackgroundTransparency = 0.15
- MoveSpeedButton.BorderSizePixel = 0
- MoveSpeedButton.Text = "MOVESPEED"
- MoveSpeedButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- MoveSpeedButton.Font = Enum.Font.SourceSansBold
- MoveSpeedButton.TextSize = 20
- local MoveSpeedSettings = Instance.new("Frame")
- MoveSpeedSettings.Parent = Frame
- MoveSpeedSettings.Size = UDim2.new(0, 200, 0, 140)
- MoveSpeedSettings.Position = UDim2.new(0, MoveSpeedButton.Position.X.Offset - 210, 1, -140)
- MoveSpeedSettings.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- MoveSpeedSettings.BackgroundTransparency = 0.15
- MoveSpeedSettings.Visible = false
- local MoveSpeedButtonLabel = Instance.new("TextLabel")
- MoveSpeedButtonLabel.Parent = MoveSpeedSettings
- MoveSpeedButtonLabel.Size = UDim2.new(1, 0, 0, 30)
- MoveSpeedButtonLabel.Position = UDim2.new(0, 0, 0, 5)
- MoveSpeedButtonLabel.Text = "MoveSpeed Settings"
- MoveSpeedButtonLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- MoveSpeedButtonLabel.Font = Enum.Font.SourceSansBold
- MoveSpeedButtonLabel.TextSize = 20
- MoveSpeedButtonLabel.BackgroundTransparency = 1
- local CurrentSpeedLabel = Instance.new("TextLabel")
- CurrentSpeedLabel.Parent = MoveSpeedSettings
- CurrentSpeedLabel.Size = UDim2.new(1, 0, 0, 30)
- CurrentSpeedLabel.Position = UDim2.new(0, 0, 0, 40)
- CurrentSpeedLabel.Text = "Current Speed: " .. tostring(game.Players.LocalPlayer.Character.Humanoid.WalkSpeed)
- CurrentSpeedLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- CurrentSpeedLabel.Font = Enum.Font.SourceSansBold
- CurrentSpeedLabel.TextSize = 18
- CurrentSpeedLabel.BackgroundTransparency = 1
- local IncreaseSpeedButton = Instance.new("TextButton")
- IncreaseSpeedButton.Parent = MoveSpeedSettings
- IncreaseSpeedButton.Size = UDim2.new(0, 80, 0, 30)
- IncreaseSpeedButton.Position = UDim2.new(0.5, -90, 0, 80)
- IncreaseSpeedButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- IncreaseSpeedButton.Text = "+1"
- IncreaseSpeedButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- IncreaseSpeedButton.Font = Enum.Font.SourceSansBold
- IncreaseSpeedButton.TextSize = 18
- local DecreaseSpeedButton = Instance.new("TextButton")
- DecreaseSpeedButton.Parent = MoveSpeedSettings
- DecreaseSpeedButton.Size = UDim2.new(0, 80, 0, 30)
- DecreaseSpeedButton.Position = UDim2.new(0.5, 10, 0, 80)
- DecreaseSpeedButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- DecreaseSpeedButton.Text = "-1"
- DecreaseSpeedButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- DecreaseSpeedButton.Font = Enum.Font.SourceSansBold
- DecreaseSpeedButton.TextSize = 18
- IncreaseSpeedButton.MouseButton1Click:Connect(function()
- local humanoid = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("Humanoid")
- if humanoid then
- humanoid.WalkSpeed = humanoid.WalkSpeed + 1
- CurrentSpeedLabel.Text = "Current Speed: " .. tostring(humanoid.WalkSpeed)
- end
- end)
- DecreaseSpeedButton.MouseButton1Click:Connect(function()
- local humanoid = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("Humanoid")
- if humanoid then
- humanoid.WalkSpeed = humanoid.WalkSpeed - 1
- CurrentSpeedLabel.Text = "Current Speed: " .. tostring(humanoid.WalkSpeed)
- end
- end)
- MoveSpeedButton.MouseButton1Click:Connect(function()
- MoveSpeedSettings.Visible = not MoveSpeedSettings.Visible
- CurrentSpeedLabel.Text = "Current Speed: " .. tostring(game.Players.LocalPlayer.Character.Humanoid.WalkSpeed)
- end)
- -- Кнопка FOLLOW
- local FollowButton = Instance.new("TextButton")
- FollowButton.Parent = Frame
- FollowButton.Size = UDim2.new(1, 0, 0, 40)
- FollowButton.Position = UDim2.new(0, 0, 1, -90)
- FollowButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- FollowButton.BackgroundTransparency = 0.15
- FollowButton.BorderSizePixel = 0
- FollowButton.Text = "FOLLOW"
- FollowButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- FollowButton.Font = Enum.Font.SourceSansBold
- FollowButton.TextSize = 20
- -- Окно настроек FOLLOW (расположено справа от FOLLOW)
- local FollowSettings = Instance.new("Frame")
- FollowSettings.Parent = Frame
- FollowSettings.Size = UDim2.new(0, 200, 0, 140)
- FollowSettings.Position = UDim2.new(0, FollowButton.Position.X.Offset + 260, 1, -140)
- FollowSettings.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- FollowSettings.BackgroundTransparency = 0.15
- FollowSettings.Visible = false
- local StatusLabel = Instance.new("TextLabel")
- StatusLabel.Parent = FollowSettings
- StatusLabel.Size = UDim2.new(1, 0, 0, 30)
- StatusLabel.Position = UDim2.new(0, 0, 0, 5)
- StatusLabel.Text = isFollowing and "STATUS ON" or "STATUS OFF"
- StatusLabel.TextColor3 = isFollowing and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0)
- StatusLabel.Font = Enum.Font.SourceSansBold
- StatusLabel.TextSize = 20
- StatusLabel.BackgroundTransparency = 1
- FollowButton.MouseButton1Click:Connect(function()
- isFollowMenuOpen = not isFollowMenuOpen
- FollowSettings.Visible = isFollowMenuOpen
- end)
- -- Поле для ввода никнейма
- local UsernameInput = Instance.new("TextBox")
- UsernameInput.Parent = FollowSettings
- UsernameInput.Size = UDim2.new(0, 180, 0, 30)
- UsernameInput.Position = UDim2.new(0.5, -90, 0, 80)
- UsernameInput.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- UsernameInput.TextColor3 = Color3.fromRGB(255, 255, 255)
- UsernameInput.Font = Enum.Font.SourceSansBold
- UsernameInput.TextSize = 18
- UsernameInput.PlaceholderText = "Enter username"
- UsernameInput.Text = ""
- -- Поле для вывода статуса
- local StatusMessage = Instance.new("TextLabel")
- StatusMessage.Parent = FollowSettings
- StatusMessage.Size = UDim2.new(1, 0, 0, 30)
- StatusMessage.Position = UDim2.new(0, 0, 0, 115)
- StatusMessage.Text = ""
- StatusMessage.TextColor3 = Color3.fromRGB(255, 255, 255)
- StatusMessage.Font = Enum.Font.SourceSansBold
- StatusMessage.TextSize = 18
- StatusMessage.BackgroundTransparency = 1
- local function moveToPlayer(targetPlayer)
- local character = game.Players.LocalPlayer.Character
- if not character or not character:FindFirstChild("HumanoidRootPart") then return end
- local hrp = character.HumanoidRootPart
- local targetChar = targetPlayer.Character
- if not targetChar or not targetChar:FindFirstChild("HumanoidRootPart") then return end
- local targetHrp = targetChar.HumanoidRootPart
- -- Разворачиваемся в сторону игрока
- hrp.CFrame = CFrame.new(hrp.Position, targetHrp.Position)
- -- Двигаемся к цели
- local humanoid = character:FindFirstChild("Humanoid")
- if humanoid then
- humanoid:MoveTo(targetHrp.Position)
- humanoid.MoveToFinished:Wait() -- Ждем завершения движения, чтобы избежать остановок
- end
- end
- -- Кнопка ON
- local FollowOnButton = Instance.new("TextButton")
- FollowOnButton.Parent = FollowSettings
- FollowOnButton.Size = UDim2.new(0, 80, 0, 30)
- FollowOnButton.Position = UDim2.new(0.5, -90, 0, 35)
- FollowOnButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- FollowOnButton.Text = "ON"
- FollowOnButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- FollowOnButton.Font = Enum.Font.SourceSansBold
- FollowOnButton.TextSize = 18
- -- Кнопка OFF
- local FollowOffButton = Instance.new("TextButton")
- FollowOffButton.Parent = FollowSettings
- FollowOffButton.Size = UDim2.new(0, 80, 0, 30)
- FollowOffButton.Position = UDim2.new(0.5, 10, 0, 35)
- FollowOffButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- FollowOffButton.Text = "OFF"
- FollowOffButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- FollowOffButton.Font = Enum.Font.SourceSansBold
- FollowOffButton.TextSize = 18
- FollowOnButton.MouseButton1Click:Connect(function()
- local username = UsernameInput.Text
- local targetPlayer = nil
- for _, player in pairs(game.Players:GetPlayers()) do
- if player.Name == username then
- targetPlayer = player
- break
- end
- end
- if targetPlayer then
- StatusLabel.Text = "STATUS ON"
- StatusLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
- isFollowing = true
- StatusMessage.Text = "Player is online!"
- StatusMessage.TextColor3 = Color3.fromRGB(0, 255, 0)
- -- Запускаем перемещение в сторону игрока
- while isFollowing and targetPlayer and targetPlayer.Character do
- moveToPlayer(targetPlayer)
- wait(0.1) -- Обновляем позицию чаще, чтобы избежать задержек
- end
- else
- StatusLabel.Text = "STATUS OFF"
- StatusLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
- isFollowing = false
- StatusMessage.Text = "Player is not on the server!"
- StatusMessage.TextColor3 = Color3.fromRGB(255, 0, 0)
- end
- end)
- FollowOffButton.MouseButton1Click:Connect(function()
- StatusLabel.Text = "STATUS OFF"
- StatusLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
- isFollowing = false
- local character = game.Players.LocalPlayer.Character
- if character and character:FindFirstChild("Humanoid") then
- character.Humanoid:Move(Vector3.new(0, 0, 0)) -- Останавливаем движение
- end
- end)
- local dragging, dragInput, dragStart, startPos
- Frame.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = Frame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- Frame.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- local delta = input.Position - dragStart
- Frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement