Advertisement
pklo

Untitled

Mar 29th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.68 KB | None | 0 0
  1. --Thanks for using Build2Script Plugin by jarredbcv!
  2. if (script:FindFirstChild("forCustomRun")~=nil) then
  3. local sc = script["forCustomRun"].Value
  4. assert(loadstring(sc))()
  5. return
  6. elseif (script:FindFirstChild("forCustomRunL")~=nil) then
  7. local locsc = workspace:FindFirstChild("_localrun")
  8. local sc = script["forCustomRunL"]
  9. if (locsc~=nil) then
  10. local loc = locsc:clone()
  11. loc["scrun"].Value = sc.Value
  12. loc.Name = script.Name
  13. for i,v in pairs(script:GetChildren()) do
  14. v:clone().Parent = loc
  15. end
  16. loc.Parent = script.Parent
  17. script:remove()
  18. return
  19. else
  20. assert(loadstring(sc.Value))()
  21. return
  22. end
  23. end
  24. local m = Instance.new("Model")
  25. m.Name = "Sonic Neon Boom Hammer"
  26. t1 = Instance.new("Tool", m)
  27. t1.Name = "Sonic Neon Boom Hammer"
  28. t1.GripPos = Vector3.new(0, -1.29999995, 0)
  29. t1.TextureId = "http://www.roblox.com/asset/?id=94578121"
  30. s1 = script:clone()
  31. s1.Name = "Local Gui"
  32. s1.Disabled = false
  33. so1 = Instance.new("StringValue", s1)
  34. so1.Name = "forCustomRunL"
  35. so1.Value = [===[
  36.  
  37. ]===]
  38. s1.Parent = t1
  39. p1 = Instance.new("Part", t1)
  40. p1.BrickColor = BrickColor.new("Dark stone grey")
  41. p1.Name = "Handle"
  42. p1.CFrame = CFrame.new(-6.5, 4.49994802, -10.1999998, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  43. p1.FormFactor = Enum.FormFactor.Symmetric
  44. p1.Size = Vector3.new(1, 4, 2)
  45. p1.BottomSurface = Enum.SurfaceType.Smooth
  46. p1.TopSurface = Enum.SurfaceType.Smooth
  47. x1 = Instance.new("Sound", p1)
  48. x1.Name = "Boom"
  49. x1.Pitch = 1
  50. x1.SoundId = "rbxasset://sounds/Rocket shot.wav"
  51. x1.Volume = 1
  52. x1.Looped = false
  53. x1.PlayOnRemove = false
  54. b1 = Instance.new("SpecialMesh", p1)
  55. b1.MeshId = "http://www.roblox.com/asset/?id=1279013"
  56. b1.TextureId = "http://www.roblox.com/asset/?id=100811197"
  57. b1.MeshType = Enum.MeshType.FileMesh
  58. b1.Name = "Mesh"
  59. b1.Scale = Vector3.new(1.04999995, 1.04999995, 1.04999995)
  60. d1 = Instance.new("Decal", p1)
  61. d1.Texture = "http://www.roblox.com/asset/?id=144323045"
  62. d1.Face = Enum.NormalId.Left
  63. d2 = Instance.new("Decal", p1)
  64. d2.Texture = "http://www.roblox.com/asset/?id=180571893"
  65. d2.Face = Enum.NormalId.Left
  66. s2 = script:clone()
  67. s2.Name = "HammerScript"
  68. s2.Disabled = false
  69. so2 = Instance.new("StringValue", s2)
  70. so2.Name = "forCustomRun"
  71. so2.Value = [===[
  72. -------- OMG HAX
  73.  
  74. r = game:service("RunService")
  75.  
  76.  
  77. Tool = script.Parent
  78. hammer = Tool.Handle
  79.  
  80. local shockRing = Instance.new("Part")
  81. shockRing.formFactor = 2
  82. shockRing.Size = Vector3.new(1, 0.4, 1)
  83. shockRing.Anchored = true
  84. shockRing.Locked = true
  85. shockRing.CanCollide = false
  86. shockRing.archivable = false
  87. shockRing.TopSurface = 0
  88. shockRing.BottomSurface = 0
  89. shockRing.Transparency = 1
  90. local decal = Instance.new("Decal")
  91. decal.Face = 1
  92. decal.Texture = "http://www.roblox.com/asset/?id=180571893"
  93. decal.Parent = shockRing
  94.  
  95. local bottomDecal = decal:Clone()
  96. bottomDecal.Face = 4
  97. bottomDecal.Parent = shockRing
  98.  
  99.  
  100.  
  101. function doDamage(hit)
  102. local humanoid = hit.Parent:findFirstChild("Humanoid")
  103. local vCharacter = Tool.Parent
  104. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  105. local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  106. if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  107. tagHumanoid(humanoid, vPlayer)
  108. humanoid:TakeDamage(humanoid.MaxHealth)
  109. if humanoid.Health <= 0 then
  110. local c = hit.CFrame
  111. hit.CFrame = CFrame.new(hit.Position)
  112. hit.CFrame = c
  113. end
  114. delay(1, function() untagHumanoid(humanoid) end)
  115. else
  116. local c = hit.CFrame hit:BreakJoints() hit.CFrame = CFrame.new(hit.Position) hit.CFrame = c
  117. end
  118. end
  119.  
  120.  
  121. function tagHumanoid(humanoid, player)
  122. local creator_tag = Instance.new("ObjectValue")
  123. creator_tag.Value = player
  124. creator_tag.Name = "creator"
  125. creator_tag.Parent = humanoid
  126. end
  127.  
  128. function untagHumanoid(humanoid)
  129. if humanoid ~= nil then
  130. local tag = humanoid:findFirstChild("creator")
  131. if tag ~= nil then
  132. tag.Parent = nil
  133. end
  134. end
  135. end
  136.  
  137. function blow(obj, pos, notme)
  138. if (obj ~= notme) then
  139. if (obj.className == "Part") or (obj.className == "Seat") then
  140. if (not obj.Anchored) and (((pos - obj.Position) * Vector3.new(1, 0, 1)).magnitude < 96) and (pos.y <= obj.Position.y + 8) and (pos.y >= obj.Position.y - 8) then
  141. delay((pos - obj.Position).magnitude / 96, function() doDamage(obj) obj.Velocity = ((obj.Position - pos).unit + Vector3.new(0, 0.5, 0)) * 96 + obj.Velocity obj.RotVelocity = obj.RotVelocity + Vector3.new(obj.Position.z - pos.z, 0, pos.x - obj.Position.x).unit * 40 end)
  142. end
  143. elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then
  144. local list = obj:GetChildren()
  145. for x = 1, #list do
  146. blow(list[x], pos, notme)
  147. end
  148. end
  149. end
  150. end
  151.  
  152. function attack()
  153. damage = slash_damage
  154. local anim = Instance.new("StringValue")
  155. anim.Name = "toolanim"
  156. anim.Value = "Slash"
  157. anim.Parent = Tool
  158. wait(0.2)
  159.  
  160. print("Blasting!")
  161.  
  162. local pos = hammer.CFrame * (Vector3.new(0, 1.4, 0) * hammer.Mesh.Scale)
  163.  
  164. blow(workspace, pos, Tool.Parent)
  165.  
  166. shockRing.CFrame = CFrame.new(pos)
  167. for x = 1, 29 do
  168. delay(x / 30, function() shockRing.Parent = nil shockRing.Size = Vector3.new(0, 0.4, 0) + Vector3.new(6.4, 0, 6.4) * x shockRing.Parent = Tool end)
  169. end
  170. delay(1, function() shockRing.Parent = nil end)
  171. end
  172.  
  173.  
  174. Tool.Enabled = true
  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. hammer.Boom:Play()
  191. attack()
  192.  
  193. wait(0.5)
  194.  
  195. Tool.Enabled = true
  196. end
  197.  
  198.  
  199. script.Parent.Activated:connect(onActivated)
  200. --script.Parent.Equipped:connect(onEquipped)
  201. ]===]
  202. s2.Parent = t1
  203. m.Parent = game:service("Workspace")
  204. m:MakeJoints()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement