Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.40 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83.  
  84. --Created by LuckyPlayerScripter Discord: FenixYT#0390
  85. --ROBLOX's Ban Hammer Is back!
  86. plr = owner
  87. char = plr.Character
  88. whitecolor = Color3.new(1,1,1)
  89. epicmode = false
  90. normal = true
  91. for i,v in pairs(char:GetChildren()) do
  92. if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "ShirtGraphic" then
  93. v:Destroy()
  94. end
  95. end
  96. local shirt = Instance.new("Shirt",char)
  97. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=607785311"
  98. local pants = Instance.new("Pants",char)
  99. pants.PantsTemplate = "http://www.roblox.com/asset/?id=348211416"
  100. local bdycolors = char["Body Colors"]
  101. bdycolors.HeadColor3 = whitecolor
  102. bdycolors.LeftArmColor3 = whitecolor
  103. bdycolors.LeftLegColor3 = whitecolor
  104. bdycolors.RightArmColor3 = whitecolor
  105. bdycolors.RightLegColor3 = whitecolor
  106. bdycolors.TorsoColor3 = whitecolor
  107.  
  108. -- Face
  109. char.Head.face.Texture = "http://www.roblox.com/asset/?id=26053664"
  110. z = Instance.new("Sound", char)
  111. z.SoundId = "rbxassetid://837104892"--837104892
  112. z.Looped = true
  113. z.Pitch = 1
  114. z.Volume = 10
  115. wait(.001)
  116. z:Play()
  117. --------------------------------
  118. plr1 = Instance.new("Part",char)
  119. plr1.FormFactor = Enum.FormFactor.Custom
  120. plr1.Size = Vector3.new(1.8,0.8,1.8)
  121. plr1.CanCollide = false
  122. plr1.Locked = true
  123. plr1.BottomSurface = Enum.SurfaceType.Smooth
  124. plr1.TopSurface = Enum.SurfaceType.Smooth
  125. SMesh = Instance.new("SpecialMesh", p1)
  126. SMesh.MeshId = "http://www.roblox.com/asset/?id=71483350"
  127. SMesh.MeshType = Enum.MeshType.FileMesh
  128. SMesh.Name = "Mesh"
  129. SMesh.TextureId = "http://www.roblox.com/asset/?id=607698990"
  130. w1 = Instance.new("Weld", hed)
  131. w1.Part0 = hed
  132. w1.C0 = CFrame.new(0,0.76,0.2)*CFrame.Angles(0.3,0,0)
  133. w1.Part1 = p1
  134. w1.C1 = CFrame.new(0, 0, 0)
  135. -----------
  136. CV="Maroon"
  137. Player = game.Players.LocalPlayer
  138. Character = Player.Character
  139. local txt = Instance.new("BillboardGui", Character)
  140. txt.Adornee = Character .Head
  141. txt.Name = "_status"
  142. txt.Size = UDim2.new(2, 0, 1.2, 0)
  143. txt.StudsOffset = Vector3.new(-9, 8, 0)
  144. local text = Instance.new("TextLabel", txt)
  145. text.Size = UDim2.new(10, 0, 7, 0)
  146. text.FontSize = "Size24"
  147. text.TextScaled = true
  148. text.TextTransparency = 0
  149. text.BackgroundTransparency = 1
  150. text.TextTransparency = 0
  151. text.TextStrokeTransparency = 0
  152. text.Font = "Arcade"
  153. text.TextStrokeColor3 = Color3.new(255,0,0)
  154.  
  155. v=Instance.new("Part")
  156. v.Name = "ColorBrick"
  157. v.Parent=Player.Character
  158. v.FormFactor="Symmetric"
  159. v.Anchored=true
  160. v.CanCollide=false
  161. v.BottomSurface="Smooth"
  162. v.TopSurface="Smooth"
  163. v.Size=Vector3.new(10,5,3)
  164. v.Transparency=1
  165. v.CFrame=Character.Torso.CFrame
  166. v.BrickColor=BrickColor.new(CV)
  167. v.Transparency=1
  168. text.TextColor3 = Color3.new(255,0,0)
  169. v.Shape="Block"
  170. text.Text = "ROBLOX"
  171. -----------------------------------------
  172. function sandbox(var,func)
  173. local env = getfenv(func)
  174. local newenv = setmetatable({},{
  175. __index = function(self,k)
  176. if k=="script" then
  177. return var
  178. else
  179. return env[k]
  180. end
  181. end,
  182. })
  183. setfenv(func,newenv)
  184. return func
  185. end
  186. cors = {}
  187. mas = Instance.new("Model",game:GetService("Lighting"))
  188. Tool0 = Instance.new("Tool")
  189. Part1 = Instance.new("Part")
  190. Sound2 = Instance.new("Sound")
  191. SpecialMesh3 = Instance.new("SpecialMesh")
  192. ParticleEmitter4 = Instance.new("ParticleEmitter")
  193. PointLight5 = Instance.new("PointLight")
  194. Script6 = Instance.new("Script")
  195. LocalScript7 = Instance.new("LocalScript")
  196. Script8 = Instance.new("Script")
  197. PointLight9 = Instance.new("PointLight")
  198. Tool0.Name = "BanHammer"
  199. Tool0.Parent = mas
  200. Tool0.Grip = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  201. Tool0.GripPos = Vector3.new(0, -1, 0)
  202. Part1.Name = "Handle"
  203. Part1.Parent = Tool0
  204. 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)
  205. Part1.Orientation = Vector3.new(89.9799957, -168.729996, -102.259995)
  206. Part1.Position = Vector3.new(32.008461, 0.891610622, -25.8348217)
  207. Part1.Rotation = Vector3.new(90.0199966, 0, 66.4599991)
  208. Part1.Velocity = Vector3.new(0.00131022232, -0.00751958555, 0.00376307126)
  209. Part1.Size = Vector3.new(1, 4.80000019, 1)
  210. Part1.RotVelocity = Vector3.new(-0.00235919608, 0.000430068758, 0.00397496484)
  211. Sound2.Name = "Boom"
  212. Sound2.Parent = Part1
  213. Sound2.SoundId = "rbxasset://sounds/Rocket shot.wav"
  214. Sound2.Volume = 1
  215. SpecialMesh3.Parent = Part1
  216. SpecialMesh3.MeshId = "rbxassetid://10604848"
  217. SpecialMesh3.TextureId = "rbxassetid://94840359"
  218. SpecialMesh3.MeshType = Enum.MeshType.FileMesh
  219. ParticleEmitter4.Parent = Part1
  220. ParticleEmitter4.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 0, 0))
  221. ParticleEmitter4.LightInfluence = 1
  222. PointLight5.Parent = Part1
  223. PointLight5.Color = Color3.new(1, 0, 0.0156863)
  224. PointLight5.Range = 60
  225. PointLight5.Brightness = 9.9999998430675e+17
  226. Script6.Name = "HammerScript"
  227. Script6.Parent = Tool0
  228. table.insert(cors,sandbox(Script6,function()
  229. -------- OMG HAX
  230.  
  231. r = game:service("RunService")
  232.  
  233.  
  234. Tool = script.Parent
  235. hammer = Tool.Handle
  236.  
  237. local shockRing = Instance.new("Part")
  238. shockRing.formFactor = 2
  239. shockRing.Size = Vector3.new(1, 0.60, 999999)
  240. shockRing.Anchored = true
  241. shockRing.Locked = true
  242. shockRing.CanCollide = false
  243. shockRing.archivable = false
  244. shockRing.TopSurface = 0
  245. shockRing.BottomSurface = 0
  246. shockRing.Transparency = 1
  247. local decal = Instance.new("Decal")
  248. decal.Face = 1
  249. decal.Texture = "http://www.roblox.com/asset/?version=1&id=1280730"
  250. decal.Parent = shockRing
  251.  
  252. local bottomDecal = decal:Clone()
  253. bottomDecal.Face = 4
  254. bottomDecal.Parent = shockRing
  255.  
  256.  
  257.  
  258. function doDamage(hit)
  259. local humanoid = hit.Parent:findFirstChild("Humanoid")
  260. local vCharacter = Tool.Parent
  261. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  262. local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  263. if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  264. tagHumanoid(humanoid, vPlayer)
  265. humanoid:TakeDamage(humanoid.MaxHealth)
  266. if humanoid.Health <= 0 then
  267. local c = hit.CFrame
  268. hit.CFrame = CFrame.new(hit.Position)
  269. hit.CFrame = c
  270. end
  271. delay(1, function() untagHumanoid(humanoid) end)
  272. else
  273. local c = hit.CFrame hit:BreakJoints() hit.CFrame = CFrame.new(hit.Position) hit.CFrame = c
  274. end
  275. end
  276.  
  277.  
  278. function tagHumanoid(humanoid, player)
  279. local creator_tag = Instance.new("ObjectValue")
  280. creator_tag.Value = player
  281. creator_tag.Name = "creator"
  282. creator_tag.Parent = humanoid
  283. end
  284.  
  285. function untagHumanoid(humanoid)
  286. if humanoid ~= nil then
  287. local tag = humanoid:findFirstChild("creator")
  288. if tag ~= nil then
  289. tag.Parent = nil
  290. end
  291. end
  292. end
  293.  
  294. function blow(obj, pos, notme)
  295. if (obj ~= notme) then
  296. if (obj.className == "Part") or (obj.className == "Seat") then
  297. 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
  298. 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)
  299. end
  300. elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then
  301. local list = obj:GetChildren()
  302. for x = 1, #list do
  303. blow(list[x], pos, notme)
  304. end
  305. end
  306. end
  307. end
  308.  
  309. function attack()
  310. damage = slash_damage
  311. local anim = Instance.new("StringValue")
  312. anim.Name = "toolanim"
  313. anim.Value = "Slash"
  314. anim.Parent = Tool
  315. wait(0.2)
  316.  
  317. print("Blasting!")
  318.  
  319. local pos = hammer.CFrame * (Vector3.new(0, 1.4, 0) * hammer.Mesh.Scale)
  320.  
  321. blow(workspace, pos, Tool.Parent)
  322.  
  323. shockRing.CFrame = CFrame.new(pos)
  324. for x = 1, 29 do
  325. 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)
  326. end
  327. delay(1, function() shockRing.Parent = nil end)
  328. end
  329.  
  330.  
  331. Tool.Enabled = true
  332. function onActivated()
  333.  
  334. if not Tool.Enabled then
  335. return
  336. end
  337.  
  338. Tool.Enabled = false
  339.  
  340. local character = Tool.Parent;
  341. local humanoid = character.Humanoid
  342. if humanoid == nil then
  343. print("Humanoid not found")
  344. return
  345. end
  346.  
  347. hammer.Boom:Play()
  348. attack()
  349.  
  350. wait(0.5)
  351.  
  352. Tool.Enabled = true
  353. end
  354.  
  355.  
  356. script.Parent.Activated:connect(onActivated)
  357. --script.Parent.Equipped:connect(onEquipped)
  358. end))
  359. LocalScript7.Name = "Local Gui"
  360. LocalScript7.Parent = Tool0
  361. LocalScript7.LinkedSource = "http://www.roblox.com/asset/?id=1014476"
  362. Script8.Name = "PUT THIS IN THE WEAPON"
  363. Script8.Parent = Tool0
  364. table.insert(cors,sandbox(Script8,function()
  365. local debounce = false
  366.  
  367. function getPlayer(humanoid)
  368. local players = game.Players:children()
  369. for i = 1, #players do
  370. if players[i].Character.Humanoid == humanoid then return players[i] end
  371. end
  372. return nil
  373. end
  374.  
  375. function onTouch(part)
  376.  
  377. local human = part.Parent:findFirstChild("Humanoid")
  378. if (human ~= nil) and debounce == false then
  379.  
  380. debounce = true
  381.  
  382. local player = getPlayer(human)
  383.  
  384. if (player == nil) then return end
  385.  
  386. script.Parent:clone().Parent = player.Backpack
  387.  
  388. wait(2)
  389. debounce = false
  390. end
  391. end
  392.  
  393.  
  394. script.Parent.Parent.Touched:connect(onTouch)
  395.  
  396. end))
  397. PointLight9.Parent = Tool0
  398. PointLight9.Color = Color3.new(0.666667, 0, 1)
  399. PointLight9.Range = 60
  400. PointLight9.Brightness = 9.9999996802857e+37
  401. for i,v in pairs(mas:GetChildren()) do
  402. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  403. pcall(function() v:MakeJoints() end)
  404. end
  405. mas:Destroy()
  406. for i,v in pairs(cors) do
  407. spawn(function()
  408. pcall(v)
  409. end)
  410. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement