Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
- local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
- local Humanoid = Character:WaitForChild("Humanoid")
- local enabled = false
- local randomEnabled = false
- local targetPlayerName = ""
- local originalSpeed = Humanoid.WalkSpeed -- Simpan speed asli
- local StartPosition = HumanoidRootPart.Position
- -- **Spin Attack Effect**
- local function SpinCharacter()
- while enabled or randomEnabled do
- HumanoidRootPart.CFrame = HumanoidRootPart.CFrame * CFrame.Angles(0, math.rad(30), 0)
- task.wait(0.05)
- end
- end
- -- **Cari pedang di map**
- local function FindSword()
- for _, obj in pairs(workspace:GetChildren()) do
- if obj:IsA("Tool") and obj.Name:lower():find("sword") then
- return obj
- end
- end
- return nil
- end
- -- **Teleport ke pedang dan ambil**
- local function GetSword()
- local sword = FindSword()
- if sword then
- HumanoidRootPart.CFrame = sword.Handle.CFrame
- task.wait(0.3)
- HumanoidRootPart.CFrame = CFrame.new(StartPosition)
- else
- warn("Pedang tidak ditemukan!")
- end
- end
- -- **Cari pedang di Backpack & auto equip**
- local function GetEquippedSword()
- local Backpack = LocalPlayer.Backpack
- for _, tool in pairs(Backpack:GetChildren()) do
- if tool:IsA("Tool") and tool.Name:lower():find("sword") then
- Character.Humanoid:EquipTool(tool)
- return tool
- end
- end
- return nil
- end
- -- **Serang Target Player (Tanpa Freeze, dengan Speed Boost)**
- local function attackTargetPlayer()
- task.spawn(SpinCharacter)
- Humanoid.WalkSpeed = 100 -- Tambah kecepatan pas mulai serang
- while enabled do
- local targetPlayer = Players:FindFirstChild(targetPlayerName)
- if targetPlayer and targetPlayer.Character and targetPlayer.Character:FindFirstChild("HumanoidRootPart") then
- HumanoidRootPart.CFrame = targetPlayer.Character.HumanoidRootPart.CFrame
- local sword = GetEquippedSword()
- if not sword then
- GetSword()
- sword = GetEquippedSword()
- end
- if sword then
- for _ = 1, 5 do
- sword:Activate()
- task.wait(0.05)
- end
- else
- warn("Pedang masih nggak ditemukan! Pastikan ada pedang di map.")
- end
- end
- task.wait(0.05)
- end
- Humanoid.WalkSpeed = originalSpeed -- Kembalikan speed normal setelah selesai serang
- end
- -- **Kill Random Player (Dengan Speed Boost)**
- local function attackRandomPlayer()
- task.spawn(SpinCharacter)
- Humanoid.WalkSpeed = 100 -- Tambah speed saat nyari korban
- while randomEnabled do
- local allPlayers = Players:GetPlayers()
- local targetPlayer
- for _, player in ipairs(allPlayers) do
- if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("Humanoid") then
- if player.Character.Humanoid.Health > 0 then
- targetPlayer = player
- break
- end
- end
- end
- if targetPlayer then
- print("Menyerang:", targetPlayer.Name)
- while randomEnabled and targetPlayer and targetPlayer.Character and targetPlayer.Character:FindFirstChild("Humanoid") and targetPlayer.Character.Humanoid.Health > 0 do
- HumanoidRootPart.CFrame = targetPlayer.Character.HumanoidRootPart.CFrame
- local sword = GetEquippedSword()
- if not sword then
- GetSword()
- sword = GetEquippedSword()
- end
- if sword then
- for _ = 1, 5 do
- sword:Activate()
- task.wait(0.05)
- end
- else
- warn("Pedang masih nggak ditemukan! Pastikan ada pedang di map.")
- end
- task.wait(0.05)
- end
- end
- task.wait(0.3)
- end
- Humanoid.WalkSpeed = originalSpeed -- Kembalikan speed normal setelah selesai serang
- end
- -- GUI
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Parent = LocalPlayer:FindFirstChildOfClass("PlayerGui")
- -- Tombol "Ambil Pedang"
- local SwordButton = Instance.new("TextButton", ScreenGui)
- SwordButton.Size = UDim2.new(0, 200, 0, 50)
- SwordButton.Position = UDim2.new(0.05, 0, 0.1, 0)
- SwordButton.Text = "Ambil Pedang"
- SwordButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
- SwordButton.MouseButton1Click:Connect(GetSword)
- -- Input nama player
- local TextBox = Instance.new("TextBox", ScreenGui)
- TextBox.Size = UDim2.new(0, 200, 0, 50)
- TextBox.Position = UDim2.new(0.05, 0, 0.2, 0)
- TextBox.PlaceholderText = "Masukkan Nama Player"
- TextBox.TextScaled = true
- TextBox.FocusLost:Connect(function(enterPressed)
- if enterPressed then
- targetPlayerName = TextBox.Text
- end
- end)
- -- Tombol "Kill Target"
- local AttackButton = Instance.new("TextButton", ScreenGui)
- AttackButton.Size = UDim2.new(0, 200, 0, 50)
- AttackButton.Position = UDim2.new(0.05, 0, 0.3, 0)
- AttackButton.Text = "Mulai Serang Target"
- AttackButton.BackgroundColor3 = Color3.fromRGB(255, 165, 0)
- AttackButton.MouseButton1Click:Connect(function()
- if targetPlayerName == "" then
- warn("Masukkan nama player terlebih dahulu!")
- return
- end
- enabled = not enabled
- if enabled then
- AttackButton.Text = "Hentikan Serangan"
- task.spawn(attackTargetPlayer)
- else
- AttackButton.Text = "Mulai Serang Target"
- end
- end)
- -- Tombol "Kill Random Player"
- local RandomKillButton = Instance.new("TextButton", ScreenGui)
- RandomKillButton.Size = UDim2.new(0, 200, 0, 50)
- RandomKillButton.Position = UDim2.new(0.05, 0, 0.4, 0)
- RandomKillButton.Text = "Kill Random Player"
- RandomKillButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- RandomKillButton.MouseButton1Click:Connect(function()
- randomEnabled = not randomEnabled
- if randomEnabled then
- RandomKillButton.Text = "Hentikan Random Kill"
- task.spawn(attackRandomPlayer)
- else
- RandomKillButton.Text = "Kill Random Player"
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment