Advertisement
MayWeEnjoy

R15 get banged script

Dec 22nd, 2024
156,633
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.67 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 = "Sus R15"
  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 = "10714360343"
  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. end
  131.  
  132. coroutine.wrap(function()
  133. local lastPosition = nil
  134. while following do
  135. local targetCharacter = targetPlayer.Character
  136. if targetCharacter and targetCharacter.PrimaryPart then
  137. local targetPosition = targetCharacter.PrimaryPart.Position
  138. local targetLookVector = targetCharacter.PrimaryPart.CFrame.LookVector
  139.  
  140. -- Position in front of the target
  141. local forwardCFrame = targetCharacter.PrimaryPart.CFrame * CFrame.new(0, 0, -1.5) -- Slightly in front
  142. local backwardCFrame = targetCharacter.PrimaryPart.CFrame * CFrame.new(0, 0, -1.1) -- Closer to target
  143.  
  144. -- Forward motion
  145. local tweenForward = TweenService:Create(
  146. LocalPlayer.Character.PrimaryPart,
  147. TweenInfo.new(0.15, Enum.EasingStyle.Linear, Enum.EasingDirection.Out),
  148. {CFrame = forwardCFrame}
  149. )
  150. tweenForward:Play()
  151. tweenForward.Completed:Wait()
  152.  
  153. -- Backward motion
  154. local tweenBackward = TweenService:Create(
  155. LocalPlayer.Character.PrimaryPart,
  156. TweenInfo.new(0.15, Enum.EasingStyle.Linear, Enum.EasingDirection.Out),
  157. {CFrame = backwardCFrame}
  158. )
  159. tweenBackward:Play()
  160. tweenBackward.Completed:Wait()
  161.  
  162. -- Stop if target becomes invalid
  163. lastPosition = targetPosition
  164. else
  165. following = false
  166. ToggleButton.Text = "Start"
  167. break
  168. end
  169. end
  170. end)()
  171. else
  172. print("Target not found!")
  173. end
  174. else
  175. -- Stop following
  176. following = false
  177. ToggleButton.Text = "Start"
  178.  
  179. -- Stop Animation
  180. if activeAnimation then
  181. activeAnimation:Stop()
  182. activeAnimation = nil
  183. end
  184. end
  185. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement