Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Kill all players script GUI button
- --https://www.roblox.com/games/8721702870/unnamed
- -- Create the ScreenGui and TextButton
- local gui = Instance.new("ScreenGui")
- local button = Instance.new("TextButton")
- gui.Name = "RocketLauncherScriptGui"
- gui.Parent = game.CoreGui
- button.Name = "RocketLauncherScriptButton"
- button.Parent = gui
- button.Size = UDim2.new(0, 200, 0, 50)
- button.Position = UDim2.new(0.5, -100, 0.5, -25)
- button.Text = "Kill all players"
- button.TextColor3 = Color3.new(1, 1, 1)
- button.BackgroundColor3 = Color3.new(0, 0, 0)
- button.BorderSizePixel = 0
- -- Define the function to damage players
- local function damagePlayers()
- local players = game:GetService("Players"):GetPlayers()
- for i, player in ipairs(players) do
- if player.Name ~= game:GetService("Players").LocalPlayer.Name then
- local args = {
- [1] = game:GetService("Players"):WaitForChild(game:GetService("Players").LocalPlayer.Name):WaitForChild("Backpack"):WaitForChild("Rocket Launcher"),
- [2] = {
- ["p"] = Vector3.new(18.95905303955078, 149.38900756835938, 262.246337890625),
- ["pid"] = 1,
- ["part"] = player.Character.HumanoidRootPart,
- ["d"] = 158.49783325195312,
- ["maxDist"] = 73.0173110961914,
- ["h"] = player.Character.Humanoid,
- ["m"] = Enum.Material.Plastic,
- ["sid"] = 3,
- ["t"] = 0.4634176031998304,
- ["n"] = Vector3.new(0.8189706206321716, 0.1616213023662567, -0.5506048798561096)
- }
- }
- game:GetService("ReplicatedStorage"):WaitForChild("WeaponsSystem"):WaitForChild("Network"):WaitForChild("WeaponHit"):FireServer(unpack(args))
- end
- end
- end
- -- Connect the button to the damagePlayers function
- button.MouseButton1Click:Connect(damagePlayers)
Advertisement
Add Comment
Please, Sign In to add comment