-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFllash
More file actions
105 lines (91 loc) · 2.69 KB
/
Fllash
File metadata and controls
105 lines (91 loc) · 2.69 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
-- Services
local Players = game:GetService("Players")
local ProximityPromptService = game:GetService("ProximityPromptService")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
local enabled = false
local currentPrompt = nil
-- =========================
-- Flash Equip Function
-- =========================
local function equipFlash()
local char = player.Character
local backpack = player:FindFirstChild("Backpack")
if not char or not backpack then return end
local humanoid = char:FindFirstChildOfClass("Humanoid")
if not humanoid then return end
local names = {
"FlashTeleport",
"Flash Teleport",
"FlashTP",
"Flash TP"
}
-- Backpack
for _,name in ipairs(names) do
local tool = backpack:FindFirstChild(name)
if tool then
humanoid:EquipTool(tool)
return tool
end
end
-- Already equipped
for _,name in ipairs(names) do
local tool = char:FindFirstChild(name)
if tool then
return tool
end
end
end
-- =========================
-- Proximity Tracking
-- =========================
ProximityPromptService.PromptShown:Connect(function(prompt)
currentPrompt = prompt
end)
ProximityPromptService.PromptHidden:Connect(function(prompt)
if currentPrompt == prompt then
currentPrompt = nil
end
end)
-- =========================
-- Input Detect (E)
-- =========================
UserInputService.InputBegan:Connect(function(input, gp)
if gp then return end
if input.KeyCode == Enum.KeyCode.E
and enabled
and currentPrompt then
task.spawn(function()
task.wait(0.05) -- قبل التفعيل
equipFlash()
task.wait()
pcall(function()
fireproximityprompt(currentPrompt)
end)
end)
end
end)
-- =========================
-- GUI Button (Right Middle)
-- =========================
local gui = Instance.new("ScreenGui", player.PlayerGui)
gui.ResetOnSpawn = false
gui.Name = "FlashQuickButton"
local btn = Instance.new("TextButton")
btn.Size = UDim2.new(0,120,0,40)
btn.Position = UDim2.new(1,-130,0.5,-20)
btn.BackgroundColor3 = Color3.fromRGB(0,0,0)
btn.TextColor3 = Color3.fromRGB(255,255,255)
btn.Text = "FLASH: OFF"
btn.Font = Enum.Font.GothamBold
btn.TextSize = 14
btn.Parent = gui
Instance.new("UICorner", btn).CornerRadius = UDim.new(0,8)
btn.MouseButton1Click:Connect(function()
enabled = not enabled
btn.Text = enabled and "FLASH: ON" or "FLASH: OFF"
btn.BackgroundColor3 = enabled
and Color3.fromRGB(0,170,255)
or Color3.fromRGB(0,0,0)
end)
print("⚡ Flash Proximity Helper Loaded")