- --[[
- fe fly script
- required accessory:
- https://www.roblox.com/catalog/6311978305
- by MyWorld
- discord.gg/pYVHtSJmEY
- ]]
- local speed = 20
- local lp = game:GetService("Players").LocalPlayer
- local c = lp.Character
- if not (c and c.Parent) then return nil end
- local uis = game:GetService("UserInputService")
- local function gp(parent, name, className)
- if typeof(parent) == "Instance" then
- for i, v in pairs(parent:GetChildren()) do
- if (v.Name == name) and v:IsA(className) then
- return v
- end
- end
- end
- return nil
- end
- local Vector3_101 = Vector3.new(1, 0, 1)
- local netless_Y = Vector3.new(0, 25.1, 0)
- local function getNetlessVelocity(realPartVelocity)
- local mag = realPartVelocity.Magnitude
- if mag > 1 then
- local unit = realPartVelocity.Unit
- if (unit.Y > 0.25) or (unit.Y < -0.75) then
- return realPartVelocity * (25.1 / realPartVelocity.Y)
- end
- realPartVelocity = unit * 125
- end
- return (realPartVelocity * Vector3_101) + netless_Y
- end
- local ws = game:GetService("Workspace")
- if not c:IsDescendantOf(ws) then return nil end
- local hat = gp(c, "Pet FlyAccessory", "Accessory")
- local handle = gp(hat, "Handle", "BasePart")
- if not handle then return "skill issue" end
- local hum = c:FindFirstChildOfClass("Humanoid")
- if not hum then return end
- local rs = game:GetService("RunService")
- local heartbeat, renderstepped = rs.Heartbeat, rs.RenderStepped
- pcall(c.Destroy, gp(handle, "AccessoryWeld", "Weld"))
- hum.WalkSpeed = 0
- local v3 = Vector3.new
- local v3_9e9 = v3(9e9, 9e9, 9e9)
- local pos = handle.Position
- local bg = nil
- local con = nil
- con = renderstepped:Connect(function(delta)
- if not handle then
- return con:Disconenct()
- end
- ws.CurrentCamera.CameraSubject = handle
- if not uis:GetFocusedTextBox() then
- if uis:IsKeyDown(Enum.KeyCode.W) then
- pos += ws.CurrentCamera.CFrame.LookVector * speed * delta
- end
- if uis:IsKeyDown(Enum.KeyCode.S) then
- pos -= ws.CurrentCamera.CFrame.LookVector * speed * delta
- end
- if uis:IsKeyDown(Enum.KeyCode.D) then
- pos += ws.CurrentCamera.CFrame.RightVector * speed * delta
- end
- if uis:IsKeyDown(Enum.KeyCode.A) then
- pos -= ws.CurrentCamera.CFrame.RightVector * speed * delta
- end
- end
- handle.Velocity = (pos - handle.Position) / delta
- if not bg then
- bg = Instance.new("BodyGyro")
- end
- bg.Name = tostring(math.random(69, 6969))
- bg.D = 50
- bg.P = 200
- bg.MaxTorque = v3_9e9
- bg.Parent = handle
- bg.CFrame = ws.CurrentCamera.CFrame
- end)
- local con = nil
- con = heartbeat:Connect(function()
- if not handle then
- return con:Disconnect()
- end
- handle.Velocity = getNetlessVelocity(handle.Velocity)
- if bg then bg:Destroy() bg = nil end
- end)
- handle.AncestryChanged:Connect(function()
- if (handle.Parent ~= c) or (not c:IsDescendantOf(ws)) then
- handle = nil
- end
- end)