subaru112g

ban hammer not ended

Feb 3rd, 2019
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.35 KB | None | 0 0
  1. if script.Parent.Name == "Diedhaha" then
  2. wait(1)
  3. script.Parent:Destroy()
  4. end
  5.  
  6. if not(script.Parent.Name == "Diedhaha") then
  7.  
  8. local char = owner.Character
  9.  
  10. local mus = nil
  11.  
  12. local hum = char:FindFirstChildOfClass("Humanoid")
  13.  
  14. hum.WalkSpeed = 20
  15.  
  16. mus = Instance.new("Sound",char.Torso)
  17. mus.SoundId = "rbxassetid://919231299"
  18. mus.Volume = 3
  19. mus.Looped = true
  20. mus:Play()
  21. mus.TimePosition = 55
  22.  
  23. local hammer = Instance.new("Part",char)
  24. hammer.Name = "Ban"
  25. hammer.Size = Vector3.new(1, 5.2, 1)
  26. hammer.CanCollide = false
  27. local m = Instance.new("SpecialMesh",hammer)
  28. m.Scale = Vector3.new(0.5, 0.5, 0.5)
  29. m.TextureId = "http://www.roblox.com/asset/?id=10605252"
  30. m.MeshId = "http://www.roblox.com/asset/?id=10604848"
  31.  
  32. local w = Instance.new("Weld",hammer)
  33. w.Part0 = hammer
  34. w.Part1 = char["Right Arm"]
  35. w.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  36. w.C1 = CFrame.new(-0.200000003, -1, -1.60000002, 1, 0, 0, 0, 2.98023224e-08, 0.99999994, 0, -0.99999994, 2.98023224e-08)
  37.  
  38.  
  39. --This script is made by Subaru112.
  40.  
  41. local plr = owner
  42. local char = plr.Character
  43. local hum = char:FindFirstChildOfClass("Humanoid")
  44. local remote = Instance.new("RemoteEvent", char)
  45. remote.Name = "ReplicationEvent"
  46. local client = NLS([==[
  47. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  48. local remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
  49. spawn(function()
  50. while game:GetService("RunService").Heartbeat:Wait() do
  51. remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
  52. end
  53. end)
  54. game:GetService("UserInputService").InputBegan:Connect(function(input, isTyping)
  55. if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard then
  56. remote:FireServer(1, input.KeyCode)
  57. end
  58. end)
  59. mouse.Button1Down:Connect(function()
  60. remote:FireServer(2)
  61. end)
  62. remote.OnClientEvent:Connect(function()
  63. game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position, Vector3.new(mouse.Hit.Position.X, game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position.Y, mouse.Hit.Position.Z))
  64. end)
  65. ]==], char)
  66. local crabrave = Instance.new("Sound", char.Torso)
  67. local RS = char.Torso["Right Shoulder"]
  68. local LS = char.Torso["Left Shoulder"]
  69. local RH = char.Torso["Right Hip"]
  70. local LH = char.Torso["Left Hip"]
  71. local rootj = char.HumanoidRootPart.RootJoint
  72. local throwbutton = false
  73. local throw = false
  74. local normalanim = true
  75. local attackd = false
  76. local animpose = "Idle"
  77. local timepos = 0
  78. local sine = 0
  79. local RSnor = RS.C0
  80. local LSnor = LS.C0
  81. local RHnor = RH.C0
  82. local LHnor = LH.C0
  83. local rootjnor = rootj.C0
  84. local swing = nil
  85. local swing2 = nil
  86. swing = false
  87. swing2 = false
  88.  
  89. ---------------------------------
  90. --------------Set up-------------
  91. ---------------------------------
  92.  
  93. function onTouched(fire)
  94. if not(fire.Parent == char) then
  95. if swing2 == true then
  96. if fire.Parent.ClassName == "Model" then
  97. local hum = fire.Parent:FindFirstChildOfClass("Humanoid")
  98. if hum then
  99. hum:Destroy()
  100. end
  101. for i,v in pairs(fire.Parent:GetChildren()) do
  102. v.Parent = game.Workspace
  103. v.Name = "Diedhaha"
  104. if v.ClassName == "MeshPart" or v.ClassName == "Part" then
  105. local del = math.random(1,3)
  106. v.CanCollide = true
  107. v:MakeJoints()
  108. v.Anchored = false
  109. v.Velocity = Vector3.new(0, 10, 0) + char.HumanoidRootPart.CFrame.LookVector * 70
  110. v.BrickColor = BrickColor.new("Really red")
  111. v.Transparency = 0
  112. v.Material = "Neon"
  113. for i,d in pairs(v:GetChildren()) do
  114. if d.ClassName == "Decal" or d.ClassName == "SpecialMesh" or d.ClassName == "BlockMesh" or d.ClassName == "FileMesh" then
  115. d:Destroy()
  116. end
  117. end
  118.  
  119. end
  120. end
  121. end
  122. end
  123. end
  124. end
  125. hammer.Touched:connect(onTouched)
  126.  
  127. function onTouched(fire2)
  128. if not(fire2.Parent == char) then
  129. if swing == true then
  130. if fire2.Parent.ClassName == "Model" then
  131. local hum = fire2.Parent:FindFirstChildOfClass("Humanoid")
  132. if hum then
  133. hum:Destroy()
  134. end
  135. for i,v in pairs(fire2.Parent:GetChildren()) do
  136. v.Parent = game.Workspace
  137. v.Name = "Diedhaha"
  138. if v.ClassName == "MeshPart" or v.ClassName == "Part" then
  139. v.CanCollide = true
  140. v:BreakJoints()
  141. v.Anchored = false
  142. v.Velocity = Vector3.new(0, 270, 0)
  143. v.BrickColor = BrickColor.new("White")
  144. v.Transparency = 0.8
  145. v.Material = "Neon"
  146. for i,d in pairs(v:GetChildren()) do
  147. if d.ClassName == "Decal" or d.ClassName == "SpecialMesh" or d.ClassName == "BlockMesh" or d.ClassName == "FileMesh" then
  148. d:Destroy()
  149. end
  150. end
  151. end
  152. end
  153. end
  154. end
  155. end
  156. end
  157. hammer.Touched:connect(onTouched)
  158.  
  159. ---------------------------------
  160. -------------Attacks-------------
  161. ---------------------------------
  162.  
  163. remote.OnServerEvent:Connect(function(Player, number, key)
  164. if number == 1 and plr.Name == Player.Name and attackd == false then
  165. if key == Enum.KeyCode.Z then
  166. if swing == false and swing2 == false then
  167. local hum = char:FindFirstChildOfClass("Humanoid")
  168. local idleanim = Instance.new("Animation")
  169. idleanim.Name = "Roblox Idle Animation"
  170. idleanim.AnimationId = "http://www.roblox.com/twohandswordwithswingout-item?id=32659706"
  171. local idleanimplay = hum:LoadAnimation(idleanim)
  172. idleanimplay:Play()
  173. char.Animate.Disabled = true
  174. wait(0.5)
  175. swing = true
  176. wait(0.5)
  177. swing = false
  178. char.Animate.Disabled = false
  179. end
  180. end
  181. if key == Enum.KeyCode.X then
  182. if swing2 == false and swing == false then
  183. local hum = char:FindFirstChildOfClass("Humanoid")
  184. local idleanim = Instance.new("Animation")
  185. idleanim.Name = "Roblox Idle Animation"
  186. idleanim.AnimationId = "http://www.roblox.com/twohandswordwithswingout-item?id=32659706"
  187. local idleanimplay = hum:LoadAnimation(idleanim)
  188. idleanimplay:Play()
  189. char.Animate.Disabled = true
  190. wait(0.5)
  191. swing2 = true
  192. wait(0.5)
  193. swing2 = false
  194. char.Animate.Disabled = false
  195. end
  196. end
  197. if key == Enum.KeyCode.C then
  198. swing = false
  199. swing2 = false
  200. end
  201. elseif Player.Name == plr.Name and number == 2 and throw == true and throwbutton == true then
  202. throwbutton = false
  203. throw = false
  204. end
  205. end)
  206.  
  207. ---------------------------------
  208. -----------Wrapping up-----------
  209. ---------------------------------
  210.  
  211. while true do
  212. wait()
  213.  
  214. if mus.TimePosition > 85 then
  215. mus.TimePosition = 55
  216. end
  217.  
  218. hum.Health = 9999999999999999
  219. if not(mus.Parent == char.Torso) then
  220. mus = Instance.new("Sound",char.Torso)
  221. mus.SoundId = "rbxassetid://919231299"
  222. mus.Volume = 3
  223. mus.Looped = true
  224. mus:Play()
  225. mus.TimePosition = 50
  226. end
  227. end
  228.  
  229. while game:GetService("RunService").Heartbeat:Wait() do
  230. if normalanim then
  231. sine = sine + 1
  232. end
  233.  
  234. if remote.Parent == char then
  235. remote.Name = "ReplicationEvent"
  236. else
  237. remote = Instance.new("RemoteEvent", char)
  238. end
  239. local touchfloor = workspace:FindPartOnRay(Ray.new(char.HumanoidRootPart.CFrame.Position, ((CFrame.new(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position - Vector3.new(0, 1, 0))).LookVector).Unit * 4), char)
  240. if char.HumanoidRootPart.Velocity.Magnitude > 1 and touchfloor then
  241. animpose = "Walking"
  242. elseif char.HumanoidRootPart.Velocity.Y > 0.5 and touchfloor == nil then
  243. animpose = "Jumping"
  244. elseif char.HumanoidRootPart.Velocity.Y < 0.5 and touchfloor == nil then
  245. animpose = "Falling"
  246. else
  247. animpose = "Idle"
  248. end
  249. if animpose == "Idle" and normalanim then
  250.  
  251. elseif animpose == "Walking" and normalanim then
  252.  
  253. elseif animpose == "Jumping" and normalanim then
  254.  
  255. elseif animpose == "Falling" and normalanim then
  256.  
  257. end
  258. end
  259. end
Add Comment
Please, Sign In to add comment