Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Configurações do botão
- local buttonSize = UDim2.new(0, 100, 0, 100) -- Tamanho do botão
- local buttonPosition = UDim2.new(0.5, -50, 0.8, -50) -- Posição inicial do botão (centro na parte inferior)
- -- Criação da interface do usuário
- local screenGui = Instance.new("ScreenGui", game.Players.LocalPlayer:WaitForChild("PlayerGui"))
- local button = Instance.new("TextButton", screenGui)
- button.Size = buttonSize
- button.Position = buttonPosition
- button.Text = "Flip"
- button.BackgroundColor3 = Color3.new(0.2, 0.6, 1) -- Cor do botão
- button.TextScaled = true
- button.Draggable = true -- Permite que o botão seja arrastado
- -- Variável de controle para o flip
- local FlipCooldown = false
- -- Função para o flip
- local function FortniteFlips()
- if FlipCooldown then
- return
- end
- FlipCooldown = true
- local character = game:GetService("Players").LocalPlayer.Character
- local hrp = character and character:FindFirstChild("HumanoidRootPart")
- local humanoid = character and character:FindFirstChildOfClass("Humanoid")
- local animator = humanoid and humanoid:FindFirstChildOfClass("Animator")
- if not hrp or not humanoid then
- FlipCooldown = false
- return
- end
- humanoid:ChangeState("Jumping")
- if animator then
- for _, track in pairs(animator:GetPlayingAnimationTracks()) do
- track:Stop()
- end
- end
- local duration = 0.15 -- Reduzido para aumentar a velocidade do flip
- local steps = 90
- local startCFrame = hrp.CFrame
- local forwardVector = startCFrame.LookVector
- local upVector = Vector3.new(0, 1, 0)
- for i = 1, steps do
- local t = i / steps
- local height = 4 * (t - t ^ 2) * 10
- local nextPos = startCFrame.Position + forwardVector * (35 * t) + upVector * height
- local rotation = startCFrame.Rotation * CFrame.Angles(-math.rad(i * (360 / steps)), 0, 0)
- hrp.CFrame = CFrame.new(nextPos) * rotation
- task.wait(duration / steps)
- end
- hrp.CFrame = CFrame.new(startCFrame.Position + forwardVector * 35) * startCFrame.Rotation
- if animator then
- humanoid:Move(Vector3.zero)
- end
- task.wait(0.1)
- FlipCooldown = false
- end
- -- Função para tocar o som "Boing"
- local function PlayBoing()
- local sound = Instance.new("Sound", game:GetService("Players").LocalPlayer.Character)
- sound.SoundId = "rbxassetid://9111926008" -- Substitua pelo ID do som "Boing"
- sound.PlaybackSpeed = math.random() * 1.3 + 1
- sound:Play()
- end
- -- Conectar o botão ao flip
- button.MouseButton1Click:Connect(function()
- PlayBoing()
- FortniteFlips()
- end)
Advertisement
Add Comment
Please, Sign In to add comment