Advertisement
nmnnmnn

nnnnnnnnnnnnnnnnnnnnnnnnnnnnnn

Nov 29th, 2014
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.11 KB | None | 0 0
  1. --GunBlade Gifted by TheRedAngel, Regular Script!
  2.  
  3. Me = game.Players.DeathOfKatana1
  4.  
  5. Char = Me.Character
  6.  
  7. Name = "xSGrapple"
  8.  
  9. ToolName = "Grapple"
  10.  
  11. Hold = false
  12.  
  13. ButtonDown = false
  14.  
  15. NeckO = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  16.  
  17.  
  18.  
  19.  
  20.  
  21. function Prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
  22.  
  23. part.Parent = parent
  24.  
  25. part.formFactor = form
  26.  
  27. part.CanCollide = collide
  28.  
  29. part.Transparency = tran
  30.  
  31. part.Reflectance = ref
  32.  
  33. part.Size = Vector3.new(x,y,z)
  34.  
  35. part.BrickColor = BrickColor.new(color)
  36.  
  37. part.TopSurface = 0
  38.  
  39. part.BottomSurface = 0
  40.  
  41. part.Anchored = anchor
  42.  
  43. part.Locked = true
  44.  
  45. part:BreakJoints()
  46.  
  47. end
  48.  
  49.  
  50.  
  51. function Weld(w, p, p1, a, b, c, x, y, z)
  52.  
  53. w.Parent = p
  54.  
  55. w.Part0 = p
  56.  
  57. w.Part1 = p1
  58.  
  59. w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z)
  60.  
  61. end
  62.  
  63.  
  64.  
  65. function GetCF(pos1, pos2)
  66.  
  67. local pos4 = Vector3.new(pos2.X, pos1.Y, pos2.Z)
  68.  
  69. return CFrame.new(pos1, pos4)
  70.  
  71. end
  72.  
  73.  
  74.  
  75. function SetWeld(rw, R0, TO, mouse)
  76.  
  77. local offset = (TO.Position.Y - mouse.Hit.p.Y)/60
  78.  
  79. local mag = (TO.Position - mouse.Hit.p).magnitude/80
  80.  
  81. offset = offset/mag
  82.  
  83.  
  84.  
  85. TO.Neck.C0 = NeckO * CFrame.Angles(offset, 0, 0)
  86.  
  87.  
  88.  
  89. rw.C0 = R0 * CFrame.Angles(-offset, 0, 0)
  90.  
  91. end
  92.  
  93.  
  94.  
  95. Rarm = Char:findFirstChild("Right Arm")
  96.  
  97. Larm = Char:findFirstChild("Left Arm")
  98.  
  99. Torso = Char:findFirstChild("Torso")
  100.  
  101. Hum = Char:findFirstChild("Humanoid")
  102.  
  103.  
  104.  
  105. BG = Instance.new("BodyGyro")
  106.  
  107. BG.P = 10000
  108.  
  109. BG.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  110.  
  111.  
  112.  
  113. for i,v in pairs(Char:children()) do
  114.  
  115. if v.Name == Name then v:remove() end
  116.  
  117. end
  118.  
  119.  
  120.  
  121. Mod = Instance.new("Model")
  122.  
  123. Mod.Name = Name
  124.  
  125.  
  126.  
  127. Trail = Instance.new("Part")
  128.  
  129. Prop( Trail, nil, false, 0, 0, 0.3, 1, 0.3, "Reddish brown", false, "Custom" )
  130.  
  131. TrailMesh = Instance.new("CylinderMesh",Trail)
  132.  
  133.  
  134.  
  135. Main = Instance.new("Part")
  136.  
  137. Prop( Main, Mod, false, 0, 0, 0.6, 1.4, 0.6, "Dark green", false, "Custom" )
  138.  
  139. Instance.new("SpecialMesh",Main).MeshType = "Sphere"
  140.  
  141.  
  142.  
  143. TorsoHold = Instance.new("Weld")
  144.  
  145. Weld( TorsoHold, Torso, Main, math.pi*1.2, 0, 0, -1.1, 0.7, 0.3 )
  146.  
  147.  
  148.  
  149. Neck = Instance.new("Part")
  150.  
  151. Prop( Neck, Mod, false, 0, 0.1, 0.4, 1, 0.4, "Medium grey", false, "Custom" )
  152.  
  153. Instance.new("CylinderMesh",Neck)
  154.  
  155.  
  156.  
  157. NeckWeld = Instance.new("Weld")
  158.  
  159. Weld( NeckWeld, Main, Neck, 0, 0, 0, 0, -0.8, 0 )
  160.  
  161.  
  162.  
  163. for i = -60, 180, 20 do
  164.  
  165. local Hook = Instance.new("Part")
  166.  
  167. Prop( Hook, Mod, false, 0, 0.1, 0.3, 0.3, 0.3, "Medium grey", false, "Custom" )
  168.  
  169. Instance.new("CylinderMesh",Hook)
  170.  
  171.  
  172.  
  173. local HookW = Instance.new("Weld")
  174.  
  175. HookW.C0 = CFrame.new(-0.1, 1, 0) * CFrame.Angles(math.rad(i) - math.pi/1.7,0,0)
  176.  
  177. Weld( HookW, Neck, Hook, 0, 0, 0, 0, 0, -0.7 )
  178.  
  179. end
  180.  
  181.  
  182.  
  183. Hb = Instance.new("Part")
  184.  
  185. Prop( Hb, Mod, false, 1, 0, 0.1, 0.1, 0.1, "Bright red", false, "Custom" )
  186.  
  187. Hbw = Instance.new("Weld")
  188.  
  189. Weld( Hbw, Rarm, Hb, 0, 0, 0, 0, 1, 0)
  190.  
  191.  
  192.  
  193. HW = Instance.new("Weld")
  194.  
  195. Weld( HW, Hb, nil, -math.pi/2 - 0.7, 0, 0, 0, 0, 0)
  196.  
  197.  
  198.  
  199. Rb = Instance.new("Part")
  200.  
  201. Prop( Rb, Mod, false, 1, 0, 0.1, 0.1, 0.1, "Bright red", false, "Custom" )
  202.  
  203. Rh = Instance.new("Weld")
  204.  
  205. Weld( Rh, Torso, Rb, 0, 0, 0, -1.5, -0.5, 0)
  206.  
  207.  
  208.  
  209. Lb = Instance.new("Part")
  210.  
  211. Prop( Lb, Mod, false, 1, 0, 0.1, 0.1, 0.1, "Bright red", false, "Custom" )
  212.  
  213. Lh = Instance.new("Weld")
  214.  
  215. Weld( Lh, Torso, Lb, 0, 0, 0, 1.5, -0.5, 0)
  216.  
  217.  
  218.  
  219. RW = Instance.new("Weld")
  220.  
  221. Weld(RW,Rb,nil,0,0,0,0,0.5,0)
  222.  
  223.  
  224.  
  225. LW = Instance.new("Weld")
  226.  
  227. Weld(LW,Lb,nil,0,0,0,0,0.5,0)
  228.  
  229.  
  230.  
  231. RightBattle = nil
  232.  
  233. LeftBattle = nil
  234.  
  235. WepBattle = nil
  236.  
  237.  
  238.  
  239. Mod.Parent = Char
  240.  
  241.  
  242.  
  243. if script.Parent.className ~= "HopperBin" then
  244.  
  245. Hop = Instance.new("HopperBin")
  246.  
  247. Hop.Name = ToolName
  248.  
  249. Hop.Parent = Me.Backpack
  250.  
  251. script.Parent = Hop
  252.  
  253. end
  254.  
  255.  
  256.  
  257. bin = script.Parent
  258.  
  259.  
  260.  
  261. function HoldArm()
  262.  
  263. RW.Part1 = Rarm
  264.  
  265. LW.Part1 = Larm
  266.  
  267. TorsoHold.Part1 = nil
  268.  
  269. HW.Part1 = Main
  270.  
  271. end
  272.  
  273.  
  274.  
  275. function HoldTorso()
  276.  
  277. RW.Part1 = nil
  278.  
  279. LW.Part1 = nil
  280.  
  281. TorsoHold.Part1 = Main
  282.  
  283. HW.Part1 = nil
  284.  
  285. end
  286.  
  287.  
  288.  
  289. function Normalize()
  290.  
  291. RW.C0 = RightBattle
  292.  
  293. LW.C0 = LeftBattle
  294.  
  295. HW.C0 = WepBattle
  296.  
  297. Torso.Neck.C0 = NeckO
  298.  
  299. end
  300.  
  301.  
  302.  
  303. function SelectMotion()
  304.  
  305. HoldArm()
  306.  
  307. for i = 0, 40, 5 do
  308.  
  309. RW.C0 = CFrame.Angles(math.rad(i), 0, 0)
  310.  
  311. HW.C0 = CFrame.Angles(math.rad(i*4), 0, 0)
  312.  
  313. wait()
  314.  
  315. end
  316.  
  317. if RightBattle == nil then
  318.  
  319. RightBattle = RW.C0
  320.  
  321. WepBattle = HW.C0
  322.  
  323. LeftBattle = LW.C0
  324.  
  325. end
  326.  
  327. Normalize()
  328.  
  329. end
  330.  
  331.  
  332.  
  333. function DeselMotion()
  334.  
  335. HoldTorso()
  336.  
  337. end
  338.  
  339.  
  340.  
  341. function Throw(Mouse)
  342.  
  343. Hold = true
  344.  
  345. for i = 0, 120, 15 do
  346.  
  347. RW.C0 = RightBattle * CFrame.Angles(math.rad(i), 0, 0)
  348.  
  349. wait()
  350.  
  351. end
  352.  
  353. local co = RW.C0
  354.  
  355. BG.Parent = Torso
  356.  
  357. Mouse.Button1Up:connect(function()
  358.  
  359. Hold = false
  360.  
  361. BG.Parent = nil
  362.  
  363. end)
  364.  
  365. while Hold do
  366.  
  367. BG.cframe = GetCF(Torso.Position, Mouse.Hit.p)
  368.  
  369. SetWeld(RW, co, Torso, Mouse)
  370.  
  371. wait()
  372.  
  373. end
  374.  
  375. local Wn = RW.C0
  376.  
  377. for i = 0, -60, -20 do
  378.  
  379. RW.C0 = Wn * CFrame.Angles(math.rad(i), 0, 0)
  380.  
  381. wait()
  382.  
  383. end
  384.  
  385. Wn = RW.C0
  386.  
  387. HW.Part1 = nil
  388.  
  389. local BF = Instance.new("BodyForce",Main)
  390.  
  391. BF.force = Vector3.new(0,70,0)
  392.  
  393. local Mag = (Torso.Position - Mouse.Hit.p).magnitude
  394.  
  395. if Mag > 100 then Mag = 100 end
  396.  
  397. local Lol = CFrame.new(Torso.Position, Mouse.Hit.p) * CFrame.Angles(math.pi/8,0,0) * CFrame.new(0,0,-Mag/3)
  398.  
  399. Main.CanCollide = true
  400.  
  401. local BP = Instance.new("BodyPosition",Main)
  402.  
  403. BP.position = Lol.p
  404.  
  405. BP.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  406.  
  407. BP.P = 7000
  408.  
  409. wait()
  410.  
  411. BP:remove()
  412.  
  413. Trail.Parent = Mod
  414.  
  415. local touched = nil
  416.  
  417. Main.Touched:connect(function(h)
  418.  
  419. if h.CanCollide and h:GetMass() > 30 and touched == nil then
  420.  
  421. touched = h
  422.  
  423. end
  424.  
  425. end)
  426.  
  427. repeat
  428.  
  429. local ma = (Torso.Position - Main.Position).magnitude
  430.  
  431. TrailMesh.Scale = Vector3.new(1,ma,1)
  432.  
  433. Trail.CFrame = CFrame.new(Torso.Position, Main.Position) * CFrame.Angles(math.pi/2,0,0) * CFrame.new(0,-ma/2,0)
  434.  
  435. wait()
  436.  
  437. until touched ~= nil
  438.  
  439. local bpz = Instance.new("BodyPosition",Main)
  440.  
  441. bpz.P = 15000
  442.  
  443. bpz.position = Main.Position
  444.  
  445. bpz.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  446.  
  447. local bgz = Instance.new("BodyGyro",Main)
  448.  
  449. bgz.P = 5000
  450.  
  451. bgz.cframe = CFrame.new(Main.Position, Main.CFrame * CFrame.new(0,0,-2).p)
  452.  
  453. bgz.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  454.  
  455. for i = 0, 60, 10 do
  456.  
  457. RW.C0 = Wn * CFrame.Angles(math.rad(-i), 0, math.rad(-i/1.5)) * CFrame.new(0,math.rad(-i/1.5),0)
  458.  
  459. LW.C0 = LeftBattle * CFrame.Angles(math.rad(i*1.2), 0, math.rad(i/1.5)) * CFrame.new(0,math.rad(-i),0)
  460.  
  461. wait()
  462.  
  463. end
  464.  
  465. local bpp = Instance.new("BodyPosition",Torso)
  466.  
  467. bpp.P = 11000
  468.  
  469. bpp.position = Main.Position
  470.  
  471. bpp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  472.  
  473. repeat wait() until (Torso.Position - Main.Position).magnitude < 15
  474.  
  475. bpz:remove()
  476.  
  477. bgz:remove()
  478.  
  479. bpp:remove()
  480.  
  481. Normalize()
  482.  
  483. Trail.Parent = nil
  484.  
  485. end
  486.  
  487.  
  488.  
  489. function Select(mouse)
  490.  
  491. SelectMotion()
  492.  
  493. mouse.Button1Down:connect(function() Throw(mouse) end)
  494.  
  495. end
  496.  
  497.  
  498.  
  499. function Desel()
  500.  
  501. DeselMotion()
  502.  
  503. end
  504.  
  505.  
  506.  
  507. bin.Selected:connect(Select)
  508.  
  509. bin.Deselected:connect(Desel)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement