Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.92 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. local p = owner
  88. local char = p.Character
  89. local larm = char["Left Arm"]
  90. local rarm = char["Right Arm"]
  91. local lleg = char["Left Leg"]
  92. local rleg = char["Right Leg"]
  93. local hed = char.Head
  94. local torso = char.Torso
  95. local cam = game.Workspace.CurrentCamera
  96. local root = char.HumanoidRootPart
  97. local deb = false
  98. local shot = 0
  99. local l = game.Lighting
  100. local stanceToggle = "Assertive"
  101. local CanAttack = true
  102. local Daytime = true
  103. local animpose = "Idle"
  104. local lastanimpose = "Idle"
  105. local nosword=false
  106. RootPart=char.HumanoidRootPart
  107. local Effects={}
  108. local attack=false
  109. idle=0
  110. Anim='Idle'
  111. equipped=true
  112. char.Humanoid.WalkSpeed=16
  113. colorscheme=BrickColor.new('Black')
  114. it=Instance.new
  115. attacktype=1
  116. vt=Vector3.new
  117. cf=CFrame.new
  118. euler=CFrame.fromEulerAnglesXYZ
  119. angles=CFrame.Angles
  120. m=Instance.new('Model',char)
  121. stance='god'
  122.  
  123. it=Instance.new
  124. vt=Vector3.new
  125. cf=CFrame.new
  126. euler=CFrame.fromEulerAnglesXYZ
  127. angles=CFrame.Angles
  128.  
  129.  
  130. function swait(num)
  131. if num==0 or num==nil then
  132. game:service'RunService'.Stepped:wait(0)
  133. else
  134. for i=0,num do
  135. game:service'RunService'.Stepped:wait(0)
  136. end
  137. end
  138. end
  139.  
  140. function clerp(a,b,t)
  141. local qa = {QuaternionFromCFrame(a)}
  142. local qb = {QuaternionFromCFrame(b)}
  143. local ax, ay, az = a.x, a.y, a.z
  144. local bx, by, bz = b.x, b.y, b.z
  145. local _t = 1-t
  146. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  147. end
  148.  
  149. function QuaternionFromCFrame(cf)
  150. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  151. local trace = m00 + m11 + m22
  152. if trace > 0 then
  153. local s = math.sqrt(1 + trace)
  154. local recip = 0.5/s
  155. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  156. else
  157. local i = 0
  158. if m11 > m00 then
  159. i = 1
  160. end
  161. if m22 > (i == 0 and m00 or m11) then
  162. i = 2
  163. end
  164. if i == 0 then
  165. local s = math.sqrt(m00-m11-m22+1)
  166. local recip = 0.5/s
  167. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  168. elseif i == 1 then
  169. local s = math.sqrt(m11-m22-m00+1)
  170. local recip = 0.5/s
  171. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  172. elseif i == 2 then
  173. local s = math.sqrt(m22-m00-m11+1)
  174. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  175. end
  176. end
  177. end
  178.  
  179. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  180. local xs, ys, zs = x + x, y + y, z + z
  181. local wx, wy, wz = w*xs, w*ys, w*zs
  182. local xx = x*xs
  183. local xy = x*ys
  184. local xz = x*zs
  185. local yy = y*ys
  186. local yz = y*zs
  187. local zz = z*zs
  188. 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))
  189. end
  190.  
  191. function QuaternionSlerp(a, b, t)
  192. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  193. local startInterp, finishInterp;
  194. if cosTheta >= 0.0001 then
  195. if (1 - cosTheta) > 0.0001 then
  196. local theta = math.acos(cosTheta)
  197. local invSinTheta = 1/math.sin(theta)
  198. startInterp = math.sin((1-t)*theta)*invSinTheta
  199. finishInterp = math.sin(t*theta)*invSinTheta
  200. else
  201. startInterp = 1-t
  202. finishInterp = t
  203. end
  204. else
  205. if (1+cosTheta) > 0.0001 then
  206. local theta = math.acos(-cosTheta)
  207. local invSinTheta = 1/math.sin(theta)
  208. startInterp = math.sin((t-1)*theta)*invSinTheta
  209. finishInterp = math.sin(t*theta)*invSinTheta
  210. else
  211. startInterp = t-1
  212. finishInterp = t
  213. end
  214. end
  215. 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
  216. end
  217. -----------
  218. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  219. local wld = Instance.new("Weld", wp1)
  220. wld.Part0 = wp0
  221. wld.Part1 = wp1
  222. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  223. return wld
  224. end
  225.  
  226. larm.Size = larm.Size * 2
  227. rarm.Size = rarm.Size * 2
  228. lleg.Size = lleg.Size * 2
  229. rleg.Size = rleg.Size * 2
  230. torso.Size = torso.Size * 2
  231. hed.Size = hed.Size * 2
  232. root.Size = root.Size * 2
  233. ----------------------------------------------------
  234. newWeld(torso, larm, -3, 0.5, 0)
  235. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  236. newWeld(torso, rarm, 3, 0.5, 0)
  237. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  238. newWeld(torso, hed, 0, 1.5, 0)
  239. hed.Weld.C1 = CFrame.new(0, -1.5, 0)
  240. newWeld(torso, lleg, -0.5, -1, 0)
  241. lleg.Weld.C1 = CFrame.new(.5, 3, 0)
  242. newWeld(torso, rleg, 0.5, -1, 0)
  243. rleg.Weld.C1 = CFrame.new(-.5, 3, 0)
  244. newWeld(root, torso, 0, -1, 0)
  245. torso.Weld.C1 = CFrame.new(0, -1, 0)
  246.  
  247. Player=owner
  248. Character=Player.Character
  249. m=Instance.new('Model',Character)
  250.  
  251. local function weldBetween(a, b)
  252. local weldd = Instance.new("ManualWeld")
  253. weldd.Part0 = a
  254. weldd.Part1 = b
  255. weldd.C0 = CFrame.new()
  256. weldd.C1 = b.CFrame:inverse() * a.CFrame
  257. weldd.Parent = a
  258. return weldd
  259. end
  260.  
  261. it=Instance.new
  262.  
  263. function nooutline(part)
  264. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  265. end
  266.  
  267. function paart(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  268. local fp=it("Part")
  269. fp.formFactor=formfactor
  270. fp.Parent=parent
  271. fp.Reflectance=reflectance
  272. fp.Transparency=transparency
  273. fp.CanCollide=false
  274. fp.Locked=true
  275. fp.BrickColor=brickcolor
  276. fp.Name=name
  277. fp.Size=size
  278. fp.Position=torso.Position
  279. nooutline(fp)
  280. fp.Material="SmoothPlastic"
  281. fp:BreakJoints()
  282. return fp
  283. end
  284.  
  285. function decal(part,face,texture,transparency,shiny,specular,name)
  286. local d=it("Decal",part)
  287. d.Shiny=shiny
  288. d.Face=face
  289. d.Specular=specular
  290. d.Transparency=transparency
  291. d.Texture=texture
  292. d.Name=name
  293. return d
  294. end
  295.  
  296.  
  297. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  298. local fp=it("Part")
  299. fp.formFactor=formfactor
  300. fp.Parent=parent
  301. fp.Reflectance=reflectance
  302. fp.Transparency=transparency
  303. fp.CanCollide=false
  304. fp.Locked=true
  305. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  306. fp.Name=name
  307. fp.Size=size
  308. fp.Position=Character.Torso.Position
  309. nooutline(fp)
  310. fp.Material=material
  311. fp:BreakJoints()
  312. return fp
  313. end
  314.  
  315. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  316. local mesh=it(Mesh)
  317. mesh.Parent=part
  318. if Mesh=="SpecialMesh" then
  319. mesh.MeshType=meshtype
  320. mesh.MeshId=meshid
  321. end
  322. mesh.Offset=offset
  323. mesh.Scale=scale
  324. return mesh
  325. end
  326.  
  327. function weld(parent,part0,part1,c0,c1)
  328. local weld=it("Weld")
  329. weld.Parent=parent
  330. weld.Part0=part0
  331. weld.Part1=part1
  332. weld.C0=c0
  333. weld.C1=c1
  334. return weld
  335. end
  336.  
  337. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  338. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  339. end
  340.  
  341. so = function(id,par,vol,pit)
  342. coroutine.resume(coroutine.create(function()
  343. local sou = Instance.new("Sound",par or workspace)
  344. sou.Volume=vol
  345. sou.Pitch=pit or 1
  346. sou.SoundId=id
  347. swait()
  348. sou:play()
  349. game:GetService("Debris"):AddItem(sou,6)
  350. end))
  351. end
  352.  
  353. Face=hed.face
  354.  
  355. function Cloak()
  356. so("http://roblox.com/asset/?id=2767090",torso,1,1.1)
  357. Face.Parent=nil
  358. cloaked=true
  359. for _,v in pairs(torso.Parent:children()) do
  360. if v.className=="Part" and v.Name~="HumanoidRootPart" then
  361. coroutine.resume(coroutine.create(function()
  362. for i=0,1,0.2 do
  363. wait()
  364. v.Transparency=i
  365. end
  366. v.Transparency=1
  367. end))
  368. end
  369. if v.className=="Hat" then
  370. hatp=v.Handle
  371. coroutine.resume(coroutine.create(function(derp)
  372. for i=0,1,0.2 do
  373. wait()
  374. derp.Transparency=i
  375. end
  376. derp.Transparency=1
  377. end),hatp)
  378. end
  379. end
  380. for _,v in pairs(m:children()) do
  381. if v.className=="Part" then
  382. coroutine.resume(coroutine.create(function()
  383. for i=0,1,0.2 do
  384. wait()
  385. v.Transparency=i
  386. end
  387. v.Transparency=1
  388. end))
  389. end
  390. end
  391. end
  392.  
  393. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  394. if hit.Parent==nil then
  395. return
  396. end
  397. h=hit.Parent:FindFirstChild("Humanoid")
  398. for _,v in pairs(hit.Parent:children()) do
  399. if v:IsA("Humanoid") then
  400. h=v
  401. end
  402. end
  403. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  404. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  405. end
  406. if hit.Parent.className=="Hat" then
  407. hit=hit.Parent.Parent:findFirstChild("Head")
  408. end
  409. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  410. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  411. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  412. return
  413. end]]
  414. -- hs(hit,1.2)
  415. c=Instance.new("ObjectValue")
  416. c.Name="creator"
  417. c.Value=owner
  418. c.Parent=h
  419. game:GetService("Debris"):AddItem(c,.5)
  420. Damage=math.random(minim,maxim)
  421. -- h:TakeDamage(Damage)
  422. blocked=false
  423. block=hit.Parent:findFirstChild("Block")
  424. if block~=nil then
  425. print(block.className)
  426. if block.className=="NumberValue" then
  427. if block.Value>0 then
  428. blocked=true
  429. if decreaseblock==nil then
  430. block.Value=block.Value-1
  431. end
  432. end
  433. end
  434. if block.className=="IntValue" then
  435. if block.Value>0 then
  436. blocked=true
  437. if decreaseblock~=nil then
  438. block.Value=block.Value-1
  439. end
  440. end
  441. end
  442. end
  443. if blocked==false then
  444. -- h:TakeDamage(Damage)
  445. h.Health=h.Health-Damage
  446. showDamage(hit.Parent,Damage,.5,BrickColor.new("Dark stone grey"))
  447. else
  448. h.Health=h.Health-(Damage/2)
  449. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  450. end
  451. if Type=="Knockdown" then
  452. hum=hit.Parent.Humanoid
  453. hum.PlatformStand=true
  454. coroutine.resume(coroutine.create(function(HHumanoid)
  455. swait(1)
  456. HHumanoid.PlatformStand=false
  457. end),hum)
  458. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  459. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  460. local bodvol=Instance.new("BodyVelocity")
  461. bodvol.velocity=angle*knockback
  462. bodvol.P=5000
  463. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  464. bodvol.Parent=hit
  465. rl=Instance.new("BodyAngularVelocity")
  466. rl.P=3000
  467. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  468. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  469. rl.Parent=hit
  470. game:GetService("Debris"):AddItem(bodvol,.5)
  471. game:GetService("Debris"):AddItem(rl,.5)
  472. elseif Type=="Normal" then
  473. vp=Instance.new("BodyVelocity")
  474. vp.P=500
  475. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  476. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  477. if KnockbackType==1 then
  478. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  479. elseif KnockbackType==2 then
  480. vp.velocity=Property.CFrame.lookVector*knockback
  481. end
  482. if knockback>0 then
  483. vp.Parent=hit.Parent.Torso
  484. end
  485. game:GetService("Debris"):AddItem(vp,.5)
  486. elseif Type=="Up" then
  487. local bodyVelocity=Instance.new("BodyVelocity")
  488. bodyVelocity.velocity=vt(0,60,0)
  489. bodyVelocity.P=5000
  490. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  491. bodyVelocity.Parent=hit
  492. game:GetService("Debris"):AddItem(bodyVelocity,1)
  493. rl=Instance.new("BodyAngularVelocity")
  494. rl.P=3000
  495. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  496. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  497. rl.Parent=hit
  498. game:GetService("Debris"):AddItem(rl,.5)
  499. elseif Type=="Snare" then
  500. bp=Instance.new("BodyPosition")
  501. bp.P=2000
  502. bp.D=100
  503. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  504. bp.position=hit.Parent.Torso.Position
  505. bp.Parent=hit.Parent.Torso
  506. game:GetService("Debris"):AddItem(bp,1)
  507. elseif Type=="Target" then
  508. if Targetting==false then
  509. ZTarget=hit.Parent.Torso
  510. coroutine.resume(coroutine.create(function(Part)
  511. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  512. swait(5)
  513. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  514. end),ZTarget)
  515. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  516. targetgui=Instance.new("BillboardGui")
  517. targetgui.Parent=ZTarget
  518. targetgui.Size=UDim2.new(10,100,10,100)
  519. targ=Instance.new("ImageLabel")
  520. targ.Parent=targetgui
  521. targ.BackgroundTransparency=1
  522. targ.Image="rbxassetid://4834067"
  523. targ.Size=UDim2.new(1,0,1,0)
  524. cam.CameraType="Scriptable"
  525. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  526. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  527. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  528. Targetting=true
  529. RocketTarget=ZTarget
  530. for i=1,Property do
  531. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  532. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  533. swait()
  534. end
  535. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  536. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  537. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  538. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  539. end
  540. Targetting=false
  541. RocketTarget=nil
  542. targetgui.Parent=nil
  543. cam.CameraType="Custom"
  544. end
  545. end
  546. debounce=Instance.new("BoolValue")
  547. debounce.Name="DebounceHit"
  548. debounce.Parent=hit.Parent
  549. debounce.Value=true
  550. game:GetService("Debris"):AddItem(debounce,Delay)
  551. c=Instance.new("ObjectValue")
  552. c.Name="creator"
  553. c.Value=Player
  554. c.Parent=h
  555. game:GetService("Debris"):AddItem(c,.5)
  556. CRIT=false
  557. hitDeb=true
  558. AttackPos=6
  559. end
  560. end
  561.  
  562. showDamage=function(Char,Dealt,du,Color)
  563. m=Instance.new("Model")
  564. m.Name=tostring(Dealt)
  565. h=Instance.new("Humanoid")
  566. h.Health=0
  567. h.MaxHealth=0
  568. h.Parent=m
  569. c=Instance.new("Part")
  570. c.Transparency=0
  571. c.BrickColor=Color
  572. c.Name="Head"
  573. c.TopSurface=0
  574. c.BottomSurface=0
  575. c.formFactor="Plate"
  576. c.Size=Vector3.new(1,.4,1)
  577. ms=Instance.new("CylinderMesh")
  578. ms.Scale=Vector3.new(.8,.8,.8)
  579. if CRIT==true then
  580. ms.Scale=Vector3.new(1,1.25,1)
  581. end
  582. ms.Parent=c
  583. c.Reflectance=0
  584. Instance.new("BodyGyro").Parent=c
  585. c.Parent=m
  586. if Char:findFirstChild("Head")~=nil then
  587. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  588. elseif Char.Parent:findFirstChild("Head")~=nil then
  589. c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  590. end
  591. f=Instance.new("BodyPosition")
  592. f.P=2000
  593. f.D=100
  594. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  595. f.position=c.Position+Vector3.new(0,3,0)
  596. f.Parent=c
  597. game:GetService("Debris"):AddItem(m,.5+du)
  598. c.CanCollide=false
  599. m.Parent=workspace
  600. c.CanCollide=false
  601. end
  602. --decal(Part,"Back","http://www.roblox.com/asset/?id=116620938",0,20,0,"BackDecal")
  603. --decal(Part,"Front","http://www.roblox.com/asset/?id=116620941",0,20,0,"FrontDecal")
  604.  
  605. handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Handle",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  606. handleweld=weld(m,Character["Right Arm"],handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-3.21865082e-006, -1.92506492, 1.56858718, 1, 1.76556707e-008, 2.20732019e-007, 2.19636547e-007, 0.0477656312, -0.998858452, -2.81789898e-008, 0.998858333, 0.0477656387))
  607. mesh("BlockMesh",handle,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  608. Pivot=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Pivot",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  609. Pivotweld=weld(m,handle,Pivot,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.1920929e-007, 0.15217483, -0.167459726, 1, -1.70530257e-013, -6.57252031e-014, -1.70530257e-013, 0.999999762, 0, -6.57252031e-014, 0, 0.999999762))
  610. mesh("BlockMesh",Pivot,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  611. Hitbox=part(Enum.FormFactor.Symmetric,m,Enum.Material.Plastic,0,1,"Really red","Hitbox",Vector3.new(4.51999998, 4.67999983, 1.06999993))
  612. Hitboxweld=weld(m,handle,Hitbox,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0066781044, -6.47062922, 0.321344972, 1, 2.14822961e-007, -2.90807179e-007, -2.14823331e-007, 1, -7.04079866e-007, 2.90806867e-007, 7.04079866e-007, 1))
  613. mesh("BlockMesh",Hitbox,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  614. Part=part(Enum.FormFactor.Symmetric,m,Enum.Material.Plastic,0,1,"Bright yellow","Part",Vector3.new(3, 3, 1))
  615. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-2.38418579e-007, -4.8718586, -1.00152767, -1, -2.62085393e-008, 2.9080698e-007, -2.62088236e-008, 0.999999523, -5.73694706e-007, -2.90806781e-007, -5.73694706e-007, -0.999999523))
  616. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, -0.74000001),Vector3.new(1.5, 1.5, 0))
  617. decal(Part,"Back","http://www.roblox.com/asset/?id=116620938",0,20,0,"BackDecal")
  618. decal(Part,"Front","http://www.roblox.com/asset/?id=116620941",0,20,0,"FrontDecal")
  619. Part=part(Enum.FormFactor.Symmetric,m,Enum.Material.Plastic,0,0,"Medium stone grey","Part",Vector3.new(1, 9.70000076, 1))
  620. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.1920929e-007, -1.33476639, -0.022927165, 0.99999994, -4.40536496e-013, -8.21907093e-008, 2.7000624e-013, 0.999999702, -5.32716513e-007, 8.21905957e-008, 3.35276127e-007, 0.999999523))
  621. mesh("SpecialMesh",Part,Enum.MeshType.Head,"",Vector3.new(0, 0, 0),Vector3.new(0.5, 1.20000005, 0.5))
  622.  
  623. HatHandle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","HatHandle",Vector3.new(0.800000012, 1.39999998, 2.4000001))
  624. HatHandleweld=weld(m,Character.Head,HatHandle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0299963951, -1.2432971, 0.18821907, 1, 2.19636547e-007, -2.81789898e-008, -2.10089595e-007, 0.981256008, 0.192707554, 6.99764087e-008, -0.192707554, 0.981256008))
  625. meh=mesh("SpecialMesh",HatHandle,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=26768040",Vector3.new(0, 0, 0),Vector3.new(2.0999999, 2.0999999, 2.0999999))
  626. meh.TextureId="http://www.roblox.com/asset/?id=26768024"
  627.  
  628. function attackone()
  629. attack = true
  630. local bounce=false
  631. local hitsounds={"193346722","193346883","193346793"}
  632. local con=Hitbox.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(20,40),"Knockdown",RootPart,.2,1) end)
  633. local fx=Hitbox.Touched:connect(function(part)
  634. local human=part.Parent:findFirstChild("Humanoid")
  635. if human~=nil and bounce==false then
  636. local rndm=math.random(1,#hitsounds)
  637. local r=rndm
  638. so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,.5)
  639. bounce=true
  640. end
  641. end)
  642. for i = 0,1,0.05 do
  643. swait()
  644. torso.Weld.C0 = clerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)), 0.2)
  645. hed.Weld.C0 = clerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)), 0.2)
  646. rarm.Weld.C0 = clerp(rarm.Weld.C0, CFrame.new(3, 1, -1)*CFrame.Angles(math.rad(0),math.rad(-120),math.rad(-120)), 0.2)
  647. larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-30)), 0.2)
  648. lleg.Weld.C0 = clerp(lleg.Weld.C0, CFrame.new(-.5, -1, -.5) * CFrame.Angles(math.rad(0), math.rad(50), math.rad(0)), 0.2)
  649. rleg.Weld.C0 = clerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(-30), math.rad(0)), 0.2)
  650. handleweld.C0=clerp(handleweld.C0,cf(0,0,.8)*angles(math.rad(80),math.rad(0),math.rad(0)),.2)
  651. end
  652. so("http://roblox.com/asset/?id=234365549",Hitbox,1,.8)
  653. for i = 0,1,0.05 do
  654. swait()
  655. torso.Weld.C0 = clerp(torso.Weld.C0, CFrame.new(0, -2, 0) * CFrame.Angles(math.rad(-20), math.rad(90), math.rad(0)), 0.2)
  656. hed.Weld.C0 = clerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(20), math.rad(-80), math.rad(20)), 0.2)
  657. rarm.Weld.C0 = clerp(rarm.Weld.C0, CFrame.new(1.5, 0.5, -0.5)*CFrame.Angles(math.rad(0),math.rad(-20),math.rad(-70)), 0.2)
  658. larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(-30),math.rad(0),math.rad(-40)), 0.2)
  659. lleg.Weld.C0 = clerp(lleg.Weld.C0, CFrame.new(-.5, -1, 0) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0)), 0.2)
  660. rleg.Weld.C0 = clerp(rleg.Weld.C0, CFrame.new(.5, -.2, 0) * CFrame.Angles(math.rad(20), math.rad(-40), math.rad(0)), 0.2)
  661. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(-30),math.rad(0),math.rad(0)),.2)
  662. torso.Velocity=hed.CFrame.lookVector*50
  663. end
  664. bounce = false
  665. attack = false
  666. con:disconnect()
  667. fx:disconnect()
  668. end
  669.  
  670. function attacktwo()
  671. attack = true
  672. local bounce=false
  673. local hitsounds={"193346722","193346883","193346793"}
  674. local con=Hitbox.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(20,40),"Knockdown",RootPart,.2,1) end)
  675. local fx=Hitbox.Touched:connect(function(part)
  676. local human=part.Parent:findFirstChild("Humanoid")
  677. if human~=nil and bounce==false then
  678. local rndm=math.random(1,#hitsounds)
  679. local r=rndm
  680. so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,.6)
  681. bounce=true
  682. end
  683. end)
  684. for i = 0,1,0.05 do
  685. swait()
  686. torso.Weld.C0 = clerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)), 0.2)
  687. hed.Weld.C0 = clerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(0), math.rad(70), math.rad(0)), 0.2)
  688. rarm.Weld.C0 = clerp(rarm.Weld.C0, CFrame.new(3, 2, -0.5)*CFrame.Angles(math.rad(150),math.rad(0),math.rad(10)), 0.2)
  689. larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-50)), 0.2)
  690. lleg.Weld.C0 = clerp(lleg.Weld.C0, CFrame.new(-.5, -1, -.5) * CFrame.Angles(math.rad(0), math.rad(40), math.rad(-5)), 0.2)
  691. rleg.Weld.C0 = clerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(50), math.rad(0)), 0.2)
  692. handleweld.C0=clerp(handleweld.C0,cf(0,0,.8)*angles(math.rad(80),math.rad(0),math.rad(0)),.2)
  693. end
  694. so("http://roblox.com/asset/?id=234365573",Hitbox,1,.8)
  695. for i = 0,1,0.05 do
  696. swait()
  697. torso.Weld.C0 = clerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(50), math.rad(0)), 0.2)
  698. hed.Weld.C0 = clerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(-20), math.rad(-60), math.rad(0)), 0.2)
  699. rarm.Weld.C0 = clerp(rarm.Weld.C0, CFrame.new(3, 0, 0)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(20)), 0.2)
  700. larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-30)), 0.2)
  701. lleg.Weld.C0 = clerp(lleg.Weld.C0, CFrame.new(-.5, -1, -.5) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(-5)), 0.2)
  702. rleg.Weld.C0 = clerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(-30), math.rad(0)), 0.2)
  703. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(-30),math.rad(0),math.rad(0)),.2)
  704. end
  705. bounce = false
  706. attack = false
  707. con:disconnect()
  708. fx:disconnect()
  709. end
  710.  
  711. function attackthree()
  712. attack = true
  713. local bounce=false
  714. local hitsounds={"193346722","193346883","193346793"}
  715. local con=Hitbox.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(20,40),"Knockdown",RootPart,.2,1) end)
  716. local fx=Hitbox.Touched:connect(function(part)
  717. local human=part.Parent:findFirstChild("Humanoid")
  718. if human~=nil and bounce==false then
  719. local rndm=math.random(1,#hitsounds)
  720. local r=rndm
  721. so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,.7)
  722. bounce=true
  723. end
  724. end)
  725. for i = 0,1,0.05 do
  726. swait()
  727. torso.Weld.C0 = clerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(60), math.rad(0)), 0.2)
  728. hed.Weld.C0 = clerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.2)
  729. rarm.Weld.C0 = clerp(rarm.Weld.C0, CFrame.new(3, .5, 0)*CFrame.Angles(math.rad(0),math.rad(110),math.rad(50)), 0.2)
  730. larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-2, 0.5, -.5)*CFrame.Angles(math.rad(0),math.rad(-120),math.rad(-50)), 0.2)
  731. lleg.Weld.C0 = clerp(lleg.Weld.C0, CFrame.new(-.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(-10)), 0.2)
  732. rleg.Weld.C0 = clerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(10)), 0.2)
  733. handleweld.C0=clerp(handleweld.C0,cf(0,0,-1)*angles(math.rad(-50),math.rad(0),math.rad(0)),.2)
  734. end
  735. so("http://roblox.com/asset/?id=234365549",Hitbox,1,.7)
  736. for i = 0,1,0.07 do
  737. swait()
  738. torso.Weld.C0 = clerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)), 0.2)
  739. hed.Weld.C0 = clerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(0), math.rad(80), math.rad(0)), 0.2)
  740. rarm.Weld.C0 = clerp(rarm.Weld.C0, CFrame.new(3, 1, 0)*CFrame.Angles(math.rad(0),math.rad(20),math.rad(120)), 0.2)
  741. larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-50)), 0.2)
  742. lleg.Weld.C0 = clerp(lleg.Weld.C0, CFrame.new(-.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(50), math.rad(-10)), 0.2)
  743. rleg.Weld.C0 = clerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(50), math.rad(10)), 0.2)
  744. handleweld.C0=clerp(handleweld.C0,cf(0,0,-1)*angles(math.rad(-50),math.rad(0),math.rad(0)),.2)
  745. end
  746. bounce = false
  747. attack = false
  748. con:disconnect()
  749. fx:disconnect()
  750. end
  751.  
  752. function WaveEffect2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  753. local prt=part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  754. prt.Anchored=true
  755. prt.CFrame=cframe
  756. msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://20329976",vt(0,0,0),vt(x1,y1,z1))
  757. game:GetService("Debris"):AddItem(prt,2)
  758. coroutine.resume(coroutine.create(function(Part,Mesh)
  759. for i=0,1,delay do
  760. swait()
  761. Part.CFrame=Part.CFrame
  762. Part.Transparency=i
  763. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  764. end
  765. Part.Parent=nil
  766. end),prt,msh)
  767. end
  768. --example: WaveEffect2(BrickColor.new(""),ExamplePart.CFrame,0,0,0,0,0,0,0.02)
  769.  
  770. function Kick()
  771. attack = true
  772. local bounce=false
  773. local hitsounds={"199149269","199149297","199149235","199149221"}
  774. local con=lleg.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(50,100),"Normal",RootPart,.2,1) end)
  775. local fx=lleg.Touched:connect(function(part)
  776. local human=part.Parent:findFirstChild("Humanoid")
  777. if human~=nil and bounce==false then
  778. local rndm=math.random(1,#hitsounds)
  779. local r=rndm
  780. so("http://www.roblox.com/asset/?id="..hitsounds[r],Hitbox,1,.3)
  781. bounce=true
  782. end
  783. end)
  784. for i = 0,1,0.05 do
  785. swait()
  786. torso.Weld.C0 = clerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  787. hed.Weld.C0 = clerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(-20), math.rad(0), math.rad(0)), 0.2)
  788. rarm.Weld.C0 = clerp(rarm.Weld.C0, CFrame.new(3, 1, -0.5)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(30)), 0.2)
  789. larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-20)), 0.2)
  790. lleg.Weld.C0 = clerp(lleg.Weld.C0, CFrame.new(-.5, -1, 0) * CFrame.Angles(math.rad(-50), math.rad(0), math.rad(0)), 0.2)
  791. rleg.Weld.C0 = clerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.2)
  792. handleweld.C0=clerp(handleweld.C0,cf(0,0,.8)*angles(math.rad(80),math.rad(0),math.rad(0)),.2)
  793. end
  794. so("http://roblox.com/asset/?id=200632136",lleg,1,.8)
  795. WaveEffect2(BrickColor.new("Navy blue"),lleg.CFrame*CFrame.fromEulerAnglesXYZ(1,-5,1)*CFrame.new(0,0,0),.5,.5,.5,.5,.5,.5,0.05)
  796. for i = 0,1,0.05 do
  797. swait()
  798. torso.Weld.C0 = clerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  799. hed.Weld.C0 = clerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(-10), math.rad(0), math.rad(0)), 0.2)
  800. rarm.Weld.C0 = clerp(rarm.Weld.C0, CFrame.new(3, 1, -0.5)*CFrame.Angles(math.rad(70),math.rad(0),math.rad(30)), 0.2)
  801. larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-20)), 0.2)
  802. lleg.Weld.C0 = clerp(lleg.Weld.C0, CFrame.new(-.5, -1, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), 0.2)
  803. rleg.Weld.C0 = clerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(-10), math.rad(0)), 0.2)
  804. handleweld.C0=clerp(handleweld.C0,cf(0,0,.8)*angles(math.rad(80),math.rad(0),math.rad(0)),.2)
  805. end
  806. bounce = false
  807. attack = false
  808. con:disconnect()
  809. fx:disconnect()
  810. end
  811.  
  812. mouse.Button1Down:connect(function()
  813. if attack==false then
  814. if attacktype==1 then
  815. attacktype = 2
  816. attackone()
  817. elseif attacktype==2 then
  818. attacktype = 3
  819. attacktwo()
  820. elseif attacktype==3 then
  821. attacktype = 1
  822. attackthree()
  823. end
  824. end
  825. end)
  826.  
  827. mouse.KeyDown:connect(function(k)
  828. k=k:lower()
  829. if k=='q' then
  830. if attack==false then
  831. Kick()
  832. end
  833. end
  834. end)
  835.  
  836. bc=char['Body Colors']
  837. coloras=BrickColor.new('Nougat')
  838. bc.LeftLegColor,bc.LeftArmColor,bc.TorsoColor,bc.HeadColor,bc.RightArmColor,bc.RightLegColor=coloras,coloras,coloras,coloras,coloras,coloras
  839.  
  840. pcall(function()
  841. Character.Shirt:remove()
  842. Character.Pants:remove()
  843. Character.Sound:remove()
  844. char.Humanoid.MaxHealth = 10000
  845. char.Humanoid.Health = 10000
  846. end)
  847.  
  848. game:service'InsertService':LoadAsset(187399913):children()[1].Parent = Character
  849. game:service'InsertService':LoadAsset(270582149):children()[1].Parent = Character
  850.  
  851. local prevState = "None"
  852. local fallSpeed = 0
  853.  
  854. local sRunning = Instance.new("Sound",torso) sRunning.SoundId = "http://roblox.com/asset/?id=135062807"
  855. local sLanding = Instance.new("Sound",torso) sLanding.SoundId = "http://roblox.com/asset/?id=180683823"
  856.  
  857. function onRunning(speed)
  858. if (prevState == "FreeFall" and fallSpeed > 0.1) then
  859. local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
  860. sLanding.Volume = vol
  861. sLanding:Play()
  862. fallSpeed = 0
  863. end
  864. if speed>0.5 then
  865. sRunning:Play()
  866. sRunning.Looped = true
  867. sRunning.Pitch = 0.9
  868. else
  869. sRunning:Stop()
  870. end
  871. prevState = "Run"
  872. end
  873.  
  874. Character.Humanoid.Running:connect(onRunning)
  875.  
  876. local sine = 0
  877. local change = 1
  878. local val = 0
  879.  
  880. while true do
  881. swait()
  882. sine = sine + change
  883. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  884. local velderp=RootPart.Velocity.y
  885. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,10,0))).lookVector,10,char)
  886. if equipped==true or equipped==false then
  887. if RootPart.Velocity.y > 1 and hitfloor==nil then
  888. Anim="Jump"
  889. if attack==false then
  890. torso.Weld.C0 = clerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  891. hed.Weld.C0 = clerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(-10), math.rad(0), math.rad(0)), 0.2)
  892. rarm.Weld.C0 = clerp(rarm.Weld.C0, CFrame.new(3, 1, -0.5)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(30)), 0.2)
  893. larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-30)), 0.2)
  894. lleg.Weld.C0 = clerp(lleg.Weld.C0, CFrame.new(-.5, -.5, -.5) * CFrame.Angles(math.rad(-20), math.rad(0), math.rad(0)), 0.2)
  895. rleg.Weld.C0 = clerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(-10), math.rad(0), math.rad(0)), 0.2)
  896. handleweld.C0=clerp(handleweld.C0,cf(0,0,.8)*angles(math.rad(80),math.rad(0),math.rad(0)),.2)
  897. end
  898. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  899. Anim="Fall"
  900. if attack==false then
  901. torso.Weld.C0 = clerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  902. hed.Weld.C0 = clerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(-20), math.rad(0), math.rad(0)), 0.2)
  903. rarm.Weld.C0 = clerp(rarm.Weld.C0, CFrame.new(3, 1, -0.5)*CFrame.Angles(math.rad(120),math.rad(0),math.rad(20)), 0.2)
  904. larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-50)), 0.2)
  905. lleg.Weld.C0 = clerp(lleg.Weld.C0, CFrame.new(-.5, -1, 0) * CFrame.Angles(math.rad(30), math.rad(0), math.rad(0)), 0.2)
  906. rleg.Weld.C0 = clerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(-20), math.rad(0), math.rad(0)), 0.2)
  907. end
  908. elseif torvel<1 and hitfloor~=nil then
  909. Anim="Idle"
  910. if attack==false then
  911. torso.Weld.C0 = clerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.2)
  912. hed.Weld.C0 = clerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(0), math.rad(50), math.rad(0)), 0.2)
  913. rarm.Weld.C0 = clerp(rarm.Weld.C0, CFrame.new(3, 1, -0.5)*CFrame.Angles(math.rad(70),math.rad(0),math.rad(30)), 0.2)
  914. larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-20)), 0.2)
  915. lleg.Weld.C0 = clerp(lleg.Weld.C0, CFrame.new(-.5, -1, -.5) * CFrame.Angles(math.rad(0), math.rad(30), math.rad(-5)), 0.2)
  916. rleg.Weld.C0 = clerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.2)
  917. handleweld.C0=clerp(handleweld.C0,cf(0,0,.8)*angles(math.rad(80),math.rad(0),math.rad(0)),.2)
  918. end
  919. elseif torvel>2 and hitfloor~=nil then
  920. Anim="Walk"
  921. if attack==false then
  922. torso.Weld.C0 = clerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(-20), math.rad(0), math.rad(0)), 0.2)
  923. hed.Weld.C0 = clerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(10), math.rad(0), math.rad(0)), 0.2)
  924. rarm.Weld.C0 = clerp(rarm.Weld.C0, CFrame.new(3, 1, -0.5)*CFrame.Angles(math.rad(70),math.rad(0),math.rad(30)), 0.2)
  925. larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(-30*math.cos(sine/8)),math.rad(0),math.rad(-20)), 0.2)
  926. lleg.Weld.C0 = clerp(lleg.Weld.C0, CFrame.new(-.5, -1, 0) * CFrame.Angles(math.rad(50*math.cos(sine/6)), math.rad(0), math.rad(0)), 0.2)
  927. rleg.Weld.C0 = clerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(-50*math.cos(sine/6)), math.rad(0), math.rad(0)), 0.2)
  928. handleweld.C0=clerp(handleweld.C0,cf(0,0,.8)*angles(math.rad(80),math.rad(0),math.rad(0)),.2)
  929. end
  930. end
  931. end
  932. if #Effects>0 then
  933. --table.insert(Effects,{prt,"Block1",delay})
  934. for e=1,#Effects do
  935. if Effects[e]~=nil then
  936. --for j=1,#Effects[e] do
  937. local Thing=Effects[e]
  938. if Thing~=nil then
  939. local Part=Thing[1]
  940. local Mode=Thing[2]
  941. local Delay=Thing[3]
  942. local IncX=Thing[4]
  943. local IncY=Thing[5]
  944. local IncZ=Thing[6]
  945. if Thing[2]=="DecreaseStat" then
  946. Thing[5]=Thing[5]-1
  947. if Thing[5]<=0 then
  948. if Thing[1]:findFirstChild("Stats")~=nil then
  949. Thing[1].Stats[Thing[3]].Value=Thing[1].Stats[Thing[3]].Value+Thing[4]
  950. end
  951. table.remove(Effects,e)
  952. end
  953. end
  954. if Thing[2]=="Shoot" then
  955. local Look=Thing[1]
  956. local hit,pos = rayCast(Thing[4],Look,20,m)
  957. local mag=(Thing[4]-pos).magnitude
  958. MagicHead(BrickColor.new("Really red"),CFrame.new((Thing[4]+pos)/2,pos)*angles(1.57,0,0),1,mag*5,1,.5,0,.5,0.1)
  959. Thing[4]=Thing[4]+(Look*20)
  960. Thing[3]=Thing[3]-1
  961. if hit~=nil then
  962. Thing[3]=0
  963. if Thing[8]==1 then
  964. Damagefunc(hit,Thing[5],Thing[6],Thing[7],"Normal",RootPart,0,2,math.random(1,5),nil,nil,true)
  965. elseif Thing[8]==2 then
  966. Damagefunc(hit,Thing[5],Thing[6],Thing[7],"NormalDecreaseMvmt1",RootPart,0,2,math.random(1,5),nil,nil,true)
  967. end
  968. ref=part(3,workspace,0,1,BrickColor.new("Really red"),"Reference",vt())
  969. ref.Anchored=true
  970. ref.CFrame=cf(pos)
  971. MagicCircle(BrickColor.new("Really red"),cf(pos),5,5,5,1,1,1,0.03)
  972. game:GetService("Debris"):AddItem(ref,1)
  973. end
  974. if Thing[3]<=0 then
  975. table.remove(Effects,e)
  976. end
  977. end
  978. if Thing[2]=="CylinderClang" then
  979. if Thing[3]<=1 then
  980. Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
  981. Thing[7]=Thing[1].CFrame
  982. effect("New Yeller",0,Thing[8],Thing[7])
  983. Thing[8]=Thing[7]
  984. Thing[3]=Thing[3]+Thing[4]
  985. else
  986. Part.Parent=nil
  987. table.remove(Effects,e)
  988. end
  989. --[[Mesh=Thing[7]
  990. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  991. Thing[1].Transparency=Thing[1].Transparency+Thing[3]]
  992. end
  993. if Thing[2]~="Shoot" and Thing[2]~="DecreaseStat" then
  994. if Thing[1].Transparency<=1 then
  995. if Thing[2]=="Block1" then
  996. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  997. Mesh=Thing[7]
  998. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  999. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1000. elseif Thing[2]=="Block2" then
  1001. Thing[1].CFrame=Thing[1].CFrame
  1002. Mesh=Thing[7]
  1003. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1004. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1005. elseif Thing[2]=="Cylinder" then
  1006. Mesh=Thing[7]
  1007. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1008. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1009. elseif Thing[2]=="Blood" then
  1010. Mesh=Thing[7]
  1011. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  1012. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1013. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1014. elseif Thing[2]=="Elec" then
  1015. Mesh=Thing[7]
  1016. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  1017. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1018. elseif Thing[2]=="Disappear" then
  1019. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1020. end
  1021. else
  1022. Part.Parent=nil
  1023. table.remove(Effects,e)
  1024. end
  1025. end
  1026. end
  1027. end
  1028. end
  1029. end
  1030. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement