Advertisement
ThatOneGuy561

Untitled

Jun 14th, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.67 KB | None | 0 0
  1. local function lerp(weld,beglerp,endlerp,speed)
  2. weld.C0 = beglerp:lerp(endlerp,speed)
  3. return weld.C0
  4. end
  5. local function lerp2(weld,beglerp,endlerp,speed)
  6. weld.C0 = beglerp:lerp(endlerp,speed)
  7. return weld.C1
  8. end
  9.  
  10. local speed = 0.2
  11. local angle = 0
  12. local anglespeed = 2
  13. local armspeed = 0.2
  14. local armangle = 0
  15. local armanglespeed = 2
  16. local legspeed = 0.2
  17. local legangle = 0
  18. local leganglespeed = 2
  19. local ignore = {}
  20. local on = true
  21. local damen = true
  22. local enabled = true
  23. local slamming = false
  24. local combo = 1
  25. local Player = game.Players.LocalPlayer
  26. local mouse = Player:GetMouse()
  27. local Char = Player.Character
  28. local Character = Char
  29. local Human = Char.Humanoid
  30. local Sounds = {"rbxassetid://200633148","rbxassetid://200632211","rbxassetid://2101137","rbxassetid://136523485"}
  31. local Head = Char.Head
  32. local LA = Char:findFirstChild("Left Arm")
  33. local RA = Char:findFirstChild("Right Arm")
  34. local LL = Char:findFirstChild("Left Leg")
  35. local RL = Char:findFirstChild("Right Leg")
  36. local T = Char:findFirstChild("Torso")
  37. local LS = T:findFirstChild("Left Shoulder")
  38. local RS = T:findFirstChild("Right Shoulder")
  39. local LH = T:findFirstChild("Left Hip")
  40. local RH = T:findFirstChild("Right Hip")
  41. local Neck = T:findFirstChild("Neck")
  42. local HM = Char:findFirstChild("HumanoidRootPart")
  43. local RJ = Char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  44. local WLS = Instance.new("Weld", T)
  45. WLS.C0 = CFrame.new(-1.5, 0.5, 0)
  46. WLS.C1 = CFrame.new(0, 0.5, 0)
  47. WLS.Part0 = T
  48. WLS.Part1 = LA
  49. local WRS = Instance.new("Weld", T)
  50. WRS.Part0 = T
  51. WRS.Part1 = RA
  52. WRS.C0 = CFrame.new(1.5, 0.5, 0)
  53. WRS.C1 = CFrame.new(0, 0.5, 0)
  54. local WLH = LH
  55. local WRH = RH
  56. local LSC0 = WLS.C0
  57. local RSC0 = WRS.C0
  58. local LHC0 = CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  59. local LHC1 = CFrame.new(-0.5, 1 ,0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  60. local RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  61. local RHC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  62. local WRJ = RJ
  63. local RJC0 = WRJ.C0
  64. local RJC1 = WRJ.C1
  65. local NC0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  66. local NC1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  67. local Run = game:GetService("RunService")
  68. RJC = RJ:Clone()
  69. LSH = LS:Clone()
  70. RSH = RS:Clone()
  71. LHH = LH:Clone()
  72. RHH = RH:Clone()
  73. Anim = Char:FindFirstChild("Animate")
  74. if Anim ~= nil then
  75. Anim.Parent = nil
  76. end
  77. Animate = Human:FindFirstChild("Animator")
  78. if Animate ~= nil then
  79. Animate.Parent = nil
  80. end
  81. WLS.Parent = T
  82. WRS.Parent = T
  83. WLH.Parent = T
  84. WRH.Parent = T
  85. WRJ.Parent = T
  86.  
  87. m=Instance.new('Model',Character)
  88. it=Instance.new
  89. function nooutline(part)
  90. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  91. end
  92. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  93. local fp=it("Part")
  94. fp.formFactor=formfactor
  95. fp.Parent=parent
  96. fp.Reflectance=reflectance
  97. fp.Transparency=transparency
  98. fp.CanCollide=false
  99. fp.Locked=true
  100. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  101. fp.Name=name
  102. fp.Size=size
  103. fp.Position=Character.Torso.Position
  104. nooutline(fp)
  105. fp.Material=material
  106. fp:BreakJoints()
  107. return fp
  108. end
  109. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  110. local mesh=it(Mesh)
  111. mesh.Parent=part
  112. if Mesh=="SpecialMesh" then
  113. mesh.MeshType=meshtype
  114. mesh.MeshId=meshid
  115. end
  116. mesh.Offset=offset
  117. mesh.Scale=scale
  118. return mesh
  119. end
  120. function weld(parent,part0,part1,c0,c1)
  121. local weld=it("Weld")
  122. weld.Parent=parent
  123. weld.Part0=part0
  124. weld.Part1=part1
  125. weld.C0=c0
  126. weld.C1=c1
  127. return weld
  128. end
  129.  
  130. Claw=part(Enum.FormFactor.Brick,m,Enum.Material.SmoothPlastic,0,1,"Really black","Handle",Vector3.new(1, 1.5, 1))
  131. Clawweld=weld(m,Character["Right Arm"],Claw,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0149011612, 0.25, -0.0200300217, -1, 0, 0, 0, 0.999999881, 0, 0, 0, -1))
  132. Part=part(Enum.FormFactor.Brick,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1, 1.5, 1))
  133. Partweld=weld(m,Claw,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  134. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1.10000002, 1.10000002, 1.10000002))
  135. Part=part(Enum.FormFactor.Brick,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(1, 0.200000003, 1))
  136. Partweld=weld(m,Claw,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.549998999, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  137. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1.20000005, 1.20000005, 1.20000005))
  138. Part=part(Enum.FormFactor.Symmetric,m,Enum.Material.Plastic,0,0,"Institutional white","Part",Vector3.new(0.299999952, 1, 1.39999998))
  139. Partweld=weld(m,Claw,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.594539642, -0.0200266838, -0.508953333, -0.970295787, 0.241921946, 0, 0, 0, -1, -0.241921946, -0.970295787, 0))
  140. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=10681506",Vector3.new(0, 0, 0),Vector3.new(2, 1.5, 1))
  141.  
  142. Hitbox = Part
  143.  
  144. local Meshes={
  145. Blast="20329976",
  146. Crown="1323306",
  147. Ring="3270017",
  148. Claw="10681506",
  149. Crystal="9756362",
  150. Coil="9753878",
  151. Cloud="1095708",
  152. Skull="4770583",
  153. }
  154.  
  155. local function nooutlines(part)
  156. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  157. end
  158.  
  159. local function getmesh(mesh)
  160. return "rbxassetid://"..mesh
  161. end
  162.  
  163. local function effect(part,brickcolor,size,cframe,trans,transincrement,scaleby,loopwait,meshid,meshtype)
  164. local p = Instance.new("Part", part or workspace)
  165. p.Anchored = true
  166. p.CanCollide = false
  167. p.FormFactor = Enum.FormFactor.Custom
  168. p.Material = "SmoothPlastic"
  169. p.CFrame = cframe
  170. p.BrickColor = brickcolor
  171. p.Size = Vector3.new(1,1,1)
  172. p.Transparency = trans
  173. nooutlines(p)
  174. local m = Instance.new("SpecialMesh",p)
  175. if meshtype ~= nil and meshid == nil then
  176. m.MeshType = meshtype
  177. end
  178. if meshtype == nil and meshid ~= nil then
  179. m.MeshId = getmesh(meshid)
  180. end
  181. m.Scale = size
  182. coroutine.wrap(function()
  183. for i = 0,loopwait,0.1 do
  184. p.CFrame = p.CFrame
  185. p.Transparency = p.Transparency +transincrement
  186. m.Scale = m.Scale + scaleby
  187. wait(1/60)
  188. end
  189. p:Destroy()
  190. end)()
  191. return p
  192. end
  193.  
  194. function Rwait(long)
  195. if long == 0 or long == nil then
  196. Run.RenderStepped:wait()
  197. else
  198. for i = 0,long do
  199. Run.RenderStepped:wait()
  200. end
  201. end
  202. end
  203.  
  204. local PlaySound = function(part,volume,pitch,id,looped)
  205. local Sound = Instance.new("Sound", part)
  206. Sound.SoundId = id
  207. Sound.Pitch = pitch
  208. Sound.Volume = volume
  209. coroutine.wrap(function()
  210. wait()
  211. Sound:Play()
  212. if looped == nil then
  213. game.Debris:AddItem(Sound,10)
  214. end
  215. end)()
  216. if looped == true then
  217. Sound.Looped = true
  218. ThisSound = Sound
  219. end
  220. end
  221.  
  222. local function GetDistance(Obj,Mag)
  223. for _,v in pairs(workspace:GetChildren()) do
  224. if v:FindFirstChild('Humanoid') and v:FindFirstChild('Torso') and v ~= Char then
  225. local Mag2 = (v.Torso.Position - Obj.Position).magnitude
  226. if Mag2 < Mag then
  227. return v
  228. end
  229. end
  230. end
  231. end
  232.  
  233. local ShowDmg = function(totake)
  234. local modl = Instance.new("Model", workspace)
  235. modl.Name = tostring(totake)
  236. local prt = Instance.new("Part", modl)
  237. prt.CanCollide = false
  238. prt.BrickColor = BrickColor.Red()
  239. prt.Name = "Head"
  240. prt.CFrame = HM.CFrame *CFrame.new(0, 1.5, 0)
  241. prt.TopSurface = 0
  242. prt.BottomSurface = 0
  243. prt.FormFactor = 3
  244. prt.Size = Vector3.new(1, 0.2, 1)
  245. local bm = Instance.new("BlockMesh", prt)
  246. local hum = Instance.new("Humanoid", modl)
  247. hum.Health = 0
  248. hum.MaxHealth = 0
  249. hum.WalkSpeed = 0
  250. bodypos = Instance.new("BodyPosition", prt)
  251. bodypos.position = Head.Position +Vector3.new(0, 1, 0)
  252. bodypos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  253. game.Debris:AddItem(modl, 1)
  254. coroutine.resume(coroutine.create(function()
  255. for i = 1, 3 do
  256. bodypos.position = bodypos.position +Vector3.new(0, 0.5, 0)
  257. Rwait()
  258. end
  259. end))
  260. end
  261.  
  262.  
  263.  
  264. local function Cast(Pos,Dir,Amp,IgnoreList)
  265. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit*Amp), IgnoreList)
  266. end
  267.  
  268. while true do
  269. local surface = Cast(HM.Position,(CFrame.new(HM.Position,HM.Position - Vector3.new(0,1,0))).lookVector,4,Char)
  270. if on == true then
  271. angle = (angle % 100) +anglespeed/10
  272. armangle = (armangle % 100) +armanglespeed/10
  273. legangle = (legangle % 100) +leganglespeed/10
  274. if action == "Idle" and enabled == true and surface ~= nil then
  275. lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/8,0,0),armspeed)
  276. lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(0,-math.pi/1.5,-math.pi/8),armspeed)
  277. lerp(WLH,WLH.C0,LHC0 *CFrame.new(-0.5,0,0),legspeed)
  278. lerp(WRH,WRH.C0,RHC0 *CFrame.new(0,-0.25,0) *CFrame.Angles(0,0,-math.pi/5),legspeed)
  279. lerp(WRJ,WRJ.C0,RJC0,speed)
  280. lerp(Neck,Neck.C0,NC0 *CFrame.Angles(math.sin(angle*0.25)*0.05,0,0),speed)
  281. end
  282. if action == "Walk" and enabled == true and surface ~= nil then
  283. lerp(WLS,WLS.C0,LSC0 *CFrame.new(1.7,math.cos(armangle*0.25)*0.25,-1) *CFrame.Angles(math.pi/2,0,math.pi/1.9),armspeed)
  284. lerp(WRS,WRS.C0,RSC0 *CFrame.new(0,math.cos(armangle*0.25)*0.25,0) *CFrame.Angles(math.pi/2,0,math.pi/1.4),armspeed)
  285. lerp(WLH,WLH.C0,LHC0 *CFrame.new(0,0.1-math.sin(angle*0.25)*0.25,0) *CFrame.Angles(0,0,-math.pi/30+math.sin(legangle)),legspeed)
  286. lerp(WRH,WRH.C0,RHC0 *CFrame.new(0,0.1-math.sin(angle*0.25)*0.25,0) *CFrame.Angles(0,0,math.pi/30+math.sin(legangle)),legspeed)
  287. lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,0,-0.2+math.sin(angle*0.25)*0.25) *CFrame.Angles(math.pi/8,0,0),speed)
  288. lerp(Neck,Neck.C0,NC0 *CFrame.Angles(-math.pi/8,0,0),speed)
  289. end
  290. if HM.Velocity.Y >= 5 and enabled == true and surface == nil then
  291. action = "Jump"
  292. lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/6,0,0),armspeed)
  293. lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/4,0,0),armspeed)
  294. lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.pi/10),legspeed)
  295. lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.pi/5),legspeed)
  296. lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,math.pi/5,0),speed)
  297. lerp(Neck,Neck.C0,NC0 *CFrame.Angles(-math.pi/8,0,0),speed)
  298. Rwait()
  299. end
  300. if HM.Velocity.Y <= -5 and enabled == true and surface == nil then
  301. action = "Fall"
  302. lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.pi/8,0,0),armspeed)
  303. lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/8,0,0),armspeed)
  304. lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.pi/10),legspeed)
  305. lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.pi/4),legspeed)
  306. lerp(WRJ,WRJ.C0,RJC0 *CFrame.Angles(math.pi/8,0,0),speed)
  307. lerp(Neck,Neck.C0,NC0,speed)
  308. Rwait()
  309. end
  310. if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude <= 2 then
  311. action = "Idle"
  312. elseif Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then
  313. action = "Walk"
  314. end
  315. end
  316. Rwait()
  317. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement