This repository was archived by the owner on Feb 25, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFTAP.lua
More file actions
36 lines (32 loc) · 1.46 KB
/
FTAP.lua
File metadata and controls
36 lines (32 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
local bodyvel_Name = "FlingVelocity"
local userinputs = game:GetService("UserInputService")
local w = game:GetService("Workspace")
local r = game:GetService("RunService")
local d = game:GetService("Debris")
local strength = 300
w.ChildAdded:Connect(function(model)
if model.Name == "GrabParts" then
local part_to_impulse = model["GrabPart"]["WeldConstraint"].Part1
if part_to_impulse then
print("Part found!")
local inputObj
local velocityObj = Instance.new("BodyVelocity", part_to_impulse)
model:GetPropertyChangedSignal("Parent"):Connect(function()
if not model.Parent then
if userinputs:GetLastInputType() == Enum.UserInputType.MouseButton2 then
print("Launched!")
velocityObj.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
velocityObj.Velocity = workspace.CurrentCamera.CFrame.lookVector * strength
d:AddItem(velocityObj, 1)
elseif userinputs:GetLastInputType() == Enum.UserInputType.MouseButton1 then
velocityObj:Destroy()
print("Cancel Launch!")
else
velocityObj:Destroy()
print("No two keys pressed!")
end
end
end)
end
end
end)