-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSa
More file actions
155 lines (129 loc) · 4.2 KB
/
Sa
File metadata and controls
155 lines (129 loc) · 4.2 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
--================ Services ================
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local ProximityPromptService = game:GetService("ProximityPromptService")
local player = Players.LocalPlayer
--================ Character =================
local character, humanoid, hrp
local freezeConn
local isFrozen = false
local currentPrompt = nil
local promptWatchConn1, promptWatchConn2
local function setupCharacter(char)
character = char
humanoid = char:WaitForChild("Humanoid")
hrp = char:WaitForChild("HumanoidRootPart")
-- God Mode
humanoid.MaxHealth = math.huge
humanoid.Health = math.huge
humanoid:GetPropertyChangedSignal("Health"):Connect(function()
humanoid.Health = math.huge
end)
end
setupCharacter(player.Character or player.CharacterAdded:Wait())
player.CharacterAdded:Connect(setupCharacter)
--================ Freeze Full Body =================
local function freezeCharacter(prompt)
if isFrozen or not hrp or not humanoid then return end
isFrozen = true
currentPrompt = prompt
humanoid.AutoRotate = false
humanoid.WalkSpeed = 0
humanoid.JumpPower = 0
local cf = hrp.CFrame
freezeConn = RunService.RenderStepped:Connect(function()
if hrp then
hrp.CFrame = cf
end
end)
-- مراقبة اختفاء الـ ProximityPrompt
promptWatchConn1 = prompt.AncestryChanged:Connect(function(_, parent)
if not parent then
unfreezeCharacter()
end
end)
promptWatchConn2 = prompt:GetPropertyChangedSignal("Enabled"):Connect(function()
if not prompt.Enabled then
unfreezeCharacter()
end
end)
end
function unfreezeCharacter()
if not isFrozen then return end
isFrozen = false
if freezeConn then freezeConn:Disconnect() end
if promptWatchConn1 then promptWatchConn1:Disconnect() end
if promptWatchConn2 then promptWatchConn2:Disconnect() end
humanoid.AutoRotate = true
currentPrompt = nil
end
--================ Steal Detection =================
local function isStealPrompt(prompt)
local text = ((prompt.ActionText or "") .. (prompt.ObjectText or "")):lower()
return text:find("steal") ~= nil
end
--================ Speed + VFly =================
local vflyConn
local function runMain(speed)
local walkSpeed = speed or 15
local vflySpeed = speed or 15
local vflyActive = true
if vflyConn then vflyConn:Disconnect() end
vflyConn = RunService.RenderStepped:Connect(function()
if not vflyActive then return end
if not character or not humanoid or humanoid.Health <= 0 then return end
if not hrp then return end
local moveDir = humanoid.MoveDirection
if moveDir.Magnitude > 0 then
hrp.Velocity = Vector3.new(
moveDir.X * vflySpeed,
hrp.Velocity.Y,
moveDir.Z * vflySpeed
)
else
hrp.Velocity = Vector3.new(0, hrp.Velocity.Y, 0)
end
end)
humanoid.WalkSpeed = walkSpeed
end
--================ Unspeed Button GUI =================
local UnspeedButton
do
local gui = Instance.new("ScreenGui")
gui.Name = "SpeedControlGUI"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")
UnspeedButton = Instance.new("TextButton")
UnspeedButton.Size = UDim2.new(0, 60, 0, 50)
UnspeedButton.Position = UDim2.new(0.9, 0, 0.5, -25) -- منتصف يمين
UnspeedButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
UnspeedButton.Text = "Unspeed"
UnspeedButton.Visible = false -- يختفي أول ما ينشأ
UnspeedButton.Parent = gui
UnspeedButton.MouseButton1Click:Connect(function()
if humanoid then
humanoid.WalkSpeed = 35 -- سرعة طبيعية
UnspeedButton.Visible = false
end
end)
end
--================ Proximity Events =================
ProximityPromptService.PromptButtonHoldBegan:Connect(function(prompt, plr)
if plr ~= player then return end
if not isStealPrompt(prompt) then return end
freezeCharacter(prompt)
end)
ProximityPromptService.PromptTriggered:Connect(function(prompt, plr)
if plr ~= player then return end
if not isStealPrompt(prompt) then return end
unfreezeCharacter()
-- تعيين السرعة على 15 وتشغيل VFly
runMain(15)
-- إظهار زر Unspeed
UnspeedButton.Visible = true
end)
ProximityPromptService.PromptButtonHoldEnded:Connect(function(prompt, plr)
if plr ~= player then return end
if not isStealPrompt(prompt) then return end
unfreezeCharacter()
end)