Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game.Players.LocalPlayer
- local Character = Player.CharacterAdded:wait()
- local Mouse = Player:GetMouse()
- local Plane = workspace.Plane
- local Tool = script.Parent
- local equipped = false
- local BG = Plane.Engine.zombieslayerwtf -- rotates the plane
- local BV = Plane.Engine.zombieslayerwtf -- pushes the plane
- local speed = 50 --The speed of the plane
- Tool.Equipped:connect(function()
- equipped = true
- BV.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- repeat -- Continues to fly..
- BV.velocity = Plane.Engine.CFrame.lookVector*speed -- Pushes the plane to it's new rotation
- BG.CFrame = CFrame.new(Plane.Engine.Position, Mouse.hit.p) -- Rotates the plane on the axis of the position and points at mouse
- wait() -- So we do not crash
- until not equipped -- until we unequip the tool.
- BV.MaxForce = Vector3.new(0,0, 0) -- Basically to cut of the "engine"
- BG.CFrame = CFrame.Angles(0,0,0)
- end)
- Tool.Unequipped:connect(function() -- Anonymous function
- equipped = false -- So we can tell when to stop flying the plane
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement