RobloxScripty

Untitled

Jul 8th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.66 KB | None | 0 0
  1. Workspace = Game:GetService("Workspace")
  2. Players = Game:GetService("Players")
  3. Debris = Game:GetService("Debris")
  4.  
  5. Player = Players.LocalPlayer
  6. Character = Player.Character
  7.  
  8. Speed = 100
  9. PrivateSeat = true
  10. Hold = false
  11.  
  12. SeatColor = BrickColor.new("Bright red")
  13. SmokeColor = BrickColor.new("Dark stone grey")
  14. LightningColor = BrickColor.new("Royal purple")
  15.  
  16. local Plane
  17.  
  18. function ChildAdded(child, seat)
  19. if (child.className == "Weld" and child.Name == "SeatWeld") then
  20. if (child.Part0 == seat and child.Part1.Name == "Torso") then
  21. if (child.Part1.Parent.Name ~= Player.Name) then
  22. if (PrivateSeat) then
  23. child.Parent = nil
  24. end
  25. end
  26. end
  27. end
  28. end
  29.  
  30. function WeldChanged(weld, part0, part1, c0, c1)
  31. weld.Parent = part0
  32. weld.Part0 = part0
  33. weld.Part1 = part1
  34. weld.C0 = c0
  35. weld.C1 = c1
  36. end
  37.  
  38. function Lightning(part)
  39. local pos1, pos2
  40. if (part and part:IsA("BasePart")) then
  41. while (part.Parent ~= nil) do
  42. pos2 = pos1 or part.Position
  43. pos1 = part.Position + Vector3.new(math.random(-2,2), math.random(-2,2), math.random(-2, 2))
  44. if (pos2 ~= nil) then
  45. local zap = Instance.new("Part", Workspace)
  46. zap.Anchored = true
  47. zap.Locked = true
  48. zap.CanCollide = false
  49. zap.TopSurface = 0
  50. zap.BottomSurface = 0
  51. zap.formFactor = 0
  52. zap.Size = Vector3.new(0, 0, 0)
  53. zap.BrickColor = LightningColor
  54. zap.Transparency = 0.1
  55. zap.Reflectance = 0.4
  56. zap.CFrame = CFrame.new((pos1 + pos2) / 2, pos2)
  57.  
  58. local scale = Instance.new("BlockMesh", zap)
  59. scale.Scale = Vector3.new(0.1, 0.1, (pos1-pos2).magnitude)
  60. local fade = coroutine.create(function()
  61. for index = 0.3, 1, 0.1 do
  62. zap.Transparency = index
  63. wait()
  64. end
  65. zap:Remove()
  66. end)
  67.  
  68. coroutine.resume(fade)
  69. end
  70. wait()
  71. end
  72. end
  73. end
  74.  
  75. function Weld(part0, part1, c0, c1, unremoveable)
  76. if (c0 == nil) then c0 = CFrame.new(0, 0, 0) end
  77. if (c1 == nil) then c1 = CFrame.new(0, 0, 0) end
  78.  
  79. if (part0 and part1) then
  80. local weld = Instance.new("Weld", part0)
  81. weld.Part0 = part0
  82. weld.Part1 = part1
  83. weld.C0 = c0
  84. weld.C1 = c1
  85. if (unremoveable) then
  86. weld.Changed:connect(function() WeldChanged(weld, part0, part1, c0, c1) end)
  87. end
  88. return weld
  89. end
  90.  
  91. end
  92.  
  93. if (script.Parent.className ~= "HopperBin") then
  94. local hop = Instance.new("HopperBin", Player.Backpack)
  95. hop.Name = "Plane"
  96. script.Parent = hop
  97. Plane = script.Parent
  98. end
  99.  
  100. function onButton1Down(mouse, Seat, bodyGyro, bodyVelocity)
  101. Hold = true
  102.  
  103. while true do
  104. wait()
  105. if (Hold == false) then break end
  106. bodyGyro.cframe = CFrame.new((Seat.Position + mouse.Hit.p) / 2, mouse.Hit.p)
  107. bodyVelocity.velocity = Seat.CFrame.lookVector * Speed
  108. end
  109. end
  110.  
  111. function onButton1Up(mouse, Seat, bodyGyro, bodyVelocity)
  112. Hold = false
  113. bodyVelocity.velocity = Vector3.new(0, Seat:GetMass()/10, 0)
  114. end
  115.  
  116. function onKeyDown(mouse, key)
  117. ---[[
  118. end
  119.  
  120. function onKeyUp(mouse, key)
  121. ---[[
  122. end
  123.  
  124. function onSelected(mouse)
  125. if (not Character:findFirstChild("TNSplane")) then
  126. local TheNewScripter = Instance.new("Model", Character)
  127. TheNewScripter.Name = "TNSplane"
  128.  
  129. local Seat = Instance.new("Seat", TheNewScripter)
  130. Seat.Locked = true
  131. Seat.TopSurface = 0
  132. Seat.BottomSurface = 0
  133. Seat.formFactor = 2
  134. Seat.Position = Character.Head.Position
  135. Seat.BrickColor = SeatColor
  136. Seat.Size = Vector3.new(2, 0.4, 2)
  137. local msh = Instance.new("BlockMesh")
  138. msh.Parent = Seat
  139. Seat.ChildAdded:connect(function(child) ChildAdded(child, Seat) end)
  140.  
  141.  
  142. local plat = Instance.new("Part", TheNewScripter)
  143. plat.Locked = true
  144. plat.TopSurface = 0 -- Smooth
  145. plat.BottomSurface = 0 -- Smooth
  146. plat.formFactor = 0
  147. plat.Position = Character.Head.Position
  148. plat.BrickColor = BrickColor.new("Really black")
  149. plat.Size = Vector3.new(3, 1, 5)
  150.  
  151. Weld(Seat, plat, CFrame.new(0, -0.5, 0), nil, false)
  152.  
  153. local plat1 = Instance.new("Part", TheNewScripter)
  154. plat1.Locked = true
  155. plat1.TopSurface = 0 -- Smooth
  156. plat1.BottomSurface = 0 -- Smooth
  157. plat1.formFactor = 0
  158. plat1.Position = Character.Head.Position
  159. plat1.BrickColor = BrickColor.new("Really black")
  160. plat1.Size = Vector3.new(1, 3, 5)
  161. local msh1 = msh:Clone()
  162. msh1.Parent = plat1
  163.  
  164. Weld(Seat, plat1, CFrame.new(1.5, 0.5, 0), nil, false)
  165.  
  166. local plat2 = Instance.new("Part", TheNewScripter)
  167. plat2.Locked = true
  168. plat2.TopSurface = 0 -- Smooth
  169. plat2.BottomSurface = 0 -- Smooth
  170. plat2.formFactor = 0
  171. plat2.Position = Character.Head.Position
  172. plat2.BrickColor = BrickColor.new("Really black")
  173. plat2.Size = Vector3.new(1, 3, 5)
  174. local msh2 = msh:Clone()
  175. msh2.Parent = plat2
  176.  
  177. Weld(Seat, plat2, CFrame.new(-1.5, 0.5, 0), nil, false)
  178.  
  179. local plat3 = Instance.new("Part", TheNewScripter)
  180. plat3.Locked = true
  181. plat3.TopSurface = 0 -- Smooth
  182. plat3.BottomSurface = 0 -- Smooth
  183. plat3.formFactor = 0
  184. plat3.Position = Character.Head.Position
  185. plat3.BrickColor = BrickColor.new("Really black")
  186. plat3.Size = Vector3.new(4, 3, 6)
  187. local msh3 = msh:Clone()
  188. msh3.Parent = plat3
  189.  
  190. Weld(Seat, plat3, CFrame.new(0, 0.5, 4.5), nil, false)
  191.  
  192. local plat4 = Instance.new("Part", TheNewScripter)
  193. plat4.Locked = true
  194. plat4.TopSurface = 0 -- Smooth
  195. plat4.BottomSurface = 0 -- Smooth
  196. plat4.formFactor = 0
  197. plat4.Position = Character.Head.Position
  198. plat4.BrickColor = BrickColor.new("Really black")
  199. plat4.Size = Vector3.new(3, 3, 1)
  200. local msh4 = msh:Clone()
  201. msh4.Parent = plat4
  202.  
  203. Weld(Seat, plat4, CFrame.new(0, 0.5, -2), nil, false)
  204.  
  205. local plat5 = Instance.new("Part", TheNewScripter)
  206. plat5.Locked = true
  207. plat5.TopSurface = 0 -- Smooth
  208. plat5.BottomSurface = 0 -- Smooth
  209. plat5.formFactor = 0
  210. plat5.Position = Character.Head.Position
  211. plat5.BrickColor = BrickColor.new("Really black")
  212. plat5.Size = Vector3.new(2, 1, 6)
  213. local msh3 = msh:Clone()
  214. msh3.Parent = plat5
  215.  
  216. Weld(Seat, plat5, CFrame.new(0, 0.5, 10), nil, false)
  217.  
  218. local weg = Instance.new("WedgePart", TheNewScripter)
  219. weg.Locked = true
  220. weg.TopSurface = 0 -- Smooth
  221. weg.BottomSurface = 0 -- Smooth
  222. weg.formFactor = 3
  223. weg.Position = Character.Head.Position
  224. weg.BrickColor = BrickColor.new("Really black")
  225. weg.Size = Vector3.new(4, 1.5, 5)
  226.  
  227. Weld(Seat, weg, CFrame.new(0, 1.25, -5), nil, false)
  228.  
  229. local weg2 = Instance.new("WedgePart", TheNewScripter)
  230. weg2.Locked = true
  231. weg2.TopSurface = 0 -- Smooth
  232. weg2.BottomSurface = 0 -- Smooth
  233. weg2.formFactor = 3
  234. weg2.Position = Character.Head.Position
  235. weg2.BrickColor = BrickColor.new("Really black")
  236. weg2.Size = Vector3.new(4, 2, 6)
  237.  
  238. Weld(Seat, weg2, CFrame.new(0, 3, 4.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)), nil, false)
  239.  
  240. local weg3 = Instance.new("WedgePart", TheNewScripter)
  241. weg3.Locked = true
  242. weg3.TopSurface = 0 -- Smooth
  243. weg3.BottomSurface = 0 -- Smooth
  244. weg3.formFactor = 3
  245. weg3.Position = Character.Head.Position
  246. weg3.BrickColor = BrickColor.new("Really black")
  247. weg3.CanCollide = false
  248. weg3.Size = Vector3.new(1, 3, 6)
  249.  
  250. Weld(Seat, weg3, CFrame.new(1.5, 2.5, -1.5), nil, false)
  251.  
  252. local weg4 = Instance.new("WedgePart", TheNewScripter)
  253. weg4.Locked = true
  254. weg4.TopSurface = 0 -- Smooth
  255. weg4.BottomSurface = 0 -- Smooth
  256. weg4.formFactor = 3
  257. weg4.Position = Character.Head.Position
  258. weg4.BrickColor = BrickColor.new("Really black")
  259. weg4.CanCollide = false
  260. weg4.Size = Vector3.new(1, 3, 6)
  261.  
  262. Weld(Seat, weg4, CFrame.new(-1.5, 2.5, -1.5), nil, false)
  263.  
  264. local gls = Instance.new("Part", TheNewScripter)
  265. gls.Locked = true
  266. gls.TopSurface = 0 -- Smooth
  267. gls.BottomSurface = 0 -- Smooth
  268. gls.formFactor = 0
  269. gls.Position = Character.Head.Position
  270. gls.BrickColor = BrickColor.new("Mid gray")
  271. gls.Transparency = 0.5
  272. gls.CanCollide = false
  273. gls.Size = Vector3.new(4, 5, 5)
  274. local glm = Instance.new("SpecialMesh")
  275. glm.MeshType = "Sphere"
  276. glm.Parent = gls
  277.  
  278. Weld(Seat, gls, CFrame.new(0, 2.25, 0), nil, false)
  279.  
  280. local weg1 = Instance.new("WedgePart", TheNewScripter)
  281. weg1.Locked = true
  282. weg1.TopSurface = 0 -- Smooth
  283. weg1.BottomSurface = 0 -- Smooth
  284. weg1.formFactor = 3
  285. weg1.Position = Character.Head.Position
  286. weg1.BrickColor = BrickColor.new("Really black")
  287. weg1.Size = Vector3.new(4, 1.5, 5)
  288.  
  289. Weld(Seat, weg1, CFrame.new(0, -0.25, -5)*CFrame.Angles(math.rad(180),math.rad(180),math.rad(0)), nil, false)
  290.  
  291. local wing = Instance.new("WedgePart", TheNewScripter)
  292. wing.Locked = true
  293. wing.TopSurface = 0 -- Smooth
  294. wing.BottomSurface = 0 -- Smooth
  295. wing.formFactor = 0
  296. wing.Position = Character.Head.Position
  297. wing.BrickColor = BrickColor.new("Really black")
  298. wing.Size = Vector3.new(3, 1, 6)
  299.  
  300. Weld(Seat, wing, CFrame.new(-5, 0.5, 0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), nil, false)
  301.  
  302. local wing1 = Instance.new("WedgePart", TheNewScripter)
  303. wing1.Locked = true
  304. wing1.TopSurface = 0 -- Smooth
  305. wing1.BottomSurface = 0 -- Smooth
  306. wing1.formFactor = 0
  307. wing1.Position = Character.Head.Position
  308. wing1.BrickColor = BrickColor.new("Really black")
  309. wing1.Size = Vector3.new(3, 1, 6)
  310.  
  311. Weld(Seat, wing1, CFrame.new(5, 0.5, 0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)), nil, false)
  312.  
  313. local wing2 = Instance.new("WedgePart", TheNewScripter)
  314. wing2.Locked = true
  315. wing2.TopSurface = 0 -- Smooth
  316. wing2.BottomSurface = 0 -- Smooth
  317. wing2.formFactor = 0
  318. wing2.Position = Character.Head.Position
  319. wing2.BrickColor = BrickColor.new("Really black")
  320. wing2.Size = Vector3.new(2, 1, 3)
  321.  
  322. Weld(Seat, wing2, CFrame.new(-2.5, 0.5, 12)*CFrame.Angles(math.rad(180),math.rad(90),math.rad(0)), nil, false)
  323.  
  324.  
  325. local wing3 = Instance.new("WedgePart", TheNewScripter)
  326. wing3.Locked = true
  327. wing3.TopSurface = 0 -- Smooth
  328. wing3.BottomSurface = 0 -- Smooth
  329. wing3.formFactor = 0
  330. wing3.Position = Character.Head.Position
  331. wing3.BrickColor = BrickColor.new("Really black")
  332. wing3.Size = Vector3.new(2, 1, 3)
  333.  
  334. Weld(Seat, wing3, CFrame.new(2.5, 0.5, 12)*CFrame.Angles(math.rad(180),math.rad(-90),math.rad(0)), nil, false)
  335.  
  336.  
  337. coroutine.resume(coroutine.create(function()
  338. Lightning(Seat)
  339. end))
  340.  
  341. local weld = Weld(Seat, plat, CFrame.new(0, -0.5, 0), nil, true)
  342.  
  343. local bodyGyro = Instance.new("BodyGyro", Seat)
  344. bodyGyro.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  345. bodyGyro.cframe = Seat.CFrame
  346.  
  347. local bodyVelocity = Instance.new("BodyVelocity", Seat)
  348. bodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  349. bodyVelocity.velocity = Vector3.new(0, 0, 0)
  350.  
  351. mouse.Button1Down:connect(function() onButton1Down(mouse, Seat, bodyGyro, bodyVelocity) end)
  352. mouse.Button1Up:connect(function() onButton1Up(mouse, Seat, bodyGyro, bodyVelocity) end)
  353. mouse.KeyDown:connect(function(key) onKeyDown(mouse, key) end)
  354. mouse.KeyUp:connect(function(key) onKeyUp(mouse, key) end)
  355. end
  356. end
  357.  
  358. function onDeselected()
  359. pcall(function()
  360. for i=1,3 do
  361. Character.TNSplane:Remove()
  362. end
  363. end)
  364. end
  365.  
  366. Plane.Selected:connect(onSelected)
  367. Plane.Deselected:connect(onDeselected)
Add Comment
Please, Sign In to add comment