SHOW:
|
|
- or go back to the newest paste.
1 | - | --Created by LuckyPlayerScripter Discord: FenixYT#0390 |
1 | + | if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end |
2 | - | --ROBLOX's Ban Hammer Is back! |
2 | + | print("FE Compatibility: by WaverlyCole & Mokiros") |
3 | InternalData = {} | |
4 | do | |
5 | script.Parent = owner.Character | |
6 | local Event = Instance.new("RemoteEvent") | |
7 | Event.Name = "UserInput" | |
8 | local function NewFakeEvent() | |
9 | local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect | |
10 | return Fake | |
11 | end | |
12 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()} | |
13 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()} | |
14 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...) | |
15 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil | |
16 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
17 | local function TriggerEvent(self,Event,...) | |
18 | local Trigger = Mouse[Event] | |
19 | if Trigger and Trigger.fakeEvent and Trigger.Function then | |
20 | Trigger.Function(...) | |
21 | end | |
22 | end | |
23 | Mouse.TrigEvent = TriggerEvent | |
24 | UserInputService.TrigEvent = TriggerEvent | |
25 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
26 | if FiredBy.Name ~= owner.Name then end | |
27 | if Input.MouseEvent then | |
28 | Mouse.Target = Input.Target | |
29 | Mouse.Hit = Input.Hit | |
30 | else | |
31 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
32 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then | |
33 | return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") | |
34 | end | |
35 | for _,Action in pairs(ContextActionService.Actions) do | |
36 | for _,Key in pairs(Action.Keys) do | |
37 | if Key==Input.KeyCode then | |
38 | Action.Function(Action.Name,Input.UserInputState,Input) | |
39 | end | |
40 | end | |
41 | end | |
42 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
43 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
44 | end | |
45 | end) | |
46 | InternalData["Mouse"] = Mouse | |
47 | InternalData["ContextActionService"] = ContextActionService | |
48 | InternalData["UserInputService"] = UserInputService | |
49 | Event.Parent = NLS([[ | |
50 | local Player = owner | |
51 | local Event = script:WaitForChild("UserInput") | |
52 | local UserInputService = game:GetService("UserInputService") | |
53 | local Mouse = Player:GetMouse() | |
54 | local Input = function(Input,gameProcessedEvent) | |
55 | if gameProcessedEvent then return end | |
56 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState}) | |
57 | end | |
58 | UserInputService.InputBegan:Connect(Input) | |
59 | UserInputService.InputEnded:Connect(Input) | |
60 | local Hit,Target | |
61 | while wait(1/30) do | |
62 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
63 | Hit,Target = Mouse.Hit,Mouse.Target | |
64 | Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit}) | |
65 | end | |
66 | end | |
67 | ]],owner.Character) | |
68 | end | |
69 | RealGame = game;game = setmetatable({},{ | |
70 | __index = function (self,Index) | |
71 | local Sandbox = function (Thing) | |
72 | if Thing:IsA("Player") then | |
73 | local RealPlayer = Thing | |
74 | return setmetatable({},{ | |
75 | __index = function (self,Index) | |
76 | local Type = type(RealPlayer[Index]) | |
77 | if Type == "function" then | |
78 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
79 | return function (self) | |
80 | return InternalData["Mouse"] | |
81 | end | |
82 | end | |
83 | return function (self,...) | |
84 | return RealPlayer[Index](RealPlayer,...) | |
85 | end | |
86 | else | |
87 | if Index == "PlrObj" then | |
88 | return RealPlayer | |
89 | end | |
90 | return RealPlayer[Index] | |
91 | end | |
92 | end; | |
93 | __tostring = function(self) | |
94 | return RealPlayer.Name | |
95 | end | |
96 | }) | |
97 | end | |
98 | end | |
99 | if RealGame[Index] then | |
100 | local Type = type(RealGame[Index]) | |
101 | if Type == "function" then | |
102 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
103 | return function (self,Service) | |
104 | if Service:lower() == "players" then | |
105 | return setmetatable({},{ | |
106 | __index = function (self2,Index2) | |
107 | local RealService = RealGame:GetService(Service) | |
108 | local Type2 = type(Index2) | |
109 | if Type2 == "function" then | |
110 | return function (self,...) | |
111 | return RealService[Index2](RealService,...) | |
112 | end | |
113 | else | |
114 | if Index2:lower() == "localplayer" then | |
115 | return Sandbox(owner) | |
116 | end | |
117 | return RealService[Index2] | |
118 | end | |
119 | end; | |
120 | __tostring = function(self) | |
121 | return RealGame:GetService(Service).Name | |
122 | end | |
123 | }) | |
124 | elseif Service:lower() == "contextactionservice" then | |
125 | return InternalData["ContextActionService"] | |
126 | elseif Service:lower() == "contextactionservice" then | |
127 | return InternalData["UserInputService"] | |
128 | elseif Service:lower() == "runservice" then | |
129 | return setmetatable({},{ | |
130 | __index = function(self2,Index2) | |
131 | local RealService = RealGame:GetService(Service) | |
132 | local Type2 = type(Index2) | |
133 | if Type2 == "function" then | |
134 | return function (self,...) | |
135 | return RealService[Index2](RealService,...) | |
136 | end | |
137 | else | |
138 | if Index2:lower() == "bindtorenderstep" then | |
139 | return function (self,Name,Priority,Function) | |
140 | return RealGame:GetService("RunService").Stepped:Connect(Function) | |
141 | end | |
142 | end | |
143 | if Index2:lower() == "renderstepped" then | |
144 | return RealService["Stepped"] | |
145 | end | |
146 | return RealService[Index2] | |
147 | end | |
148 | end | |
149 | }) | |
150 | else | |
151 | return RealGame:GetService(Service) | |
152 | end | |
153 | end | |
154 | end | |
155 | return function (self,...) | |
156 | return RealGame[Index](RealGame,...) | |
157 | end | |
158 | else | |
159 | if game:GetService(Index) then | |
160 | return game:GetService(Index) | |
161 | end | |
162 | return RealGame[Index] | |
163 | end | |
164 | else | |
165 | return nil | |
166 | end | |
167 | end | |
168 | });Game = game;owner = game:GetService("Players").LocalPlayer;script = {} | |
169 | print("Made by Err idk but converted by meh") | |
170 | ||
171 | plr = game.Players.LocalPlayer | |
172 | char = plr.Character | |
173 | mouse = plr:GetMouse() | |
174 | whitecolor = Color3.new(1,1,1) | |
175 | epicmode = false | |
176 | normal = true | |
177 | for i,v in pairs(char:GetChildren()) do | |
178 | if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "ShirtGraphic" then | |
179 | v:Destroy() | |
180 | end | |
181 | end | |
182 | local shirt = Instance.new("Shirt",char) | |
183 | shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=607785311" | |
184 | local pants = Instance.new("Pants",char) | |
185 | pants.PantsTemplate = "http://www.roblox.com/asset/?id=348211416" | |
186 | local bdycolors = char["Body Colors"] | |
187 | bdycolors.HeadColor3 = whitecolor | |
188 | bdycolors.LeftArmColor3 = whitecolor | |
189 | bdycolors.LeftLegColor3 = whitecolor | |
190 | bdycolors.RightArmColor3 = whitecolor | |
191 | bdycolors.RightLegColor3 = whitecolor | |
192 | bdycolors.TorsoColor3 = whitecolor | |
193 | ||
194 | -- Face | |
195 | char.Head.face.Texture = "http://www.roblox.com/asset/?id=26053664" | |
196 | z = Instance.new("Sound", char) | |
197 | z.SoundId = "rbxassetid://837104892"--837104892 | |
198 | z.Looped = true | |
199 | z.Pitch = 1 | |
200 | z.Volume = 10 | |
201 | wait(.001) | |
202 | z:Play() | |
203 | -------------------------------- | |
204 | plr1 = Instance.new("Part",char) | |
205 | plr1.FormFactor = Enum.FormFactor.Custom | |
206 | plr1.Size = Vector3.new(1.8,0.8,1.8) | |
207 | plr1.CanCollide = false | |
208 | plr1.Locked = true | |
209 | plr1.BottomSurface = Enum.SurfaceType.Smooth | |
210 | plr1.TopSurface = Enum.SurfaceType.Smooth | |
211 | SMesh = Instance.new("SpecialMesh", p1) | |
212 | SMesh.MeshId = "http://www.roblox.com/asset/?id=71483350" | |
213 | SMesh.MeshType = Enum.MeshType.FileMesh | |
214 | SMesh.Name = "Mesh" | |
215 | SMesh.TextureId = "http://www.roblox.com/asset/?id=607698990" | |
216 | w1 = Instance.new("Weld", hed) | |
217 | w1.Part0 = hed | |
218 | w1.C0 = CFrame.new(0,0.76,0.2)*CFrame.Angles(0.3,0,0) | |
219 | w1.Part1 = p1 | |
220 | w1.C1 = CFrame.new(0, 0, 0) | |
221 | ----------- | |
222 | CV="Maroon" | |
223 | Player = game.Players.LocalPlayer | |
224 | Character = Player.Character | |
225 | local txt = Instance.new("BillboardGui", Character) | |
226 | txt.Adornee = Character .Head | |
227 | txt.Name = "_status" | |
228 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
229 | txt.StudsOffset = Vector3.new(-9, 8, 0) | |
230 | local text = Instance.new("TextLabel", txt) | |
231 | text.Size = UDim2.new(10, 0, 7, 0) | |
232 | text.FontSize = "Size24" | |
233 | text.TextScaled = true | |
234 | text.TextTransparency = 0 | |
235 | text.BackgroundTransparency = 1 | |
236 | text.TextTransparency = 0 | |
237 | text.TextStrokeTransparency = 0 | |
238 | text.Font = "Arcade" | |
239 | text.TextStrokeColor3 = Color3.new(255,0,0) | |
240 | ||
241 | v=Instance.new("Part") | |
242 | v.Name = "ColorBrick" | |
243 | v.Parent=Player.Character | |
244 | v.FormFactor="Symmetric" | |
245 | v.Anchored=true | |
246 | v.CanCollide=false | |
247 | v.BottomSurface="Smooth" | |
248 | v.TopSurface="Smooth" | |
249 | v.Size=Vector3.new(10,5,3) | |
250 | v.Transparency=1 | |
251 | v.CFrame=Character.Torso.CFrame | |
252 | v.BrickColor=BrickColor.new(CV) | |
253 | v.Transparency=1 | |
254 | text.TextColor3 = Color3.new(255,0,0) | |
255 | v.Shape="Block" | |
256 | text.Text = "ROBLOX" | |
257 | ----------------------------------------- | |
258 | function sandbox(var,func) | |
259 | local env = getfenv(func) | |
260 | local newenv = setmetatable({},{ | |
261 | __index = function(self,k) | |
262 | if k=="script" then | |
263 | return var | |
264 | else | |
265 | return env[k] | |
266 | end | |
267 | end, | |
268 | }) | |
269 | setfenv(func,newenv) | |
270 | return func | |
271 | end | |
272 | cors = {} | |
273 | mas = Instance.new("Model",game:GetService("Lighting")) | |
274 | Tool0 = Instance.new("Tool") | |
275 | Part1 = Instance.new("Part") | |
276 | Sound2 = Instance.new("Sound") | |
277 | SpecialMesh3 = Instance.new("SpecialMesh") | |
278 | ParticleEmitter4 = Instance.new("ParticleEmitter") | |
279 | PointLight5 = Instance.new("PointLight") | |
280 | Script6 = Instance.new("Script") | |
281 | LocalScript7 = Instance.new("LocalScript") | |
282 | Script8 = Instance.new("Script") | |
283 | PointLight9 = Instance.new("PointLight") | |
284 | Tool0.Name = "BanHammer" | |
285 | Tool0.Parent = mas | |
286 | Tool0.Grip = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
287 | Tool0.GripPos = Vector3.new(0, -1, 0) | |
288 | Part1.Name = "Handle" | |
289 | Part1.Parent = Tool0 | |
290 | 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) | |
291 | Part1.Orientation = Vector3.new(89.9799957, -168.729996, -102.259995) | |
292 | Part1.Position = Vector3.new(32.008461, 0.891610622, -25.8348217) | |
293 | Part1.Rotation = Vector3.new(90.0199966, 0, 66.4599991) | |
294 | Part1.Velocity = Vector3.new(0.00131022232, -0.00751958555, 0.00376307126) | |
295 | Part1.Size = Vector3.new(1, 4.80000019, 1) | |
296 | Part1.RotVelocity = Vector3.new(-0.00235919608, 0.000430068758, 0.00397496484) | |
297 | Sound2.Name = "Boom" | |
298 | Sound2.Parent = Part1 | |
299 | Sound2.SoundId = "rbxasset://sounds/Rocket shot.wav" | |
300 | Sound2.Volume = 1 | |
301 | SpecialMesh3.Parent = Part1 | |
302 | SpecialMesh3.MeshId = "rbxassetid://10604848" | |
303 | SpecialMesh3.TextureId = "rbxassetid://94840359" | |
304 | SpecialMesh3.MeshType = Enum.MeshType.FileMesh | |
305 | ParticleEmitter4.Parent = Part1 | |
306 | ParticleEmitter4.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 0, 0)) | |
307 | ParticleEmitter4.LightInfluence = 1 | |
308 | PointLight5.Parent = Part1 | |
309 | PointLight5.Color = Color3.new(1, 0, 0.0156863) | |
310 | PointLight5.Range = 60 | |
311 | PointLight5.Brightness = 9.9999998430675e+17 | |
312 | Script6.Name = "HammerScript" | |
313 | Script6.Parent = Tool0 | |
314 | table.insert(cors,sandbox(Script6,function() | |
315 | -------- OMG HAX | |
316 | ||
317 | r = game:service("RunService") | |
318 | ||
319 | ||
320 | Tool = script.Parent | |
321 | hammer = Tool.Handle | |
322 | ||
323 | local shockRing = Instance.new("Part") | |
324 | shockRing.formFactor = 2 | |
325 | shockRing.Size = Vector3.new(1, 0.60, 999999) | |
326 | shockRing.Anchored = true | |
327 | shockRing.Locked = true | |
328 | shockRing.CanCollide = false | |
329 | shockRing.archivable = false | |
330 | shockRing.TopSurface = 0 | |
331 | shockRing.BottomSurface = 0 | |
332 | shockRing.Transparency = 1 | |
333 | local decal = Instance.new("Decal") | |
334 | decal.Face = 1 | |
335 | decal.Texture = "http://www.roblox.com/asset/?version=1&id=1280730" | |
336 | decal.Parent = shockRing | |
337 | ||
338 | local bottomDecal = decal:Clone() | |
339 | bottomDecal.Face = 4 | |
340 | bottomDecal.Parent = shockRing | |
341 | ||
342 | ||
343 | ||
344 | function doDamage(hit) | |
345 | local humanoid = hit.Parent:findFirstChild("Humanoid") | |
346 | local vCharacter = Tool.Parent | |
347 | local vPlayer = game.Players:playerFromCharacter(vCharacter) | |
348 | local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character | |
349 | if humanoid~=nil and humanoid ~= hum and hum ~= nil then | |
350 | tagHumanoid(humanoid, vPlayer) | |
351 | humanoid:TakeDamage(humanoid.MaxHealth) | |
352 | if humanoid.Health <= 0 then | |
353 | local c = hit.CFrame | |
354 | hit.CFrame = CFrame.new(hit.Position) | |
355 | hit.CFrame = c | |
356 | end | |
357 | delay(1, function() untagHumanoid(humanoid) end) | |
358 | else | |
359 | local c = hit.CFrame hit:BreakJoints() hit.CFrame = CFrame.new(hit.Position) hit.CFrame = c | |
360 | end | |
361 | end | |
362 | ||
363 | ||
364 | function tagHumanoid(humanoid, player) | |
365 | local creator_tag = Instance.new("ObjectValue") | |
366 | creator_tag.Value = player | |
367 | creator_tag.Name = "creator" | |
368 | creator_tag.Parent = humanoid | |
369 | end | |
370 | ||
371 | function untagHumanoid(humanoid) | |
372 | if humanoid ~= nil then | |
373 | local tag = humanoid:findFirstChild("creator") | |
374 | if tag ~= nil then | |
375 | tag.Parent = nil | |
376 | end | |
377 | end | |
378 | end | |
379 | ||
380 | function blow(obj, pos, notme) | |
381 | if (obj ~= notme) then | |
382 | if (obj.className == "Part") or (obj.className == "Seat") then | |
383 | 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 | |
384 | 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) | |
385 | end | |
386 | elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then | |
387 | local list = obj:GetChildren() | |
388 | for x = 1, #list do | |
389 | blow(list[x], pos, notme) | |
390 | end | |
391 | end | |
392 | end | |
393 | end | |
394 | ||
395 | function attack() | |
396 | damage = slash_damage | |
397 | local anim = Instance.new("StringValue") | |
398 | anim.Name = "toolanim" | |
399 | anim.Value = "Slash" | |
400 | anim.Parent = Tool | |
401 | wait(0.2) | |
402 | ||
403 | print("Blasting!") | |
404 | ||
405 | local pos = hammer.CFrame * (Vector3.new(0, 1.4, 0) * hammer.Mesh.Scale) | |
406 | ||
407 | blow(workspace, pos, Tool.Parent) | |
408 | ||
409 | shockRing.CFrame = CFrame.new(pos) | |
410 | for x = 1, 29 do | |
411 | 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) | |
412 | end | |
413 | delay(1, function() shockRing.Parent = nil end) | |
414 | end | |
415 | ||
416 | ||
417 | Tool.Enabled = true | |
418 | function onActivated() | |
419 | ||
420 | if not Tool.Enabled then | |
421 | return | |
422 | end | |
423 | ||
424 | Tool.Enabled = false | |
425 | ||
426 | local character = Tool.Parent; | |
427 | local humanoid = character.Humanoid | |
428 | if humanoid == nil then | |
429 | print("Humanoid not found") | |
430 | return | |
431 | end | |
432 | ||
433 | hammer.Boom:Play() | |
434 | attack() | |
435 | ||
436 | wait(0.5) | |
437 | ||
438 | Tool.Enabled = true | |
439 | end | |
440 | ||
441 | ||
442 | script.Parent.Activated:connect(onActivated) | |
443 | --script.Parent.Equipped:connect(onEquipped) | |
444 | end)) | |
445 | LocalScript7.Name = "Local Gui" | |
446 | LocalScript7.Parent = Tool0 | |
447 | LocalScript7.LinkedSource = "http://www.roblox.com/asset/?id=1014476" | |
448 | Script8.Name = "PUT THIS IN THE WEAPON" | |
449 | Script8.Parent = Tool0 | |
450 | table.insert(cors,sandbox(Script8,function() | |
451 | local debounce = false | |
452 | ||
453 | function getPlayer(humanoid) | |
454 | local players = game.Players:children() | |
455 | for i = 1, #players do | |
456 | if players[i].Character.Humanoid == humanoid then return players[i] end | |
457 | end | |
458 | return nil | |
459 | end | |
460 | ||
461 | function onTouch(part) | |
462 | ||
463 | local human = part.Parent:findFirstChild("Humanoid") | |
464 | if (human ~= nil) and debounce == false then | |
465 | ||
466 | debounce = true | |
467 | ||
468 | local player = getPlayer(human) | |
469 | ||
470 | if (player == nil) then return end | |
471 | ||
472 | script.Parent:clone().Parent = player.Backpack | |
473 | ||
474 | wait(2) | |
475 | debounce = false | |
476 | end | |
477 | end | |
478 | ||
479 | ||
480 | script.Parent.Parent.Touched:connect(onTouch) | |
481 | ||
482 | end)) | |
483 | PointLight9.Parent = Tool0 | |
484 | PointLight9.Color = Color3.new(0.666667, 0, 1) | |
485 | PointLight9.Range = 60 | |
486 | PointLight9.Brightness = 9.9999996802857e+37 | |
487 | for i,v in pairs(mas:GetChildren()) do | |
488 | v.Parent = game:GetService("Players").LocalPlayer.Backpack | |
489 | pcall(function() v:MakeJoints() end) | |
490 | end | |
491 | mas:Destroy() | |
492 | for i,v in pairs(cors) do | |
493 | spawn(function() | |
494 | pcall(v) | |
495 | end) | |
496 | end |