Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Criando um menu
- local menu = Instance.new ("ScreenGui")
- menu.Name = "Menu"
- menu.Parent = game.Players.LocalPlayer:WaitForChild ("PlayerGui")
- -- Criando um botão para abrir o menu
- local openButton = Instance.new ("TextButton")
- openButton.Name = "OpenButton"
- openButton.Text = "Menu"
- openButton.Size = UDim2.new (0, 100, 0, 50)
- openButton.Position = UDim2.new (0, 10, 0, 10)
- openButton.Parent = menu
- -- Criando um frame para o menu
- local menuFrame = Instance.new ("Frame")
- menuFrame.Name = "MenuFrame"
- menuFrame.Size = UDim2.new (0, 200, 0, 300)
- menuFrame.Position = UDim2.new (0, 120, 0, 10)
- menuFrame.Visible = false
- menuFrame.Parent = menu
- -- Criando um texto para o menu
- local menuText = Instance.new ("TextLabel")
- menuText.Name = "MenuText"
- menuText.Text = "Escolha uma opção:"
- menuText.Size = UDim2.new (1, 0, 0, 50)
- menuText.Parent = menuFrame
- -- Criando um botão para antilag
- local antilagButton = Instance.new ("TextButton")
- antilagButton.Name = "AntilagButton"
- antilagButton.Text = "Antilag"
- antilagButton.Size = UDim2.new (1, 0, 0, 50)
- antilagButton.Position = UDim2.new (0, 0, 0, 50)
- antilagButton.Parent = menuFrame
- -- Criando um botão para fly
- local flyButton = Instance.new ("TextButton")
- flyButton.Name = "FlyButton"
- flyButton.Text = "Fly"
- flyButton.Size = UDim2.new (1, 0, 0, 50)
- flyButton.Position = UDim2.new (0, 0, 0, 100)
- flyButton.Parent = menuFrame
- -- Criando um frame para o fly
- local flyFrame = Instance.new ("Frame")
- flyFrame.Name = "FlyFrame"
- flyFrame.Size = UDim2.new (0, 200, 0, 200)
- flyFrame.Position = UDim2.new (0, 330, 0, 10)
- flyFrame.Visible = false
- flyFrame.Parent = menu
- -- Criando um texto para o fly
- local flyText = Instance.new ("TextLabel")
- flyText.Name = "FlyText"
- flyText.Text = "Créditos: Admin"
- flyText.Size = UDim2.new (1, 0, 0, 50)
- flyText.Parent = flyFrame
- -- Criando um botão para ativar o fly
- local activateButton = Instance.new ("TextButton")
- activateButton.Name = "ActivateButton"
- activateButton.Text = "Ativar"
- activateButton.Size = UDim2.new (1, 0, 0, 50)
- activateButton.Position = UDim2.new (0, 0, 0, 50)
- activateButton.Parent = flyFrame
- -- Criando um botão para desativar o fly
- local deactivateButton = Instance.new ("TextButton")
- deactivateButton.Name = "DeactivateButton"
- deactivateButton.Text = "Desativar"
- deactivateButton.Size = UDim2.new (1, 0, 0, 50)
- deactivateButton.Position = UDim2.new (0, 0, 0, 100)
- deactivateButton.Parent = flyFrame
- -- Definindo as variáveis para o fly
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse ()
- local flying = false
- local speed = 0.5
- local keys = {a = false, d = false, w = false, s = false}
- -- Definindo a função para o fly
- local function fly ()
- local bodyGyro = Instance.new ("BodyGyro")
- bodyGyro.Parent = player.Character.UpperTorso
- bodyGyro.MaxTorque = Vector3.new (9e9, 9e9, 9e9)
- bodyGyro.CFrame = player.Character.UpperTorso.CFrame
- local bodyVelocity = Instance.new ("BodyVelocity")
- bodyVelocity.Parent = player.Character.UpperTorso
- bodyVelocity.MaxForce = Vector3.new (9e9, 9e9, 9e9)
- bodyVelocity.Velocity = player.Character.UpperTorso.Velocity
- flying = true
- repeat
- wait ()
- player.Character.Humanoid.PlatformStand = true
- local new = (bodyGyro.CFrame - bodyGyro.CFrame.p) + mouse.Hit.p
- local move = (new - bodyGyro.CFrame.p).Magnitude * speed
- if keys.w then
- new = new + bodyGyro.CFrame.lookVector * move
- end
- if keys.s then
- new = new - bodyGyro.CFrame.lookVector * move
- end
- if keys.d then
- new = new * CFrame.new (move, 0, 0)
- end
- if keys.a then
- new = new * CFrame.new (-move, 0, 0)
- end
- if keys.space then
- new = new + Vector3.new (0, move, 0)
- end
- bodyGyro.CFrame = new
- bodyVelocity.Velocity = Vector3.new (0, 0.1, 0)
- until not flying
- bodyGyro:Destroy ()
- bodyVelocity:Destroy ()
- player.Character.Humanoid.PlatformStand = false
- end
- -- Definindo a função para o antilag
- local function antilag ()
- local graphics = game:GetService ("UserSettings"):GetService ("UserGameSettings")
- graphics.SavedQualityLevel = Enum.QualityLevel.Level01
- graphics.GraphicsMode = Enum.GraphicsMode.Automatic
- graphics.MeshQuality = Enum.MeshQuality.Low
- graphics.TextureQuality = Enum.TextureQuality.Low
- graphics.ShadowQuality = Enum.ShadowQuality.Low
- graphics.MaterialQuality = Enum.MaterialQuality.Low
- graphics.Antialiasing = Enum.AntialiasingMode.Off
- graphics.AnisotropicFiltering = Enum.AnisotropicFilteringMode.Off
- end
- -- Definindo os eventos para os botões
- openButton.MouseButton1Click:Connect (function ()
- menuFrame.Visible = not menuFrame.Visible
- end)
- antilagButton.MouseButton1Click:Connect (function ()
- antilag ()
- end)
- flyButton.MouseButton1Click:Connect (function ()
- flyFrame.Visible = not flyFrame.Visible
- end)
- activateButton.MouseButton1Click:Connect (function ()
- fly ()
- end)
- deactivateButton.MouseButton1Click:Connect (function ()
- flying = false
- end)
- -- Definindo os eventos para as teclas
- mouse.KeyDown:Connect (function (key)
- if key:lower () == "w" then
- keys.w = true
- elseif key:lower () == "s" then
- keys.s = true
- elseif key:lower () == "a" then
- keys.a = true
- elseif key:lower () == "d" then
- keys.d = true
- elseif key:lower () == "space" then
- keys.space = true
- end
- end)
- mouse.KeyUp:Connect (function (key)
- if key:lower () == "w" then
- keys.w = false
- elseif key:lower () == "s" then
- keys.s = false
- elseif key:lower () == "a" then
- keys.a = false
- elseif key:lower () == "d" then
- keys.d = false
- elseif key:lower () == "space" then
- keys.space = false
- end
- end)
Advertisement