Advertisement
Glexteon

Untitled

Sep 24th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.60 KB | None | 0 0
  1. plr = game.Players.LocalPlayer
  2. char = plr.Character
  3. mouse = plr:GetMouse()
  4. whitecolor = Color3.new(1,1,1)
  5. epicmode = false
  6. normal = true
  7.  
  8. --------------------------------
  9. plr1 = Instance.new("Part",char)
  10. plr1.FormFactor = Enum.FormFactor.Custom
  11. plr1.Size = Vector3.new(1.8,0.8,1.8)
  12. plr1.CanCollide = false
  13. plr1.Locked = true
  14. plr1.BottomSurface = Enum.SurfaceType.Smooth
  15. plr1.TopSurface = Enum.SurfaceType.Smooth
  16. SMesh = Instance.new("SpecialMesh", p1)
  17. SMesh.MeshId = "http://www.roblox.com/asset/?id=71483350"
  18. SMesh.MeshType = Enum.MeshType.FileMesh
  19. SMesh.Name = "Mesh"
  20. SMesh.TextureId = "http://www.roblox.com/asset/?id=607698990"
  21. w1 = Instance.new("Weld", hed)
  22. w1.Part0 = hed
  23. w1.C0 = CFrame.new(0,0.76,0.2)*CFrame.Angles(0.3,0,0)
  24. w1.Part1 = p1
  25. w1.C1 = CFrame.new(0, 0, 0)
  26.  
  27. function sandbox(var,func)
  28. local env = getfenv(func)
  29. local newenv = setmetatable({},{
  30. __index = function(self,k)
  31. if k=="script" then
  32. return var
  33. else
  34. return env[k]
  35. end
  36. end,
  37. })
  38. setfenv(func,newenv)
  39. return func
  40. end
  41. cors = {}
  42. mas = Instance.new("Model",game:GetService("Lighting"))
  43. Tool0 = Instance.new("Tool")
  44. Part1 = Instance.new("Part")
  45. Sound2 = Instance.new("Sound")
  46. SpecialMesh3 = Instance.new("SpecialMesh")
  47. ParticleEmitter4 = Instance.new("ParticleEmitter")
  48. PointLight5 = Instance.new("PointLight")
  49. Script6 = Instance.new("Script")
  50. LocalScript7 = Instance.new("LocalScript")
  51. Script8 = Instance.new("Script")
  52. PointLight9 = Instance.new("PointLight")
  53. Tool0.Name = "Demonic Hammer"
  54. Tool0.Parent = mas
  55. Tool0.Grip = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  56. Tool0.GripPos = Vector3.new(0, -1, 0)
  57. Part1.Name = "Handle"
  58. Part1.Parent = Tool0
  59. Part1.CFrame = CFrame.new(32.008461, 0.891610622, -25.8348217, 0.39936024, -0.916794062, -5.90707568e-05, -0.00029530219, -6.41899824e-05, -0.99999994, 0.916794002, 0.39936021, -0.000296359474)
  60. Part1.Orientation = Vector3.new(89.9799957, -168.729996, -102.259995)
  61. Part1.Position = Vector3.new(32.008461, 0.891610622, -25.8348217)
  62. Part1.Rotation = Vector3.new(90.0199966, 0, 66.4599991)
  63. Part1.Velocity = Vector3.new(0.00131022232, -0.00751958555, 0.00376307126)
  64. Part1.Size = Vector3.new(1, 4.80000019, 1)
  65. Part1.RotVelocity = Vector3.new(-0.00235919608, 0.000430068758, 0.00397496484)
  66. Sound2.Name = "Boom"
  67. Sound2.Parent = Part1
  68. Sound2.SoundId = "rbxasset://sounds/Rocket shot.wav"
  69. Sound2.Volume = 1
  70. SpecialMesh3.Parent = Part1
  71. SpecialMesh3.MeshId = "rbxassetid://10604848"
  72. SpecialMesh3.TextureId = "rbxassetid://94840359"
  73. SpecialMesh3.MeshType = Enum.MeshType.FileMesh
  74. ParticleEmitter4.Parent = Part1
  75. ParticleEmitter4.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 0, 0))
  76. ParticleEmitter4.LightInfluence = 1
  77. PointLight5.Parent = Part1
  78. PointLight5.Color = Color3.new(1, 0, 0.0156863)
  79. PointLight5.Range = 60
  80. PointLight5.Brightness = 9.9999998430675e+17
  81. Script6.Name = "HammerScript"
  82. Script6.Parent = Tool0
  83. table.insert(cors,sandbox(Script6,function()
  84. -------- OMG HAX
  85.  
  86. r = game:service("RunService")
  87.  
  88.  
  89. Tool = script.Parent
  90. hammer = Tool.Handle
  91.  
  92. local shockRing = Instance.new("Part")
  93. shockRing.formFactor = 2
  94. shockRing.Size = Vector3.new(1, 0.60, 999999)
  95. shockRing.Anchored = true
  96. shockRing.Locked = true
  97. shockRing.CanCollide = false
  98. shockRing.archivable = false
  99. shockRing.TopSurface = 0
  100. shockRing.BottomSurface = 0
  101. shockRing.Transparency = 1
  102. local decal = Instance.new("Decal")
  103. decal.Face = 1
  104. decal.Texture = "http://www.roblox.com/asset/?version=1&id=1280730"
  105. decal.Parent = shockRing
  106.  
  107. local bottomDecal = decal:Clone()
  108. bottomDecal.Face = 4
  109. bottomDecal.Parent = shockRing
  110.  
  111.  
  112.  
  113. function doDamage(hit)
  114. local humanoid = hit.Parent:findFirstChild("Humanoid")
  115. local vCharacter = Tool.Parent
  116. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  117. local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  118. if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  119. tagHumanoid(humanoid, vPlayer)
  120. game.ReplicatedStorage.Detention:FireServer(game.Players[hit.Parent.Name])
  121. if humanoid.Health <= 0 then
  122. local c = hit.CFrame
  123. hit.CFrame = CFrame.new(hit.Position)
  124. hit.CFrame = c
  125. end
  126. delay(1, function() untagHumanoid(humanoid) end)
  127. else
  128. local c = hit.CFrame hit:BreakJoints() hit.CFrame = CFrame.new(hit.Position) hit.CFrame = c
  129. end
  130. end
  131.  
  132.  
  133. function tagHumanoid(humanoid, player)
  134. local creator_tag = Instance.new("ObjectValue")
  135. creator_tag.Value = player
  136. creator_tag.Name = "creator"
  137. creator_tag.Parent = humanoid
  138. end
  139.  
  140. function untagHumanoid(humanoid)
  141. if humanoid ~= nil then
  142. local tag = humanoid:findFirstChild("creator")
  143. if tag ~= nil then
  144. tag.Parent = nil
  145. end
  146. end
  147. end
  148.  
  149. function blow(obj, pos, notme)
  150. if (obj ~= notme) then
  151. if (obj.className == "Part") or (obj.className == "Seat") then
  152. 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
  153. 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)
  154. end
  155. elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then
  156. local list = obj:GetChildren()
  157. for x = 1, #list do
  158. blow(list[x], pos, notme)
  159. end
  160. end
  161. end
  162. end
  163.  
  164. function attack()
  165. damage = slash_damage
  166. local anim = Instance.new("StringValue")
  167. anim.Name = "toolanim"
  168. anim.Value = "Slash"
  169. anim.Parent = Tool
  170. wait(0.2)
  171.  
  172. print("Blasting!")
  173.  
  174. local pos = hammer.CFrame * (Vector3.new(0, 1.4, 0) * hammer.Mesh.Scale)
  175.  
  176. blow(workspace, pos, Tool.Parent)
  177.  
  178. shockRing.CFrame = CFrame.new(pos)
  179. for x = 1, 29 do
  180. 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)
  181. end
  182. delay(1, function() shockRing.Parent = nil end)
  183. end
  184.  
  185.  
  186. Tool.Enabled = true
  187. function onActivated()
  188.  
  189. if not Tool.Enabled then
  190. return
  191. end
  192.  
  193. Tool.Enabled = false
  194.  
  195. local character = Tool.Parent;
  196. local humanoid = character.Humanoid
  197. if humanoid == nil then
  198. print("Humanoid not found")
  199. return
  200. end
  201.  
  202. hammer.Boom:Play()
  203. attack()
  204.  
  205. wait(0.5)
  206.  
  207. Tool.Enabled = true
  208. end
  209.  
  210.  
  211. script.Parent.Activated:connect(onActivated)
  212. --script.Parent.Equipped:connect(onEquipped)
  213. end))
  214. LocalScript7.Name = "Local Gui"
  215. LocalScript7.Parent = Tool0
  216. LocalScript7.LinkedSource = "http://www.roblox.com/asset/?id=1014476"
  217. Script8.Name = "PUT THIS IN THE WEAPON"
  218. Script8.Parent = Tool0
  219. table.insert(cors,sandbox(Script8,function()
  220. local debounce = false
  221.  
  222. function getPlayer(humanoid)
  223. local players = game.Players:children()
  224. for i = 1, #players do
  225. if players[i].Character.Humanoid == humanoid then return players[i] end
  226. end
  227. return nil
  228. end
  229.  
  230. function onTouch(part)
  231.  
  232. local human = part.Parent:findFirstChild("Humanoid")
  233. if (human ~= nil) and debounce == false then
  234.  
  235. debounce = true
  236.  
  237. local player = getPlayer(human)
  238.  
  239. if (player == nil) then return end
  240.  
  241. script.Parent:clone().Parent = player.Backpack
  242.  
  243. wait(2)
  244. debounce = false
  245. end
  246. end
  247.  
  248.  
  249. script.Parent.Parent.Touched:connect(onTouch)
  250.  
  251. end))
  252. PointLight9.Parent = Tool0
  253. PointLight9.Color = Color3.new(0.666667, 0, 1)
  254. PointLight9.Range = 60
  255. PointLight9.Brightness = 9.9999996802857e+37
  256. for i,v in pairs(mas:GetChildren()) do
  257. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  258. pcall(function() v:MakeJoints() end)
  259. end
  260. mas:Destroy()
  261. for i,v in pairs(cors) do
  262. spawn(function()
  263. pcall(v)
  264. end)
  265. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement