Advertisement
Hebablazin

RCplane

May 31st, 2016
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.22 KB | None | 0 0
  1. --RC Plane Gifted by machontz, Regular Script!
  2.  
  3. me = game.Players.TheMoonlightGlows
  4.  
  5.  
  6.  
  7. if script.Parent.className ~= "HopperBin" then
  8.  
  9. h = Instance.new("HopperBin")
  10.  
  11. h.Parent = me.Backpack
  12.  
  13. h.Name = "Rocket"
  14.  
  15. script.Parent = h
  16.  
  17. end
  18.  
  19. sp = script.Parent
  20.  
  21.  
  22.  
  23. function property(part, parent, x, y, z, color, tra, re)
  24.  
  25. part.Parent = parent
  26.  
  27. part.formFactor = 0
  28.  
  29. part.TopSurface = 0
  30.  
  31. part.BottomSurface = 0
  32.  
  33. part.Size = Vector3.new(x,y,z)
  34.  
  35. part.BrickColor = BrickColor.new(color)
  36.  
  37. part.Transparency = tra
  38.  
  39. part.Reflectance = re
  40.  
  41. end
  42.  
  43.  
  44.  
  45. function weld(weld,parent,part1,a,b,c,x,y,z)
  46.  
  47. weld.Parent = parent
  48.  
  49. weld.Part0 = weld.Parent
  50.  
  51. weld.Part1 = part1
  52.  
  53. weld.C1 = CFrame.fromEulerAnglesXYZ(x,y,z) * CFrame.new(a,b,c)
  54.  
  55. end
  56.  
  57.  
  58.  
  59.  
  60.  
  61. hold = false
  62.  
  63.  
  64.  
  65. speed = 0
  66.  
  67. maxspeed = 150
  68.  
  69.  
  70.  
  71. sp.Selected:connect(function(mouse, key)
  72.  
  73. mouse.Icon = " "
  74.  
  75. if me.Character:findFirstChild("Duck") == nil then
  76.  
  77. mod = Instance.new("Model")
  78.  
  79. mod.Parent = me.Character
  80.  
  81. mod.Name = "Duck"
  82.  
  83. plane = Instance.new("Seat")
  84.  
  85. property(plane, mod, 2, 1, 2, "Bright red", 0, 0)
  86.  
  87. plane.Position = Vector3.new(0,7,0)
  88.  
  89.  
  90.  
  91. planebase = Instance.new("Part")
  92.  
  93. property(planebase, mod, 7, 1, 14, "Black metallic")
  94.  
  95.  
  96.  
  97. weld1 = Instance.new("Weld")
  98.  
  99. weld(weld1, planebase, plane, 0, -0.5, 0, -0.1, 0, 0)
  100.  
  101.  
  102.  
  103. bv = Instance.new("BodyVelocity")
  104.  
  105. bv.Parent = planebase
  106.  
  107. bv.velocity = Vector3.new(0,0.01,0)
  108.  
  109. bv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  110.  
  111. bg = Instance.new("BodyGyro")
  112.  
  113. bg.Parent = planebase
  114.  
  115. bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  116.  
  117.  
  118.  
  119. dec1 = Instance.new("Part")
  120.  
  121. property(dec1, mod, 7, 1, 7, "Black metallic", 0, 0)
  122.  
  123. weld2 = Instance.new("Weld")
  124.  
  125. weld(weld2, planebase, dec1, 0, -3, -5, -1, 0, 0)
  126.  
  127.  
  128.  
  129. dec2 = Instance.new("Part")
  130.  
  131. property(dec2, mod, 7, 1, 13, "Black metallic", 0, 0)
  132.  
  133. dec2.CanCollide = false
  134.  
  135. weld3 = Instance.new("Weld")
  136.  
  137. weld(weld3, planebase, dec2, 0, -6, 3, 0, 0, 0)
  138.  
  139.  
  140.  
  141. dec3 = Instance.new("Part")
  142.  
  143. property(dec3, mod, 7, 1, 2, "Black metallic", 0, 0)
  144.  
  145. weld4 = Instance.new("Weld")
  146.  
  147. weld(weld4, planebase, dec3, 0, -0.5, 7, -1, 0, 0)
  148.  
  149.  
  150.  
  151. dec4 = Instance.new("Part")
  152.  
  153. property(dec4, mod, 7, 1, 5, "Navy blue", 0.6, 0.2)
  154.  
  155. weld5 = Instance.new("Weld")
  156.  
  157. weld(weld5, planebase, dec4, 0, -3.5, 8, -1.2, 0, 0)
  158.  
  159.  
  160.  
  161. dec5 = Instance.new("Part")
  162.  
  163. property(dec5, mod, 1, 6, 9, "Black metallic", 0, 0)
  164.  
  165. weld6 = Instance.new("Weld")
  166.  
  167. weld(weld6, planebase, dec5, 3.05, -3, 1.5, 0, 0, 0)
  168.  
  169.  
  170.  
  171. dec6 = Instance.new("Part")
  172.  
  173. property(dec6, mod, 1, 6, 9, "Black metallic", 0, 0)
  174.  
  175. weld7 = Instance.new("Weld")
  176.  
  177. weld(weld7, planebase, dec6, -3.05, -3, 1.5, 0, 0, 0)
  178.  
  179.  
  180.  
  181. dec7 = Instance.new("WedgePart")
  182.  
  183. property(dec7, mod, 1, 6, 4, "Black metallic", 0, 0)
  184.  
  185. weld8 = Instance.new("Weld")
  186.  
  187. weld(weld8, planebase, dec7, -3.05, -3, -4.5, 0, 3.12, 0)
  188.  
  189.  
  190.  
  191. dec8 = Instance.new("WedgePart")
  192.  
  193. property(dec8, mod, 1, 6, 4, "Black metallic", 0, 0)
  194.  
  195. weld9 = Instance.new("Weld")
  196.  
  197. weld(weld9, planebase, dec8, 3.05, -3, -4.5, 0, 3.12, 0)
  198.  
  199.  
  200.  
  201. dec9 = Instance.new("WedgePart")
  202.  
  203. property(dec9, mod, 1, 6, 3, "Black metallic", 0, 0)
  204.  
  205. weld10 = Instance.new("Weld")
  206.  
  207. weld(weld10, planebase, dec9, 3.05, -3, 7.4, 3.12, 3.12, 0)
  208.  
  209.  
  210.  
  211. dec10 = Instance.new("WedgePart")
  212.  
  213. property(dec10, mod, 1, 6, 3, "Black metallic", 0, 0)
  214.  
  215. weld11 = Instance.new("Weld")
  216.  
  217. weld(weld11, planebase, dec10, -3.05, -3, 7.4, 3.12, 3.12, 0)
  218.  
  219.  
  220.  
  221. wing = Instance.new("WedgePart")
  222.  
  223. property(wing, mod, 1, 9, 13, "Black metallic", 0, 0)
  224.  
  225. weld12 = Instance.new("Weld")
  226.  
  227. weld(weld12, planebase, wing, -7.55, -2, 0.5, 0, 0, 1.57)
  228.  
  229.  
  230.  
  231. wing2 = Instance.new("WedgePart")
  232.  
  233. property(wing2, mod, 1, 9, 13, "Black metallic", 0, 0)
  234.  
  235. weld13 = Instance.new("Weld")
  236.  
  237. weld(weld13, planebase, wing2, 7.55, -2, 0.5, 0, 0, -1.57)
  238.  
  239.  
  240.  
  241. miss = Instance.new("WedgePart")
  242.  
  243. property(miss, mod, 1, 9, 13, "Dark grey metallic", 0, 0)
  244.  
  245. mii = Instance.new("SpecialMesh",miss)
  246.  
  247. mii.Scale = Vector3.new(0.7,0.7,0.7)
  248.  
  249. mii.MeshType = "FileMesh"
  250.  
  251. mii.MeshId = "http://roblox.com/asset/?id=2251534"
  252.  
  253. weld14 = Instance.new("Weld")
  254.  
  255. weld(weld14, planebase, miss, 6, -1, 0.5, 0, 0, -1.57)
  256.  
  257.  
  258.  
  259. miss2 = Instance.new("WedgePart")
  260.  
  261. property(miss2, mod, 1, 1, 7, "Dark grey metallic", 0, 0)
  262.  
  263. mii2 = Instance.new("SpecialMesh",miss2)
  264.  
  265. mii2.Scale = Vector3.new(0.7,0.7,0.7)
  266.  
  267. mii2.MeshType = "FileMesh"
  268.  
  269. mii2.MeshId = "http://roblox.com/asset/?id=2251534"
  270.  
  271. weld15 = Instance.new("Weld")
  272.  
  273. weld(weld15, planebase, miss2, -6, -1, 0.5, 0, 0, -1.57)
  274.  
  275.  
  276.  
  277.  
  278.  
  279. mouse.Button1Down:connect(function()
  280.  
  281. hold = true
  282.  
  283. while hold == true do
  284.  
  285. bg.cframe = CFrame.new(planebase.Position, mouse.Hit.p)
  286.  
  287. bv.velocity = planebase.CFrame.lookVector * speed
  288.  
  289. speed = speed + 1
  290.  
  291. if speed >= maxspeed then
  292.  
  293. speed = maxspeed
  294.  
  295. end
  296.  
  297. wait()
  298.  
  299. end
  300.  
  301. end)
  302.  
  303. mouse.Button1Up:connect(function()
  304.  
  305. hold = false
  306.  
  307. while hold == false do
  308.  
  309. wait()
  310.  
  311. speed = speed - 5
  312.  
  313. if speed <= 0 then
  314.  
  315. speed = 0
  316.  
  317. end
  318.  
  319. bv.velocity = planebase.CFrame.lookVector * speed
  320.  
  321. end
  322.  
  323. bv.velocity = Vector3.new(0,.2,0)
  324.  
  325. end)
  326.  
  327. mouse.KeyDown:connect(function(key)
  328.  
  329. key = key:lower()
  330.  
  331. if (key == "q") then
  332.  
  333. local bomb = Instance.new("Part")
  334.  
  335. bomb.Parent = workspace
  336.  
  337. bomb.formFactor = 0
  338.  
  339. bomb.Size = Vector3.new(2,2,6)
  340.  
  341. bomb.BrickColor = BrickColor.new(26)
  342.  
  343. bombmesh = Instance.new("SpecialMesh",bomb)
  344.  
  345. bombmesh.MeshType = "FileMesh"
  346.  
  347. bombmesh.Scale = Vector3.new(0.2,0.2,0.2)
  348.  
  349. bombmesh.MeshId = "2ff5ca3d3c439e4a558cb67d4a96f342"
  350.  
  351. bomb.CFrame = planebase.CFrame * CFrame.new(0,-5,0)
  352.  
  353. bomb.CFrame = bomb.CFrame * CFrame.Angles(0.4,0,0)
  354.  
  355. bomb:BreakJoints()
  356.  
  357. wait(0.1)
  358.  
  359. bomb.Touched:connect(function()
  360.  
  361. local ex = Instance.new("Explosion")
  362.  
  363. ex.Parent = workspace
  364.  
  365. ex.Position = bomb.Position
  366.  
  367. ex.BlastRadius = 14
  368.  
  369. ex.BlastPressure = 400000
  370.  
  371. bomb:remove()
  372.  
  373. end)
  374.  
  375. elseif (key == "f") then
  376.  
  377. local bom = miss:clone()
  378.  
  379. bom.Parent = workspace
  380.  
  381. bom.CFrame = miss.CFrame * CFrame.new(0,-5,-30)
  382.  
  383.  
  384.  
  385. local bom2 = miss2:clone()
  386.  
  387. bom2.Parent = workspace
  388.  
  389. bom2.CFrame = miss2.CFrame * CFrame.new(0,-5,-30)
  390.  
  391.  
  392.  
  393. bom:BreakJoints()
  394.  
  395. bom2:BreakJoints()
  396.  
  397.  
  398.  
  399. local b = Instance.new("BodyVelocity",bom)
  400.  
  401. b.velocity = bom.CFrame.lookVector * 250
  402.  
  403. b.P = 900000001
  404.  
  405.  
  406.  
  407. local b2 = b:clone()
  408.  
  409. b2.Parent = bom2
  410.  
  411.  
  412.  
  413. bom.Touched:connect(function()
  414.  
  415. local ex = Instance.new("Explosion")
  416.  
  417. ex.Parent = workspace
  418.  
  419. ex.Position = bom.Position
  420.  
  421. ex.BlastRadius = 7
  422.  
  423. ex.BlastPressure = 300000
  424.  
  425. bom:remove()
  426.  
  427. end)
  428.  
  429. bom2.Touched:connect(function()
  430.  
  431. local ex = Instance.new("Explosion")
  432.  
  433. ex.Parent = workspace
  434.  
  435. ex.Position = bom2.Position
  436.  
  437. ex.BlastRadius = 7
  438.  
  439. ex.BlastPressure = 300000
  440.  
  441. bom2:remove()
  442.  
  443. end)
  444.  
  445. end
  446.  
  447. end)
  448.  
  449. end
  450.  
  451. end)
  452.  
  453.  
  454.  
  455. sp.Deselected:connect(function()
  456.  
  457. mod:remove()
  458.  
  459. hold = false
  460.  
  461. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement