MaxproGlitcher

Script test pour Fling

Oct 7th, 2023
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.26 KB | None | 0 0
  1. print("Before the while loop")
  2.  
  3.  
  4.  
  5. local Targets = {"All"} -- "All", "Target Name", "Target name can be shortened"
  6.  
  7. local Players = game:GetService("Players")
  8. local Player = Players.LocalPlayer
  9.  
  10. local AllBool = falseasa
  11.  
  12. local GetPlayer = function(Name)
  13. Name = Name:lower()
  14. if Name == "all" or Name == "others" then
  15. AllBool = true
  16. return
  17. elseif Name == "random" then
  18. local GetPlayers = Players:GetPlayers()
  19. if table.find(GetPlayers,Player) then table.remove(GetPlayers,table.find(GetPlayers,Player)) end
  20. return GetPlayers[math.random(#GetPlayers)]
  21. elseif Name ~= "random" and Name ~= "all" and Name ~= "others" then
  22. for _,x in next, Players:GetPlayers() do
  23. if x ~= Player then
  24. if x.Name:lower():match("^"..Name) then
  25. return x;
  26. elseif x.DisplayName:lower():match("^"..Name) then
  27. return x;
  28. end
  29. end
  30. end
  31. else
  32. return
  33. end
  34. end
  35.  
  36. local Message = function(_Title, _Text, Time)
  37. game:GetService("StarterGui"):SetCore("SendNotification", {Title = _Title, Text = _Text, Duration = Time})
  38. end
  39.  
  40. local SkidFling = function(TargetPlayer)
  41. local Character = Player.Character
  42. local Humanoid = Character and Character:FindFirstChildOfClass("Humanoid")
  43. local RootPart = Humanoid and Humanoid.RootPart
  44.  
  45. local TCharacter = TargetPlayer.Character
  46. local THumanoid
  47. local TRootPart
  48. local THead
  49. local Accessory
  50. local Handle
  51.  
  52. if TCharacter:FindFirstChildOfClass("Humanoid") then
  53. THumanoid = TCharacter:FindFirstChildOfClass("Humanoid")
  54. end
  55. if THumanoid and THumanoid.RootPart then
  56. TRootPart = THumanoid.RootPart
  57. end
  58. if TCharacter:FindFirstChild("Head") then
  59. THead = TCharacter.Head
  60. end
  61. if TCharacter:FindFirstChildOfClass("Accessory") then
  62. Accessory = TCharacter:FindFirstChildOfClass("Accessory")
  63. end
  64. if Accessoy and Accessory:FindFirstChild("Handle") then
  65. Handle = Accessory.Handle
  66. end
  67.  
  68. if Character and Humanoid and RootPart then
  69. if RootPart.Velocity.Magnitude < 50 then
  70. getgenv().OldPos = RootPart.CFrame
  71. end
  72. if THumanoid and THumanoid.Sit and not AllBool then
  73. return Message("Error Occurred", "Targeting is sitting", 5) -- u can remove dis part if u want lol
  74. end
  75. if THead then
  76. workspace.CurrentCamera.CameraSubject = THead
  77. elseif not THead and Handle then
  78. workspace.CurrentCamera.CameraSubject = Handle
  79. elseif THumanoid and TRootPart then
  80. workspace.CurrentCamera.CameraSubject = THumanoid
  81. end
  82. if not TCharacter:FindFirstChildWhichIsA("BasePart") then
  83. return
  84. end
  85.  
  86. local FPos = function(BasePart, Pos, Ang)
  87. RootPart.CFrame = CFrame.new(BasePart.Position) * Pos * Ang
  88. Character:SetPrimaryPartCFrame(CFrame.new(BasePart.Position) * Pos * Ang)
  89. RootPart.Velocity = Vector3.new(9e7, 9e7 * 10, 9e7)
  90. RootPart.RotVelocity = Vector3.new(9e8, 9e8, 9e8)
  91. end
  92.  
  93. local SFBasePart = function(BasePart)
  94. local TimeToWait = 0.1
  95. local Time = tick()
  96. local Angle = 0
  97.  
  98. repeat
  99. if RootPart and THumanoid then
  100. if BasePart.Velocity.Magnitude < 50 then
  101. Angle = Angle + 100
  102.  
  103. FPos(BasePart, CFrame.new(0, 1.5, 0) + THumanoid.MoveDirection * BasePart.Velocity.Magnitude / 1.25, CFrame.Angles(math.rad(Angle),0 ,0))
  104. task.wait()
  105.  
  106. FPos(BasePart, CFrame.new(0, -1.5, 0) + THumanoid.MoveDirection * BasePart.Velocity.Magnitude / 1.25, CFrame.Angles(math.rad(Angle), 0, 0))
  107. task.wait()
  108.  
  109. FPos(BasePart, CFrame.new(2.25, 1.5, -2.25) + THumanoid.MoveDirection * BasePart.Velocity.Magnitude / 1.25, CFrame.Angles(math.rad(Angle), 0, 0))
  110. task.wait()
  111.  
  112. FPos(BasePart, CFrame.new(-2.25, -1.5, 2.25) + THumanoid.MoveDirection * BasePart.Velocity.Magnitude / 1.25, CFrame.Angles(math.rad(Angle), 0, 0))
  113. task.wait()
  114.  
  115. FPos(BasePart, CFrame.new(0, 1.5, 0) + THumanoid.MoveDirection,CFrame.Angles(math.rad(Angle), 0, 0))
  116. task.wait()
  117.  
  118. FPos(BasePart, CFrame.new(0, -1.5, 0) + THumanoid.MoveDirection,CFrame.Angles(math.rad(Angle), 0, 0))
  119. task.wait()
  120. else
  121. FPos(BasePart, CFrame.new(0, 1.5, THumanoid.WalkSpeed), CFrame.Angles(math.rad(90), 0, 0))
  122. task.wait()
  123.  
  124. FPos(BasePart, CFrame.new(0, -1.5, -THumanoid.WalkSpeed), CFrame.Angles(0, 0, 0))
  125. task.wait()
  126.  
  127. FPos(BasePart, CFrame.new(0, 1.5, THumanoid.WalkSpeed), CFrame.Angles(math.rad(90), 0, 0))
  128. task.wait()
  129.  
  130. FPos(BasePart, CFrame.new(0, 1.5, TRootPart.Velocity.Magnitude / 1.25), CFrame.Angles(math.rad(90), 0, 0))
  131. task.wait()
  132.  
  133. FPos(BasePart, CFrame.new(0, -1.5, -TRootPart.Velocity.Magnitude / 1.25), CFrame.Angles(0, 0, 0))
  134. task.wait()
  135.  
  136. FPos(BasePart, CFrame.new(0, 1.5, TRootPart.Velocity.Magnitude / 1.25), CFrame.Angles(math.rad(90), 0, 0))
  137. task.wait()
  138.  
  139. FPos(BasePart, CFrame.new(0, -1.5, 0), CFrame.Angles(math.rad(90), 0, 0))
  140. task.wait()
  141.  
  142. FPos(BasePart, CFrame.new(0, -1.5, 0), CFrame.Angles(0, 0, 0))
  143. task.wait()
  144.  
  145. FPos(BasePart, CFrame.new(0, -1.5 ,0), CFrame.Angles(math.rad(-90), 0, 0))
  146. task.wait()
  147.  
  148. FPos(BasePart, CFrame.new(0, -1.5, 0), CFrame.Angles(0, 0, 0))
  149. task.wait()
  150. end
  151. else
  152. break
  153. end
  154. until BasePart.Velocity.Magnitude > 500 or BasePart.Parent ~= TargetPlayer.Character or TargetPlayer.Parent ~= Players or not TargetPlayer.Character == TCharacter or THumanoid.Sit or Humanoid.Health <= 0 or tick() > Time + TimeToWait
  155. end
  156.  
  157. workspace.FallenPartsDestroyHeight = 0/0
  158.  
  159. local BV = Instance.new("BodyVelocity")
  160. BV.Name = "EpixVel"
  161. BV.Parent = RootPart
  162. BV.Velocity = Vector3.new(9e8, 9e8, 9e8)
  163. BV.MaxForce = Vector3.new(1/0, 1/0, 1/0)
  164.  
  165. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, false)
  166.  
  167. if TRootPart and THead then
  168. if (TRootPart.CFrame.p - THead.CFrame.p).Magnitude > 5 then
  169. SFBasePart(THead)
  170. else
  171. SFBasePart(TRootPart)
  172. end
  173. elseif TRootPart and not THead then
  174. SFBasePart(TRootPart)
  175. elseif not TRootPart and THead then
  176. SFBasePart(THead)
  177. elseif not TRootPart and not THead and Accessory and Handle then
  178. SFBasePart(Handle)
  179. else
  180. return Message("Error Occurred", "Target is missing everything", 5)
  181. end
  182.  
  183. BV:Destroy()
  184. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, true)
  185. workspace.CurrentCamera.CameraSubject = Humanoid
  186.  
  187. repeat
  188. RootPart.CFrame = getgenv().OldPos * CFrame.new(0, .5, 0)
  189. Character:SetPrimaryPartCFrame(getgenv().OldPos * CFrame.new(0, .5, 0))
  190. Humanoid:ChangeState("GettingUp")
  191. table.foreach(Character:GetChildren(), function(_, x)
  192. if x:IsA("BasePart") then
  193. x.Velocity, x.RotVelocity = Vector3.new(), Vector3.new()
  194. end
  195. end)
  196. task.wait()
  197. until (RootPart.Position - getgenv().OldPos.p).Magnitude < 25
  198. workspace.FallenPartsDestroyHeight = getgenv().FPDH
  199. else
  200. return Message("Error Occurred", "Random error", 5)
  201. end
  202. end
  203.  
  204. if not Welcome then Message("Script by DranghetaSm0ke", "Enjoy!", 5) end
  205. getgenv().Welcome = true
  206. if Targets[1] then for _,x in next, Targets do GetPlayer(x) end else return end
  207.  
  208. if AllBool then
  209. for _,x in next, Players:GetPlayers() do
  210. SkidFling(x)
  211. end
  212. end
  213.  
  214. for _,x in next, Targets do
  215. if GetPlayer(x) and GetPlayer(x) ~= Player then
  216. if GetPlayer(x).UserId ~= 1414978355 then
  217. local TPlayer = GetPlayer(x)
  218. if TPlayer then
  219. SkidFling(TPlayer)
  220. end
  221. else
  222. Message("Error Occurred", "This user is whitelisted! (Owner)", 5)
  223. end
  224. elseif not GetPlayer(x) and not AllBool then
  225. Message("Error Occurred", "Username Invalid", 5)
  226. end
  227. end
  228. local WhitelistedPlayers = {
  229. [123456789] = true, -- Replace with the actual UserId of whitelisted players
  230. [987654321] = true,
  231. }
  232.  
  233. local function IsPlayerWhitelisted(player)
  234. local userId = player.UserId
  235. return WhitelistedPlayers[userId] or false
  236. end
  237.  
  238. return IsPlayerWhitelisted
Add Comment
Please, Sign In to add comment