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