The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Bed Wars script pastebin roblox
By LINK GAME on 2024-09-20 08:00 am | Syntax: LUA | Views: 9



New Script | Raw | Show/Hide line no. | Copy text to clipboard
  1.  local RunService = game:GetService("RunService")
  2. RunService.RenderStepped:Connect(function()
  3.     game.Players.LocalPlayer.Character:FindFirstChildWhichIsA("Humanoid"):ChangeState(11)
  4. end)
  5. for i,v in pairs(workspace:FindFirstChild("Beds", true):GetChildren()) do
  6.     if not game:GetService("ReplicatedStorage").BedWars.Teams:FindFirstChild(v.Name):FindFirstChild(game.Players.LocalPlayer.Name) then
  7.         repeat wait()
  8.             game.Players.LocalPlayer.Character.PrimaryPart.CFrame = v.CFrame + Vector3.new(0,5,0)
  9.             game:GetService("ReplicatedStorage").BedWars.RemoteEvent:FireServer("DamageBlock", game:GetService("Players").LocalPlayer, v.Position, v)
  10.         until v.Parent == nil
  11.     end
  12. end
  13. local team = game:GetService("ReplicatedStorage").BedWars.Teams:FindFirstChild(game.Players.LocalPlayer.Name, true).Parent
  14. for i,v in pairs(game.Players:GetPlayers()) do
  15.     if not team:FindFirstChild(v.Name) and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") and game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") and game.Players.LocalPlayer.Character.Humanoid.Health > 0 then
  16.         repeat wait()
  17.             game.Players.LocalPlayer.Character.PrimaryPart.CFrame = v.Character.HumanoidRootPart.CFrame + Vector3.new(0,5,0)
  18.             game:GetService("ReplicatedStorage").BedWars.RemoteEvent:FireServer("DamagePlayer", game:GetService("Players").LocalPlayer, v)
  19.         until not v.Character or not v.Character:FindFirstChild("HumanoidRootPart") or not v.Character:FindFirstChild("Humanoid") or v.Character.Humanoid.Health <= 0 or v.Character.HP.Value <= 0
  20.     end
  21. end