Advertisement
yudhaprawira

metal wings

Jun 29th, 2016
2,758
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
q/kdb+ 4.34 KB | None | 0 0
  1. me = game.Players.yudhaprawira
  2.  
  3. if script.Parent.className ~= "HopperBin" then
  4.  
  5. h = Instance.new("HopperBin",me.Backpack)
  6.  
  7. h.Name = "Wings"
  8.  
  9. script.Parent = h
  10.  
  11. end
  12.  
  13.  
  14.  
  15. bin = script.Parent
  16.  
  17.  
  18.  
  19. function weld(w, p, p0, p1, a, b, c, x, y, z)
  20.  
  21. w.Parent = p
  22.  
  23. w.Part0 = p0
  24.  
  25. w.Part1 = p1
  26.  
  27. w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z)
  28.  
  29. end
  30.  
  31.  
  32.  
  33. function prop(part, parent, collide, tran, ref, x, y, z, color)
  34.  
  35. part.Parent = parent
  36.  
  37. part.formFactor = 0
  38.  
  39. part.CanCollide = collide
  40.  
  41. part.Transparency = tran
  42.  
  43. part.Reflectance = ref
  44.  
  45. part.Size = Vector3.new(x,y,z)
  46.  
  47. part.BrickColor = BrickColor.new(color)
  48.  
  49. part:BreakJoints()
  50.  
  51. end
  52.  
  53.  
  54.  
  55. function mesh(mesh, parent, x, y, z, type)
  56.  
  57. mesh.Parent = parent
  58.  
  59. mesh.Scale = Vector3.new(x, y, z)
  60.  
  61. mesh.MeshType = type
  62.  
  63. end
  64.  
  65.  
  66.  
  67. wings = Instance.new("Model",me.Character)
  68.  
  69. wings.Name = "Wings"
  70.  
  71.  
  72.  
  73. torso = me.Character.Torso
  74.  
  75. rarm = me.Character["Right Arm"]
  76.  
  77. larm = me.Character["Left Arm"]
  78.  
  79.  
  80.  
  81. main = Instance.new("Part")
  82.  
  83. prop(main,wings,false,0,0.06,2,1,2,"Dark grey")
  84.  
  85. mainmesh = Instance.new("SpecialMesh")
  86.  
  87. mesh(mainmesh,main,0.9,0.4,0.75,"Torso")
  88.  
  89. tweld = Instance.new("Weld")
  90.  
  91. weld(tweld,torso,torso,main,-1.57,0,0,0,0,-0.7)
  92.  
  93.  
  94.  
  95. wing1 = Instance.new("Part")
  96.  
  97. prop(wing1,wings,false,0,0.1,1,1,2,"Dark grey")
  98.  
  99. wingmesh1 = Instance.new("SpecialMesh")
  100.  
  101. mesh(wingmesh1,wing1,1,0.65,1.2,"Brick")
  102.  
  103. ww1 = Instance.new("Weld")
  104.  
  105. weld(ww1,main,main,wing1,0,0,0,1,0,0)
  106.  
  107.  
  108.  
  109. wing2 = Instance.new("Part")
  110.  
  111. prop(wing2,wings,false,0,0.1,1,1,2,"Dark grey")
  112.  
  113. wingmesh2 = Instance.new("SpecialMesh")
  114.  
  115. mesh(wingmesh2,wing2,1,0.65,1.2,"Brick")
  116.  
  117. ww2 = Instance.new("Weld")
  118.  
  119. weld(ww2,main,main,wing2,0,0,0,-1,0,0)
  120.  
  121.  
  122.  
  123. wing2b = Instance.new("Part")
  124.  
  125. prop(wing2b,wings,false,0,0.1,1,2,3,"Dark grey")
  126.  
  127. wingmesh2b = Instance.new("SpecialMesh")
  128.  
  129. mesh(wingmesh2b,wing2b,0.4,1.4,1.4,"Wedge")
  130.  
  131. ww2b = Instance.new("Weld")
  132.  
  133. weld(ww2b,main,main,wing2b,-math.pi/2,0,math.pi/2,-3,0,-0.25)
  134.  
  135.  
  136.  
  137. wing1b = Instance.new("Part")
  138.  
  139. prop(wing1b,wings,false,0,0.1,1,2,3,"Dark grey")
  140.  
  141. wingmesh1b = Instance.new("SpecialMesh")
  142.  
  143. mesh(wingmesh1b,wing1b,0.4,1.4,1.4,"Wedge")
  144.  
  145. ww1b = Instance.new("Weld")
  146.  
  147. weld(ww1b,main,main,wing1b,-math.pi/2,0,-math.pi/2,3,0,-0.25)
  148.  
  149.  
  150.  
  151. thrust1 = Instance.new("Part")
  152.  
  153. prop(thrust1, wings, false, 0, 0.1, 1, 2, 1, "Dark grey")
  154.  
  155. tme1 = Instance.new("SpecialMesh")
  156.  
  157. mesh(tme1,thrust1,0.8,1,0.8,"Head")
  158.  
  159. tw1 = Instance.new("Weld")
  160.  
  161. weld(tw1, wing1b, wing1b, thrust1, 0, 0, 0, 0, 0, 0)
  162.  
  163.  
  164.  
  165. thrust2 = Instance.new("Part")
  166.  
  167. prop(thrust2, wings, false, 0, 0.1, 1, 2, 1, "Dark grey")
  168.  
  169. tme2 = Instance.new("SpecialMesh")
  170.  
  171. mesh(tme2,thrust2,0.8,1,0.8,"Head")
  172.  
  173. tw2 = Instance.new("Weld")
  174.  
  175. weld(tw2, wing2b, wing2b, thrust2, 0, 0, 0, 0, 0, 0)
  176.  
  177.  
  178.  
  179.  
  180.  
  181. fire1 = Instance.new("Fire",thrust1)
  182.  
  183. fire1.Heat = 25
  184.  
  185. fire1.Size = 2
  186.  
  187. fire1.Enabled = false
  188.  
  189.  
  190.  
  191. fire2 = Instance.new("Fire",thrust2)
  192.  
  193. fire2.Heat = 25
  194.  
  195. fire2.Size = 2
  196.  
  197. fire2.Enabled = false
  198.  
  199.  
  200.  
  201. hold = false
  202.  
  203. using = false
  204.  
  205.  
  206.  
  207. speed = 0
  208.  
  209. maxspeed = 700
  210.  
  211.  
  212.  
  213. bin.Selected:connect(function(mouse)
  214.  
  215.     speed = 0
  216.  
  217.     mouse.Button1Down:connect(function()
  218.  
  219.         if using == false then
  220.  
  221.             hold = true
  222.  
  223.             using = true
  224.  
  225.             me.Character.Humanoid.PlatformStand = true
  226.  
  227.             bg = Instance.new("BodyGyro",main)
  228.  
  229.             bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  230.  
  231.             bv = Instance.new("BodyVelocity",main)
  232.  
  233.             bv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  234.  
  235.             bg.cframe = CFrame.new(main.Position, mouse.Hit.p)
  236.  
  237.             bv.velocity = main.CFrame.lookVector * speed
  238.  
  239.             fire1.Enabled = true
  240.  
  241.             fire2.Enabled = true
  242.  
  243.             while hold do
  244.  
  245.                 wait()
  246.  
  247.                 speed = speed + 5
  248.  
  249.                 if speed >= maxspeed then
  250.  
  251.                     speed = maxspeed
  252.  
  253.                 end
  254.  
  255.                 bg.cframe = CFrame.new(main.Position, mouse.Hit.p)
  256.  
  257.                 bv.velocity = main.CFrame.lookVector * speed
  258.  
  259.             end
  260.  
  261.         end
  262.  
  263.     end)
  264.  
  265.     mouse.Button1Up:connect(function()
  266.  
  267.         hold = false
  268.  
  269.         me.Character.Humanoid.PlatformStand = false
  270.  
  271.         fire1.Enabled = false
  272.  
  273.         fire2.Enabled = false
  274.  
  275.         for i = speed, 0, -30 do
  276.  
  277.             wait()
  278.  
  279.             speed = i
  280.  
  281.             bv.velocity = main.CFrame.lookVector * speed
  282.  
  283.         end
  284.  
  285.         bg.Parent = torso
  286.  
  287.         bg.cframe = CFrame.new(torso.Position, torso.Position + Vector3.new(3,0,0))
  288.  
  289.         wait(0.5)
  290.  
  291.         bv:remove()
  292.  
  293.         wait(2)
  294.  
  295.         bg:remove()
  296.  
  297.         using = false
  298.  
  299.     end)
  300.  
  301. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement