Advertisement
qiell

w fling all (universal)

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