Advertisement
sdsdsdsdsdsdsds

B4n H4mmer

May 25th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.48 KB | None | 0 0
  1. --By quuisiYT(quu#9149)
  2. --https://github.com/Mokiros/roblox-FE-compatibility
  3. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  4. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  5. local RealPlayer = Player
  6. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer endlocal player = game.Players.LocalPlayer
  7.  
  8. local char = player.Character
  9. local invisible = false
  10. local invisiblehammer = false
  11.  
  12. local tool = Instance.new("Tool",workspace)
  13. tool.TextureId = "http://www.roblox.com/asset/?id=10684453"
  14. tool.Enabled = true
  15. tool.Name = "BanHammer"
  16. local thma = Instance.new("Camera",tool)
  17. thma.Name = "ThumbnailCamera"
  18. local smack = Instance.new("Sound",tool)
  19. smack.Name = "Smash"
  20. smack.Volume = 1
  21. smack.SoundId = "rbxassetid://147722910" -- rbxassetid://147722910 rbxassetid://514867425
  22. local handle = Instance.new("Part",tool)
  23. handle.Name = "Handle"
  24. handle.Size = Vector3.new(1, 5.2, 1)
  25. handle.Anchored = true
  26. handle.Position = Vector3.new(0,6,0)
  27. local txtfag = Instance.new("BillboardGui",handle)
  28. txtfag.Name = "BanHammerLabel"
  29. txtfag.Size = UDim2.new(2, 0, 1.2, 0)
  30. txtfag.StudsOffset = Vector3.new(-5, 3, 0)
  31. txtfag.Enabled = false
  32. local textfag = Instance.new("TextLabel", txtfag)
  33. textfag.Size = UDim2.new(6, 0, 1, 0)
  34. textfag.FontSize = "Size8"
  35. textfag.TextScaled = true
  36. textfag.TextTransparency = 0
  37. textfag.BackgroundTransparency = 1
  38. textfag.TextTransparency = 0
  39. textfag.TextStrokeTransparency = 0
  40. textfag.Font = Enum.Font.Highway
  41. textfag.Text = "The Ban Hammer"
  42. textfag.TextStrokeColor3 = Color3.new(0.55, 0.9, 0.16)
  43. local sparkles = Instance.new("Sparkles",handle)
  44. sparkles.SparkleColor = Color3.new(0,0,0)
  45. sparkles.Enabled = true
  46. local mesh = Instance.new("SpecialMesh",handle)
  47. mesh.Name = "Mesh"
  48. mesh.MeshType = Enum.MeshType.FileMesh
  49. mesh.MeshId = "http://www.roblox.com/asset/?id=10604848"
  50. mesh.TextureId = "http://www.roblox.com/asset/?id=10605252"
  51. mesh.Scale = Vector3.new(0.5,0.5,0.5)
  52. mesh.Offset = Vector3.new(0,0,0)
  53. mesh.VertexColor = Vector3.new(1,1,1)
  54. script.Parent = tool
  55. local animation = Instance.new("Animation",tool)
  56. animation.Name = "Animation"
  57. animation.AnimationId = "http://www.roblox.com/twohandswordwithswingout-item?id=32659706"
  58. --Impletion [awful coding i know]
  59. wait()
  60. explode=false
  61. soundlock=false
  62. lock=false
  63. script.Parent.Activated:connect(function(click)
  64. if lock==false then
  65. lock=true
  66. local char=script.Parent.Parent
  67. local anim=char.Humanoid:LoadAnimation(script.Parent.Animation)
  68. anim:Play()
  69. wait(1.4)
  70. lock=false
  71. end
  72. end)
  73.  
  74. script.Parent.Handle.Touched:connect(function(hit)
  75. if tool.Parent.ClassName=="Model"then
  76. if hit.Parent:FindFirstChild("BanHammer")==nil then
  77. hit.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=432180642"
  78. local gethum=hit.Parent:GetChildren()
  79. for i=1,#gethum do
  80. if gethum[i].ClassName=="Humanoid" and gethum[i] ~= nil and hit.Parent.Name ~= tool.Parent.Name and lock==true then
  81. local hum=gethum[i]
  82. hum.Sit=true
  83. if soundlock==false then
  84. soundlock=true
  85. script.Parent.Smash:Play()
  86. end
  87. local character=hit.Parent
  88. local b=character:GetChildren()
  89. for i=1,#b do
  90. if b[i]:IsA("Part") and b[i] ~= nil then
  91. b[i].CanCollide=false
  92. b[i].Anchored=false
  93. end
  94. end
  95. local HumanoidRootPart=hit.Parent:findFirstChild("HumanoidRootPart")
  96. character.HumanoidRootPart.Velocity=tool.Parent.HumanoidRootPart.CFrame.lookVector * 1200
  97. character.HumanoidRootPart.Velocity=character.HumanoidRootPart.Velocity + Vector3.new(0,300,0)
  98. wait(1.8)
  99. if explode==false then
  100. explode=true
  101. local expl=Instance.new("Explosion", workspace)
  102. expl.BlastPressure=900
  103. expl.BlastRadius=1
  104. expl.Position=HumanoidRootPart.Position
  105. for _,xccrptparts in pairs(character:GetChildren())do
  106. if xccrptparts.ClassName=="Part"then
  107. xccrptparts.Transparency = 0
  108. xccrptparts.Anchored = false
  109. end
  110. if xccrptparts.ClassName=="MeshPart"then
  111. xccrptparts.Transparency = 0
  112. xccrptparts.Anchored = false
  113. end
  114. end
  115. HumanoidRootPart.Transparency = 1
  116. local p=game.Players:GetPlayerFromCharacter(character)
  117. character.Humanoid:Destroy()
  118. end
  119. end
  120. end
  121. wait(1)
  122. soundlock=false
  123. explode=false
  124. end
  125. else
  126. if invisible==true then
  127. hit.Parent.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=252557606"
  128. local invisibility = coroutine.wrap(function()
  129. for _,en in pairs(hit.Parent:GetChildren())do
  130. if en.ClassName=="Part"then
  131. local turninv = coroutine.wrap(function(part)
  132. for count = 1,10 do
  133. part.Transparency = part.Transparency + 0.1
  134. wait(.1)
  135. end
  136. end)
  137. turninv(en)
  138. end
  139. if en.ClassName=="MeshPart"then
  140. local turninv = coroutine.wrap(function(part)
  141. for count = 1,10 do
  142. part.Transparency = part.Transparency + 0.1
  143. wait(.1)
  144. end
  145. end)
  146. turninv(en)
  147. end
  148. if en.ClassName=="Hat"then
  149. local turninv = coroutine.wrap(function(part)
  150. for count = 1,10 do
  151. part.Transparency = part.Transparency + 0.1
  152. wait(.1)
  153. end
  154. end)
  155. turninv(en.Handle)
  156. end
  157. if en.ClassName=="Accessory"then
  158. local turninv = coroutine.wrap(function(part)
  159. for count = 1,10 do
  160. part.Transparency = part.Transparency + 0.1
  161. wait(.1)
  162. end
  163. end)
  164. turninv(en.Handle)
  165. end
  166. end
  167. for count = 1,10 do
  168. hit.Parent.Head.face.Transparency = hit.Parent.Head.face.Transparency + 0.1
  169. if invisiblehammer == true then
  170. handle.Transparency = handle.Transparency + 0.1
  171. end
  172. textfag.TextTransparency = textfag.TextTransparency + 0.1
  173. textfag.TextStrokeTransparency = textfag.TextStrokeTransparency + 0.1
  174. sparkles.Enabled = false
  175. wait(.1)
  176. end
  177. end)
  178. invisibility()
  179. hit.Parent:WaitForChild("Humanoid").HealthDisplayDistance = 0
  180. hit.Parent:WaitForChild("Humanoid").NameDisplayDistance = 0
  181. end
  182. end
  183. end)
  184.  
  185. using = false
  186.  
  187. script.Parent.Equipped:connect(function(equip)
  188. wait(.1)
  189. tool.Parent.Humanoid.MaxHealth=math.huge*math.huge
  190. tool.Parent.Humanoid.Health=math.huge*math.huge
  191. tool.Parent.Humanoid.WalkSpeed=100
  192. using = true
  193. end)
  194.  
  195. script.Parent.Unequipped:connect(function(equip)
  196. if not tool.Parent:FindFirstChild("Humanoid")~=nil then
  197. if not tool.Parent.Humanoid.Health==0 then
  198. wait(.1)
  199. tool.Parent.Parent.Character.Humanoid.MaxHealth=100
  200. tool.Parent.Parent.Character.Humanoid.Health=100
  201. tool.Parent.Parent.Character.Humanoid.WalkSpeed=16
  202. sparkles.SparkleColor = Color3.new(0,0,0)
  203. using = false
  204. end
  205. end
  206. end)
  207.  
  208. local depth = 1
  209. local speed = 50
  210. local itsalive = Instance.new("Sound",tool)
  211. itsalive.Name = "NotEquippedMusic"
  212. itsalive.SoundId = "rbxassetid://149119648"
  213. itsalive.Volume = 8.75
  214. itsalive.Looped = true
  215. function alive()
  216. for i = 1, speed do wait()
  217. handle.CFrame = handle.CFrame * CFrame.new(0,-depth/speed,0)
  218. end
  219. for i = 1, speed do wait()
  220. handle.CFrame = handle.CFrame * CFrame.new(0,depth/speed,0)
  221. end
  222. end
  223.  
  224. print("Ban hammer Created!")
  225.  
  226. while true do
  227. if using==true then
  228. txtfag.Enabled = false
  229. handle.Anchored = false
  230. itsalive:Stop()
  231. sparkles.SparkleColor = BrickColor.Random().Color
  232. if tool.Parent:FindFirstChild("Humanoid")~=nil then
  233. tool.Parent = workspace
  234. handle.Position = handle.Position + Vector3.new(0,3,0)
  235. using=false
  236. end
  237. if tool.Parent:WaitForChild("Humanoid").Health==0 then
  238. tool.Parent = workspace
  239. handle.Position = handle.Position + Vector3.new(0,3,0)
  240. using=false
  241. end
  242. wait(.5)
  243. else
  244. txtfag.Enabled = true
  245. handle.Anchored = true
  246. itsalive:Play()
  247. repeat
  248. sparkles.SparkleColor = Color3.new(0,0,0)
  249. alive()
  250. until using==true
  251. end
  252. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement