bubnake

Weapon template *Large Player*

Aug 30th, 2016
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.27 KB | None | 0 0
  1. local p = game.Players.localPlayer
  2. local char = p.Character
  3. local mouse = p:GetMouse()
  4. local larm = char["Left Arm"]
  5. local rarm = char["Right Arm"]
  6. local lleg = char["Left Leg"]
  7. local rleg = char["Right Leg"]
  8. local hed = char.Head
  9. local torso = char.Torso
  10. local cam = game.Workspace.CurrentCamera
  11. local root = char.HumanoidRootPart
  12. local deb = false
  13. local shot = 0
  14. local l = game.Lighting
  15. local stanceToggle = "Assertive"
  16. local CanAttack = true
  17. local Daytime = true
  18. local animpose = "Idle"
  19. local lastanimpose = "Idle"
  20. local nosword=false
  21. RootPart=char.HumanoidRootPart
  22. local Effects={}
  23. local attack=false
  24. idle=0
  25. Anim='Idle'
  26. equipped=true
  27. char.Humanoid.WalkSpeed=10
  28. colorscheme=BrickColor.new('Black')
  29. it=Instance.new
  30. attacktype=1
  31. vt=Vector3.new
  32. cf=CFrame.new
  33. euler=CFrame.fromEulerAnglesXYZ
  34. angles=CFrame.Angles
  35. m=Instance.new('Model',char)
  36. cam = workspace.CurrentCamera
  37. ZTarget = nil
  38. RocketTarget = nil
  39.  
  40. it=Instance.new
  41. vt=Vector3.new
  42. cf=CFrame.new
  43. euler=CFrame.fromEulerAnglesXYZ
  44. angles=CFrame.Angles
  45.  
  46.  
  47. function swait(num)
  48. if num==0 or num==nil then
  49. game:service'RunService'.Heartbeat:wait(0)
  50. else
  51. for i=0,num do
  52. game:service'RunService'.Heartbeat:wait(0)
  53. end
  54. end
  55. end
  56.  
  57. function Lerp(c1,c2,al)
  58. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  59. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  60. for i,v in pairs(com1) do
  61. com1[i] = v+(com2[i]-v)*al
  62. end
  63. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  64. end
  65. -----------
  66. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  67. wld = Instance.new("Weld", wp1)
  68. wld.Part0 = wp0
  69. wld.Part1 = wp1
  70. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  71. return wld
  72. end
  73.  
  74. newWeld(torso, larm, -1.5, 0.5, 0)
  75. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  76. newWeld(torso, rarm, 1.5, 0.5, 0)
  77. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  78. newWeld(torso, hed, 0, 1.5, 0)
  79. newWeld(torso, lleg, -0.5, -1, 0)
  80. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  81. newWeld(torso, rleg, 0.5, -1, 0)
  82. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  83. newWeld(root, torso, 0, -1, 0)
  84. torso.Weld.C1 = CFrame.new(0, -1, 0)
  85.  
  86. Player=game:GetService('Players').LocalPlayer
  87. Character=Player.Character
  88. Mouse=Player:GetMouse()
  89. m=Instance.new('Model',Character)
  90.  
  91. local function weldBetween(a, b)
  92. local weldd = Instance.new("ManualWeld")
  93. weldd.Part0 = a
  94. weldd.Part1 = b
  95. weldd.C0 = CFrame.new()
  96. weldd.C1 = b.CFrame:inverse() * a.CFrame
  97. weldd.Parent = a
  98. return weldd
  99. end
  100.  
  101. it=Instance.new
  102.  
  103. function nooutline(part)
  104. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  105. end
  106.  
  107. function paart(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  108. local fp=it("Part")
  109. fp.formFactor=formfactor
  110. fp.Parent=parent
  111. fp.Reflectance=reflectance
  112. fp.Transparency=transparency
  113. fp.CanCollide=false
  114. fp.Locked=true
  115. fp.BrickColor=brickcolor
  116. fp.Name=name
  117. fp.Size=size
  118. fp.Position=torso.Position
  119. nooutline(fp)
  120. fp.Material="SmoothPlastic"
  121. fp:BreakJoints()
  122. return fp
  123. end
  124.  
  125.  
  126. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  127. local fp=it("Part")
  128. fp.formFactor=formfactor
  129. fp.Parent=parent
  130. fp.Reflectance=reflectance
  131. fp.Transparency=transparency
  132. fp.CanCollide=false
  133. fp.Locked=true
  134. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  135. fp.Name=name
  136. fp.Size=size
  137. fp.Position=Character.Torso.Position
  138. nooutline(fp)
  139. fp.Material=material
  140. fp:BreakJoints()
  141. return fp
  142. end
  143.  
  144. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  145. local mesh=it(Mesh)
  146. mesh.Parent=part
  147. if Mesh=="SpecialMesh" then
  148. mesh.MeshType=meshtype
  149. mesh.MeshId=meshid
  150. end
  151. mesh.Offset=offset
  152. mesh.Scale=scale
  153. return mesh
  154. end
  155.  
  156. function weld(parent,part0,part1,c0,c1)
  157. local weld=it("Weld")
  158. weld.Parent=parent
  159. weld.Part0=part0
  160. weld.Part1=part1
  161. weld.C0=c0
  162. weld.C1=c1
  163. return weld
  164. end
  165.  
  166. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  167. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  168. end
  169.  
  170. so = function(id,par,vol,pit)
  171. coroutine.resume(coroutine.create(function()
  172. local sou = Instance.new("Sound",par or workspace)
  173. sou.Volume=vol
  174. sou.Pitch=pit or 1
  175. sou.SoundId=id
  176. swait()
  177. sou:play()
  178. game:GetService("Debris"):AddItem(sou,6)
  179. end))
  180. end
  181.  
  182. Face=hed.face
  183.  
  184. function Cloak()
  185. --so("http://roblox.com/asset/?id=2767090",Torso,1,1.1)
  186. Face.Parent=nil
  187. cloaked=true
  188. for _,v in pairs(torso.Parent:children()) do
  189. if v.className=="Part" and v.Name~="HumanoidRootPart" then
  190. coroutine.resume(coroutine.create(function()
  191. for i=0,1,0.2 do
  192. wait()
  193. v.Transparency=i
  194. end
  195. v.Transparency=1
  196. end))
  197. end
  198. if v.className=="Hat" then
  199. hatp=v.Handle
  200. coroutine.resume(coroutine.create(function(derp)
  201. for i=0,1,0.2 do
  202. wait()
  203. derp.Transparency=i
  204. end
  205. derp.Transparency=1
  206. end),hatp)
  207. end
  208. end
  209. for _,v in pairs(m:children()) do
  210. if v.className=="Part" then
  211. coroutine.resume(coroutine.create(function()
  212. for i=0,1,0.2 do
  213. wait()
  214. v.Transparency=i
  215. end
  216. v.Transparency=1
  217. end))
  218. end
  219. end
  220. end
  221. magix=true
  222. function UnCloak()
  223. --so("http://roblox.com/asset/?id=2767090",Torso,1,1.1)
  224. Face.Parent=hed
  225. cloaked=false
  226. for _,v in pairs(torso.Parent:children()) do
  227. if v.className=="Part" and v.Name~="HumanoidRootPart" then
  228. coroutine.resume(coroutine.create(function()
  229. for i=0,1,0.1 do
  230. wait()
  231. v.Transparency=v.Transparency-0.1
  232. end
  233. v.Transparency=0
  234. end))
  235. end
  236. --[[if v.className~="Hat" then
  237. hatp=v.Handle
  238. coroutine.resume(coroutine.create(function(derp)
  239. for i=0,1,0.1 do
  240. wait()
  241. derp.Transparency=derp.Transparency-0.1
  242. end
  243. derp.Transparency=0
  244. end),hatp)
  245. end]]
  246. end
  247. if magix==false then
  248. for _,v in pairs(m:children()) do
  249. if v.className=="Part" and v.Name~="hitbox" and v.Name~='tip' and v.Name~='hat' then
  250. coroutine.resume(coroutine.create(function()
  251. for i=0,1,0.1 do
  252. wait()
  253. v.Transparency=v.Transparency-0.1
  254. end
  255. v.Transparency=0
  256. end))
  257. v.Transparency=0
  258. end
  259. end
  260. else
  261. for _,v in pairs(m:children()) do
  262. if v.className=="Part" and v.ClassName~='Weld' and v.Name~="hitbox" and v.Name~='tip' and v.Name~='hat'then
  263. coroutine.resume(coroutine.create(function()
  264. for i=0,1,0.1 do
  265. wait()
  266. v.Transparency=v.Transparency-0.1
  267. end
  268. v.Transparency=0
  269. end))
  270. v.Transparency=0
  271. end
  272. end
  273. end
  274. end
  275.  
  276. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  277. if hit.Parent==nil then
  278. return
  279. end
  280. h=hit.Parent:FindFirstChild("Humanoid")
  281. for _,v in pairs(hit.Parent:children()) do
  282. if v:IsA("Humanoid") then
  283. h=v
  284. end
  285. end
  286. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  287. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  288. end
  289. if hit.Parent.className=="Hat" then
  290. hit=hit.Parent.Parent:findFirstChild("Head")
  291. end
  292. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  293. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  294. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  295. return
  296. end]]
  297. -- hs(hit,1.2)
  298. c=Instance.new("ObjectValue")
  299. c.Name="creator"
  300. c.Value=game:service("Players").LocalPlayer
  301. c.Parent=h
  302. game:GetService("Debris"):AddItem(c,.5)
  303. local Damage=math.random(minim,maxim)
  304. -- h:TakeDamage(Damage)
  305. local blocked=false
  306. local block=hit.Parent:findFirstChild("Block")
  307. if block~=nil then
  308. print(block.className)
  309. if block.className=="NumberValue" then
  310. if block.Value>0 then
  311. blocked=true
  312. if decreaseblock==nil then
  313. block.Value=block.Value-1
  314. end
  315. end
  316. end
  317. if block.className=="IntValue" then
  318. if block.Value>0 then
  319. blocked=true
  320. if decreaseblock~=nil then
  321. block.Value=block.Value-1
  322. end
  323. end
  324. end
  325. end
  326. if blocked==false then
  327. -- h:TakeDamage(Damage)
  328. h.Health=h.Health-Damage
  329. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, Hitbox.BrickColor.Color)
  330. else
  331. h.Health=h.Health-(Damage/2)
  332. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Bright blue").Color)
  333. end
  334. if Type=="Knockdown" then
  335. local hum=hit.Parent.Humanoid
  336. hum.PlatformStand=true
  337. coroutine.resume(coroutine.create(function(HHumanoid)
  338. swait(1)
  339. HHumanoid.PlatformStand=false
  340. end),hum)
  341. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  342. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  343. local bodvol=Instance.new("BodyVelocity")
  344. bodvol.velocity=angle*knockback
  345. bodvol.P=5000
  346. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  347. bodvol.Parent=hit
  348. rl=Instance.new("BodyAngularVelocity")
  349. rl.P=3000
  350. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  351. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  352. rl.Parent=hit
  353. game:GetService("Debris"):AddItem(bodvol,.5)
  354. game:GetService("Debris"):AddItem(rl,.5)
  355. elseif Type=="Normal" then
  356. vp=Instance.new("BodyVelocity")
  357. vp.P=500
  358. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  359. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  360. if KnockbackType==1 then
  361. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  362. elseif KnockbackType==2 then
  363. vp.velocity=Property.CFrame.lookVector*knockback
  364. end
  365. if knockback>0 then
  366. vp.Parent=hit.Parent.Torso
  367. end
  368. game:GetService("Debris"):AddItem(vp,.5)
  369. elseif Type=="Up" then
  370. local bodyVelocity=Instance.new("BodyVelocity")
  371. bodyVelocity.velocity=vt(0,60,0)
  372. bodyVelocity.P=5000
  373. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  374. bodyVelocity.Parent=hit
  375. game:GetService("Debris"):AddItem(bodyVelocity,1)
  376. rl=Instance.new("BodyAngularVelocity")
  377. rl.P=3000
  378. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  379. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  380. rl.Parent=hit
  381. game:GetService("Debris"):AddItem(rl,.5)
  382. elseif Type=="Snare" then
  383. bp=Instance.new("BodyPosition")
  384. bp.P=2000
  385. bp.D=100
  386. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  387. bp.position=hit.Parent.Torso.Position
  388. bp.Parent=hit.Parent.Torso
  389. game:GetService("Debris"):AddItem(bp,1)
  390. elseif Type=="Target" then
  391. local Targetting = false
  392. if Targetting==false then
  393. ZTarget=hit.Parent.Torso
  394. coroutine.resume(coroutine.create(function(Part)
  395. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  396. swait(5)
  397. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  398. end),ZTarget)
  399. local TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  400. local targetgui=Instance.new("BillboardGui")
  401. targetgui.Parent=ZTarget
  402. targetgui.Size=UDim2.new(10,100,10,100)
  403. local targ=Instance.new("ImageLabel")
  404. targ.Parent=targetgui
  405. targ.BackgroundTransparency=1
  406. targ.Image="rbxassetid://4834067"
  407. targ.Size=UDim2.new(1,0,1,0)
  408. cam.CameraType="Scriptable"
  409. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  410. local dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  411. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  412. Targetting=true
  413. RocketTarget=ZTarget
  414. for i=1,Property do
  415. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  416. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  417. swait()
  418. end
  419. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  420. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  421. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  422. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  423. end
  424. Targetting=false
  425. RocketTarget=nil
  426. targetgui.Parent=nil
  427. cam.CameraType="Custom"
  428. end
  429. end
  430. local debounce=Instance.new("BoolValue")
  431. debounce.Name="DebounceHit"
  432. debounce.Parent=hit.Parent
  433. debounce.Value=true
  434. game:GetService("Debris"):AddItem(debounce,Delay)
  435. c=Instance.new("ObjectValue")
  436. c.Name="creator"
  437. c.Value=Player
  438. c.Parent=h
  439. game:GetService("Debris"):AddItem(c,.5)
  440. end
  441. end
  442.  
  443.  
  444. function ShowDamage(Pos, Text, Time, Color)
  445. local Rate = (1 / 30)
  446. local Pos = (Pos or Vector3.new(0, 0, 0))
  447. local Text = (Text or "")
  448. local Time = (Time or 2)
  449. local Color = (Color or Color3.new(1, 0, 0))
  450. local EffectPart = part("Custom",workspace,"SmoothPlastic",0,1,BrickColor.new(Color),"Effect",vt(0,0,0))
  451. EffectPart.Anchored = true
  452. local BillboardGui = Instance.new("BillboardGui")
  453. BillboardGui.Size = UDim2.new(3, 0, 3, 0)
  454. BillboardGui.Adornee = EffectPart
  455. local TextLabel = Instance.new("TextLabel")
  456. TextLabel.BackgroundTransparency = 1
  457. TextLabel.Size = UDim2.new(1, 0, 1, 0)
  458. TextLabel.Text = Text
  459. TextLabel.TextColor3 = Color
  460. TextLabel.TextScaled = true
  461. TextLabel.Font = Enum.Font.ArialBold
  462. TextLabel.Parent = BillboardGui
  463. BillboardGui.Parent = EffectPart
  464. game.Debris:AddItem(EffectPart, (Time + 0.1))
  465. EffectPart.Parent = game:GetService("Workspace")
  466. Delay(0, function()
  467. local Frames = (Time / Rate)
  468. for Frame = 1, Frames do
  469. wait(Rate)
  470. local Percent = (Frame / Frames)
  471. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  472. TextLabel.TextTransparency = Percent
  473. end
  474. if EffectPart and EffectPart.Parent then
  475. EffectPart:Destroy()
  476. end
  477. end)
  478. end
  479.  
  480. mouse.Button1Down:connect(function()
  481. if attack==false and attacktype == 1 then
  482. if attacktype==1 then
  483. attacktype = 1
  484.  
  485. end
  486. end
  487. end)
  488.  
  489. mouse.KeyDown:connect(function(k)
  490. if attack == false and k == '' then
  491.  
  492. end
  493. end)
  494.  
  495. --[[bodvel=it("BodyVelocity")
  496. bodvel.Parent=root
  497. bodvel.maxForce=vt(4e+005,4e+005,4e+005)*1
  498. bodvel.velocity=root.CFrame.lookVector*60
  499. --]]
  500. local sine = 0
  501. local change = 1
  502. local val = 0
  503.  
  504. larm.Size = larm.Size * 2
  505. rarm.Size = rarm.Size * 2
  506. lleg.Size = lleg.Size * 2
  507. rleg.Size = rleg.Size * 2
  508. torso.Size = torso.Size * 2
  509. hed.Size = hed.Size * 2
  510. root.Size = root.Size * 2
  511. ----------------------------------------------------
  512. newWeld(torso, larm, -3, 0.5, 0)
  513. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  514. newWeld(torso, rarm, 3, 0.5, 0)
  515. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  516. newWeld(torso, hed, 0, 1.5, 0)
  517. hed.Weld.C1 = CFrame.new(0, -1.5, 0)
  518. newWeld(torso, lleg, -0.5, -1, 0)
  519. lleg.Weld.C1 = CFrame.new(.5, 3, 0)
  520. newWeld(torso, rleg, 0.5, -1, 0)
  521. rleg.Weld.C1 = CFrame.new(-.5, 3, 0)
  522. newWeld(root, torso, 0, -1, 0)
  523. torso.Weld.C1 = CFrame.new(0, -1, 0)
  524.  
  525. while true do
  526. swait()
  527. sine = sine + change
  528. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  529. local velderp=RootPart.Velocity.y
  530. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,50,0))).lookVector,50,char)
  531. if equipped==true or equipped==false then
  532. if RootPart.Velocity.y > 1 and hitfloor==nil then
  533. Anim="Jump"
  534. if attack==false then
  535. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  536. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  537. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(3, 0.5, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  538. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  539. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  540. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  541. end
  542. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  543. Anim="Fall"
  544. if attack==false then
  545. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  546. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  547. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(3, 0.5, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  548. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  549. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  550. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  551. end
  552. elseif torvel<1 and hitfloor~=nil then
  553. Anim="Idle"
  554. if attack==false then
  555. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  556. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  557. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(3, 0.5, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  558. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  559. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  560. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  561. end
  562. elseif torvel>2 and hitfloor~=nil then
  563. Anim="Walk"
  564. if attack==false then
  565. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  566. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  567. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(3, 0.5, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  568. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-3, 0.5, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  569. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  570. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
  571. end
  572. end
  573. end
  574. if #Effects>0 then
  575. --table.insert(Effects,{prt,"Block1",delay})
  576. for e=1,#Effects do
  577. if Effects[e]~=nil then
  578. --for j=1,#Effects[e] do
  579. local Thing=Effects[e]
  580. if Thing~=nil then
  581. local Part=Thing[1]
  582. local Mode=Thing[2]
  583. local Delay=Thing[3]
  584. local IncX=Thing[4]
  585. local IncY=Thing[5]
  586. local IncZ=Thing[6]
  587. if Thing[2]=="DecreaseStat" then
  588. Thing[5]=Thing[5]-1
  589. if Thing[5]<=0 then
  590. if Thing[1]:findFirstChild("Stats")~=nil then
  591. Thing[1].Stats[Thing[3]].Value=Thing[1].Stats[Thing[3]].Value+Thing[4]
  592. end
  593. table.remove(Effects,e)
  594. end
  595. end
  596. if Thing[2]=="Shoot" then
  597. local Look=Thing[1]
  598. local hit,pos = rayCast(Thing[4],Look,20,m)
  599. local mag=(Thing[4]-pos).magnitude
  600. 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)
  601. Thing[4]=Thing[4]+(Look*20)
  602. Thing[3]=Thing[3]-1
  603. if hit~=nil then
  604. Thing[3]=0
  605. if Thing[8]==1 then
  606. Damagefunc(hit,Thing[5],Thing[6],Thing[7],"Normal",RootPart,0,2,math.random(1,5),nil,nil,true)
  607. elseif Thing[8]==2 then
  608. Damagefunc(hit,Thing[5],Thing[6],Thing[7],"NormalDecreaseMvmt1",RootPart,0,2,math.random(1,5),nil,nil,true)
  609. end
  610. ref=part(3,workspace,0,1,BrickColor.new("Really red"),"Reference",vt())
  611. ref.Anchored=true
  612. ref.CFrame=cf(pos)
  613. MagicCircle(BrickColor.new("Really red"),cf(pos),5,5,5,1,1,1,0.03)
  614. game:GetService("Debris"):AddItem(ref,1)
  615. end
  616. if Thing[3]<=0 then
  617. table.remove(Effects,e)
  618. end
  619. end
  620. if Thing[2]=="CylinderClang" then
  621. if Thing[3]<=1 then
  622. Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
  623. Thing[7]=Thing[1].CFrame
  624. effect("New Yeller",0,Thing[8],Thing[7])
  625. Thing[8]=Thing[7]
  626. Thing[3]=Thing[3]+Thing[4]
  627. else
  628. Part.Parent=nil
  629. table.remove(Effects,e)
  630. end
  631. --[[Mesh=Thing[7]
  632. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  633. Thing[1].Transparency=Thing[1].Transparency+Thing[3]]
  634. end
  635. if Thing[2]~="Shoot" and Thing[2]~="DecreaseStat" then
  636. if Thing[1].Transparency<=1 then
  637. if Thing[2]=="Block1" then
  638. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  639. Mesh=Thing[7]
  640. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  641. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  642. elseif Thing[2]=="Block2" then
  643. Thing[1].CFrame=Thing[1].CFrame
  644. Mesh=Thing[7]
  645. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  646. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  647. elseif Thing[2]=="Cylinder" then
  648. Mesh=Thing[7]
  649. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  650. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  651. elseif Thing[2]=="Blood" then
  652. Mesh=Thing[7]
  653. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  654. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  655. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  656. elseif Thing[2]=="Elec" then
  657. Mesh=Thing[7]
  658. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  659. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  660. elseif Thing[2]=="Disappear" then
  661. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  662. end
  663. else
  664. Part.Parent=nil
  665. table.remove(Effects,e)
  666. end
  667. end
  668. end
  669. end
  670. end
  671. end
  672. end
Add Comment
Please, Sign In to add comment