plytalent

manafly

Dec 19th, 2020 (edited)
858
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.64 KB | None | 0 0
  1. local manafly = false
  2. local MANAFLY = nil
  3. local leftorright,upordown,backorforward = 0,0,0
  4. local plr = game:GetService("Players").LocalPlayer
  5. local mouse = plr:GetMouse()
  6. local Character = plr.Character
  7. local Ui
  8. local speed = 2.5
  9. --Start Core Of Mana Fly
  10. game:GetService("RunService"):BindToRenderStep("MANA FLY IN GAIA",1,function()
  11.     if manafly then
  12.         Character:SetPrimaryPartCFrame(Character:GetPrimaryPartCFrame():Lerp(Character:GetPrimaryPartCFrame()*CFrame.new(leftorright,upordown,backorforward),0.5))
  13.         --[[Character.HumanoidRootPart.Anchored = true]]
  14.         --print(CFrame.new(leftorright,upordown,backorforward))
  15.         if not MANAFLY then
  16.             MANAFLY =  Instance.new("Part")
  17.         end
  18.         MANAFLY.Parent = workspace
  19.         MANAFLY.Size = Vector3.new(2,1,2)
  20.         MANAFLY.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0,-3.5,0)
  21.         MANAFLY.Name = "MANAFLYPART"
  22.         MANAFLY.Anchored = true
  23.     end
  24.     if plr.Character ~= Character then
  25.         Character = plr.Character
  26.     end
  27. end)
  28. --End Core Of Mana Fly
  29. XD=Instance.new("ScreenGui",game:GetService("CoreGui"))
  30. syn.protect_gui(XD)
  31. Ui = Instance.new("Frame",XD)
  32. local ButtonSubmit = Instance.new("TextButton",Ui)
  33. local Up = Instance.new("TextBox",Ui)
  34. local Key1 = Instance.new("TextLabel",Ui)
  35. Ui.Position= UDim2.new(0.89, 0, 0.5, 0)
  36. Ui.Size = UDim2.new(0.11, 0, 0.25, 0)
  37. Ui.BorderSizePixel = 0
  38. ButtonSubmit.Size = UDim2.new(1, 0, 0.2, 0)
  39. ButtonSubmit.Text = "SUBMIT"
  40. Key1.Position = UDim2.new(0, 0, 0.199, 0)
  41. Key1.Size = UDim2.new(1, 0, 0.2, 0)
  42. Key1.Text = "SPEED UP"
  43. Up.Position = UDim2.new(0, 0, 0.397, 0)
  44. Up.Size  = UDim2.new(1, 0, 0.2, 0)
  45. ButtonSubmit.MouseButton1Click:Connect(function()
  46.     speed=tonumber(Up.Text)
  47. end)
  48. mouse.KeyDown:Connect(function(k)
  49.     if k == "w" then
  50.         backorforward = backorforward - speed
  51.     elseif k == "s" then
  52.         backorforward = backorforward + speed
  53.     elseif k == "a" then
  54.         leftorright = leftorright - speed
  55.     elseif k == "d" then
  56.         leftorright = leftorright + speed
  57.     elseif k == "z" then
  58.         upordown = upordown - speed
  59.     elseif k == "x" then
  60.         upordown = upordown + speed
  61.     elseif k == "b" then
  62.         manafly = not manafly
  63.         leftorright,upordown,backorforward = 0,0,0
  64.         Character = plr.Character
  65.         Character.HumanoidRootPart.Anchored = false
  66.     end
  67. end)
  68. mouse.KeyUp:Connect(function(k)
  69.     if not manafly then return end
  70.     if k == "w" then
  71.         backorforward = backorforward + speed
  72.     elseif k == "s" then
  73.         backorforward = backorforward - speed
  74.     elseif k == "a" then
  75.         leftorright = leftorright + speed
  76.     elseif k == "d" then
  77.         leftorright = leftorright - speed
  78.     elseif k == "z" then
  79.         upordown = upordown + speed
  80.     elseif k == "x" then
  81.         upordown = upordown - speed
  82.     end
  83. end)
  84.  
  85.  
Add Comment
Please, Sign In to add comment