-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSped
More file actions
83 lines (67 loc) · 1.93 KB
/
Sped
File metadata and controls
83 lines (67 loc) · 1.93 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
--================ Services =================
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
--================ Character =================
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local hrp = character:WaitForChild("HumanoidRootPart")
local animator = humanoid:WaitForChild("Animator")
--================ Targets =================
local POS_1 = Vector3.new(-350.54, -7.01, 27.08)
local POS_2 = Vector3.new(-348.18, -701, 98.04)
local FAKE_SPEED = 22
local running = false
--================ No Animation =================
local animConn
local function enableNoAnim()
for _, t in ipairs(animator:GetPlayingAnimationTracks()) do
t:Stop(0)
end
animConn = animator.AnimationPlayed:Connect(function(track)
track:Stop(0)
end)
humanoid.AutoRotate = true
end
--================ Disable Player Control =================
local function lockPlayer()
humanoid.WalkSpeed = 0
humanoid.JumpPower = 0
end
--================ Fake Walk =================
local function fakeWalkTo(target)
while (hrp.Position - target).Magnitude > 2 do
local dir = (target - hrp.Position).Unit
humanoid:Move(dir, false)
RunService.RenderStepped:Wait()
end
end
--================ Main =================
local function startSequence()
if running then return end
running = true
lockPlayer()
enableNoAnim()
fakeWalkTo(POS_1)
fakeWalkTo(POS_2)
task.wait(0.2)
player:Kick("تم السرقة..")
end
--================ ProximityPrompt Hook =================
local function hookPrompt(prompt)
prompt.Triggered:Connect(function(plr)
if plr == player then
startSequence()
end
end)
end
for _, obj in ipairs(workspace:GetDescendants()) do
if obj:IsA("ProximityPrompt") then
hookPrompt(obj)
end
end
workspace.DescendantAdded:Connect(function(obj)
if obj:IsA("ProximityPrompt") then
hookPrompt(obj)
end
end)