wanTH092

Dual Luger

Jul 4th, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.22 KB | None | 0 0
  1. C = game.Players.LocalPlayer.Character.torso
  2. H = game.Players.LocalPlayer.Character.head
  3. RA = game.Players.LocalPlayer.Character["Right Arm"]
  4. LA = game.Players.LocalPlayer.Character["Left Arm"]
  5. LL = game.Players.LocalPlayer.Character["Left Leg"]
  6. RL = game.Players.LocalPlayer.Character["Right Leg"]
  7. gun = Instance.new("Part")
  8. gun2 = Instance.new("Part")
  9. local gun2W = Instance.new("Weld")
  10. local gunW = Instance.new("Weld")
  11. local raW = Instance.new("Weld")
  12. local laW = Instance.new("Weld")
  13. Mouse = game.Players.LocalPlayer:GetMouse()
  14. plr = game:service'Players'.LocalPlayer
  15. char = plr.Character
  16. mouse = plr:GetMouse()
  17. head = char.Head
  18. down = false
  19. humanoid = char:findFirstChild("Humanoid")
  20. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  21. anim = char:findFirstChild("Animate")
  22. torso = char:findFirstChild("Torso")
  23. rootpart = char:findFirstChild("HumanoidRootPart")
  24. neck = torso:findFirstChild("Neck")
  25. ------------------
  26.  
  27. function damage(hit,damage,cooldown)
  28. for i,v in pairs(hit:GetChildren()) do
  29. if v:IsA("Humanoid") and hit.Name ~= char.Name then
  30. local find = v:FindFirstChild("Hitz")
  31. if not find then
  32. if v.Parent:findFirstChild("Head") then
  33. local BillG = Instance.new("BillboardGui",v.Parent.Head)BillG.Size = UDim2.new(1,0,1,0)
  34. BillG.Adornee = v.Parent.Head BillG.StudsOffset = Vector3.new(math.random(-3,3),math.random(3,5),math.random(-3,3))
  35. local TL = Instance.new("TextLabel",BillG)TL.Size = UDim2.new(1,0,1,0)
  36. TL.BackgroundTransparency = 1 TL.Text = tostring(damage).."-"
  37. TL.TextColor3 = BrickColor.new("Dark stone grey").Color TL.TextStrokeColor3 = BrickColor.new("Cyan").Color
  38. TL.TextStrokeTransparency = 0 TL.TextXAlignment = Enum.TextXAlignment.Center
  39. TL.TextYAlignment = Enum.TextYAlignment.Center TL.FontSize = Enum.FontSize.Size18
  40. TL.Font = "ArialBold"
  41. coroutine.resume(coroutine.create(function()
  42. wait(1)
  43. for i = 0,1,.1 do wait(.1) BillG.StudsOffset = BillG.StudsOffset+Vector3.new(0,.1,0) end
  44. BillG:Destroy()
  45. end))
  46. end
  47. v.Health = v.Health - damage local bool = Instance.new("BoolValue",v)bool.Name = 'Hitz'game:GetService("Debris"):AddItem(bool,cooldown)
  48. end
  49. end
  50. end
  51. end
  52. ------------------raW.Parent = RA
  53. raW.Parent = RA
  54. raW.Part0 = RA
  55. raW.C0 = CFrame.new(1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-90),math.rad(160),math.rad(0))
  56. raW.Part1 = C
  57. -------------------------------------------------
  58.  
  59. laW.Parent = LA
  60. laW.Part0 = LA
  61. laW.C0 = CFrame.new(-1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-90),math.rad(-160),math.rad(0))
  62. laW.Part1 = C
  63. ---------------------------------------------------------
  64. neckc0 = neck.C0
  65. --------------
  66. function trail()
  67. a = Instance.new("Part", workspace)
  68. a.Material = "SmoothPlastic"
  69. a.FormFactor = "Custom"
  70. a.Size = Vector3.new(0.2, 2.6, 3.8)
  71. a.BrickColor = BrickColor.new("Cyan")
  72. a.Transparency = 0.6
  73.     a.Anchored = true
  74.     a.CanCollide = false
  75.     a.CFrame = game.Players.LocalPlayer.Character.torso.CFrame * CFrame.new(0, 0, 2)
  76.     a.Transparency = 0.2
  77.     wait()
  78.     a.Transparency = 0.4
  79.     wait()
  80.     a.Transparency = 0.6
  81.     wait()
  82.     a.Transparency = 0.8
  83.     game:GetService("Debris"):AddItem(a, 2)
  84.  
  85. end
  86. ------------
  87. function trail2()
  88. c = Instance.new("Part", workspace)
  89. c.Material = "SmoothPlastic"
  90. c.FormFactor = "Custom"
  91. c.Size = Vector3.new(0.2, 2.6, 3.8)
  92. c.BrickColor = BrickColor.new("Really red")
  93. c.Transparency = 0.6
  94.     c.Anchored = true
  95.     c.CanCollide = false
  96.     c.CFrame = game.Players.LocalPlayer.Character.torso.CFrame * CFrame.new(0, 0, 0.5)
  97.     c.Transparency = 0.2
  98.     wait()
  99.     c.Transparency = 0.4
  100.     wait()
  101.     c.Transparency = 0.6
  102.     wait()
  103.     c.Transparency = 0.8
  104.     game:GetService("Debris"):AddItem(a, 2)
  105.     end
  106. ----------------------------
  107.  
  108.  
  109.  
  110.    
  111.  
  112.  
  113.        
  114.  
  115.    
  116. gun.Parent = RA
  117. gun.Material = "SmoothPlastic"
  118. gun.Transparency = 0
  119. gun.FormFactor = "Symmetric"
  120. gun.Size = Vector3.new(1.2, 1.6, 1.2)
  121. gun.Material = "Plastic"
  122. gun.BrickColor = BrickColor.new("Really black")
  123. gun.BottomSurface = "Smooth"
  124. gun.TopSurface = "Smooth"
  125. gunM = Instance.new("SpecialMesh", gun)
  126. gunM.MeshId = "http://www.roblox.com/asset/?id=95356090"
  127. gunM.TextureId = "http://www.roblox.com/asset/?id=95387789"
  128. gunM.Scale = Vector3.new(1.8, 1.8, 1.8)
  129. gunM.VertexColor = Vector3.new(1, 1, 1)
  130. ------------
  131. gun2.Parent = RA
  132. gun2.Material = "SmoothPlastic"
  133. gun2.Transparency = 0
  134. gun2.FormFactor = "Symmetric"
  135. gun2.Size = Vector3.new(1.2, 1.6, 1.2)
  136. gun2.Material = "Plastic"
  137. gun2.BrickColor = BrickColor.new("Really black")
  138. gun2.BottomSurface = "Smooth"
  139. gun2.TopSurface = "Smooth"
  140. gun2M = Instance.new("SpecialMesh", gun2)
  141. gun2M.MeshId = "http://www.roblox.com/asset/?id=95356090"
  142. gun2M.TextureId = "http://www.roblox.com/asset/?id=95387789"
  143. gun2M.Scale = Vector3.new(1.8, 1.8, 1.8)
  144. gun2M.VertexColor = Vector3.new(1, 1, 1)
  145. ------
  146. s = Instance.new("Sound", char)
  147. s.SoundId = "http://roblox.com/asset/?id=136472158"
  148. s.Volume = 0.7
  149. -------
  150.  
  151. local count = 0
  152. local countspeed = 1
  153. ----------
  154. spd = 1000
  155. -------
  156. gunW.Parent = gun
  157. gunW.Part0 = gun
  158. gunW.C0 = CFrame.new(0, -0.4, 1.4) * CFrame.Angles(math.rad(90),math.rad(-10),math.rad(180))
  159. gunW.Part1 = RA
  160. ---------------
  161. gun2W.Parent = gun2
  162. gun2W.Part0 = gun2
  163. gun2W.C0 = CFrame.new(0, -0.4, 1.4) * CFrame.Angles(math.rad(90),math.rad(10),math.rad(180))
  164. gun2W.Part1 = LA
  165. local deb = true
  166. Mouse.Button1Down:connect(function()
  167.     if deb == false then return end
  168. deb = false
  169.     print("Shots have been fired!!!")
  170.     pl = Instance.new("PointLight", H)
  171.     s:Play()
  172.  
  173. pl.Brightness = 20
  174. pl.Range = 8
  175.  
  176. wait(0.10)
  177. pl:Remove()
  178.  
  179.     raW.C0 = CFrame.new(1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-100),math.rad(160),math.rad(0))
  180.         laW.C0 = CFrame.new(-1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-100),math.rad(-160),math.rad(0))
  181.     wait(0.001)
  182.         raW.C0 = CFrame.new(1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-90),math.rad(160),math.rad(0))
  183.         laW.C0 = CFrame.new(-1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-90),math.rad(-160),math.rad(0))
  184.         wait(0.001)    
  185.             laW.C0 = CFrame.new(-1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-80),math.rad(-160),math.rad(0))
  186.             raW.C0 = CFrame.new(1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-80),math.rad(160),math.rad(0))
  187.                        
  188.             wait(0.001)
  189.     laW.C0 = CFrame.new(-1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-70),math.rad(-160),math.rad(0))
  190.                 raW.C0 = CFrame.new(1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-70),math.rad(160),math.rad(0))
  191.                        
  192.                 wait(0.001)
  193.             laW.C0 = CFrame.new(-1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-80),math.rad(-160),math.rad(0))
  194.                     raW.C0 = CFrame.new(1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-80),math.rad(160),math.rad(0))   
  195.                            
  196.             wait(0.001)
  197.         laW.C0 = CFrame.new(-1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-90),math.rad(-160),math.rad(0))
  198.             raW.C0 = CFrame.new(1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-90),math.rad(160),math.rad(0))
  199.        
  200.         wait(0.001)
  201.     laW.C0 = CFrame.new(-1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-100),math.rad(-160),math.rad(0))
  202.         raW.C0 = CFrame.new(1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-100),math.rad(160),math.rad(0))
  203.                    
  204.     wait(0.001)
  205. laW.C0 = CFrame.new(-1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-90),math.rad(-160),math.rad(0))
  206.     raW.C0 = CFrame.new(1.4, -0.3, 0.5) * CFrame.Angles(math.rad(-90),math.rad(160),math.rad(0))  
  207.    
  208. b = Instance.new("Part", workspace)
  209. b.Material = "SmoothPlastic"
  210. b.Shape = "Ball"
  211. b.Transparency = 0
  212. b.BrickColor = BrickColor.new("Really black")
  213. b.Size = Vector3.new(0.1, 0.1, 0.1)
  214. b.Anchored = false
  215. b.CanCollide = false
  216. b.CFrame = CFrame.new(gun.Position + (gun.CFrame.lookVector * 3),(Mouse.UnitRay.Direction * 1000))
  217. b.Velocity = b.CFrame.lookVector * spd
  218. local Var = b.Touched:connect(function(Hit) damage(Hit.Parent,math.random(30,45),1) end)
  219. wait(0.1)
  220. deb = true
  221. wait(10)
  222. Var:disconnect()
  223. b:remove()
  224. end)
  225.  
  226. ---------
  227. rootc0 = rj.C0
  228. ----
  229.  
  230. while wait() do
  231.     count = (count % 100) + countspeed
  232. angle = math.pi * math.sin(math.pi*2/100*count)
  233. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  234. countspeed = 0.80
  235. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  236.  
  237. rj.C0 = rootc0 * CFrame.Angles(math.rad(0), 0, 0)
  238.     neck.C0 = neckc0 * CFrame.Angles(-angle*0.060, 0, 0)
  239.     elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  240. countspeed = 9
  241. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 35
  242. rj.C0 = rootc0 * CFrame.Angles(math.rad(22), 0, 0)
  243.  
  244. end
  245. end
Add Comment
Please, Sign In to add comment