Advertisement
MayWeEnjoy

Fe bang v2 R15

Dec 23rd, 2024 (edited)
198,778
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.72 KB | None | 0 0
  1. -- Services
  2. local Players = game:GetService("Players")
  3. local TweenService = game:GetService("TweenService")
  4. local LocalPlayer = Players.LocalPlayer
  5. local UserInputService = game:GetService("UserInputService")
  6.  
  7. -- Create the ScreenGui
  8. local ScreenGui = Instance.new("ScreenGui")
  9. ScreenGui.Parent = game.CoreGui
  10. ScreenGui.Name = "ModernGUI"
  11.  
  12. -- Main Frame
  13. local MainFrame = Instance.new("Frame")
  14. MainFrame.Parent = ScreenGui
  15. MainFrame.Size = UDim2.new(0, 300, 0, 150)
  16. MainFrame.Position = UDim2.new(0.5, -150, 0.5, -75)
  17. MainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  18. MainFrame.BorderSizePixel = 0
  19. MainFrame.Draggable = true
  20. MainFrame.Active = true
  21.  
  22. -- Squircle Shape
  23. local UICorner = Instance.new("UICorner")
  24. UICorner.Parent = MainFrame
  25. UICorner.CornerRadius = UDim.new(0, 20)
  26.  
  27. -- Title Bar
  28. local TitleBar = Instance.new("Frame")
  29. TitleBar.Parent = MainFrame
  30. TitleBar.Size = UDim2.new(1, 0, 0, 25)
  31. TitleBar.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  32. TitleBar.BorderSizePixel = 0
  33.  
  34. -- Title Label
  35. local TitleLabel = Instance.new("TextLabel")
  36. TitleLabel.Parent = TitleBar
  37. TitleLabel.Size = UDim2.new(0, 50, 1, 0)
  38. TitleLabel.Position = UDim2.new(0, 5, 0, 0)
  39. TitleLabel.Text = "Bang V2"
  40. TitleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  41. TitleLabel.BackgroundTransparency = 1
  42. TitleLabel.TextSize = 14
  43.  
  44. -- Close Button
  45. local CloseButton = Instance.new("TextButton")
  46. CloseButton.Parent = TitleBar
  47. CloseButton.Size = UDim2.new(0, 25, 1, 0)
  48. CloseButton.Position = UDim2.new(1, -25, 0, 0)
  49. CloseButton.Text = "X"
  50. CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  51. CloseButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
  52. CloseButton.BorderSizePixel = 0
  53. CloseButton.MouseButton1Click:Connect(function()
  54. ScreenGui:Destroy()
  55. end)
  56.  
  57. -- Minimize Button
  58. local MinimizeButton = Instance.new("TextButton")
  59. MinimizeButton.Parent = TitleBar
  60. MinimizeButton.Size = UDim2.new(0, 50, 1, 0)
  61. MinimizeButton.Position = UDim2.new(1, -75, 0, 0)
  62. MinimizeButton.Text = "Hide"
  63. MinimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  64. MinimizeButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
  65. MinimizeButton.BorderSizePixel = 0
  66.  
  67. local minimized = false
  68. MinimizeButton.MouseButton1Click:Connect(function()
  69. if not minimized then
  70. MainFrame.Size = UDim2.new(0, 300, 0, 25)
  71. MinimizeButton.Text = "Show"
  72. else
  73. MainFrame.Size = UDim2.new(0, 300, 0, 150)
  74. MinimizeButton.Text = "Hide"
  75. end
  76. minimized = not minimized
  77. end)
  78.  
  79. -- Text Box
  80. local TargetTextBox = Instance.new("TextBox")
  81. TargetTextBox.Parent = MainFrame
  82. TargetTextBox.Size = UDim2.new(0.9, 0, 0, 30)
  83. TargetTextBox.Position = UDim2.new(0.05, 0, 0.3, 0)
  84. TargetTextBox.PlaceholderText = "Enter target name"
  85. TargetTextBox.Text = ""
  86. TargetTextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  87. TargetTextBox.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  88. TargetTextBox.BorderSizePixel = 0
  89.  
  90. -- Toggle Button
  91. local ToggleButton = Instance.new("TextButton")
  92. ToggleButton.Parent = MainFrame
  93. ToggleButton.Size = UDim2.new(0.9, 0, 0, 30)
  94. ToggleButton.Position = UDim2.new(0.05, 0, 0.6, 0)
  95. ToggleButton.Text = "Start"
  96. ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  97. ToggleButton.BackgroundColor3 = Color3.fromRGB(70, 130, 180)
  98. ToggleButton.BorderSizePixel = 0
  99.  
  100. -- Functionality
  101. local following = false
  102. local targetPlayer = nil
  103. local animationId = "10714068222"
  104. local activeAnimation
  105.  
  106. ToggleButton.MouseButton1Click:Connect(function()
  107. if not following then
  108. -- Start following
  109. local targetName = TargetTextBox.Text:lower()
  110. targetPlayer = nil
  111.  
  112. for _, player in pairs(Players:GetPlayers()) do
  113. if player.Name:lower():find(targetName) or player.DisplayName:lower():find(targetName) then
  114. targetPlayer = player
  115. break
  116. end
  117. end
  118.  
  119. if targetPlayer and targetPlayer.Character then
  120. following = true
  121. ToggleButton.Text = "Stop"
  122.  
  123. -- Play Animation
  124. local humanoid = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
  125. if humanoid then
  126. local animation = Instance.new("Animation")
  127. animation.AnimationId = "rbxassetid://" .. animationId
  128. activeAnimation = humanoid:LoadAnimation(animation)
  129. activeAnimation:Play()
  130. activeAnimation:AdjustSpeed(2) -- Adjust speed to 2x
  131. end
  132.  
  133. coroutine.wrap(function()
  134. local lastPosition = nil
  135. while following do
  136. local targetCharacter = targetPlayer.Character
  137. if targetCharacter and targetCharacter:FindFirstChild("HumanoidRootPart") then
  138. local targetHRP = targetCharacter.HumanoidRootPart
  139. local targetPosition = targetHRP.Position
  140. local targetLookVector = targetHRP.CFrame.LookVector
  141.  
  142. -- Smoothly position character behind the target
  143. local forwardCFrame = targetHRP.CFrame * CFrame.new(0, 0, 1) -- Closer forward
  144. local backwardCFrame = targetHRP.CFrame * CFrame.new(0, 0, 2.5) -- Slightly farther backward
  145.  
  146. -- Forward motion
  147. local tweenForward = TweenService:Create(
  148. LocalPlayer.Character:FindFirstChild("HumanoidRootPart"),
  149. TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out),
  150. {CFrame = forwardCFrame}
  151. )
  152. tweenForward:Play()
  153. tweenForward.Completed:Wait()
  154.  
  155. -- Backward motion
  156. local tweenBackward = TweenService:Create(
  157. LocalPlayer.Character:FindFirstChild("HumanoidRootPart"),
  158. TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out),
  159. {CFrame = backwardCFrame}
  160. )
  161. tweenBackward:Play()
  162. tweenBackward.Completed:Wait()
  163.  
  164. -- Stop if target becomes invalid
  165. lastPosition = targetPosition
  166. else
  167. following = false
  168. ToggleButton.Text = "Start"
  169. break
  170. end
  171. end
  172. end)()
  173. else
  174. print("Target not found!")
  175. end
  176. else
  177. -- Stop following
  178. following = false
  179. ToggleButton.Text = "Start"
  180.  
  181. -- Stop Animation
  182. if activeAnimation then
  183. activeAnimation:Stop()
  184. activeAnimation = nil
  185. end
  186. end
  187. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement