Advertisement
CursedExploits

Natural Disaster Survival PART FLINGER SCRIPT

May 28th, 2022
3,644
-2
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.31 KB | None | 0 2
  1. --script meant to run once per mid-round
  2.  
  3. local Plrs = game:GetService("Players")
  4. local LP = Plrs.LocalPlayer
  5.  
  6. local Whitelist = {'adakban'} --type lowercases
  7. local Parts = {} -- array
  8. do
  9.  
  10. for _, Obj in pairs(workspace:WaitForChild("Structure"):GetDescendants()) do -- searching for parts
  11. if Obj:IsA("BasePart") or Obj:IsA("Part") then
  12. --Obj.CanTouch = false
  13. Parts[#Parts+1] = {Obj, false} -- adding parts
  14. end
  15. end
  16. getgenv().CheckForMore = workspace.Structure.DescendantAdded:Connect(function(Obj) -- checking for more parts
  17. if Obj:IsA("BasePart") or Obj:IsA("Part") then
  18. --Obj.CanTouch = false
  19. if Parts == nil then getgenv().CheckForMore:Disconnect() return end
  20. table.insert(Parts, {Obj, false}) -- if there are no parts then just say there isn't any.
  21. end
  22. end)
  23.  
  24. local function IfDestroy(Parent, Name)
  25. if Parent:FindFirstChild(Name) then
  26. Parent[Name]:Destroy() -- yeahhh i dunno what the hecc this does sorry
  27. end
  28. end
  29. IfDestroy(workspace.Tower, 'Windows')
  30. IfDestroy(LP.Character, 'FallDamageScript') -- fall from a trillion meters and NOT DIE!
  31. local Myhum = LP.Character.Humanoid
  32. Myhum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false) -- goodbye ragdoll
  33. Myhum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false) -- goodbye ragdoll
  34. Myhum:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding, false) -- goodbye ragdoll
  35.  
  36. print'run'
  37. end
  38.  
  39. local function KillPlr(Part, PlayerHum)
  40. repeat
  41. Part.CanCollide = false
  42. task.wait()
  43. Part.Velocity = (PlayerHum.Position-Part.Position).Unit*(600) -- (PlayerHum.Position.Magnitude-Part.Position.Magnitude)*(PlayerHum.Position.Magnitude-Part.Position.Magnitude) <---- ignore this please
  44. until isnetworkowner(Part) == false or PlayerHum.Parent == nil or PlayerHum.Parent.Humanoid.Health <= 0 -- the teacher: i'll wait until you stop ______ing.
  45. Part.CanCollide = true
  46. end
  47.  
  48. while #Parts > 2 do
  49. local i = 0
  50. for Int, Tab in pairs(Parts) do
  51. local Part = Tab[1]
  52. i=i+1
  53. if i%120 == 0 then task.wait() sethiddenproperty(game.Players.LocalPlayer,"SimulationRadius",1000);sethiddenproperty(game.Players.LocalPlayer,"MaxSimulationRadius",1000) task.wait(0.1) end -- uhhh yes roblox i own these parts btw kthxbai
  54. if Part == nil or Part.Parent == nil then
  55. Parts[Int] = nil
  56. else
  57. if Part:IsGrounded() == false and isnetworkowner(Part) and Tab[2] == false then
  58. Tab[2] = true
  59. local PrevClosest = 1000 -- check 4 mfers!
  60. local PlayerHum
  61. for _, Plr in ipairs(Plrs:GetChildren()) do
  62. if Plr:IsA("Player") and not table.find(Whitelist, Plr.Name:lower()) and Plr.Character ~= nil and Plr.Character:FindFirstChild("HumanoidRootPart") and Plr.Character:FindFirstChild("Humanoid") and Plr.Character.Humanoid.Health > 0 then
  63. local Hum = Plr.Character.HumanoidRootPart
  64.  
  65. local dis = (Hum.Position-Part.Position).Magnitude
  66. if dis < PrevClosest then
  67. PrevClosest = dis
  68. PlayerHum = Hum
  69. end
  70. end
  71. end
  72. PrevClosest = nil
  73. --PlayerHum = game.Players[''].Character:FindFirstChild("HumanoidRootPart")
  74. if PlayerHum then
  75. local bambam = Instance.new("BodyThrust")
  76. bambam.Parent = Part
  77. bambam.Force = Vector3.new(99999,99999*10,99999) -- if you are a fling script maker you know damn well what this does
  78. bambam.Location = Part.Position
  79. Part.CanCollide = false
  80. coroutine.wrap(function()
  81. KillPlr(Part, PlayerHum)
  82. Tab[2] = false
  83. return
  84. end)() --idk how to use the args
  85. task.wait()
  86. end
  87. end
  88. end
  89. end
  90. task.wait(0)
  91. end
  92.  
  93. getgenv().CheckForMore:Disconnect()
  94. PlayerHums, Parts, Plrs, viewPart, Whitelist, KillPlr = nil
  95. error("disconnected script")
  96.  
  97.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement