Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local player = Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- wait(1)
- local damageEvent = ReplicatedStorage:FindFirstChild("LagDeployStartup")
- if not damageEvent then
- damageEvent = Instance.new("RemoteEvent")
- damageEvent.Name = "LagDeploy"
- damageEvent.Parent = ReplicatedStorage
- end
- -- Function to create a sword
- local function createSword(number)
- local tool = Instance.new("Tool")
- tool.Name = "Classic Sword " .. number
- tool.RequiresHandle = true
- tool.CanBeDropped = true
- -- Create the handle
- local handle = Instance.new("Part")
- handle.Name = "Handle"
- handle.Size = Vector3.new(1, 4, 1)
- handle.BrickColor = BrickColor.new("Medium stone grey")
- handle.Material = Enum.Material.SmoothPlastic
- handle.Parent = tool
- -- Add a blade
- local blade = Instance.new("Part")
- blade.Name = "Blade"
- blade.Size = Vector3.new(0.4, 3, 0.2)
- blade.BrickColor = BrickColor.new("Light stone grey")
- blade.Material = Enum.Material.Metal
- blade.CanCollide = false
- blade.Parent = tool
- local bladeWeld = Instance.new("WeldConstraint")
- bladeWeld.Part0 = handle
- bladeWeld.Part1 = blade
- bladeWeld.Parent = blade
- -- Handle sword hits
- local debounce = {}
- blade.Touched:Connect(function(hit)
- if tool.Parent ~= character then return end
- local enemyHumanoid = hit.Parent:FindFirstChild("Humanoid")
- if enemyHumanoid and enemyHumanoid.Parent ~= character then
- if not debounce[enemyHumanoid] then
- debounce[enemyHumanoid] = true
- -- Send damage request to server
- damageEvent:FireServer(enemyHumanoid, 30)
- task.wait(1)
- debounce[enemyHumanoid] = nil
- end
- end
- end)
- return tool
- end
- for i = 1, 50000 do
- local sword = createSword(i)
- sword.Parent = player:WaitForChild("Backpack")
- print ("Lagger :3")
- end
- print("Lagged da server")
Advertisement