PatrickTheScripter

HEADSHOT

Apr 23rd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 24.62 KB | None | 0 0
  1. --headshot pistol
  2. --press E to equip
  3.  
  4. plr = game.Players.LocalPlayer
  5. char = plr.Character
  6. mode = 'none'
  7.  
  8. follow = false
  9. local mouse = plr:GetMouse()
  10. getPos=function(Pos,TorsoPos)
  11.         return Vector3.new(Pos.x,TorsoPos.y,Pos.z)
  12. end
  13.  
  14.  
  15. getSound=function(id)
  16. local s=Instance.new("Sound",char.Head)
  17. s.Volume=1
  18. s.SoundId=id
  19. return s
  20. end
  21.  
  22.  
  23. Turn=function(mse,Torso,Gyro)
  24.         g.cframe=CFrame.new(Torso.Position,getPos(mse.Hit.p,Torso.Position))* CFrame.Angles(0,-7.9,0)
  25.         offset=(Torso.Position.y-mse.Hit.p.y)/100
  26.         mag=(Torso.Position-mse.Hit.p).magnitude/80
  27.         offset=offset/mag
  28.         neck=Torso.Neck
  29.         arm=Torso:FindFirstChild("Right Shoulder")
  30. end
  31.  
  32.  
  33.  
  34. function turnOnFollow()
  35.         follow = true
  36.         coroutine.resume(coroutine.create(function()
  37.         g=Instance.new("BodyGyro")
  38.         g.P=18000
  39.         g.Name = 'Gyroz'
  40.         g.D=600
  41.         g.maxTorque=Vector3.new(1/0,1/0,1/0)
  42.         g.cframe=char.Torso.CFrame
  43.         g.Parent=char.Torso
  44.         while wait() do
  45.                 if follow == true then
  46.                 Turn(mouse,char.Torso,g)
  47.                 else
  48.                         g:Destroy()
  49.                         break
  50.                        
  51.                                 end
  52.         end
  53.         end))
  54. end
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. --[[REMOVING]]--
  63.  
  64.  
  65. char.Head:ClearAllChildren()
  66. local m = Instance.new("SpecialMesh", char.Head)
  67. m.Scale = Vector3.new(1.25, 1.25, 1.25)
  68.  
  69. local function weldBetween(a, b)
  70.     local weld = Instance.new("ManualWeld")
  71.     weld.Part0 = a
  72.     weld.Part1 = b
  73.     weld.C0 = CFrame.new()
  74.     weld.C1 = b.CFrame:inverse() * a.CFrame
  75.     weld.Parent = a
  76.     return weld;
  77. end
  78.  
  79.  
  80.  
  81.  
  82. --------------------------ARM 1-----------------------------------------
  83. local rawc = char["Right Arm"]:clone()
  84. char["Right Arm"]:Destroy()
  85. rawc.Parent = char
  86. local RAW = weldBetween(char.Torso, char["Right Arm"])
  87. RAW.C1 = CFrame.new(-1.5, 0, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  88. ----------------------------ARM 2---------------------------------------
  89. local lawc = char["Left Arm"]:clone()
  90. char["Left Arm"]:Destroy()
  91. lawc.Parent = char
  92. local LAW = weldBetween(char.Torso, char["Left Arm"])
  93. LAW.C1 = CFrame.new(1.5, 0, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  94.  
  95. -------------------------------------------------------------------
  96.  
  97.  
  98.  
  99. --[[BUILDING]]--
  100.  
  101. local Handle  = Instance.new("Part", char)
  102.                         Handle:BreakJoints()
  103.                         Handle.TopSurface = "Smooth"
  104.                         Handle.Name = 'Handle'
  105.                         Handle.BottomSurface = "Smooth"
  106.                         Handle.FormFactor = "Custom" Handle.CanCollide = false
  107.                         Handle.BrickColor = BrickColor.new("Medium stone grey")
  108.                         Handle.Size = Vector3.new(1, 1.20000005, 1)
  109.                             local Handleweld = Instance.new("ManualWeld")
  110.    Handleweld.Part0 = char["Left Arm"]
  111.    Handleweld.Part1 = Handle  Handleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  112.    Handleweld.C1 = CFrame.new(-0.0450940132, 1.50100136, 0.402997375, 1, -7.20473547e-009, 4.30820357e-008, 1.66450249e-008, 0.999999881, 2.74245376e-010, -4.43407409e-008, 2.74245654e-010, 1)
  113.     Handleweld.Parent = char["Left Arm"]
  114.                
  115.                                         local HandleMesh = Instance.new("BlockMesh",Handle)
  116.                                 HandleMesh.Name = "BlockMesh"
  117.                                 HandleMesh.Offset = Vector3.new(0, 0, -0.0500000007)
  118.                                 HandleMesh.Scale = Vector3.new(0.300000012, 1.20000005, 0.150000006)
  119.                                
  120. local Move  = Instance.new("Part", char)
  121.                         Move:BreakJoints()
  122.                         Move.TopSurface = "Smooth"
  123.                         Move.Name = 'Move'
  124.                         Move.BottomSurface = "Smooth"
  125.                         Move.FormFactor = "Custom" Move.CanCollide = false
  126.                         Move.BrickColor = BrickColor.new("Medium stone grey")
  127.                         Move.Size = Vector3.new(1, 1.20000005, 1)
  128.                             local Moveweld = Instance.new("ManualWeld")
  129.    Moveweld.Part0 =  Handle   Moveweld.Part1 = Move  Moveweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  130.    Moveweld.C1 = CFrame.new(0, -0.675000906, 0.220000267, 1, 9.44028855e-009, -1.25870514e-009, 9.44028855e-009, 1, 5.48490309e-010, -1.25870514e-009, 5.48490309e-010, 1)
  131.     Moveweld.Parent = Move                
  132.                                         local MoveMesh = Instance.new("SpecialMesh",Move)
  133.                                         MoveMesh.MeshId = ""
  134.                                         MoveMesh.MeshType = Enum.MeshType.Wedge                                MoveMesh.Name = "Mesh"
  135.                                 MoveMesh.Offset = Vector3.new(0, 0, 0)
  136.                                 MoveMesh.Scale = Vector3.new(0.300000012, 0.0799999982, 0.200000003)
  137.                                
  138. local Move  = Instance.new("Part", char)
  139.                         Move:BreakJoints()
  140.                         Move.TopSurface = "Smooth"
  141.                         Move.Name = 'Move'
  142.                         Move.BottomSurface = "Smooth"
  143.                         Move.FormFactor = "Custom" Move.CanCollide = false
  144.                         Move.BrickColor = BrickColor.new("Dark stone grey")
  145.                         Move.Size = Vector3.new(1, 1.20000005, 1)
  146.                             local Moveweld = Instance.new("ManualWeld")
  147.    Moveweld.Part0 =  Handle   Moveweld.Part1 = Move  Moveweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  148.    Moveweld.C1 = CFrame.new(0, -0.168394566, -0.470785618, 1, 9.44028855e-009, -1.25870514e-009, 9.3906225e-009, 0.955336511, -0.295520216, 1.5873205e-009, 0.295520216, 0.955336511)
  149.     Moveweld.Parent = Move                
  150.                                         local MoveMesh = Instance.new("BlockMesh",Move)
  151.                                 MoveMesh.Name = "BlockMesh"
  152.                                 MoveMesh.Offset = Vector3.new(0, 0.0500000007, -0.100000001)
  153.                                 MoveMesh.Scale = Vector3.new(0.200000003, 0.349999994, 0.800000012)
  154.                                
  155. local Move  = Instance.new("Part", char)
  156.                         Move:BreakJoints()
  157.                         Move.TopSurface = "Smooth"
  158.                         Move.Name = 'Move'
  159.                         Move.BottomSurface = "Smooth"
  160.                         Move.FormFactor = "Custom" Move.CanCollide = false
  161.                         Move.BrickColor = BrickColor.new("Medium stone grey")
  162.                         Move.Size = Vector3.new(1, 1.20000005, 1)
  163.                             local Moveweld = Instance.new("ManualWeld")
  164.    Moveweld.Part0 =  Handle   Moveweld.Part1 = Move  Moveweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  165.    Moveweld.C1 = CFrame.new(0, 0.0450925827, 0.200001717, 1, 9.44028855e-009, -1.25870514e-009, 9.44028855e-009, 1, 5.48490309e-010, -1.25870514e-009, 5.48490309e-010, 1)
  166.     Moveweld.Parent = Move                
  167.                                         local MoveMesh = Instance.new("BlockMesh",Move)
  168.                                 MoveMesh.Name = "BlockMesh"
  169.                                 MoveMesh.Offset = Vector3.new(0, 0, 0)
  170.                                 MoveMesh.Scale = Vector3.new(0.300000012, 1.125, 0.25)
  171.                                
  172. local Move  = Instance.new("Part", char)
  173.                         Move:BreakJoints()
  174.                         Move.TopSurface = "Smooth"
  175.                         Move.Name = 'Move'
  176.                         Move.BottomSurface = "Smooth"
  177.                         Move.FormFactor = "Custom" Move.CanCollide = false
  178.                         Move.BrickColor = BrickColor.new("Dark stone grey")
  179.                         Move.Size = Vector3.new(1, 1.20000005, 1)
  180.                             local Moveweld = Instance.new("ManualWeld")
  181.    Moveweld.Part0 =  Handle   Moveweld.Part1 = Move  Moveweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  182.    Moveweld.C1 = CFrame.new(0, 0.100000381, -0.350000381, 1, 9.44028855e-009, -1.25870514e-009, 9.44028855e-009, 1, 5.48490309e-010, -1.25870514e-009, 5.48490309e-010, 1)
  183.     Moveweld.Parent = Move                
  184.                                         local MoveMesh = Instance.new("BlockMesh",Move)
  185.                                 MoveMesh.Name = "BlockMesh"
  186.                                 MoveMesh.Offset = Vector3.new(0, 0.0500000007, -0.100000001)
  187.                                 MoveMesh.Scale = Vector3.new(0.200000003, 0.400000006, 0.0500000007)
  188.                                
  189. local Move  = Instance.new("Part", char)
  190.                         Move:BreakJoints()
  191.                         Move.TopSurface = "Smooth"
  192.                         Move.Name = 'Move'
  193.                         Move.BottomSurface = "Smooth"
  194.                         Move.FormFactor = "Custom" Move.CanCollide = false
  195.                         Move.BrickColor = BrickColor.new("Dark stone grey")
  196.                         Move.Size = Vector3.new(1, 1.20000005, 1)
  197.                             local Moveweld = Instance.new("ManualWeld")
  198.    Moveweld.Part0 =  Handle   Moveweld.Part1 = Move  Moveweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  199.    Moveweld.C1 = CFrame.new(0, 0.319999695, -0.180000305, 1, 9.44028855e-009, -1.25870514e-009, 9.44028855e-009, 1, 5.48490309e-010, -1.25870514e-009, 5.48490309e-010, 1)
  200.     Moveweld.Parent = Move                
  201.                                         local MoveMesh = Instance.new("BlockMesh",Move)
  202.                                 MoveMesh.Name = "BlockMesh"
  203.                                 MoveMesh.Offset = Vector3.new(0, 0.0500000007, -0.100000001)
  204.                                 MoveMesh.Scale = Vector3.new(0.200000003, 0.0500000007, 0.400000006)
  205.                                
  206. local Move  = Instance.new("Part", char)
  207.                         Move:BreakJoints()
  208.                         Move.TopSurface = "Smooth"
  209.                         Move.Name = 'Move'
  210.                         Move.BottomSurface = "Smooth"
  211.                         Move.FormFactor = "Custom" Move.CanCollide = false
  212.                         Move.BrickColor = BrickColor.new("Dark stone grey")
  213.                         Move.Size = Vector3.new(1, 1.20000005, 1)
  214.                             local Moveweld = Instance.new("ManualWeld")
  215.    Moveweld.Part0 =  Handle   Moveweld.Part1 = Move  Moveweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  216.    Moveweld.C1 = CFrame.new(0.0799999237, -0.399999619, 0.329999864, 1, 9.44028855e-009, -1.25870514e-009, 9.44028855e-009, 1, 5.48490309e-010, -1.25870514e-009, 5.48490309e-010, 1)
  217.     Moveweld.Parent = Move                
  218.                                         local MoveMesh = Instance.new("BlockMesh",Move)
  219.                                 MoveMesh.Name = "BlockMesh"
  220.                                 MoveMesh.Offset = Vector3.new(0, 0, 0)
  221.                                 MoveMesh.Scale = Vector3.new(0.0500000007, 0.100000001, 0.100000001)
  222.                                
  223. local Move  = Instance.new("Part", char)
  224.                         Move:BreakJoints()
  225.                         Move.TopSurface = "Smooth"
  226.                         Move.Name = 'Move'
  227.                         Move.BottomSurface = "Smooth"
  228.                         Move.FormFactor = "Custom" Move.CanCollide = false
  229.                         Move.BrickColor = BrickColor.new("Dark stone grey")
  230.                         Move.Size = Vector3.new(1, 1.20000005, 1)
  231.                             local Moveweld = Instance.new("ManualWeld")
  232.    Moveweld.Part0 =  Handle   Moveweld.Part1 = Move  Moveweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  233.    Moveweld.C1 = CFrame.new(-0.0799999237, -0.399999619, 0.329999864, 1, 9.44028855e-009, -1.25870514e-009, 9.44028855e-009, 1, 5.48490309e-010, -1.25870514e-009, 5.48490309e-010, 1)
  234.     Moveweld.Parent = Move                
  235.                                         local MoveMesh = Instance.new("BlockMesh",Move)
  236.                                 MoveMesh.Name = "BlockMesh"
  237.                                 MoveMesh.Offset = Vector3.new(0, 0, 0)
  238.                                 MoveMesh.Scale = Vector3.new(0.0500000007, 0.100000001, 0.100000001)
  239.                                
  240. local Move  = Instance.new("Part", char)
  241.                         Move:BreakJoints()
  242.                         Move.TopSurface = "Smooth"
  243.                         Move.Name = 'Move'
  244.                         Move.BottomSurface = "Smooth"
  245.                         Move.FormFactor = "Custom" Move.CanCollide = false
  246.                         Move.BrickColor = BrickColor.new("Medium stone grey")
  247.                         Move.Size = Vector3.new(1, 1.20000005, 1)
  248.                             local Moveweld = Instance.new("ManualWeld")
  249.    Moveweld.Part0 =  Handle   Moveweld.Part1 = Move  Moveweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  250.    Moveweld.C1 = CFrame.new(0, -0.399999619, 0.199999809, 1, 9.44028855e-009, -1.25870514e-009, 9.44028855e-009, 1, 5.48490309e-010, -1.25870514e-009, 5.48490309e-010, 1)
  251.     Moveweld.Parent = Move                
  252.                                         local MoveMesh = Instance.new("BlockMesh",Move)
  253.                                 MoveMesh.Name = "BlockMesh"
  254.                                 MoveMesh.Offset = Vector3.new(0, 0, 0)
  255.                                 MoveMesh.Scale = Vector3.new(0.300000012, 1.20000005, 0.25)
  256.                                
  257. local Move  = Instance.new("Part", char)
  258.                         Move:BreakJoints()
  259.                         Move.TopSurface = "Smooth"
  260.                         Move.Name = 'Move'
  261.                         Move.BottomSurface = "Smooth"
  262.                         Move.FormFactor = "Custom" Move.CanCollide = false
  263.                         Move.BrickColor = BrickColor.new("Dark stone grey")
  264.                         Move.Size = Vector3.new(1, 1.20000005, 1)
  265.                             local Moveweld = Instance.new("ManualWeld")
  266.    Moveweld.Part0 =  Handle   Moveweld.Part1 = Move  Moveweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  267.    Moveweld.C1 = CFrame.new(-0.0799999237, -0.800000906, 0.329999864, 1, 9.44028855e-009, -1.25870514e-009, 9.44028855e-009, 1, 5.48490309e-010, -1.25870514e-009, 5.48490309e-010, 1)
  268.     Moveweld.Parent = Move                
  269.                                         local MoveMesh = Instance.new("BlockMesh",Move)
  270.                                 MoveMesh.Name = "BlockMesh"
  271.                                 MoveMesh.Offset = Vector3.new(0, 0, 0)
  272.                                 MoveMesh.Scale = Vector3.new(0.0500000007, 0.100000001, 0.100000001)
  273.                                
  274. local Move  = Instance.new("Part", char)
  275.                         Move:BreakJoints()
  276.                         Move.TopSurface = "Smooth"
  277.                         Move.Name = 'Move'
  278.                         Move.BottomSurface = "Smooth"
  279.                         Move.FormFactor = "Custom" Move.CanCollide = false
  280.                         Move.BrickColor = BrickColor.new("Medium stone grey")
  281.                         Move.Size = Vector3.new(1, 1.20000005, 1)
  282.                             local Moveweld = Instance.new("ManualWeld")
  283.    Moveweld.Part0 =  Handle   Moveweld.Part1 = Move  Moveweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  284.    Moveweld.C1 = CFrame.new(0.0799999237, -0.800000906, 0.329999864, 1, 9.44028855e-009, -1.25870514e-009, 9.44028855e-009, 1, 5.48490309e-010, -1.25870514e-009, 5.48490309e-010, 1)
  285.     Moveweld.Parent = Move                
  286.                                         local MoveMesh = Instance.new("BlockMesh",Move)
  287.                                 MoveMesh.Name = "BlockMesh"
  288.                                 MoveMesh.Offset = Vector3.new(0, 0, 0)
  289.                                 MoveMesh.Scale = Vector3.new(0.0500000007, 0.100000001, 0.100000001)
  290.                                
  291. local Move  = Instance.new("Part", char)
  292.                         Move:BreakJoints()
  293.                         Move.TopSurface = "Smooth"
  294.                         Move.Name = 'Move'
  295.                         Move.BottomSurface = "Smooth"
  296.                         Move.FormFactor = "Custom" Move.CanCollide = false
  297.                         Move.BrickColor = BrickColor.new("Black")
  298.                         Move.Size = Vector3.new(1, 1.20000005, 1)
  299.                             local Moveweld = Instance.new("ManualWeld")
  300.    Moveweld.Part0 =  Handle   Moveweld.Part1 = Move  Moveweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  301.    Moveweld.C1 = CFrame.new(0, 0.0682066679, -0.166876644, 1, 9.44028855e-009, -1.25870514e-009, 9.00204356e-009, 0.980066597, 0.198669329, -3.10911474e-009, -0.198669329, 0.980066597)
  302.     Moveweld.Parent = Move                
  303.                                         local MoveMesh = Instance.new("BlockMesh",Move)
  304.                                 MoveMesh.Name = "BlockMesh"
  305.                                 MoveMesh.Offset = Vector3.new(0, 0, -0.100000001)
  306.                                 MoveMesh.Scale = Vector3.new(0.100000001, 0.0299999993, 0.200000003)
  307.                                
  308. local Move  = Instance.new("Part", char)
  309.                         Move:BreakJoints()
  310.                         Move.TopSurface = "Smooth"
  311.                         Move.Name = 'Move'
  312.                         Move.BottomSurface = "Smooth"
  313.                         Move.FormFactor = "Custom" Move.CanCollide = false
  314.                         Move.BrickColor = BrickColor.new("Dark stone grey")
  315.                         Move.Size = Vector3.new(1, 1.20000005, 1)
  316.                             local Moveweld = Instance.new("ManualWeld")
  317.    Moveweld.Part0 =  Handle   Moveweld.Part1 = Move  Moveweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  318.    Moveweld.C1 = CFrame.new(0, 0.600000203, 0.329999864, 1, 9.44028855e-009, -1.25870514e-009, 9.44028855e-009, 1, 5.48490309e-010, -1.25870514e-009, 5.48490309e-010, 1)
  319.     Moveweld.Parent = Move                
  320.                                         local MoveMesh = Instance.new("BlockMesh",Move)
  321.                                 MoveMesh.Name = "BlockMesh"
  322.                                 MoveMesh.Offset = Vector3.new(0, 0, 0)
  323.                                 MoveMesh.Scale = Vector3.new(0.100000001, 0.100000001, 0.100000001)
  324.                                
  325. local Move  = Instance.new("Part", char)
  326.                         Move:BreakJoints()
  327.                         Move.TopSurface = "Smooth"
  328.                         Move.Name = 'Move'
  329.                         Move.BottomSurface = "Smooth"
  330.                         Move.FormFactor = "Custom" Move.CanCollide = false
  331.                         Move.BrickColor = BrickColor.new("Dark stone grey")
  332.                         Move.Size = Vector3.new(1, 1.20000005, 1)
  333.                             local Moveweld = Instance.new("ManualWeld")
  334.    Moveweld.Part0 =  Handle   Moveweld.Part1 = Move  Moveweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  335.    Moveweld.C1 = CFrame.new(0, 0, 0.329999864, 1, 9.44028855e-009, -1.25870514e-009, 9.44028855e-009, 1, 5.48490309e-010, -1.25870514e-009, 5.48490309e-010, 1)
  336.     Moveweld.Parent = Move                
  337.                                         local MoveMesh = Instance.new("BlockMesh",Move)
  338.                                 MoveMesh.Name = "BlockMesh"
  339.                                 MoveMesh.Offset = Vector3.new(0, 0, 0)
  340.                                 MoveMesh.Scale = Vector3.new(0.100000001, 0.100000001, 0.100000001)
  341.                                
  342. local BlastPart  = Instance.new("Part", char)
  343.                         BlastPart:BreakJoints()
  344.                         BlastPart.TopSurface = "Smooth"
  345.                         BlastPart.Name = 'BlastPart'
  346.                         BlastPart.BottomSurface = "Smooth"
  347.                         BlastPart.FormFactor = "Custom" BlastPart.CanCollide = false
  348.                         BlastPart.BrickColor = BrickColor.new("Dark stone grey")
  349.                         BlastPart.Size = Vector3.new(1, 1.20000005, 1)
  350.                             local BlastPartweld = Instance.new("ManualWeld")
  351.    BlastPartweld.Part0 =  Handle   BlastPartweld.Part1 = BlastPart  BlastPartweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  352.    BlastPartweld.C1 = CFrame.new(0, 0.199999809, 0.149999619, 1, 9.44028855e-009, -1.25870514e-009, 9.44028855e-009, 1, 5.48490309e-010, -1.25870514e-009, 5.48490309e-010, 1)
  353.     BlastPartweld.Parent = BlastPart                
  354.                                         local BlastPartMesh = Instance.new("SpecialMesh",BlastPart)
  355.                                         BlastPartMesh.MeshId = ""
  356.                                         BlastPartMesh.MeshType = Enum.MeshType.Head                                BlastPartMesh.Name = "Mesh"
  357.                                 BlastPartMesh.Offset = Vector3.new(0, 0, 0)
  358.                                 BlastPartMesh.Scale = Vector3.new(0.100000001, 0.9, 0.5)
  359.                                
  360.                                
  361.  
  362. --
  363.  
  364. Tween = function(Weld, Stop, Step,a)
  365. ypcall(function()
  366. local func = function()
  367. local Start = Weld.C1
  368. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  369. local Stop = Stop
  370. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  371.  
  372. for i = 0, 1, Step or .1 do
  373. Weld.C1 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
  374. (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
  375. (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
  376. (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
  377. (Z1 * (1 - i)) + (Z2 * i) )
  378. wait()
  379. end
  380.  
  381. Weld.C1 = Stop
  382. end
  383.  
  384. if a then coroutine.wrap(func)() else func() end
  385. end)
  386. end
  387.  
  388. local shot = getSound('http://www.roblox.com/asset/?id=2760979')
  389. shot.Volume = 0.4
  390.  
  391.  
  392. mouse.KeyDown:connect(function(key)
  393.         if key == 'e' then
  394.                 if mode ~= 'shooting' then
  395.                 mode = 'shooting'
  396.                 turnOnFollow()
  397.                 Tween(LAW, CFrame.new(-0.0599988326, 1.8599987, 0.539999783, -0.0342967249, 0.0531933941, -0.997999191, 0.999416888, 0.00151917152, -0.034264423, -0.000306034461, -0.998589158, -0.0532138087)  , .1, true)
  398. end        
  399.         end
  400. end)
  401.  
  402. mouse.Button1Down:connect(function()
  403.        
  404.         if mode == 'shooting' then
  405.                 pcall(function()
  406.                         local ray = Ray.new(BlastPart.CFrame.p, (mouse.Hit.p - BlastPart.CFrame.p).unit*900)
  407.         local hit, position = game.Workspace:FindPartOnRay(ray, char)
  408.  
  409.         local humanoid = hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid")
  410.         if humanoid and humanoid.Health ~= 0 then
  411.        
  412.         local blood = getSound('http://www.roblox.com/asset/?id=142858160')
  413. blood.Volume = 5
  414. blood.Pitch = 1
  415. blood.PlayOnRemove = true
  416.         blood:Play()
  417.         blood:Destroy()
  418.         if hit.Name == 'Head' or hit.Name == 'Handle' then
  419.                         local blood = getSound('http://www.roblox.com/asset/?id=1876552')
  420. blood.Volume = 0.5
  421. blood.Pitch = 1
  422. blood.Parent = humanoid.Parent.Head
  423. blood.PlayOnRemove = true
  424.         blood:Play()
  425.         blood:Destroy()
  426.                 humanoid:TakeDamage(5000)
  427.         else
  428.                 humanoid:TakeDamage(30)
  429.         end
  430.            
  431.  
  432.         end
  433.         local distance = (position - BlastPart.CFrame.p).magnitude
  434.         local rayPart = Instance.new("Part", char)
  435.         rayPart.Name          = "RayPart"
  436.         rayPart.BrickColor    = BrickColor.new("Bright yellow")
  437.         rayPart.Transparency  = 0.5
  438.         rayPart.Anchored      = true
  439.         rayPart.CanCollide    = false
  440.         rayPart.TopSurface    = Enum.SurfaceType.Smooth
  441.         rayPart.BottomSurface = Enum.SurfaceType.Smooth
  442.         rayPart.formFactor    = Enum.FormFactor.Custom
  443.         rayPart.Size          = Vector3.new(0.2, 0.2, distance)
  444.         rayPart.CFrame        = CFrame.new(position, BlastPart.CFrame.p) * CFrame.new(0, 0, -distance/2)
  445.  game.Debris:AddItem(rayPart, 0.05)
  446.  
  447.                 for i=1, 1 do
  448.                        
  449.                 local blast = Instance.new("Part", char)
  450.                 blast.Anchored = true
  451.                 blast.BrickColor = BrickColor.new("Really red")
  452.                 blast.FormFactor = 'Custom'
  453.                 blast.Size = Vector3.new(0.6,0.6,0.6)
  454.                 blast.Transparency = 0.5
  455.                 local m = Instance.new("BlockMesh", blast)
  456.                 shot:Play()
  457.                 blast.CFrame = BlastPart.CFrame* CFrame.new(0,-1,0) * CFrame.Angles(math.random(1,200),math.random(1,200),math.random(1,200))
  458. coroutine.resume(coroutine.create(function()
  459.         for i=1, 2 do
  460.                 m.Scale = m.Scale + Vector3.new(1, 1,1)
  461.                 wait()
  462.                 if i==2 then
  463.                         blast:Destroy()
  464.                 end
  465.         end
  466. end))
  467. wait(0.001)
  468.  
  469.                 end
  470.                 end)
  471.         end
  472. end)
Add Comment
Please, Sign In to add comment