Advertisement
Kish0v

help...

Jan 16th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local Player, Character, Mouse = game:service("Players").LocalPlayer, game:GetService("Players").LocalPlayer.Character, game:GetService("Players").LocalPlayer:GetMouse();
  2. local Torso = Character:FindFirstChild("Torso")
  3. local rootPart = Character:FindFirstChild("HumanoidRootPart")
  4. local Humanoid = Character:FindFirstChild("Humanoid")
  5. local Head = Character:FindFirstChild("Head")
  6. local Right_Arm = Character:FindFirstChild("Right Arm")
  7. local Left_Arm = Character:FindFirstChild("Left Arm")
  8. local Right_Leg = Character:FindFirstChild("Right Leg")
  9. local Left_Leg = Character:FindFirstChild("Left Leg")
  10. local Right_Shoulder = Torso:FindFirstChild("Right Shoulder")
  11. local Left_Shoulder = Torso:FindFirstChild("Left Shoulder")
  12. local Right_Hip = Torso:FindFirstChild("Right Hip")
  13. local Left_Hip = Torso:FindFirstChild("Left Hip")
  14. local Neck = Torso:FindFirstChild("Neck")
  15. local rootPart = Character:FindFirstChild("HumanoidRootPart")
  16. local rootJoint = rootPart:FindFirstChild("RootJoint")
  17. local CurrentIdle = "Idling1"
  18. local Degree = 0.0175438596491228
  19. local canremove = false
  20. local debounce = false
  21. local UIService=game:GetService'UserInputService'
  22. _G.SongName = math.random(1,9025232)
  23. sin = math.sin
  24. Right_Leg.FormFactor = "Custom";
  25. Left_Leg.FormFactor = "Custom";
  26. rootPart.Archivable = true;
  27. rootJoint.Archivable = true;
  28. c_new = CFrame.new;
  29. c_angles = CFrame.Angles;
  30. i_new = Instance.new
  31. Humanoid:ClearAllChildren();
  32. local isAttacking = false
  33. local isSprinting = false
  34. local Animations = false
  35. local Angle = 0
  36. local Axis = 0
  37. local angleSpeed = 1
  38. local axisSpeed = angleSpeed
  39. local currentAnim
  40. local levetatingheight = 3
  41. local WalkType = "Ground"
  42.  
  43. function Sound(parent,loop,vol,id)
  44. local s = Instance.new('Sound',parent)
  45. s.Looped = loop
  46. s.Volume = vol
  47. s.MaxDistance=200
  48. s.EmitterSize=20
  49. s.SoundId = 'rbxassetid://'..tostring(id)
  50. s:Play()
  51. if loop == false then
  52. wait(s.TimeLength)
  53. s:Destroy()
  54. end
  55. end
  56.  
  57. Sound(rootPart,true,1,1316241687)
  58.  
  59. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  60. wld = Instance.new("Weld", wp1)
  61. wld.Part0 = wp0
  62. wld.Part1 = wp1
  63. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  64. return wld
  65. end
  66.  
  67. function noOutline(part)
  68. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  69. end
  70.  
  71. local function Part(Name,Color, Material, Transparency,Shape, Size, CFrame,CanCollide,Anchored,parent)
  72. local partie = i_new("Part",parent)
  73. partie.Name=Name
  74. partie.BrickColor = BrickColor.new(Color)
  75. partie.Material = Material
  76. partie.Shape = Shape
  77. partie.Transparency = Transparency
  78. partie.Size = Size
  79. partie.CFrame = CFrame
  80. partie.CanCollide = CanCollide
  81. partie.Anchored = Anchored
  82. return partie
  83. end
  84.  
  85.  
  86.  
  87. function swait(num)
  88. if num == 0 or num == nil then
  89. game:GetService("RunService").Stepped:wait(0)
  90. else
  91. for i = 0, num do
  92. game:GetService("RunService").Stepped:wait(0)
  93. end
  94. end
  95. end
  96.  
  97. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  98. local mesh = i_new(Mesh)
  99. mesh.Parent = part
  100. if Mesh == "SpecialMesh" then
  101. mesh.MeshType = meshtype
  102. mesh.MeshId = meshid
  103. end
  104. mesh.Offset = offset
  105. mesh.Scale = scale
  106. return mesh
  107. end
  108.  
  109. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position, Direction, MaxDistance, IgnoreDescendants
  110. return game:GetService("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  111. end
  112.  
  113. function QuaternionFromCFrame(cf)
  114. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  115. local trace = m00 + m11 + m22
  116. if trace > 0 then
  117. local s = math.sqrt(1 + trace)
  118. local recip = 0.5/s
  119. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  120. else
  121. local i = 0
  122. if m11 > m00 then
  123. i = 1
  124. end
  125. if m22 > (i == 0 and m00 or m11) then
  126. i = 2
  127. end
  128. if i == 0 then
  129. local s = math.sqrt(m00-m11-m22+1)
  130. local recip = 0.5/s
  131. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  132. elseif i == 1 then
  133. local s = math.sqrt(m11-m22-m00+1)
  134. local recip = 0.5/s
  135. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  136. elseif i == 2 then
  137. local s = math.sqrt(m22-m00-m11+1)
  138. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  139. end
  140. end
  141. end
  142.  
  143. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  144. local xs, ys, zs = x + x, y + y, z + z
  145. local wx, wy, wz = w*xs, w*ys, w*zs
  146. local xx = x*xs
  147. local xy = x*ys
  148. local xz = x*zs
  149. local yy = y*ys
  150. local yz = y*zs
  151. local zz = z*zs
  152. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  153. end
  154.  
  155. function QuaternionSlerp(a, b, t)
  156. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  157. local startInterp, finishInterp;
  158. if cosTheta >= 0.0001 then
  159. if (1 - cosTheta) > 0.0001 then
  160. local theta = math.acos(cosTheta)
  161. local invSinTheta = 1/math.sin(theta)
  162. startInterp = math.sin((1-t)*theta)*invSinTheta
  163. finishInterp = math.sin(t*theta)*invSinTheta
  164. else
  165. startInterp = 1-t
  166. finishInterp = t
  167. end
  168. else
  169. if (1+cosTheta) > 0.0001 then
  170. local theta = math.acos(-cosTheta)
  171. local invSinTheta = 1/math.sin(theta)
  172. startInterp = math.sin((t-1)*theta)*invSinTheta
  173. finishInterp = math.sin(t*theta)*invSinTheta
  174. else
  175. startInterp = t-1
  176. finishInterp = t
  177. end
  178. end
  179. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  180. end
  181.  
  182. function clerp(a, b, t)
  183. local qa = {QuaternionFromCFrame(a)}
  184. local qb = {QuaternionFromCFrame(b)}
  185. local ax, ay, az = a.x, a.y, a.z
  186. local bx, by, bz = b.x, b.y, b.z
  187. local _t = 1-t
  188. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  189. end
  190.  
  191. swait()
  192. LA_Weld = newWeld(Torso, Left_Arm, -1.5, 0.5, 0)
  193. Left_Arm.Weld.C1 = CFrame.new(0, 0.5, 0)
  194. RA_Weld = newWeld(Torso, Right_Arm, 1.5, 0.5, 0)
  195. Right_Arm.Weld.C1 = CFrame.new(0, 0.5, 0)
  196. LL_Weld = newWeld(Torso, Left_Leg, -0.5, -1, 0)
  197. Left_Leg.Weld.C1 = CFrame.new(0, 1, 0) -- Left_Leg.Weld.C1 = CFrame.new(0, 1, 0.15)
  198. RL_Weld = newWeld(Torso, Right_Leg, 0.5, -1, 0)
  199. Right_Leg.Weld.C1 = CFrame.new(0, 1, 0) -- Right_Leg.Weld.C1 = CFrame.new(0, 1, 0.15)
  200. Torso_Weld = newWeld(rootPart, Torso, 0, -1, 0)
  201. Torso.Weld.C1 = CFrame.new(0, -1, 0)
  202. Head_Weld = newWeld(Torso, Head, 0, 1.5, 0)
  203.  
  204. for i,v in pairs(Character:GetChildren()) do
  205. if v:IsA('Accoutrement') or v:IsA('Shirt') or v:IsA('Pants') then
  206. v:Destroy()
  207. elseif v:IsA('Part') and v.Name=='Head' then
  208. v.face:Destroy()
  209. end
  210. end
  211.  
  212. Character['Body Colors'].HeadColor=BrickColor.new('Really black')
  213. Character['Body Colors'].TorsoColor=BrickColor.new('Really black')
  214. Character['Body Colors'].RightArmColor=BrickColor.new('Really black')
  215. Character['Body Colors'].LeftArmColor=BrickColor.new('Really black')
  216. Character['Body Colors'].RightLegColor=BrickColor.new('Really black')
  217. Character['Body Colors'].LeftLegColor=BrickColor.new('Really black')
  218.  
  219. Humanoid.DisplayDistanceType='None'
  220.  
  221. --Part(Name,Color, Material, Transparency,Shape, Size, CFrame,CanCollide,Anchored,parent)
  222. --newWeld(wp0, wp1, wc0x, wc0y, wc0z)
  223. local REye=Part('REye','Royal purple','Neon',0,'Ball',Vector3.new(.1,.1,.1),CFrame.new(0,0,0),false,false,Character)
  224. newWeld(Head,REye,.2,.225,-.5)
  225. local REGlow=Instance.new('SurfaceLight')
  226. REGlow.Color=Color3.fromRGB(170,85,255)
  227. REGlow.Range=6
  228. REGlow.Brightness=10
  229. REGlow.Parent=REye
  230. local Glow=Instance.new('ParticleEmitter')
  231. Glow.Color=ColorSequence.new(Color3.fromRGB(170,85,255),Color3.fromRGB(170,85,255))
  232. Glow.Texture='rbxassetid://242292318'
  233. Glow.Transparency=NumberSequence.new(.9)
  234. Glow.Size=NumberSequence.new(.225)
  235. Glow.Acceleration=Vector3.new(45,30,0)
  236. Glow.LockedToPart=true
  237. Glow.Lifetime=NumberRange.new(.25,.25)
  238. Glow.Rate=1000
  239. Glow.EmissionDirection='Bottom'
  240. Glow.Speed=NumberRange.new(1,1)
  241. Glow.ZOffset=2
  242. Glow.Parent=REye
  243. local LEye=Part('LEye','Royal purple','Neon',0,'Ball',Vector3.new(.1,.1,.1),CFrame.new(0,0,0),false,false,Character)
  244. newWeld(Head,LEye,-.2,.225,-.5)
  245. local LEGlow=Instance.new('SurfaceLight')
  246. LEGlow.Color=Color3.fromRGB(170,85,255)
  247. LEGlow.Range=6
  248. LEGlow.Brightness=10
  249. LEGlow.Parent=LEye
  250. local Glow2=Instance.new('ParticleEmitter')
  251. Glow2.Color=ColorSequence.new(Color3.fromRGB(0,0,0),Color3.fromRGB(0,0,0))
  252. Glow2.Texture='rbxassetid://242292318'
  253. Glow2.Transparency=NumberSequence.new(.988)
  254. Glow2.Size=NumberSequence.new(5)
  255. Glow2.LockedToPart=false
  256. Glow2.Lifetime=NumberRange.new(.5,.5)
  257. Glow2.Rate=1000
  258. Glow2.EmissionDirection='Top'
  259. Glow2.Speed=NumberRange.new(1,1)
  260. Glow2.VelocitySpread=Vector3.new(0,0,60)
  261. Glow2.ZOffset=1
  262. Glow2.Parent=Torso
  263.  
  264. sine = 0
  265. change = 1
  266. sprint=false
  267. local punches={
  268. a=false,
  269. b=false,
  270. c=false
  271. }
  272.  
  273. UIService.InputBegan:connect(function(Input,GUIProcessed)
  274. if not GUIProcessed and Input.UserInputType==Enum.UserInputType.MouseButton1 then
  275. if punches.a==false then
  276. punches.a=true wait(.4) punches.a=false
  277. else
  278. punches.a=true
  279. print('a ',punches.a)
  280. if punches.b==false then
  281. punches.b=true wait(.4) punches.b=false
  282. else
  283. punches.b=true
  284. print('b ',punches.b)
  285. if punches.c==false then
  286. punches.c=true wait(.4) punches.c=false
  287. else
  288. punches.c=true
  289. print('c ',punches.c)
  290. print('a ',punches.a,'b ',punches.b,'c ',punches.c)
  291. end
  292. end
  293. end
  294. elseif not GUIProcessed and Input.KeyCode==Enum.KeyCode.LeftShift then
  295. sprint=true
  296. end
  297. end)
  298.  
  299. UIService.InputEnded:connect(function(Input,GUIProcessed)
  300. if not GUIProcessed and Input.KeyCode==Enum.KeyCode.LeftShift then
  301. sprint=false
  302. end
  303. end)
  304.  
  305. game:GetService("RunService").RenderStepped:connect(function()
  306. Angle = (Angle % 100) + angleSpeed/10
  307. Axis = (Axis % 100) + axisSpeed/10
  308. walkingMagnitude = Vector3.new(rootPart.Velocity.X, 0, rootPart.Velocity.Z).magnitude
  309. jumpVel = Torso.Velocity.Y
  310. sine = change + sine
  311.  
  312. if(Humanoid.Jump) and jumpVel > 1 then
  313. currentAnim = "Jumping"
  314. elseif walkingMagnitude < 2 then
  315. currentAnim = "Idling"
  316. elseif isSprinting == true then
  317. currentAnim = "Sprinting"
  318. elseif walkingMagnitude > 2 then
  319. currentAnim = "Walking"
  320. elseif isAttacking == true then
  321. currentAnim = "Attacking"
  322. end
  323.  
  324. if currentAnim == "Jumping" and Animations == false then
  325. angleSpeed = 2
  326. axisSpeed = 2
  327. RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  328. LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  329. LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  330. RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  331. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  332. Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  333. elseif currentAnim == "Idling" and Animations == false then
  334. angleSpeed = 1
  335. axisSpeed = 1
  336. change = 0.5
  337. RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, .5, 0) * c_angles(math.rad(45), math.rad(-3), math.rad(-10)), 0.15)
  338. LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(45), math.rad(5), math.rad(20)), 0.15)
  339. LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.rad(85), math.rad(0), math.rad(-20)), 0.15)
  340. RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(math.rad(85), math.rad(0), math.rad(30)), 0.15)
  341. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -2.5, 0) * c_angles(math.rad(10), math.rad(0), math.rad(0)), 0.15)
  342. Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  343. elseif currentAnim == "Walking" and Animations == false then
  344. if sprint==false then
  345. angleSpeed = 1
  346. axisSpeed = 1
  347. Humanoid.WalkSpeed = 16
  348. RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0) * c_angles(math.rad(0), -math.sin((rootPart.RotVelocity.X/5))/2, math.sin((-rootPart.RotVelocity.Y/5))/2), 0.15)
  349. LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(0), math.sin((rootPart.RotVelocity.X/5))/2, -math.sin((-rootPart.RotVelocity.Y/5))/2), 0.15)
  350. LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.sin(sine/2)/1.5, math.sin((rootPart.RotVelocity.Y/5))/2, -math.sin((rootPart.RotVelocity.Y/5))/2), 0.15)
  351. RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(-math.sin(sine/2)/1.5, -math.sin((rootPart.RotVelocity.Y/5))/2, math.sin((-rootPart.RotVelocity.Y/5))/2), 0.15)
  352. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(0), math.rad(0), math.sin((rootPart.RotVelocity.Y/30))/2), 0.15)
  353. Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.sin((rootPart.RotVelocity.Y/2.5))/2, math.rad(0)), 0.15)
  354. else
  355. angleSpeed = 10
  356. axisSpeed = 10
  357. Humanoid.WalkSpeed = 60
  358. RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0) * c_angles(math.rad(-40)+(-math.sin(sine/20)/5), -math.sin((rootPart.RotVelocity.X/3))/2, math.sin((-rootPart.RotVelocity.Y/3))/2), 0.15)
  359. LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(-40)+(-math.sin(sine/20)/5), math.sin((rootPart.RotVelocity.X/3))/2, -math.sin((-rootPart.RotVelocity.Y/3))/2), 0.15)
  360. LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.sin(sine/1)/1, math.sin((rootPart.RotVelocity.Y/3))/2, -math.sin((rootPart.RotVelocity.Y/3))/2), 0.15)
  361. RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(-math.sin(sine/1)/1, -math.sin((rootPart.RotVelocity.Y/3))/2, math.sin((-rootPart.RotVelocity.Y/3))/2), 0.15)
  362. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(-20), math.rad(0), math.sin((rootPart.RotVelocity.Y/15))/2), 0.15)
  363. Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.sin((rootPart.RotVelocity.Y/1))/2, math.rad(0)), 0.15)
  364. end
  365. end
  366. end)
  367. function chatfunc(text)
  368. local chat = coroutine.wrap(function()
  369. if chara:FindFirstChild("TalkingBillBoard")~= nil then
  370. chara:FindFirstChild("TalkingBillBoard"):destroy()
  371. end
  372. local naeeym2 = Instance.new("BillboardGui",chara)
  373. naeeym2.Size = UDim2.new(0,100,0,40)
  374. naeeym2.StudsOffset = Vector3.new(0,3,0)
  375. naeeym2.Adornee = chara.Head
  376. naeeym2.Name = "TalkingBillBoard"
  377. local tecks2 = Instance.new("TextLabel",naeeym2)
  378. tecks2.BackgroundTransparency = 1
  379. tecks2.BorderSizePixel = 0
  380. tecks2.Text = ""
  381. tecks2.Font = "Fantasy"
  382. tecks2.FontSize = "Size24"
  383. tecks2.TextStrokeTransparency = 0
  384. tecks2.TextColor3 = Color3.new(.6,0,0)
  385. tecks2.TextStrokeColor3 = Color3.new(0,0,0)
  386. tecks2.Size = UDim2.new(1,0,0.5,0)
  387. local shk = coroutine.wrap(function()
  388. while tecks2 ~= nil do
  389. wait(.05)
  390. tecks2.Position = UDim2.new(0,math.random(-3,3),0,math.random(-3,3))
  391. end
  392. end)
  393. shk()
  394. for i = 1,string.len(text),1 do
  395. tecks2.Text = string.sub(text,1,i)
  396. wait(0.01)
  397. end
  398. wait(1)
  399. for i = 1, 5 do
  400. wait(.01)
  401. tecks2.Position = tecks2.Position - UDim2.new(0,0,.05,0)
  402. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2
  403. tecks2.TextTransparency = tecks2.TextTransparency + .2
  404. end
  405. naeeym2:Destroy()
  406. end)
  407. chat()
  408. end
  409.  
  410. function onChatted(msg)
  411. chatfunc(msg)
  412. end
  413. player.Chatted:connect(onChatted)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement