Advertisement
Isaiah20Yt

Roblox Prison Life Fly Car Script!!!

Dec 27th, 2020
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.41 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.1
  3.  
  4. -- Instances:
  5.  
  6. local flycar = Instance.new("ScreenGui")
  7. local veryepic = Instance.new("Frame")
  8. local background = Instance.new("TextLabel")
  9. local title = Instance.new("TextLabel")
  10. local close = Instance.new("TextButton")
  11. local fly = Instance.new("TextButton")
  12. local toogle = Instance.new("TextLabel")
  13. local notice = Instance.new("TextLabel")
  14. local TextLabel = Instance.new("TextLabel")
  15.  
  16. --Properties:
  17.  
  18. flycar.Name = "flycar"
  19. flycar.Parent = game.CoreGui
  20.  
  21. veryepic.Name = "veryepic"
  22. veryepic.Parent = flycar
  23. veryepic.BackgroundColor3 = Color3.fromRGB(85, 255, 0)
  24. veryepic.Position = UDim2.new(0.038906455, 0, 0.619164586, 0)
  25. veryepic.Size = UDim2.new(0, 243, 0, 263)
  26. veryepic.Active = true
  27. veryepic.Draggable = true
  28.  
  29. background.Name = "background"
  30. background.Parent = veryepic
  31. background.BackgroundColor3 = Color3.fromRGB(85, 170, 0)
  32. background.Position = UDim2.new(0.0370370373, 0, 0.0304182507, 0)
  33. background.Size = UDim2.new(0, 224, 0, 246)
  34. background.Font = Enum.Font.SourceSans
  35. background.Text = ""
  36. background.TextColor3 = Color3.fromRGB(0, 0, 0)
  37. background.TextSize = 14.000
  38.  
  39. title.Name = "title"
  40. title.Parent = veryepic
  41. title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  42. title.BackgroundTransparency = 1.000
  43. title.Position = UDim2.new(0.0864197537, 0, 0.0798479095, 0)
  44. title.Size = UDim2.new(0, 163, 0, 28)
  45. title.Font = Enum.Font.SciFi
  46. title.Text = "FlyCar (for Prison Life.)"
  47. title.TextColor3 = Color3.fromRGB(0, 0, 0)
  48. title.TextScaled = true
  49. title.TextSize = 14.000
  50. title.TextWrapped = true
  51.  
  52. close.Name = "close"
  53. close.Parent = veryepic
  54. close.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  55. close.Position = UDim2.new(0.806584358, 0, 0.064638786, 0)
  56. close.Size = UDim2.new(0, 30, 0, 33)
  57. close.Font = Enum.Font.GothamBlack
  58. close.Text = "X"
  59. close.TextColor3 = Color3.fromRGB(0, 0, 0)
  60. close.TextScaled = true
  61. close.TextSize = 14.000
  62. close.TextWrapped = true
  63. close.MouseButton1Down:connect(function()
  64. veryepic.Visible = false
  65. end)
  66.  
  67. fly.Name = "fly"
  68. fly.Parent = veryepic
  69. fly.BackgroundColor3 = Color3.fromRGB(85, 255, 0)
  70. fly.Position = UDim2.new(0.0864197537, 0, 0.266159713, 0)
  71. fly.Size = UDim2.new(0, 200, 0, 50)
  72. fly.Font = Enum.Font.SourceSans
  73. fly.Text = "Made By PcGmers use FlyCar!"
  74. fly.TextColor3 = Color3.fromRGB(0, 0, 0)
  75. fly.TextScaled = true
  76. fly.TextSize = 14.000
  77. fly.TextWrapped = true
  78. fly.MouseButton1Down:connect(function()
  79. local hint = Instance.new("Hint",game.Players.LocalPlayer.PlayerGui)
  80. hint.Text = "Press Z To Use -PcGmers"
  81. hint.Name = game.JobId
  82. repeat wait()
  83. until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  84. local mouse = game.Players.LocalPlayer:GetMouse()
  85. repeat wait() until mouse
  86. local plr = game.Players.LocalPlayer
  87. local torso = plr.Character.Torso
  88. local flying = true
  89. local deb = true
  90. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  91. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  92. local maxspeed = 500
  93. local speed = 0
  94.  
  95. function Fly()
  96. local bg = Instance.new("BodyGyro", torso)
  97. bg.P = 9e4
  98. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  99. bg.cframe = torso.CFrame
  100. local bv = Instance.new("BodyVelocity", torso)
  101. bv.velocity = Vector3.new(0,0.1,0)
  102. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  103. repeat wait()
  104. plr.Character.Humanoid.PlatformStand = false
  105. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  106. speed = speed+125.0+(speed/maxspeed)
  107. if speed > maxspeed then
  108. speed = maxspeed
  109. end
  110. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  111. speed = speed-250
  112. if speed < 0 then
  113. speed = 0
  114. end
  115. end
  116. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  117. 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
  118. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  119. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  120. 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
  121. else
  122. bv.velocity = Vector3.new(0,0.1,0)
  123. end
  124. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  125. until not flying
  126. ctrl = {f = 0, b = 0, l = 0, r = 0}
  127. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  128. speed = 0
  129. bg:Destroy()
  130. bv:Destroy()
  131. plr.Character.Humanoid.PlatformStand = false
  132. end
  133. mouse.KeyDown:connect(function(key)
  134. if key:lower() == "z" then
  135. if flying then flying = false
  136. else
  137. flying = true
  138. Fly()
  139. end
  140. elseif key:lower() == "w" then
  141. ctrl.f = 1
  142. elseif key:lower() == "s" then
  143. ctrl.b = -1
  144. elseif key:lower() == "a" then
  145. ctrl.l = -1
  146. elseif key:lower() == "d" then
  147. ctrl.r = 1
  148. end
  149. end)
  150. mouse.KeyUp:connect(function(key)
  151. if key:lower() == "w" then
  152. ctrl.f = 0
  153. elseif key:lower() == "s" then
  154. ctrl.b = 0
  155. elseif key:lower() == "a" then
  156. ctrl.l = 0
  157. elseif key:lower() == "d" then
  158. ctrl.r = 0
  159. end
  160. wait(5)
  161. hint:Destroy()
  162. end)
  163. Fly()
  164. end)
  165.  
  166. toogle.Name = "toogle"
  167. toogle.Parent = veryepic
  168. toogle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  169. toogle.Position = UDim2.new(0.0864197537, 0, 0.444867015, 0)
  170. toogle.Size = UDim2.new(0, 200, 0, 29)
  171. toogle.Font = Enum.Font.SourceSans
  172. toogle.Text = "Press Z to Toggle"
  173. toogle.TextColor3 = Color3.fromRGB(0, 0, 0)
  174. toogle.TextSize = 14.000
  175.  
  176. notice.Name = "notice"
  177. notice.Parent = veryepic
  178. notice.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  179. notice.Position = UDim2.new(0.0864197537, 0, 0.585551441, 0)
  180. notice.Size = UDim2.new(0, 200, 0, 29)
  181. notice.Font = Enum.Font.GothamBlack
  182. notice.Text = "NOTE: Made By PcGmers."
  183. notice.TextColor3 = Color3.fromRGB(0, 0, 0)
  184. notice.TextScaled = true
  185. notice.TextSize = 14.000
  186. notice.TextWrapped = true
  187.  
  188. TextLabel.Parent = veryepic
  189. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 170, 0)
  190. TextLabel.Position = UDim2.new(0.0864197537, 0, 0.749049425, 0)
  191. TextLabel.Size = UDim2.new(0, 200, 0, 50)
  192. TextLabel.Font = Enum.Font.GothamBlack
  193. TextLabel.Text = "Made by PcGmers"
  194. TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  195. TextLabel.TextScaled = true
  196. TextLabel.TextSize = 14.000
  197. TextLabel.TextWrapped = true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement