Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.88 KB | None | 0 0
  1. local Player = game:GetService("Players").LocalPlayer
  2. local Character = Player.Character
  3. local Mouse = Player:GetMouse()
  4. --Mouse.TargetFilter = workspace
  5.  
  6. local Head = Character:WaitForChild("Head")
  7. local Torso = Character:WaitForChild("Torso")
  8. local RootPart = Character:WaitForChild("HumanoidRootPart")
  9. local Human = Character:WaitForChild("Humanoid")
  10.  
  11. Human.AutoRotate = false
  12. Human.JumpPower = 0
  13. Human.WalkSpeed = 12
  14.  
  15. -----------------------------------------------------------------------------------------------------------------------
  16.  
  17. for _, Item in next, Character:GetChildren() do
  18. if Item:IsA("CharacterAppearance") then
  19. Item:Destroy()
  20. end
  21. end
  22.  
  23. local Pants = Character:FindFirstChild("Pants") or Instance.new("Pants")
  24. Pants.PantsTemplate = "rbxassetid://0"
  25. Pants.Name = "Pants"
  26. Pants.Parent = Character
  27.  
  28. local Shirt = Character:FindFirstChild("Shirt") or Instance.new("Shirt")
  29. Shirt.ShirtTemplate = "rbxassetid://0"
  30. Shirt.Name = "Shirt"
  31. Shirt.Parent = Character
  32.  
  33. local Face = Head:WaitForChild("face")
  34. Face.Texture = "rbxassetid://112805849"
  35.  
  36. local TShirt = Torso:FindFirstChild("roblox")
  37. if TShirt then
  38. TShirt:Destroy()
  39. end
  40.  
  41. --[[local BodyColors = Character:WaitForChild("Body Colors")
  42. BodyColors.HeadColor = BrickColor.new("New yeller")
  43. BodyColors.LeftArmColor = BrickColor.new("New yeller")
  44. BodyColors.RightArmColor = BrickColor.new("New yeller")
  45. BodyColors.TorsoColor = BrickColor.new("Violet")--]]
  46.  
  47. spawn(function() wait(.5)
  48. Head.BrickColor = BrickColor.new("New yeller")
  49. Torso.BrickColor = BrickColor.new("New yeller")
  50. Character["Left Arm"].BrickColor = BrickColor.new("New yeller")
  51. Character["Right Arm"].BrickColor = BrickColor.new("New yeller")
  52. end)
  53.  
  54. Character:WaitForChild("Animate"):Destroy()
  55.  
  56. local RJ = RootPart:WaitForChild("RootJoint")
  57. RJ:Destroy()
  58. RJ = Instance.new("Weld", RootPart)
  59. RJ.Part0 = RootPart
  60. RJ.Part1 = Torso
  61.  
  62. local Neck = Instance.new("Weld", Torso)
  63. Neck.Part0 = Torso
  64. Neck.Part1 = Character:WaitForChild("Head")
  65. Neck.C0 = CFrame.new(0, 1.5, 0)
  66.  
  67. Torso:WaitForChild("Right Shoulder").Part1 = nil
  68. local RS = Instance.new("Weld", Head)
  69. RS.Part0 = Head
  70. RS.Part1 = Character:WaitForChild("Right Arm")
  71.  
  72. Torso:WaitForChild("Left Shoulder").Part1 = nil
  73. local LS = Instance.new("Weld", Head)
  74. LS.Part0 = Head
  75. LS.Part1 = Character:WaitForChild("Left Arm")
  76.  
  77. local LH = Torso:WaitForChild("Left Hip")
  78. LH:Destroy()
  79. LH = Instance.new("Weld", Torso)
  80. LH.Part0 = Torso
  81. LH.Part1 = Character:WaitForChild("Left Leg")
  82.  
  83. local RH = Torso:WaitForChild("Right Hip")
  84. RH:Destroy()
  85. RH = Instance.new("Weld", Torso)
  86. RH.Part0 = Torso
  87. RH.Part1 = Character:WaitForChild("Right Leg")
  88.  
  89. local GUN = Instance.new("Part", Character)
  90. GUN.CanCollide = false
  91. GUN.Size = Vector3.new(1.549, 2.302, 3.814)
  92. GUN.Name = "Handle"
  93. GUN.Material = Enum.Material.SmoothPlastic
  94.  
  95. local MS = Instance.new("SpecialMesh", GUN)
  96. MS.MeshType = Enum.MeshType.FileMesh
  97. MS.MeshId = "rbxassetid://450812185"
  98. MS.TextureId = "rbxassetid://450812194"
  99.  
  100. local GRIP = Instance.new("Weld", RS.Part1)
  101. GRIP.Part0 = RS.Part1
  102. GRIP.Part1 = GUN
  103.  
  104. local SN = Instance.new("Sound", GUN)
  105. SN.SoundId = "rbxassetid://341294387"
  106. SN.PlaybackSpeed = 0.9
  107. SN.Looped = true
  108. SN.Volume = 0
  109. SN:Play()
  110.  
  111. local FL = Instance.new("Part", GUN)
  112. FL.BrickColor = BrickColor.Yellow()
  113. FL.Transparency = 1
  114. FL.Material = Enum.Material.SmoothPlastic
  115. FL.CanCollide = false
  116. FL.Size = Vector3.new(1, 3.38, 1)
  117.  
  118. local MS2 = Instance.new("SpecialMesh", FL)
  119. MS2.MeshType = Enum.MeshType.FileMesh
  120. MS2.MeshId = "rbxassetid://1323306"
  121. MS2.Scale = Vector3.new(0.35, 1.9, 0.35)
  122.  
  123. local FLW = Instance.new("Weld", GUN)
  124. FLW.Part0 = GUN
  125. FLW.Part1 = FL
  126. FLW.C0 = CFrame.new(0.293, 0.251, 3.221, 0, 0.028, 1, 1, 0, 0, 0, 1, -0.028)
  127.  
  128. -----------------------------------------------------------------------------------------------------------------------
  129.  
  130. local STANCE = {
  131. NK = CFrame.new(0, 1, 0, 0.747311652, 0, 0.664473772, 0, 1, 0, -0.664473772, 0, 0.747311652);
  132. RJ = CFrame.new(0, 0, 0, 0.747311592, 0, -0.664473712, 0, 1, 0, 0.664473712, 0, 0.747311592);
  133. LS = CFrame.new(0.474761963, -1.61745477, -1.20455933, -0.127145067, -0.88503027, -0.447834671, -0.836402416, 0.338357687, -0.431213528, 0.533165276, 0.319743276, -0.783262014);
  134. RS = CFrame.new(1.14480591, -1.47239065, 0.695491791, 0.972185493, -0.190045089, -0.136889026, 0.123703048, 0.912935674, -0.388903707, 0.198880106, 0.361152887, 0.911051929);
  135. GRIP = CFrame.new(-0.0976009369, -1.92251587, -1.31733322, -0.980839312, 0.117544398, -0.155363142, 0.158846945, 0.944226265, -0.288452089, 0.11279203, -0.307604104, -0.944805682);
  136. }
  137.  
  138. LS.C0 = STANCE.LS
  139. RS.C0 = STANCE.RS
  140. RJ.C0 = STANCE.RJ
  141. GRIP.C0 = STANCE.GRIP
  142.  
  143. local Down = false
  144.  
  145. Mouse.Button1Down:Connect(function()
  146. Down = true
  147. end)
  148.  
  149. Mouse.Button1Up:Connect(function()
  150. Down = false
  151. end)
  152.  
  153. math.randomseed(os.time())
  154.  
  155. local function Taunt()
  156. local Taunts = {137542750, 130774824, 130776108, 679798995, 679798810}
  157. local Sound = Instance.new("Sound", GUN)
  158. local Id = Taunts[math.random(#Taunts)]
  159. Sound.TimePosition = Id == 130776108 and 4.2 or 0
  160. Sound.SoundId = "rbxassetid://" .. Id
  161. Sound.Volume = 1
  162. Sound.Ended:Connect(function()
  163. Sound:Destroy()
  164. end)
  165. Sound:Play()
  166. end
  167.  
  168. Mouse.KeyDown:Connect(function(Key)
  169. if Key == string.char(32) then
  170. Taunt()
  171. end
  172. end)
  173.  
  174.  
  175.  
  176. local function Shoot()
  177. local Bullet = Instance.new("Part")
  178. Bullet.Size = Vector3.new(0.3, 0.3, 0.7)
  179. Bullet.Transparency = 1
  180. Bullet.CanCollide = false
  181.  
  182. local AntiGravity = Instance.new("BodyForce", Bullet)
  183. AntiGravity.Force = Vector3.new(0, Bullet:GetMass() * workspace.Gravity, 0)
  184.  
  185. local Start = (GUN.CFrame * CFrame.new(0.255, 0.251, 1.877)).p
  186. Bullet.CFrame = CFrame.new(Start, Mouse.Hit.p)
  187. Bullet.Velocity = Bullet.CFrame.lookVector * 300
  188.  
  189. Bullet.Touched:Connect(function(Hit)
  190. if Hit.Parent and Hit.Parent ~= Character and Hit.Parent:FindFirstChild("Humanoid") then
  191. Hit.Parent.Humanoid:TakeDamage(500)
  192. Bullet:Destroy()
  193. end
  194. end)
  195.  
  196. Bullet.Parent = workspace
  197. game.Debris:AddItem(Bullet, 3)
  198. end
  199.  
  200.  
  201. game:GetService("RunService"):BindToRenderStep("Invisible", Enum.RenderPriority.Character.Value - 1, function()
  202. GUN.LocalTransparencyModifier = 0
  203. FL.LocalTransparencyModifier = 0
  204. LS.Part1.LocalTransparencyModifier = 0
  205. RS.Part1.LocalTransparencyModifier = 0
  206. end)
  207.  
  208. local Heartbeat, Angle = game:GetService("RunService").Heartbeat
  209.  
  210. while Heartbeat:Wait() do
  211. local Angle = tick() * 8
  212.  
  213. -- Torso lean
  214. local VelocityForTilt = RootPart.Velocity * Vector3.new(1, 0, 1) / 150
  215. local VectorForTilt = RootPart.CFrame:vectorToObjectSpace(VelocityForTilt)
  216. RJ.C0 = RJ.C0:Lerp(STANCE.RJ * CFrame.Angles(VectorForTilt.Z, VectorForTilt.X, -VectorForTilt.X), 0.1)
  217.  
  218. -- Rotate to face camera
  219. local RootPosition = RootPart.Position
  220. local Direction = Mouse.Hit.p - RootPosition
  221. Direction = Vector3.new(Direction.X, 0, Direction.Z).unit
  222. local NewCFrame = CFrame.new(RootPosition, RootPosition + Direction) * CFrame.Angles(0, -0.02, 0)
  223. RootPart.CFrame = RootPart.CFrame:Lerp(NewCFrame, 0.1)
  224.  
  225. -- Neck Angle
  226. local Hypotenuse = (Mouse.Hit.p - Head.Position).magnitude
  227. local Opposite = Mouse.Hit.p.y - Head.Position.y
  228. local Pitch = math.asin(Opposite / Hypotenuse)
  229. local NewNeckCFrame = STANCE.NK * CFrame.Angles(Pitch + 0.2, 0, 0) * CFrame.new(0, 0.5, 0)
  230. Neck.C0 = Neck.C0:Lerp(NewNeckCFrame, 0.1)
  231.  
  232. -- Legs
  233. local FlatVelocity = (Torso.Velocity * Vector3.new(1, 0, 1))
  234. if FlatVelocity.magnitude < 2 then
  235. LH.C0 = LH.C0:Lerp(CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.sin(tick() * 0.5) / 17, 0, -0.02 + math.sin(tick() * 0.4) / 19) * CFrame.new(0, -1, 0), 0.2)
  236. RH.C0 = RH.C0:Lerp(CFrame.new(0.5, -1, 0) * CFrame.Angles(math.sin(-tick() * 0.5) / 18, 0, 0.02 + math.sin(-tick() * 0.35) / 20) * CFrame.new(0, -1, 0), 0.2)
  237. else
  238. local Look = (Torso.CFrame.lookVector * Vector3.new(1, 0, 1)).unit
  239. local Move = FlatVelocity.unit
  240. local OffAngle = (Look:Cross(Move).Y > 0 and 1 or -1) * math.acos(1 - (Look - Move).magnitude ^ 2 / 2)
  241. OffAngle = math.max(-math.pi, math.min(math.pi, OffAngle))
  242. LH.C0 = LH.C0:Lerp(CFrame.new(-0.5, 0, 0) * CFrame.Angles(0, OffAngle, 0)
  243. * CFrame.new(0, -math.max(0, math.cos(Angle * 2) / 5) + math.max(0, math.cos(Angle + math.pi) / 2.5) - 2, math.sin(-Angle + math.pi) / 1.8 + 0.15)
  244. * CFrame.Angles(math.sin(-Angle) / 1.8 - 0.2, 0, 0), 0.2)
  245. RH.C0 = RH.C0:Lerp(CFrame.new(0.5, 0, 0) * CFrame.Angles(0, OffAngle, 0)
  246. * CFrame.new(0, -math.max(0, math.cos(Angle * 2) / 5) + math.max(0, math.cos(Angle) / 2.5) - 2, math.sin(-Angle) / 1.8 + 0.15)
  247. * CFrame.Angles(math.sin(Angle) / 1.8 - 0.2, 0, 0), 0.2)
  248. end
  249.  
  250. -- Shooting
  251. if Down then
  252. SN.Volume = SN.Volume + (1.5 - SN.Volume) * 0.3
  253. FL.Transparency = FL.Transparency + (0.6 - FL.Transparency) * 0.2
  254. FLW.C0 = FLW.C0 * CFrame.Angles(0, 0.2, 0)
  255. Shoot()
  256. else
  257. SN.Volume = SN.Volume + (0 - SN.Volume) * 0.15
  258. FL.Transparency = FL.Transparency + (1 - FL.Transparency) * 0.2
  259. end
  260. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement