Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local localRoot = character:WaitForChild("HumanoidRootPart")
- -- Combat script
- local function combat()
- for _, player in pairs(game.Players:GetPlayers()) do
- if player ~= game.Players.LocalPlayer and player.Character then
- local JN = player.Character:FindFirstChild("HumanoidRootPart")
- local HJ = player.Character:FindFirstChild("Humanoid")
- local backpack = player:FindFirstChildOfClass("Backpack")
- local hasTool = false
- if backpack then
- for _, item in pairs(backpack:GetChildren()) do
- if item:IsA("Tool") then
- hasTool = true
- break
- end
- end
- end
- if JN and HJ and hasTool then
- while HJ.Health > 0 do
- JN.CFrame = localRoot.CFrame * CFrame.new(0, 0, -5)
- game:GetService("Players").LocalPlayer.Character.Combatv2.RemoteEvent:FireServer()
- game:GetService("RunService").Heartbeat:Wait()
- end
- end
- end
- end
- end
- -- Consider running this in a more controlled manner to avoid continuous execution
- while true do
- combat()
- wait(1) -- Adjust wait time as needed
- end
- wait(1)
- end
Advertisement
Comments
-
- https://www.roblox.com/games/4585085581/Shinobi-Storm
Add Comment
Please, Sign In to add comment