Advertisement
Pl3X

One piece Legendary

Mar 8th, 2019
17,682
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.78 KB | None | 0 0
  1. -- Farewell Infortality.
  2. -- Version: 2.82
  3. -- Instances:
  4. local ScreenGui = Instance.new("ScreenGui")
  5. local LoginFrame = Instance.new("Frame")
  6. local TextLabel = Instance.new("TextLabel")
  7. local AutoVOff = Instance.new("TextButton")
  8. local AutoVOn = Instance.new("TextButton")
  9. local Safe = Instance.new("TextButton")
  10. local AutoCOff = Instance.new("TextButton")
  11. local AutoCOn = Instance.new("TextButton")
  12. local AutoTOff = Instance.new("TextButton")
  13. local AutoTOn = Instance.new("TextButton")
  14. local AutoHOn = Instance.new("TextButton")
  15. local AutoHOff = Instance.new("TextButton")
  16. local weapon = Instance.new("TextBox")
  17. local AutoBOff = Instance.new("TextButton")
  18. local AutoBOn = Instance.new("TextButton")
  19. local name = Instance.new("TextBox")
  20. local Fly = Instance.new("TextButton")
  21. local fly = Instance.new("TextBox")
  22. local Frame = Instance.new("Frame")
  23. local TextButton = Instance.new("TextButton")
  24. --Properties:
  25. ScreenGui.Parent = game.CoreGui
  26. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  27.  
  28. LoginFrame.Name = "LoginFrame"
  29. LoginFrame.Parent = ScreenGui
  30. LoginFrame.Active = true
  31. LoginFrame.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  32. LoginFrame.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  33. LoginFrame.Position = UDim2.new(0.36944446, 0, 0.264940262, 0)
  34. LoginFrame.Size = UDim2.new(0, 347, 0, 163)
  35. LoginFrame.Visible = false
  36. LoginFrame.Draggable = true
  37.  
  38. TextLabel.Parent = LoginFrame
  39. TextLabel.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  40. TextLabel.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  41. TextLabel.Position = UDim2.new(0.587896228, 0, 0, 0)
  42. TextLabel.Size = UDim2.new(0, 143, 0, 23)
  43. TextLabel.Font = Enum.Font.SourceSans
  44. TextLabel.Text = "Made By Arda#0810 Boi"
  45. TextLabel.TextColor3 = Color3.new(0, 0, 0)
  46. TextLabel.TextScaled = true
  47. TextLabel.TextSize = 14
  48. TextLabel.TextWrapped = true
  49.  
  50. AutoVOff.Name = "AutoVOff"
  51. AutoVOff.Parent = LoginFrame
  52. AutoVOff.BackgroundColor3 = Color3.new(1, 0, 0)
  53. AutoVOff.BorderColor3 = Color3.new(1, 0, 0)
  54. AutoVOff.Position = UDim2.new(0, 0, 0.300613493, 0)
  55. AutoVOff.Size = UDim2.new(0, 123, 0, 25)
  56. AutoVOff.Font = Enum.Font.SourceSans
  57. AutoVOff.Text = "Vokun Auto Tp On/Off"
  58. AutoVOff.TextColor3 = Color3.new(0, 0, 0)
  59. AutoVOff.TextScaled = true
  60. AutoVOff.TextSize = 14
  61. AutoVOff.TextWrapped = true
  62.  
  63. AutoVOn.Name = "AutoVOn"
  64. AutoVOn.Parent = LoginFrame
  65. AutoVOn.BackgroundColor3 = Color3.new(0, 1, 0)
  66. AutoVOn.BorderColor3 = Color3.new(0, 1, 0)
  67. AutoVOn.Position = UDim2.new(0, 0, 0.300613493, 0)
  68. AutoVOn.Size = UDim2.new(0, 123, 0, 25)
  69. AutoVOn.Visible = false
  70. AutoVOn.Font = Enum.Font.SourceSans
  71. AutoVOn.Text = "Vokun Auto Tp On/Off"
  72. AutoVOn.TextColor3 = Color3.new(0, 0, 0)
  73. AutoVOn.TextScaled = true
  74. AutoVOn.TextSize = 14
  75. AutoVOn.TextWrapped = true
  76.  
  77. Safe.Name = "Safe"
  78. Safe.Parent = LoginFrame
  79. Safe.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
  80. Safe.BorderColor3 = Color3.new(0.156863, 0.156863, 0.156863)
  81. Safe.Position = UDim2.new(0, 0, 0.564417183, 0)
  82. Safe.Size = UDim2.new(0, 123, 0, 25)
  83. Safe.Font = Enum.Font.SourceSans
  84. Safe.Text = "Safe Place"
  85. Safe.TextColor3 = Color3.new(0, 0, 0)
  86. Safe.TextScaled = true
  87. Safe.TextSize = 14
  88. Safe.TextWrapped = true
  89.  
  90. AutoCOff.Name = "AutoCOff"
  91. AutoCOff.Parent = LoginFrame
  92. AutoCOff.BackgroundColor3 = Color3.new(1, 0, 0)
  93. AutoCOff.BorderColor3 = Color3.new(1, 0, 0)
  94. AutoCOff.Position = UDim2.new(0.417867482, 0, 0.300613493, 0)
  95. AutoCOff.Size = UDim2.new(0, 123, 0, 25)
  96. AutoCOff.Font = Enum.Font.SourceSans
  97. AutoCOff.Text = "Cave Demon On/Off"
  98. AutoCOff.TextColor3 = Color3.new(0, 0, 0)
  99. AutoCOff.TextScaled = true
  100. AutoCOff.TextSize = 14
  101. AutoCOff.TextWrapped = true
  102.  
  103. AutoCOn.Name = "AutoCOn"
  104. AutoCOn.Parent = LoginFrame
  105. AutoCOn.BackgroundColor3 = Color3.new(0, 1, 0)
  106. AutoCOn.BorderColor3 = Color3.new(0, 1, 0)
  107. AutoCOn.Position = UDim2.new(0.417867482, 0, 0.300613493, 0)
  108. AutoCOn.Size = UDim2.new(0, 123, 0, 25)
  109. AutoCOn.Visible = false
  110. AutoCOn.Font = Enum.Font.SourceSans
  111. AutoCOn.Text = "Cave Demon On/Off"
  112. AutoCOn.TextColor3 = Color3.new(0, 0, 0)
  113. AutoCOn.TextScaled = true
  114. AutoCOn.TextSize = 14
  115. AutoCOn.TextWrapped = true
  116.  
  117. AutoTOff.Name = "AutoTOff"
  118. AutoTOff.Parent = LoginFrame
  119. AutoTOff.BackgroundColor3 = Color3.new(1, 0, 0)
  120. AutoTOff.BorderColor3 = Color3.new(1, 0, 0)
  121. AutoTOff.Position = UDim2.new(8.79469084e-08, 0, 0.785275996, 0)
  122. AutoTOff.Size = UDim2.new(0, 92, 0, 25)
  123. AutoTOff.Font = Enum.Font.SourceSans
  124. AutoTOff.Text = "Thief On/Off"
  125. AutoTOff.TextColor3 = Color3.new(0, 0, 0)
  126. AutoTOff.TextScaled = true
  127. AutoTOff.TextSize = 14
  128. AutoTOff.TextWrapped = true
  129.  
  130. AutoTOn.Name = "AutoTOn"
  131. AutoTOn.Parent = LoginFrame
  132. AutoTOn.BackgroundColor3 = Color3.new(0, 1, 0)
  133. AutoTOn.BorderColor3 = Color3.new(0, 1, 0)
  134. AutoTOn.Position = UDim2.new(8.79469084e-08, 0, 0.785275996, 0)
  135. AutoTOn.Size = UDim2.new(0, 92, 0, 25)
  136. AutoTOn.Visible = false
  137. AutoTOn.Font = Enum.Font.SourceSans
  138. AutoTOn.Text = "Thief On/Off"
  139. AutoTOn.TextColor3 = Color3.new(0, 0, 0)
  140. AutoTOn.TextScaled = true
  141. AutoTOn.TextSize = 14
  142. AutoTOn.TextWrapped = true
  143.  
  144. AutoHOn.Name = "AutoHOn"
  145. AutoHOn.Parent = LoginFrame
  146. AutoHOn.BackgroundColor3 = Color3.new(0, 1, 0)
  147. AutoHOn.BorderColor3 = Color3.new(0, 1, 0)
  148. AutoHOn.Position = UDim2.new(0.397694528, 0, 0.564417064, 0)
  149. AutoHOn.Size = UDim2.new(0, 74, 0, 25)
  150. AutoHOn.Visible = false
  151. AutoHOn.Font = Enum.Font.SourceSans
  152. AutoHOn.Text = "Auto Hit On/Off"
  153. AutoHOn.TextColor3 = Color3.new(0, 0, 0)
  154. AutoHOn.TextScaled = true
  155. AutoHOn.TextSize = 14
  156. AutoHOn.TextWrapped = true
  157.  
  158. AutoHOff.Name = "AutoHOff"
  159. AutoHOff.Parent = LoginFrame
  160. AutoHOff.BackgroundColor3 = Color3.new(1, 0, 0)
  161. AutoHOff.BorderColor3 = Color3.new(1, 0, 0)
  162. AutoHOff.Position = UDim2.new(0.397694528, 0, 0.564417064, 0)
  163. AutoHOff.Size = UDim2.new(0, 74, 0, 25)
  164. AutoHOff.Font = Enum.Font.SourceSans
  165. AutoHOff.Text = "Auto Hit On/Off"
  166. AutoHOff.TextColor3 = Color3.new(0, 0, 0)
  167. AutoHOff.TextScaled = true
  168. AutoHOff.TextSize = 14
  169. AutoHOff.TextWrapped = true
  170.  
  171. weapon.Name = "weapon"
  172. weapon.Parent = LoginFrame
  173. weapon.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
  174. weapon.Position = UDim2.new(0.63688761, 0, 0.57055223, 0)
  175. weapon.Size = UDim2.new(0, 81, 0, 23)
  176. weapon.Font = Enum.Font.SourceSans
  177. weapon.Text = "Weapon Name Here"
  178. weapon.TextColor3 = Color3.new(0, 0, 0)
  179. weapon.TextScaled = true
  180. weapon.TextSize = 14
  181. weapon.TextWrapped = true
  182.  
  183. AutoBOff.Name = "AutoBOff"
  184. AutoBOff.Parent = LoginFrame
  185. AutoBOff.BackgroundColor3 = Color3.new(1, 0, 0)
  186. AutoBOff.BorderColor3 = Color3.new(1, 0, 0)
  187. AutoBOff.Position = UDim2.new(0.337175786, 0, 0.785275936, 0)
  188. AutoBOff.Size = UDim2.new(0, 74, 0, 25)
  189. AutoBOff.Font = Enum.Font.SourceSans
  190. AutoBOff.Text = "Cbring On/Off"
  191. AutoBOff.TextColor3 = Color3.new(0, 0, 0)
  192. AutoBOff.TextScaled = true
  193. AutoBOff.TextSize = 14
  194. AutoBOff.TextWrapped = true
  195.  
  196. AutoBOn.Name = "AutoBOn"
  197. AutoBOn.Parent = LoginFrame
  198. AutoBOn.BackgroundColor3 = Color3.new(0, 1, 0)
  199. AutoBOn.BorderColor3 = Color3.new(0, 1, 0)
  200. AutoBOn.Position = UDim2.new(0.337175786, 0, 0.785275936, 0)
  201. AutoBOn.Size = UDim2.new(0, 74, 0, 25)
  202. AutoBOn.Visible = false
  203. AutoBOn.Font = Enum.Font.SourceSans
  204. AutoBOn.Text = "Cbring On/Off"
  205. AutoBOn.TextColor3 = Color3.new(0, 0, 0)
  206. AutoBOn.TextScaled = true
  207. AutoBOn.TextSize = 14
  208. AutoBOn.TextWrapped = true
  209.  
  210. name.Name = "name"
  211. name.Parent = LoginFrame
  212. name.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
  213. name.Position = UDim2.new(0.587896228, 0, 0.791411161, 0)
  214. name.Size = UDim2.new(0, 81, 0, 23)
  215. name.Font = Enum.Font.SourceSans
  216. name.Text = "PLAYER NAME HERE"
  217. name.TextColor3 = Color3.new(0, 0, 0)
  218. name.TextScaled = true
  219. name.TextSize = 14
  220. name.TextWrapped = true
  221.  
  222. Fly.Name = "Fly"
  223. Fly.Parent = LoginFrame
  224. Fly.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
  225. Fly.BorderColor3 = Color3.new(0.156863, 0.156863, 0.156863)
  226. Fly.Position = UDim2.new(0, 0, 0.036809817, 0)
  227. Fly.Size = UDim2.new(0, 105, 0, 25)
  228. Fly.Font = Enum.Font.SourceSans
  229. Fly.Text = "Fly"
  230. Fly.TextColor3 = Color3.new(0, 0, 0)
  231. Fly.TextScaled = true
  232. Fly.TextSize = 14
  233. Fly.TextWrapped = true
  234.  
  235. fly.Name = "fly"
  236. fly.Parent = LoginFrame
  237. fly.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
  238. fly.Position = UDim2.new(0.337175786, 0, 0.036809817, 0)
  239. fly.Size = UDim2.new(0, 81, 0, 24)
  240. fly.Font = Enum.Font.SourceSans
  241. fly.Text = "Fly Speed Here"
  242. fly.TextColor3 = Color3.new(0, 0, 0)
  243. fly.TextScaled = true
  244. fly.TextSize = 14
  245. fly.TextWrapped = true
  246.  
  247. Frame.Parent = ScreenGui
  248. Frame.Active = true
  249. Frame.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
  250. Frame.Position = UDim2.new(0.112962961, 0, 0.193227082, 0)
  251. Frame.Size = UDim2.new(0, 143, 0, 33)
  252. Frame.Draggable = true
  253.  
  254. TextButton.Parent = Frame
  255. TextButton.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  256. TextButton.Position = UDim2.new(0.0979020968, 0, 0.0909090936, 0)
  257. TextButton.Size = UDim2.new(0, 115, 0, 26)
  258. TextButton.Font = Enum.Font.SourceSans
  259. TextButton.Text = "Open/Close"
  260. TextButton.TextColor3 = Color3.new(0, 0, 0)
  261. TextButton.TextSize = 14
  262. -- Scripts:
  263. AutoVOff.MouseButton1Click:connect(function()
  264. AutoVOff.Visible = false
  265. AutoVOn.Visible = true
  266.  
  267. _G.Auto = true
  268. while _G.Auto do
  269. wait(1.5)
  270. for i,v in pairs(game.Workspace.Enemies:GetChildren()) do
  271. if v.Name == "Lv200 Vokun" then
  272. v.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -2) + game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.lookVector * 2
  273. v.HumanoidRootPart.Anchored = true
  274. end
  275. end
  276. end
  277.  
  278. end)
  279.  
  280. AutoVOn.MouseButton1Click:connect(function()
  281. AutoVOff.Visible = true
  282. AutoVOn.Visible = false
  283.  
  284. _G.Auto = false
  285. while _G.Auto do
  286. wait(1.5)
  287. for i,v in pairs(game.Workspace.Enemies:GetChildren()) do
  288. if v.Name == "Lv200 Vokun" then
  289. v.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -2) + game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.lookVector * 2
  290. v.HumanoidRootPart.Anchored = true
  291. end
  292. end
  293. end
  294.  
  295. end)
  296.  
  297. Safe.MouseButton1Click:connect(function()
  298. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-2000, 22000, -1000)
  299. baseplatee = Instance.new("Part", workspace)
  300. baseplatee.Size = Vector3.new(1000, 1, 1000)
  301. baseplatee.CFrame = game.workspace[game.Players.LocalPlayer.Name].HumanoidRootPart.CFrame + Vector3.new(0,-2, 0)
  302. baseplatee.Anchored = true
  303.  
  304. end)
  305.  
  306. AutoCOff.MouseButton1Click:connect(function()
  307. AutoCOff.Visible = false
  308. AutoCOn.Visible = true
  309.  
  310. _G.Auto2 = true
  311. while _G.Auto2 do
  312. wait(1.5)
  313. for i,v in pairs(game.Workspace.Enemies:GetChildren()) do
  314. if v.Name == "Lv40 Cave Demon" then
  315. v.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -2) + game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.lookVector * 2
  316. v.HumanoidRootPart.Anchored = true
  317. end
  318. end
  319. end
  320.  
  321. end)
  322.  
  323. AutoCOn.MouseButton1Click:connect(function()
  324. AutoCOff.Visible = true
  325. AutoCOn.Visible = false
  326.  
  327. _G.Auto2 = false
  328. while _G.Auto2 do
  329. wait(1.5)
  330. for i,v in pairs(game.Workspace.Enemies:GetChildren()) do
  331. if v.Name == "Lv40 Cave Demon" then
  332. v.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -2) + game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.lookVector * 2
  333. v.HumanoidRootPart.Anchored = true
  334. end
  335. end
  336. end
  337.  
  338. end)
  339.  
  340. AutoTOff.MouseButton1Click:connect(function()
  341. AutoTOff.Visible = false
  342. AutoTOn.Visible = true
  343.  
  344. _G.Auto3 = true
  345. while _G.Auto3 do
  346. wait(1.5)
  347. for i,v in pairs(game.Workspace.Enemies:GetChildren()) do
  348. if v.Name == "Lv20 Thief" then
  349. v.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -2) + game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.lookVector * 2
  350. v.HumanoidRootPart.Anchored = true
  351. end
  352. end
  353. end
  354.  
  355. end)
  356.  
  357. AutoTOn.MouseButton1Click:connect(function()
  358. AutoTOff.Visible = true
  359. AutoTOn.Visible = false
  360.  
  361. _G.Auto3 = false
  362. while _G.Auto2 do
  363. wait(1.5)
  364. for i,v in pairs(game.Workspace.Enemies:GetChildren()) do
  365. if v.Name == "Lv20 Thief" then
  366. v.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -2) + game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.lookVector * 2
  367. v.HumanoidRootPart.Anchored = true
  368. end
  369. end
  370. end
  371.  
  372. end)
  373.  
  374. AutoHOn.MouseButton1Click:connect(function()
  375. AutoHOff.Visible = true
  376. AutoHOn.Visible = false
  377.  
  378. _G.Auto4 = false
  379. while _G.Auto4 do
  380. wait(0.3)
  381. for i,v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
  382. if v.Name == weapon.Text then v:Activate() end
  383. end
  384. end
  385.  
  386. end)
  387.  
  388. AutoHOff.MouseButton1Click:connect(function()
  389. AutoHOff.Visible = false
  390. AutoHOn.Visible = true
  391.  
  392. _G.Auto4 = true
  393. while _G.Auto4 do
  394. wait(0.3)
  395. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  396. if v.Name == weapon.Text then v:Activate() end
  397. end
  398. end
  399.  
  400. end)
  401.  
  402. TextButton.MouseButton1Click:connect(function()
  403. LoginFrame.Visible = not LoginFrame.Visible
  404.  
  405.  
  406. end)
  407.  
  408. AutoBOff.MouseButton1Click:connect(function()
  409. AutoBOff.Visible = false
  410. AutoBOn.Visible = true
  411.  
  412. _G.bring = true
  413. while _G.bring do
  414. wait(0.5)
  415. for i,v in pairs(game.Workspace:GetChildren()) do
  416. if v.Name == name.Text then
  417. v.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, 0) + game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.lookVector * 2
  418. v.HumanoidRootPart.Anchored = true
  419. end
  420. end
  421. end
  422.  
  423. end)
  424.  
  425. AutoBOn.MouseButton1Click:connect(function()
  426. AutoBOff.Visible = true
  427. AutoBOn.Visible = false
  428.  
  429. _G.bring = false
  430. while _G.bring do
  431. wait(1)
  432. for i,v in pairs(game.Workspace:GetChildren()) do
  433. if v.Name == "name.Text" then
  434. v.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, 0) + game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.lookVector * 2
  435. v.HumanoidRootPart.Anchored = true
  436. end
  437. end
  438. end
  439.  
  440. end)
  441.  
  442. Fly.MouseButton1Click:connect(function()
  443. -- FE Fly (Push E)
  444. repeat wait()
  445. until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  446. local mouse = game.Players.LocalPlayer:GetMouse()
  447. repeat wait() until mouse
  448. local plr = game.Players.LocalPlayer
  449. local torso = plr.Character.Torso
  450. local flying = true
  451. local deb = true
  452. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  453. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  454. local maxspeed = 250
  455. local speed = 0
  456.  
  457. function Fly()
  458. local bg = Instance.new("BodyGyro", torso)
  459. bg.P = 9e4
  460. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  461. bg.cframe = torso.CFrame
  462. local bv = Instance.new("BodyVelocity", torso)
  463. bv.velocity = Vector3.new(0,0.1,0)
  464. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  465. repeat wait()
  466. plr.Character.Humanoid.PlatformStand = true
  467. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  468. speed = speed+.5+(speed/maxspeed)
  469. if speed > maxspeed then
  470. speed = maxspeed
  471. end
  472. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  473. speed = speed-1
  474. if speed < 0 then
  475. speed = 0
  476. end
  477. end
  478. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  479. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  480. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  481. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  482. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  483. else
  484. bv.velocity = Vector3.new(0,0.1,0)
  485. end
  486. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  487. until not flying
  488. ctrl = {f = 0, b = 0, l = 0, r = 0}
  489. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  490. speed = 0
  491. bg:Destroy()
  492. bv:Destroy()
  493. plr.Character.Humanoid.PlatformStand = false
  494. end
  495. mouse.KeyDown:connect(function(key)
  496. if key:lower() == "e" then
  497. if flying then flying = false
  498. else
  499. flying = true
  500. Fly()
  501. end
  502. elseif key:lower() == "w" then
  503. ctrl.f = 1
  504. elseif key:lower() == "s" then
  505. ctrl.b = -1
  506. elseif key:lower() == "a" then
  507. ctrl.l = -1
  508. elseif key:lower() == "d" then
  509. ctrl.r = 1
  510. end
  511. end)
  512. mouse.KeyUp:connect(function(key)
  513. if key:lower() == "w" then
  514. ctrl.f = 0
  515. elseif key:lower() == "s" then
  516. ctrl.b = 0
  517. elseif key:lower() == "a" then
  518. ctrl.l = 0
  519. elseif key:lower() == "d" then
  520. ctrl.r = 0
  521. end
  522. end)
  523. Fly()
  524.  
  525.  
  526. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement