local player = game.Players.LocalPlayer
local chr = player.Character or player.CharacterAdded:Wait()
local btool = Instance.new("Tool")
local SelectionBox = Instance.new("SelectionBox")
SelectionBox.Name = "SelectionBox"
SelectionBox.LineThickness = 0.05
SelectionBox.Adornee = nil
SelectionBox.Color3 = Color3.fromRGB(0, 0, 255)
SelectionBox.Visible = false
SelectionBox.Parent = game.Workspace
btool.Name = "click fling Tool"
btool.RequiresHandle = false
btool.Parent = player.Backpack
local IsEquipped = false
local Mouse = player:GetMouse()
btool.Equipped:Connect(function()
IsEquipped = true
SelectionBox.Visible = true
SelectionBox.Adornee = nil
end)
btool.Unequipped:Connect(function()
IsEquipped = false
SelectionBox.Visible = false
SelectionBox.Adornee = nil
end)
btool.Activated:Connect(function()
if IsEquipped and Mouse.Target then
local ex = Instance.new('Explosion')
ex.BlastRadius = 0
ex.Position = Mouse.Target.Position
ex.Parent = game.Workspace
local targetreal = Mouse.Target.Parent
if targetreal:IsA("Accessory") then
targetreal = targetreal.Parent
end
local s, f = pcall(function()
if targetreal:FindFirstChild("HumanoidRootPart") then
local OldVelocity = chr.HumanoidRootPart.Velocity
local OldPos = chr.HumanoidRootPart.CFrame
local Target = {targetreal}
local Root = chr.HumanoidRootPart
for i, v in next, Target do
local TargetRoot = v.HumanoidRootPart
local TargetPos = TargetRoot.Position
local Running = game:GetService("RunService").Stepped:Connect(function(step)
step = step - workspace.DistributedGameTime
Root.CFrame = (TargetRoot.CFrame - (Vector3.new(0, 1e6, 0) * step)) + (TargetRoot.Velocity * (step * 30))
Root.Velocity = Vector3.new(0, 1e6, 0)
end)
local starttime = tick()
repeat
wait()
until (TargetPos - TargetRoot.Position).magnitude >= 60 or tick() - starttime >= 3.5
Running:Disconnect()
end
wait()
local Running = game:GetService("RunService").Stepped:Connect(function()
Root.Velocity = OldVelocity
Root.CFrame = OldPos
end)
wait(0.5)
Root.Anchored = true
Running:Disconnect()
Root.Anchored = false
Root.Velocity = OldVelocity
Root.CFrame = OldPos
end
end)
if not s then
warn(f)
end
end
end)
while true do
if IsEquipped then
SelectionBox.Adornee = Mouse.Target or nil
end
wait(0.1)
end