TKFP

Untitled

Mar 11th, 2025
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.40 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local LocalPlayer = Players.LocalPlayer
  3. local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
  4. local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
  5. local Humanoid = Character:WaitForChild("Humanoid")
  6.  
  7. local enabled = false
  8. local randomEnabled = false
  9. local targetPlayerName = ""
  10. local originalSpeed = Humanoid.WalkSpeed -- Simpan speed asli
  11.  
  12. local StartPosition = HumanoidRootPart.Position
  13.  
  14. -- **Spin Attack Effect**
  15. local function SpinCharacter()
  16. while enabled or randomEnabled do
  17. HumanoidRootPart.CFrame = HumanoidRootPart.CFrame * CFrame.Angles(0, math.rad(30), 0)
  18. task.wait(0.05)
  19. end
  20. end
  21.  
  22. -- **Cari pedang di map**
  23. local function FindSword()
  24. for _, obj in pairs(workspace:GetChildren()) do
  25. if obj:IsA("Tool") and obj.Name:lower():find("sword") then
  26. return obj
  27. end
  28. end
  29. return nil
  30. end
  31.  
  32. -- **Teleport ke pedang dan ambil**
  33. local function GetSword()
  34. local sword = FindSword()
  35. if sword then
  36. HumanoidRootPart.CFrame = sword.Handle.CFrame
  37. task.wait(0.3)
  38. HumanoidRootPart.CFrame = CFrame.new(StartPosition)
  39. else
  40. warn("Pedang tidak ditemukan!")
  41. end
  42. end
  43.  
  44. -- **Cari pedang di Backpack & auto equip**
  45. local function GetEquippedSword()
  46. local Backpack = LocalPlayer.Backpack
  47. for _, tool in pairs(Backpack:GetChildren()) do
  48. if tool:IsA("Tool") and tool.Name:lower():find("sword") then
  49. Character.Humanoid:EquipTool(tool)
  50. return tool
  51. end
  52. end
  53. return nil
  54. end
  55.  
  56. -- **Serang Target Player (Tanpa Freeze, dengan Speed Boost)**
  57. local function attackTargetPlayer()
  58. task.spawn(SpinCharacter)
  59. Humanoid.WalkSpeed = 100 -- Tambah kecepatan pas mulai serang
  60.  
  61. while enabled do
  62. local targetPlayer = Players:FindFirstChild(targetPlayerName)
  63.  
  64. if targetPlayer and targetPlayer.Character and targetPlayer.Character:FindFirstChild("HumanoidRootPart") then
  65. HumanoidRootPart.CFrame = targetPlayer.Character.HumanoidRootPart.CFrame
  66.  
  67. local sword = GetEquippedSword()
  68. if not sword then
  69. GetSword()
  70. sword = GetEquippedSword()
  71. end
  72.  
  73. if sword then
  74. for _ = 1, 5 do
  75. sword:Activate()
  76. task.wait(0.05)
  77. end
  78. else
  79. warn("Pedang masih nggak ditemukan! Pastikan ada pedang di map.")
  80. end
  81. end
  82. task.wait(0.05)
  83. end
  84.  
  85. Humanoid.WalkSpeed = originalSpeed -- Kembalikan speed normal setelah selesai serang
  86. end
  87.  
  88. -- **Kill Random Player (Dengan Speed Boost)**
  89. local function attackRandomPlayer()
  90. task.spawn(SpinCharacter)
  91. Humanoid.WalkSpeed = 100 -- Tambah speed saat nyari korban
  92.  
  93. while randomEnabled do
  94. local allPlayers = Players:GetPlayers()
  95. local targetPlayer
  96.  
  97. for _, player in ipairs(allPlayers) do
  98. if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("Humanoid") then
  99. if player.Character.Humanoid.Health > 0 then
  100. targetPlayer = player
  101. break
  102. end
  103. end
  104. end
  105.  
  106. if targetPlayer then
  107. print("Menyerang:", targetPlayer.Name)
  108.  
  109. while randomEnabled and targetPlayer and targetPlayer.Character and targetPlayer.Character:FindFirstChild("Humanoid") and targetPlayer.Character.Humanoid.Health > 0 do
  110. HumanoidRootPart.CFrame = targetPlayer.Character.HumanoidRootPart.CFrame
  111.  
  112. local sword = GetEquippedSword()
  113. if not sword then
  114. GetSword()
  115. sword = GetEquippedSword()
  116. end
  117.  
  118. if sword then
  119. for _ = 1, 5 do
  120. sword:Activate()
  121. task.wait(0.05)
  122. end
  123. else
  124. warn("Pedang masih nggak ditemukan! Pastikan ada pedang di map.")
  125. end
  126. task.wait(0.05)
  127. end
  128. end
  129.  
  130. task.wait(0.3)
  131. end
  132.  
  133. Humanoid.WalkSpeed = originalSpeed -- Kembalikan speed normal setelah selesai serang
  134. end
  135.  
  136. -- GUI
  137. local ScreenGui = Instance.new("ScreenGui")
  138. ScreenGui.Parent = LocalPlayer:FindFirstChildOfClass("PlayerGui")
  139.  
  140. -- Tombol "Ambil Pedang"
  141. local SwordButton = Instance.new("TextButton", ScreenGui)
  142. SwordButton.Size = UDim2.new(0, 200, 0, 50)
  143. SwordButton.Position = UDim2.new(0.05, 0, 0.1, 0)
  144. SwordButton.Text = "Ambil Pedang"
  145. SwordButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  146.  
  147. SwordButton.MouseButton1Click:Connect(GetSword)
  148.  
  149. -- Input nama player
  150. local TextBox = Instance.new("TextBox", ScreenGui)
  151. TextBox.Size = UDim2.new(0, 200, 0, 50)
  152. TextBox.Position = UDim2.new(0.05, 0, 0.2, 0)
  153. TextBox.PlaceholderText = "Masukkan Nama Player"
  154. TextBox.TextScaled = true
  155.  
  156. TextBox.FocusLost:Connect(function(enterPressed)
  157. if enterPressed then
  158. targetPlayerName = TextBox.Text
  159. end
  160. end)
  161.  
  162. -- Tombol "Kill Target"
  163. local AttackButton = Instance.new("TextButton", ScreenGui)
  164. AttackButton.Size = UDim2.new(0, 200, 0, 50)
  165. AttackButton.Position = UDim2.new(0.05, 0, 0.3, 0)
  166. AttackButton.Text = "Mulai Serang Target"
  167. AttackButton.BackgroundColor3 = Color3.fromRGB(255, 165, 0)
  168.  
  169. AttackButton.MouseButton1Click:Connect(function()
  170. if targetPlayerName == "" then
  171. warn("Masukkan nama player terlebih dahulu!")
  172. return
  173. end
  174.  
  175. enabled = not enabled
  176. if enabled then
  177. AttackButton.Text = "Hentikan Serangan"
  178. task.spawn(attackTargetPlayer)
  179. else
  180. AttackButton.Text = "Mulai Serang Target"
  181. end
  182. end)
  183.  
  184. -- Tombol "Kill Random Player"
  185. local RandomKillButton = Instance.new("TextButton", ScreenGui)
  186. RandomKillButton.Size = UDim2.new(0, 200, 0, 50)
  187. RandomKillButton.Position = UDim2.new(0.05, 0, 0.4, 0)
  188. RandomKillButton.Text = "Kill Random Player"
  189. RandomKillButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  190.  
  191. RandomKillButton.MouseButton1Click:Connect(function()
  192. randomEnabled = not randomEnabled
  193. if randomEnabled then
  194. RandomKillButton.Text = "Hentikan Random Kill"
  195. task.spawn(attackRandomPlayer)
  196. else
  197. RandomKillButton.Text = "Kill Random Player"
  198. end
  199. end)
Advertisement
Add Comment
Please, Sign In to add comment