Advertisement
lafur

Untitled

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