-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfly.lua
More file actions
138 lines (121 loc) · 4.69 KB
/
Copy pathfly.lua
File metadata and controls
138 lines (121 loc) · 4.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
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
local CoreGui = game:GetService("CoreGui")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
-- Create UI
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "ByAnaf_Ultimate"
ScreenGui.Parent = CoreGui
ScreenGui.ResetOnSpawn = false
local MainFrame = Instance.new("Frame")
MainFrame.Name = "MainFrame"
MainFrame.Parent = ScreenGui
MainFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255) -- Base for gradient
-- Red Gradient Theme
local UIGradient = Instance.new("UIGradient")
UIGradient.Color = ColorSequence.new{
ColorSequenceKeypoint.new(0, Color3.fromRGB(150, 0, 0)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(40, 0, 0))
}
UIGradient.Rotation = 45
UIGradient.Parent = MainFrame
MainFrame.Position = UDim2.new(0.1, 0, 0.4, 0)
MainFrame.Size = UDim2.new(0, 200, 0, 180)
MainFrame.BorderSizePixel = 0
MainFrame.Active = true
MainFrame.Draggable = true
local UICorner = Instance.new("UICorner")
UICorner.CornerRadius = UDim.new(0, 12)
UICorner.Parent = MainFrame
local Title = Instance.new("TextLabel")
Title.Parent = MainFrame
Title.BackgroundTransparency = 1
Title.Size = UDim2.new(1, 0, 0, 40)
Title.Font = Enum.Font.GothamBold
Title.Text = "BYANAF ULTIMATE"
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
Title.TextSize = 16
-- Fly Button
local FlyButton = Instance.new("TextButton")
FlyButton.Parent = MainFrame
FlyButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
FlyButton.BackgroundTransparency = 0.6
FlyButton.Position = UDim2.new(0.1, 0, 0.25, 0)
FlyButton.Size = UDim2.new(0.8, 0, 0, 30)
FlyButton.Font = Enum.Font.GothamSemibold
FlyButton.Text = "FLY: OFF"
FlyButton.TextColor3 = Color3.fromRGB(255, 255, 255)
FlyButton.TextSize = 14
Instance.new("UICorner", FlyButton).CornerRadius = UDim.new(0, 6)
-- Noclip Button
local NoclipButton = Instance.new("TextButton")
NoclipButton.Parent = MainFrame
NoclipButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
NoclipButton.BackgroundTransparency = 0.6
NoclipButton.Position = UDim2.new(0.1, 0, 0.47, 0)
NoclipButton.Size = UDim2.new(0.8, 0, 0, 30)
NoclipButton.Font = Enum.Font.GothamSemibold
NoclipButton.Text = "NOCLIP: OFF"
NoclipButton.TextColor3 = Color3.fromRGB(255, 255, 255)
NoclipButton.TextSize = 14
Instance.new("UICorner", NoclipButton).CornerRadius = UDim.new(0, 6)
-- Speed Input
local SpeedInput = Instance.new("TextBox")
SpeedInput.Parent = MainFrame
SpeedInput.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
SpeedInput.BackgroundTransparency = 0.6
SpeedInput.Position = UDim2.new(0.1, 0, 0.7, 0)
SpeedInput.Size = UDim2.new(0.8, 0, 0, 30)
SpeedInput.Font = Enum.Font.Gotham
SpeedInput.PlaceholderText = "Set Speed..."
SpeedInput.Text = "50"
SpeedInput.TextColor3 = Color3.fromRGB(255, 255, 255)
SpeedInput.TextSize = 14
Instance.new("UICorner", SpeedInput).CornerRadius = UDim.new(0, 6)
-- Logic Variables
local flying = false
local noclip = false
local speed = 50
local bv, bg
-- Noclip Logic
RunService.Stepped:Connect(function()
if noclip and player.Character then
for _, part in pairs(player.Character:GetDescendants()) do
if part:IsA("BasePart") and part.CanCollide then
part.CanCollide = false
end
end
end
end)
NoclipButton.MouseButton1Click:Connect(function()
noclip = not noclip
NoclipButton.Text = noclip and "NOCLIP: ON" or "NOCLIP: OFF"
NoclipButton.TextColor3 = noclip and Color3.fromRGB(255, 100, 100) or Color3.fromRGB(255, 255, 255)
end)
-- Fly Logic
FlyButton.MouseButton1Click:Connect(function()
local char = player.Character
if not char or not char:FindFirstChild("HumanoidRootPart") then return end
flying = not flying
FlyButton.Text = flying and "FLY: ON" or "FLY: OFF"
FlyButton.TextColor3 = flying and Color3.fromRGB(255, 100, 100) or Color3.fromRGB(255, 255, 255)
if flying then
bv = Instance.new("BodyVelocity", char.HumanoidRootPart)
bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bv.Velocity = Vector3.new(0,0,0)
bg = Instance.new("BodyGyro", char.HumanoidRootPart)
bg.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
bg.P = 10000
task.spawn(function()
while flying do
speed = tonumber(SpeedInput.Text) or 50
bv.Velocity = camera.CFrame.LookVector * speed
bg.CFrame = camera.CFrame
RunService.RenderStepped:Wait()
end
if bv then bv:Destroy() end
if bg then bg:Destroy() end
end)
end
end)