Advertisement
zed_isJayTheLionJR

black Panther claw

Mar 4th, 2018
680
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.81 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Tool0 = Instance.new("Tool")
  19. Script1 = Instance.new("Script")
  20. Part2 = Instance.new("Part")
  21. SpecialMesh3 = Instance.new("SpecialMesh")
  22. Sound4 = Instance.new("Sound")
  23. Sound5 = Instance.new("Sound")
  24. Sound6 = Instance.new("Sound")
  25. Fire7 = Instance.new("Fire")
  26. LocalScript8 = Instance.new("LocalScript")
  27. Tool0.Name = "Joel's Flaming Super Death Sword"
  28. Tool0.Parent = mas
  29. Tool0.TextureId = "http://www.roblox.com/asset/?id=11444089"
  30. Tool0.GripForward = Vector3.new(-1, -0, -0)
  31. Tool0.GripPos = Vector3.new(0, 0, -1.70000005)
  32. Tool0.GripRight = Vector3.new(0, 1, 0)
  33. Tool0.GripUp = Vector3.new(0, 0, 1)
  34. Tool0.ToolTip = "Joel? Have you been downloading viruses again?"
  35. Script1.Name = "SwordScript"
  36. Script1.Parent = Tool0
  37. table.insert(cors,sandbox(Script1,function()
  38. --Stickmasterluke
  39.  
  40.  
  41. sp=script.Parent
  42.  
  43.  
  44. r=game:service("RunService")
  45. debris=game:GetService("Debris")
  46.  
  47. basedamage=0
  48. fulldamage=15
  49. lastattack=0
  50.  
  51.  
  52. function waitfor(parent,name)
  53. while true do
  54. local child=parent:FindFirstChild(name)
  55. if child~=nil then
  56. return child
  57. end
  58. wait()
  59. end
  60. end
  61.  
  62. UnsheathSound=waitfor(sp.Handle,"GrowlSound1")
  63. waitfor(sp,"RunAnim")
  64.  
  65. function blow(hit,claw)
  66. if hit.Parent~=nil and claw~=nil then
  67. local humanoid=hit.Parent:findFirstChild("Humanoid")
  68. local vCharacter=sp.Parent
  69. if vCharacter~=nil and humanoid then
  70. local vPlayer=game.Players:playerFromCharacter(vCharacter)
  71. if vPlayer~=nil then
  72. local hum=vCharacter:findFirstChild("Humanoid")
  73. if hum~=nil and humanoid~=hum and hum.Health>0 then
  74. local right_arm=vCharacter:FindFirstChild("Right Arm")
  75. if right_arm~=nil then
  76. local joint=right_arm:FindFirstChild("RightGrip")
  77. if joint~=nil and (joint.Part0==sp.Handle or joint.Part1==sp.Handle) then
  78. tagHumanoid(humanoid,vPlayer)
  79. if tick()-lastattack<=1 then
  80. humanoid:TakeDamage(fulldamage)
  81. else
  82. humanoid:TakeDamage(basedamage)
  83. end
  84. end
  85. end
  86. end
  87. end
  88. end
  89. end
  90. end
  91.  
  92.  
  93. function tagHumanoid(humanoid,player)
  94. for i,v in ipairs(humanoid:GetChildren()) do
  95. if v.Name=="creator" then
  96. v:remove()
  97. end
  98. end
  99. local creator_tag=Instance.new("ObjectValue")
  100. creator_tag.Value=player
  101. creator_tag.Name="creator"
  102. creator_tag.Parent=humanoid
  103. debris:AddItem(creator_tag,1)
  104. end
  105.  
  106. sp.Enabled=true
  107. function onActivated()
  108. local h=sp.Parent:FindFirstChild("Humanoid")
  109. if h~=nil and h.Health>0 and sp.Enabled then
  110. sp.Enabled=false
  111. sp.RunAnim.Value=not sp.RunAnim.Value
  112. lastattack=tick()
  113. local sound=sp.Handle:FindFirstChild("GrowlSound"..tostring(math.random(1,2)))
  114. if sound then
  115. sound.Pitch=.75+(math.random()*.5)
  116. sound:Play()
  117. end
  118. h.WalkSpeed=30
  119. wait(.75)
  120. if h~=nil then
  121. h.WalkSpeed=18
  122. end
  123. wait(.25)
  124. if h~=nil then
  125. h.WalkSpeed=16
  126. end
  127. sp.Enabled=true
  128. end
  129. end
  130.  
  131. function onEquipped()
  132. UnsheathSound:play()
  133. delay(0,function()
  134. if lefthand~=nil then
  135. lefthand:remove()
  136. lefthand=nil
  137. end
  138. for i,v in ipairs(sp:GetChildren()) do
  139. if v~=nil and v.Name=="Effect" and v~=leftarm then
  140. v:remove()
  141. end
  142. end
  143. local leftarm=sp.Parent:FindFirstChild("Left Arm")
  144. if leftarm~=nil then
  145. lefthand=sp.Handle:clone()
  146. local mesh=lefthand:FindFirstChild("Mesh")
  147. for i,v in ipairs(lefthand:GetChildren()) do
  148. if v.className~="SpecialMesh" then
  149. v:remove()
  150. end
  151. end
  152. lefthand.Name="Effect"
  153. lefthand.CanCollide=false
  154. local w=Instance.new("Weld")
  155. w.Part0=leftarm
  156. w.Part1=lefthand
  157. w.C0=CFrame.new(-.2,-1.4,0)*CFrame.Angles(-math.pi/2,0,math.pi/2)
  158. w.Parent=lefthand
  159. lefthand.Touched:connect(function(hit)
  160. blow(hit,lefthand)
  161. end)
  162. lefthand.Parent=sp
  163. end
  164. end)
  165. end
  166.  
  167. function onUnequipped()
  168. delay(0,function()
  169. if lefthand~=nil then
  170. lefthand:remove()
  171. lefthand=nil
  172. end
  173. end)
  174. end
  175.  
  176. sp.Activated:connect(onActivated)
  177. sp.Equipped:connect(onEquipped)
  178. sp.Unequipped:connect(onUnequipped)
  179.  
  180. connection=sp.Handle.Touched:connect(function(hit)
  181. blow(hit,sp.Handle)
  182. end)
  183. --Made by Stickmasterluke
  184.  
  185.  
  186. local sp=script.Parent
  187.  
  188.  
  189. swingspeed=1
  190.  
  191. debris=game:GetService("Debris")
  192. enabled=true
  193.  
  194. function waitfor(parent,name)
  195. while true do
  196. local child=parent:FindFirstChild(name)
  197. if child~=nil then
  198. return child
  199. end
  200. wait()
  201. end
  202. end
  203.  
  204. waitfor(sp,"Handle")
  205.  
  206. function onButton1Down(mouse)
  207. if not enabled then
  208. return
  209. end
  210. enabled=false
  211. mouse.Icon="rbxasset://textures\\GunWaitCursor.png"
  212. wait(.75)
  213. mouse.Icon="rbxasset://textures\\GunCursor.png"
  214. enabled=true
  215. end
  216.  
  217. sp.Equipped:connect(function(mouse)
  218. equipped=true
  219. local currentlast=lastequipped
  220. if mouse==nil then
  221. print("Mouse not found")
  222. return
  223. end
  224. mouse.Icon="rbxasset://textures\\GunCursor.png"
  225. mouse.Button1Down:connect(function()
  226. onButton1Down(mouse)
  227. end)
  228. mouse.KeyDown:connect(function(key)
  229. key=string.lower(key)
  230. if key=="l" or key=="t" or key=="g" then
  231. local h=sp.Parent:FindFirstChild("Humanoid")
  232. if h~=nil then
  233.  
  234. end
  235. end
  236. end)
  237. end)
  238.  
  239. sp.Unequipped:connect(function()
  240. equipped=false
  241. end)
  242.  
  243.  
  244. function lunge()
  245. local t=sp.Parent:FindFirstChild("Torso")
  246. local h=sp.Parent:FindFirstChild("Humanoid")
  247. if t and h and equipped then
  248. local target=h.TargetPoint
  249. local direction=(target-t.Position)*Vector3.new(1,0,1)
  250. if direction.magnitude>.01 then
  251. direction=direction.unit
  252. local newBV=Instance.new("BodyVelocity")
  253. newBV.P=10^5
  254. newBV.maxForce=Vector3.new(newBV.P,0,newBV.P)
  255. newBV.velocity=direction*30
  256. debris:AddItem(newBV,1)
  257. newBV.Parent=t
  258. t.CFrame=CFrame.new(t.Position,target*Vector3.new(1,0,1)+Vector3.new(0,t.Position.Y,0))
  259. local sound=sp.Handle:FindFirstChild("FlashSound")
  260. if sound then
  261. sound:Play()
  262. end
  263. wait(.15)
  264. if newBV~=nil then
  265. newBV:remove()
  266. end
  267. end
  268. end
  269. end
  270.  
  271. waitfor(sp,"RunAnim")
  272. sp.RunAnim.Changed:connect(function()
  273. local h=sp.Parent:FindFirstChild("Humanoid")
  274. local t=sp.Parent:FindFirstChild("Torso")
  275. local anim=sp:FindFirstChild("ClawAttack")
  276. if anim and t and h then
  277. theanim=h:LoadAnimation(anim)
  278. if theanim and h.Health>0 then
  279. theanim:Play(nil,nil,1/swingspeed)
  280. --lunge()
  281. end
  282. end
  283. end)
  284.  
  285. function tagHumanoid(humanoid,player)
  286. for i,v in ipairs(humanoid:GetChildren()) do
  287. if v.Name=="creator" then
  288. v:remove()
  289. end
  290. end
  291. local creator_tag=Instance.new("ObjectValue")
  292. creator_tag.Value=player
  293. creator_tag.Name="creator"
  294. creator_tag.Parent=humanoid
  295. debris:AddItem(creator_tag,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement