Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local OrionLib = loadstring(game:HttpGet(('https://raw.githubusercontent.com/shlexware/Orion/main/source')))()
- local Window = OrionLib:MakeWindow({Name = "Project Nono", HidePremium = false, SaveConfig = false})
- -- R15 Check
- if game.Players.LocalPlayer.Character.Humanoid.RigType ~= Enum.HumanoidRigType.R15 then
- OrionLib:MakeNotification({
- Name = "Rig Type Error",
- Content = "This script requires R15 rig type to work properly!",
- Image = "rbxassetid://4483345998",
- Time = 5
- })
- return
- end
- local MainTab = Window:MakeTab({
- Name = "Jetpack",
- Icon = "rbxassetid://4483345998"
- })
- -- Variables
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local UserInputService = game:GetService("UserInputService")
- local player = Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local rootPart = character:WaitForChild("HumanoidRootPart")
- local flyingAnimation = Instance.new("Animation")
- flyingAnimation.AnimationId = "rbxassetid://619512450"
- local flyTrack = humanoid:LoadAnimation(flyingAnimation)
- -- Settings
- local isFlying = false
- local jumpCount = 0
- local lastJump = 0
- local flySpeed = 50
- -- UI Elements
- MainTab:AddToggle({
- Name = "Toggle Flight",
- Default = false,
- Callback = function(Value)
- isFlying = Value
- if isFlying then
- flyTrack:Play()
- else
- flyTrack:Stop()
- end
- end
- })
- MainTab:AddSlider({
- Name = "Flight Speed",
- Min = 10,
- Max = 200,
- Default = 50,
- Color = Color3.fromRGB(255,255,255),
- Increment = 1,
- ValueName = "Speed",
- Callback = function(Value)
- flySpeed = Value
- end
- })
- -- Jetpack Creation
- local jetpack = Instance.new("Part")
- jetpack.Size = Vector3.new(1, 2, 0.5)
- jetpack.Color = Color3.fromRGB(0, 0, 0)
- jetpack.CanCollide = false
- jetpack.Name = "Jetpack"
- local weld = Instance.new("Weld")
- weld.Part0 = character:WaitForChild("UpperTorso")
- weld.Part1 = jetpack
- weld.C0 = CFrame.new(0, 0, 0.5)
- weld.Parent = jetpack
- jetpack.Parent = character
- -- Particle Effects
- local fireEffect = Instance.new("Fire")
- fireEffect.Heat = 0
- fireEffect.Size = 3
- fireEffect.Enabled = false
- fireEffect.Parent = jetpack
- local cloudAttachment = Instance.new("Attachment")
- cloudAttachment.Parent = jetpack
- local cloudParticle = Instance.new("ParticleEmitter")
- cloudParticle.Texture = "rbxasset://textures/particles/smoke_main.dds"
- cloudParticle.Size = NumberSequence.new(0.5)
- cloudParticle.Transparency = NumberSequence.new({
- NumberSequenceKeypoint.new(0, 0.75),
- NumberSequenceKeypoint.new(1, 1)
- })
- cloudParticle.Rate = 50
- cloudParticle.Rotation = NumberRange.new(0, 360)
- cloudParticle.RotSpeed = NumberRange.new(-30, 30)
- cloudParticle.Speed = NumberRange.new(3)
- cloudParticle.Enabled = false
- cloudParticle.Parent = cloudAttachment
- -- Jump Detection
- humanoid.StateChanged:Connect(function(old, new)
- if new == Enum.HumanoidStateType.Jumping then
- local currentTime = tick()
- if currentTime - lastJump < 0.5 then
- jumpCount = jumpCount + 1
- if jumpCount == 2 then
- isFlying = not isFlying
- if isFlying then
- flyTrack:Play()
- else
- flyTrack:Stop()
- end
- jumpCount = 0
- end
- else
- jumpCount = 1
- end
- lastJump = currentTime
- end
- end)
- -- Flying Mechanics
- RunService.RenderStepped:Connect(function()
- if isFlying then
- local moveDirection = Vector3.new(
- UserInputService:IsKeyDown(Enum.KeyCode.D) and 1 or (UserInputService:IsKeyDown(Enum.KeyCode.A) and -1 or 0),
- UserInputService:IsKeyDown(Enum.KeyCode.Space) and 1 or (UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) and -1 or 0),
- UserInputService:IsKeyDown(Enum.KeyCode.S) and 1 or (UserInputService:IsKeyDown(Enum.KeyCode.W) and -1 or 0)
- )
- local lookVector = workspace.CurrentCamera.CFrame.LookVector
- local rightVector = workspace.CurrentCamera.CFrame.RightVector
- local flyDirection = (rightVector * moveDirection.X) + (Vector3.new(0, 1, 0) * moveDirection.Y) + (lookVector * moveDirection.Z)
- if flyDirection.Magnitude > 0 then
- rootPart.Velocity = -flyDirection.Unit * flySpeed
- fireEffect.Enabled = true
- cloudParticle.Enabled = true
- else
- rootPart.Velocity = Vector3.new(0, 0, 0)
- fireEffect.Enabled = false
- cloudParticle.Enabled = false
- end
- else
- fireEffect.Enabled = false
- cloudParticle.Enabled = false
- end
- end)
- OrionLib:Init()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement