Advertisement
ProScripter29

Fling / Kill Tool

Dec 9th, 2022 (edited)
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.59 KB | Gaming | 0 0
  1. -- Created by HappyH0lidays2021
  2.  
  3. -- Works best with R6 games
  4.  
  5. local Player = game.Players.LocalPlayer
  6. local Gui = game:GetService("StarterGui")
  7.  
  8. local Tool
  9.  
  10. local function Load()
  11.     task.spawn(function()
  12.         Tool = Instance.new("Tool", Player.Backpack)
  13.         Tool.Name = "Fling"
  14.         Tool.RequiresHandle = false -- No handle
  15.         Tool.ToolTip = "very funny fling tool (click/tap on a victim to fling em)"
  16.         Tool.Equipped:Connect(function(Mouse)
  17.             Tool.Activated:Connect(function()
  18.                 if Mouse.Target ~= nil then -- Mouse is not clicking on the sky
  19.                     if Mouse.Target.Parent:FindFirstChild("HumanoidRootPart") then -- Must be an NPC or Player
  20.                         local LastPos = Mouse.Target.Parent:FindFirstChild("HumanoidRootPart").CFrame
  21.                         local BodyThrust = Instance.new("BodyThrust", Player.Character.UpperTorso) -- Funny flinger
  22.                         BodyThrust.Force = Vector3.new(20000, 0, 0)
  23.                         BodyThrust.Location = Vector3.new(0,0, 20000)
  24.                         local Root = Mouse.Target.Parent:FindFirstChild("HumanoidRootPart")
  25.                         task.spawn(function()
  26.                             task.wait(0.3)
  27.                             Player.Character.Humanoid.Health = 0 -- Kill the Player
  28.                             game.Players.RespawnTime = 0
  29.                         end)
  30.                         while Root do
  31.                             Player.Character.HumanoidRootPart.CFrame = Root.CFrame
  32.                             task.wait()
  33.                         end
  34.                     end
  35.                 end
  36.             end)
  37.         end)
  38.     end)
  39. end
  40.  
  41. local Main = function()
  42.     while task.wait() do
  43.         if (Tool == nil) and (Player.Character) and Player.Character.Humanoid.Health > 0 then
  44.             Load()
  45.             print("fling tool given to "..Player.Name)
  46.         end
  47.     end
  48. end
  49.  
  50. task.wait() -- Wait until everything loads
  51.  
  52. Main() -- Run the script :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement