Idisjsusus

Flip

Feb 13th, 2025
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. -- Configurações do botão
  2. local buttonSize = UDim2.new(0, 100, 0, 100) -- Tamanho do botão
  3. local buttonPosition = UDim2.new(0.5, -50, 0.8, -50) -- Posição inicial do botão (centro na parte inferior)
  4.  
  5. -- Criação da interface do usuário
  6. local screenGui = Instance.new("ScreenGui", game.Players.LocalPlayer:WaitForChild("PlayerGui"))
  7. local button = Instance.new("TextButton", screenGui)
  8. button.Size = buttonSize
  9. button.Position = buttonPosition
  10. button.Text = "Flip"
  11. button.BackgroundColor3 = Color3.new(0.2, 0.6, 1) -- Cor do botão
  12. button.TextScaled = true
  13. button.Draggable = true -- Permite que o botão seja arrastado
  14.  
  15. -- Variável de controle para o flip
  16. local FlipCooldown = false
  17.  
  18. -- Função para o flip
  19. local function FortniteFlips()
  20. if FlipCooldown then
  21. return
  22. end
  23.  
  24. FlipCooldown = true
  25. local character = game:GetService("Players").LocalPlayer.Character
  26. local hrp = character and character:FindFirstChild("HumanoidRootPart")
  27. local humanoid = character and character:FindFirstChildOfClass("Humanoid")
  28. local animator = humanoid and humanoid:FindFirstChildOfClass("Animator")
  29. if not hrp or not humanoid then
  30. FlipCooldown = false
  31. return
  32. end
  33.  
  34. humanoid:ChangeState("Jumping")
  35. if animator then
  36. for _, track in pairs(animator:GetPlayingAnimationTracks()) do
  37. track:Stop()
  38. end
  39. end
  40.  
  41. local duration = 0.15 -- Reduzido para aumentar a velocidade do flip
  42. local steps = 90
  43. local startCFrame = hrp.CFrame
  44. local forwardVector = startCFrame.LookVector
  45. local upVector = Vector3.new(0, 1, 0)
  46.  
  47. for i = 1, steps do
  48. local t = i / steps
  49. local height = 4 * (t - t ^ 2) * 10
  50. local nextPos = startCFrame.Position + forwardVector * (35 * t) + upVector * height
  51. local rotation = startCFrame.Rotation * CFrame.Angles(-math.rad(i * (360 / steps)), 0, 0)
  52.  
  53. hrp.CFrame = CFrame.new(nextPos) * rotation
  54. task.wait(duration / steps)
  55. end
  56.  
  57. hrp.CFrame = CFrame.new(startCFrame.Position + forwardVector * 35) * startCFrame.Rotation
  58.  
  59. if animator then
  60. humanoid:Move(Vector3.zero)
  61. end
  62.  
  63. task.wait(0.1)
  64. FlipCooldown = false
  65. end
  66.  
  67. -- Função para tocar o som "Boing"
  68. local function PlayBoing()
  69. local sound = Instance.new("Sound", game:GetService("Players").LocalPlayer.Character)
  70. sound.SoundId = "rbxassetid://9111926008" -- Substitua pelo ID do som "Boing"
  71. sound.PlaybackSpeed = math.random() * 1.3 + 1
  72. sound:Play()
  73. end
  74.  
  75. -- Conectar o botão ao flip
  76. button.MouseButton1Click:Connect(function()
  77. PlayBoing()
  78. FortniteFlips()
  79. end)
Advertisement
Add Comment
Please, Sign In to add comment