Advertisement
Animescapetower

zombie spawning hammer

Apr 28th, 2018
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.48 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Script0 = Instance.new("Script")
  20. BodyVelocity1 = Instance.new("BodyVelocity")
  21. LocalScript2 = Instance.new("LocalScript")
  22. Part3 = Instance.new("Part")
  23. SpecialMesh4 = Instance.new("SpecialMesh")
  24. Sound5 = Instance.new("Sound")
  25. Sound6 = Instance.new("Sound")
  26. Tool7 = Instance.new("Tool")
  27. Part8 = Instance.new("Part")
  28. SpecialMesh9 = Instance.new("SpecialMesh")
  29. Sound10 = Instance.new("Sound")
  30. Sound11 = Instance.new("Sound")
  31. LocalScript12 = Instance.new("LocalScript")
  32. Script13 = Instance.new("Script")
  33. BodyVelocity14 = Instance.new("BodyVelocity")
  34. Script13.Name = "IceHammer"
  35. Script13.Parent = Tool7
  36. table.insert(cors,sandbox(Script13,function()
  37. -------- OMG HAX
  38. debris = game:GetService("Debris")
  39. r = game:service("RunService")
  40.  
  41.  
  42. local damage = 5
  43.  
  44.  
  45. local slash_damage = 5
  46.  
  47.  
  48. sword = script.Parent.Handle
  49. Tool = script.Parent
  50.  
  51.  
  52. local SlashSound = Instance.new("Sound")
  53. SlashSound.SoundId = "http://www.roblox.com/asset/?id=15933756"
  54. SlashSound.Parent = sword
  55. SlashSound.Volume = 1
  56.  
  57.  
  58. local UnsheathSound = Instance.new("Sound")
  59. UnsheathSound.SoundId = "http://www.roblox.com/asset/?id=15933756"
  60. UnsheathSound.Parent = sword
  61. UnsheathSound.Volume = 1
  62.  
  63. local blues = {"White", "Institutional white"}
  64.  
  65.  
  66. function isTurbo(character)
  67. return character:FindFirstChild("Ie4tehlm") ~= nil
  68. end
  69.  
  70. function allThatIce2(pos, isTurbo)
  71.  
  72. local count = 15
  73. if (isTurbo == true) then count = 10 end
  74.  
  75. for i=1,count do
  76. local p = Instance.new("Seat")
  77. p.BrickColor = BrickColor.new(blues[math.random(#blues)])
  78. p.formFactor = "Symmetric"
  79. p.Size = Vector3.new(5,2000,5)
  80. p.Friction = 0
  81. script.vel:clone().Parent = p
  82. p.CanCollide = false
  83. p.Transparency = 0.5
  84. p.TopSurface = 0
  85. p.BottomSurface = 0
  86.  
  87. local a = math.random() * 6.28
  88. local d = Vector3.new(math.cos(a), 0, math.sin(a)).unit
  89. p.Velocity = Tool.Parent.Torso.CFrame.lookVector * 1500 + Vector3.new(math.random(-200,200), 0, math.random(-200,200))
  90. p.Position = pos + Vector3.new(0, math.random() * -2, 0) + (d * 2)
  91. p.Parent = game.Workspace
  92.  
  93. debris:AddItem(p, 1)
  94. end
  95.  
  96. end
  97.  
  98.  
  99.  
  100. function blow(hit)
  101. local humanoid = hit.Parent:findFirstChild("Humanoid")
  102. local vCharacter = Tool.Parent
  103. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  104. local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  105.  
  106.  
  107.  
  108. if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  109. -- final check, make sure sword is in-hand
  110.  
  111. local right_arm = vCharacter:FindFirstChild("Right Arm")
  112. if (right_arm ~= nil) then
  113. local joint = right_arm:FindFirstChild("RightGrip")
  114. if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
  115. tagHumanoid(humanoid, vPlayer)
  116. if (isTurbo(vCharacter) == true) then
  117. humanoid:TakeDamage(damage * 1.2)
  118. else
  119. humanoid:TakeDamage(damage)
  120. end
  121. end
  122. end
  123.  
  124.  
  125. end
  126. end
  127.  
  128.  
  129. function tagHumanoid(humanoid, player)
  130. local creator_tag = Instance.new("ObjectValue")
  131. creator_tag.Value = player
  132. creator_tag.Name = "creator"
  133. creator_tag.Parent = humanoid
  134. debris:AddItem(creator_tag, 1)
  135. end
  136.  
  137.  
  138.  
  139.  
  140. function attack()
  141. damage = slash_damage
  142. SlashSound:play()
  143. local anim = Instance.new("StringValue")
  144. anim.Name = "toolanim"
  145. anim.Value = "Slash"
  146. anim.Parent = Tool
  147. end
  148.  
  149. function attackOMEGA()
  150. damage = slash_damage
  151. SlashSound.Pitch = 2
  152. SlashSound:play()
  153. local anim = Instance.new("StringValue")
  154. anim.Name = "toolanim"
  155. anim.Value = "Slash"
  156. anim.Parent = Tool
  157. end
  158.  
  159. function swordUp()
  160. Tool.GripForward = Vector3.new(-1,0,0)
  161. Tool.GripRight = Vector3.new(0,1,0)
  162. Tool.GripUp = Vector3.new(0,0,1)
  163. end
  164.  
  165. function swordOut()
  166. Tool.GripForward = Vector3.new(0,0,1)
  167. Tool.GripRight = Vector3.new(0,-1,0)
  168. Tool.GripUp = Vector3.new(-1,0,0)
  169. end
  170.  
  171.  
  172.  
  173. Tool.Enabled = true
  174.  
  175. function onActivated()
  176.  
  177. if not Tool.Enabled then
  178. return
  179. end
  180.  
  181. Tool.Enabled = false
  182.  
  183. local character = Tool.Parent;
  184. local humanoid = character.Humanoid
  185. if humanoid == nil then
  186. print("Humanoid not found")
  187. return
  188. end
  189.  
  190.  
  191. attackOMEGA()
  192. allThatIce2(character.Torso.Position + (character.Torso.CFrame.lookVector * 15), isTurbo(character))
  193.  
  194. wait(60)
  195.  
  196. Tool.Enabled = true
  197. end
  198.  
  199.  
  200. function onEquipped()
  201. UnsheathSound:play()
  202. end
  203.  
  204.  
  205. script.Parent.Activated:connect(onActivated)
  206. script.Parent.Equipped:connect(onEquipped)
  207.  
  208.  
  209. connection = sword.Touched:connect(blow)
  210.  
  211.  
  212.  
  213. end))
  214. BodyVelocity14.Name = "vel"
  215. BodyVelocity14.Parent = Script13
  216. BodyVelocity14.Velocity = Vector3.new(0, 100, 0)
  217. BodyVelocity14.velocity = Vector3.new(0, 100, 0)
  218. LocalScript12.Name = "Local Gui"
  219. LocalScript12.Parent = Tool7
  220. table.insert(cors,sandbox(LocalScript12,function()
  221. local Tool = script.Parent;
  222.  
  223. enabled = true
  224. function onButton1Down(mouse)
  225. if not enabled then
  226. return
  227. end
  228.  
  229. enabled = false
  230. mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  231.  
  232. wait(1)
  233. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  234. enabled = true
  235.  
  236. end
  237.  
  238. function onEquippedLocal(mouse)
  239.  
  240. if mouse == nil then
  241. print("Mouse not found")
  242. return
  243. end
  244.  
  245. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  246. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  247. end
  248.  
  249.  
  250. Tool.Equipped:connect(onEquippedLocal)
  251.  
  252. end))
  253. Part8.Name = "Handle"
  254. Part8.Parent = Tool7
  255. Part8.BrickColor = BrickColor.new("Dark stone grey")
  256. Part8.Rotation = Vector3.new(-89.9700012, -0.0299999993, 45.6800003)
  257. Part8.CanCollide = false
  258. Part8.FormFactor = Enum.FormFactor.Plate
  259. Part8.Size = Vector3.new(1, 0.800000012, 6)
  260. Part8.CFrame = CFrame.new(-164.044373, 43.5160217, -36.5623627, 0.69865936, -0.715454042, -0.000556324667, 0.000796274282, 6.80899737e-23, 0.999999642, -0.715453863, -0.698659539, 0.000569697702)
  261. Part8.BottomSurface = Enum.SurfaceType.Smooth
  262. Part8.TopSurface = Enum.SurfaceType.Smooth
  263. Part8.Color = Color3.new(0.388235, 0.372549, 0.384314)
  264. Part8.Position = Vector3.new(-164.044373, 43.5160217, -36.5623627)
  265. Part8.Orientation = Vector3.new(-89.9499969, -44.3199997, 90)
  266. Part8.Color = Color3.new(0.388235, 0.372549, 0.384314)
  267. SpecialMesh9.Parent = Part8
  268. SpecialMesh9.MeshId = "http://www.roblox.com/asset/?id=15924243"
  269. SpecialMesh9.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
  270. SpecialMesh9.TextureId = "http://www.roblox.com/asset/?id=19012755"
  271. SpecialMesh9.VertexColor = Vector3.new(2, 2, 2)
  272. SpecialMesh9.MeshType = Enum.MeshType.FileMesh
  273. SpecialMesh9.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
  274. Sound10.Parent = Part8
  275. Sound10.SoundId = "http://www.roblox.com/asset/?id=15933756"
  276. Sound10.Volume = 1
  277. Sound11.Parent = Part8
  278. Sound11.SoundId = "http://www.roblox.com/asset/?id=15933756"
  279. Sound11.Volume = 1
  280. Tool7.Name = "Diamond Light Hammer"
  281. Tool7.Parent = mas
  282. Tool7.TextureId = "http://www.roblox.com/asset/?id=15933689"
  283. Tool7.GripForward = Vector3.new(-1, -0, -0)
  284. Tool7.GripPos = Vector3.new(0, 0, -1)
  285. Tool7.GripRight = Vector3.new(0, 1, 0)
  286. Tool7.GripUp = Vector3.new(0, 0, 1)
  287. Part8.Name = "Handle"
  288. Part8.Parent = Tool7
  289. Part8.BrickColor = BrickColor.new("Dark stone grey")
  290. Part8.Rotation = Vector3.new(-89.9700012, -0.0299999993, 45.6800003)
  291. Part8.CanCollide = false
  292. Part8.FormFactor = Enum.FormFactor.Plate
  293. Part8.Size = Vector3.new(1, 0.800000012, 6)
  294. Part8.CFrame = CFrame.new(-164.044373, 43.5160217, -36.5623627, 0.69865936, -0.715454042, -0.000556324667, 0.000796274282, 6.80899737e-23, 0.999999642, -0.715453863, -0.698659539, 0.000569697702)
  295. Part8.BottomSurface = Enum.SurfaceType.Smooth
  296. Part8.TopSurface = Enum.SurfaceType.Smooth
  297. Part8.Color = Color3.new(0.388235, 0.372549, 0.384314)
  298. Part8.Position = Vector3.new(-164.044373, 43.5160217, -36.5623627)
  299. Part8.Orientation = Vector3.new(-89.9499969, -44.3199997, 90)
  300. Part8.Color = Color3.new(0.388235, 0.372549, 0.384314)
  301. SpecialMesh9.Parent = Part8
  302. SpecialMesh9.MeshId = "http://www.roblox.com/asset/?id=15924243"
  303. SpecialMesh9.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
  304. SpecialMesh9.TextureId = "http://www.roblox.com/asset/?id=19012755"
  305. SpecialMesh9.VertexColor = Vector3.new(2, 2, 2)
  306. SpecialMesh9.MeshType = Enum.MeshType.FileMesh
  307. SpecialMesh9.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
  308. Sound10.Parent = Part8
  309. Sound10.SoundId = "http://www.roblox.com/asset/?id=15933756"
  310. Sound10.Volume = 1
  311. Sound11.Parent = Part8
  312. Sound11.SoundId = "http://www.roblox.com/asset/?id=15933756"
  313. Sound11.Volume = 1
  314. LocalScript12.Name = "Local Gui"
  315. LocalScript12.Parent = Tool7
  316. table.insert(cors,sandbox(LocalScript12,function()
  317. local Tool = script.Parent;
  318.  
  319. enabled = true
  320. function onButton1Down(mouse)
  321. if not enabled then
  322. return
  323. end
  324.  
  325. enabled = false
  326. mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  327.  
  328. wait(1)
  329. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  330. enabled = true
  331.  
  332. end
  333.  
  334. function onEquippedLocal(mouse)
  335.  
  336. if mouse == nil then
  337. print("Mouse not found")
  338. return
  339. end
  340.  
  341. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  342. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  343. end
  344.  
  345.  
  346. Tool.Equipped:connect(onEquippedLocal)
  347.  
  348. end))
  349. Script13.Name = "IceHammer"
  350. Script13.Parent = Tool7
  351. table.insert(cors,sandbox(Script13,function()
  352. -------- OMG HAX
  353. debris = game:GetService("Debris")
  354. r = game:service("RunService")
  355.  
  356.  
  357. local damage = 5
  358.  
  359.  
  360. local slash_damage = 5
  361.  
  362.  
  363. sword = script.Parent.Handle
  364. Tool = script.Parent
  365.  
  366.  
  367. local SlashSound = Instance.new("Sound")
  368. SlashSound.SoundId = "http://www.roblox.com/asset/?id=15933756"
  369. SlashSound.Parent = sword
  370. SlashSound.Volume = 1
  371.  
  372.  
  373. local UnsheathSound = Instance.new("Sound")
  374. UnsheathSound.SoundId = "http://www.roblox.com/asset/?id=15933756"
  375. UnsheathSound.Parent = sword
  376. UnsheathSound.Volume = 1
  377.  
  378. local blues = {"White", "Institutional white"}
  379.  
  380.  
  381. function isTurbo(character)
  382. return character:FindFirstChild("Ie4tehlm") ~= nil
  383. end
  384.  
  385. function allThatIce2(pos, isTurbo)
  386.  
  387. local count = 15
  388. if (isTurbo == true) then count = 10 end
  389.  
  390. for i=1,count do
  391. local p = Instance.new("Seat")
  392. p.BrickColor = BrickColor.new(blues[math.random(#blues)])
  393. p.formFactor = "Symmetric"
  394. p.Size = Vector3.new(5,2000,5)
  395. p.Friction = 0
  396. script.vel:clone().Parent = p
  397. p.CanCollide = false
  398. p.Transparency = 0.5
  399. p.TopSurface = 0
  400. p.BottomSurface = 0
  401.  
  402. local a = math.random() * 6.28
  403. local d = Vector3.new(math.cos(a), 0, math.sin(a)).unit
  404. p.Velocity = Tool.Parent.Torso.CFrame.lookVector * 1500 + Vector3.new(math.random(-200,200), 0, math.random(-200,200))
  405. p.Position = pos + Vector3.new(0, math.random() * -2, 0) + (d * 2)
  406. p.Parent = game.Workspace
  407.  
  408. debris:AddItem(p, 1)
  409. end
  410.  
  411. end
  412.  
  413.  
  414.  
  415. function blow(hit)
  416. local humanoid = hit.Parent:findFirstChild("Humanoid")
  417. local vCharacter = Tool.Parent
  418. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  419. local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  420.  
  421.  
  422.  
  423. if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  424. -- final check, make sure sword is in-hand
  425.  
  426. local right_arm = vCharacter:FindFirstChild("Right Arm")
  427. if (right_arm ~= nil) then
  428. local joint = right_arm:FindFirstChild("RightGrip")
  429. if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
  430. tagHumanoid(humanoid, vPlayer)
  431. if (isTurbo(vCharacter) == true) then
  432. humanoid:TakeDamage(damage * 1.2)
  433. else
  434. humanoid:TakeDamage(damage)
  435. end
  436. end
  437. end
  438.  
  439.  
  440. end
  441. end
  442.  
  443.  
  444. function tagHumanoid(humanoid, player)
  445. local creator_tag = Instance.new("ObjectValue")
  446. creator_tag.Value = player
  447. creator_tag.Name = "creator"
  448. creator_tag.Parent = humanoid
  449. debris:AddItem(creator_tag, 1)
  450. end
  451.  
  452.  
  453.  
  454.  
  455. function attack()
  456. damage = slash_damage
  457. SlashSound:play()
  458. local anim = Instance.new("StringValue")
  459. anim.Name = "toolanim"
  460. anim.Value = "Slash"
  461. anim.Parent = Tool
  462. end
  463.  
  464. function attackOMEGA()
  465. damage = slash_damage
  466. SlashSound.Pitch = 2
  467. SlashSound:play()
  468. local anim = Instance.new("StringValue")
  469. anim.Name = "toolanim"
  470. anim.Value = "Slash"
  471. anim.Parent = Tool
  472. end
  473.  
  474. function swordUp()
  475. Tool.GripForward = Vector3.new(-1,0,0)
  476. Tool.GripRight = Vector3.new(0,1,0)
  477. Tool.GripUp = Vector3.new(0,0,1)
  478. end
  479.  
  480. function swordOut()
  481. Tool.GripForward = Vector3.new(0,0,1)
  482. Tool.GripRight = Vector3.new(0,-1,0)
  483. Tool.GripUp = Vector3.new(-1,0,0)
  484. end
  485.  
  486.  
  487.  
  488. Tool.Enabled = true
  489.  
  490. function onActivated()
  491.  
  492. if not Tool.Enabled then
  493. return
  494. end
  495.  
  496. Tool.Enabled = false
  497.  
  498. local character = Tool.Parent;
  499. local humanoid = character.Humanoid
  500. if humanoid == nil then
  501. print("Humanoid not found")
  502. return
  503. end
  504.  
  505.  
  506. attackOMEGA()
  507. allThatIce2(character.Torso.Position + (character.Torso.CFrame.lookVector * 15), isTurbo(character))
  508.  
  509. wait(60)
  510.  
  511. Tool.Enabled = true
  512. end
  513.  
  514.  
  515. function onEquipped()
  516. UnsheathSound:play()
  517. end
  518.  
  519.  
  520. script.Parent.Activated:connect(onActivated)
  521. script.Parent.Equipped:connect(onEquipped)
  522.  
  523.  
  524. connection = sword.Touched:connect(blow)
  525.  
  526.  
  527.  
  528. end))
  529. BodyVelocity14.Name = "vel"
  530. BodyVelocity14.Parent = Script13
  531. BodyVelocity14.Velocity = Vector3.new(0, 100, 0)
  532. BodyVelocity14.velocity = Vector3.new(0, 100, 0)
  533. for i,v in pairs(mas:GetChildren()) do
  534. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  535. pcall(function() v:MakeJoints() end)
  536. end
  537. mas:Destroy()
  538. for i,v in pairs(cors) do
  539. spawn(function()
  540. pcall(v)
  541. end)
  542. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement