-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInsta-kill.lua
More file actions
50 lines (48 loc) · 1.67 KB
/
Insta-kill.lua
File metadata and controls
50 lines (48 loc) · 1.67 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
workspace.FallenPartsDestroyHeight = 0/0
if getgenv().loop then
coroutine.close(getgenv().loop)
getgenv().loop = nil
end
local animations = {
["rbxassetid://12273188754"]=1.31,
["rbxassetid://12296113986"]=1.2,
}
function ifind(t,a)
for i,v in pairs(t) do
if i==a then
return i
end
end
return false
end
local plr = game.Players.LocalPlayer
getgenv().loop = coroutine.create(function()
local dothetech = false
local lastcf
while task.wait() do
local character = plr.Character
local animate = character.Humanoid.Animator
for i,v in pairs(animate:GetPlayingAnimationTracks()) do
if ifind(animations, v.Animation.AnimationId) then
task.wait(animations[v.Animation.AnimationId])
dothetech=true
lastcf = character.HumanoidRootPart.CFrame
v.Stopped:Connect(function()
dothetech=false
end)
repeat wait()
workspace.Camera.CameraType = Enum.CameraType.Scriptable
character.HumanoidRootPart.CFrame = CFrame.new(0,-300,0)
character.HumanoidRootPart.AssemblyLinearVelocity = Vector3.zero
character.HumanoidRootPart.AssemblyAngularVelocity = Vector3.zero
until not dothetech
task.wait(0.1)
character.HumanoidRootPart.CFrame=lastcf
workspace.Camera.CameraType = Enum.CameraType.Custom
workspace.Camera.CameraSubject = character.Humanoid
task.wait(1)
end
end
end
end)
coroutine.resume(getgenv().loop)