View difference between Paste ID: drwrB7H1 and 9qLy0ug3
SHOW: | | - or go back to the newest paste.
1-
local player = game.Players.LocalPlayer
1+
-- This script has been converted to FE by iPxter
2
3
4
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6
do
7
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
8
	script.Parent = Player.Character
9
10
	--RemoteEvent for communicating
11
	local Event = Instance.new("RemoteEvent")
12
	Event.Name = "UserInput_Event"
13
14
	--Fake event to make stuff like Mouse.KeyDown work
15
	local function fakeEvent()
16
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
17
		t.connect = t.Connect
18
		return t
19
	end
20
21
	--Creating fake input objects with fake variables
22
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
23
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
24
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
25
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
26
	end}
27
	--Merged 2 functions into one by checking amount of arguments
28
	CAS.UnbindAction = CAS.BindAction
29
30
	--This function will trigger the events that have been :Connect()'ed
31
	local function te(self,ev,...)
32
		local t = m[ev]
33
		if t and t._fakeEvent and t.Function then
34
			t.Function(...)
35
		end
36
	end
37
	m.TrigEvent = te
38
	UIS.TrigEvent = te
39
40
	Event.OnServerEvent:Connect(function(plr,io)
41
	    if plr~=Player then return end
42
		if io.isMouse then
43
			m.Target = io.Target
44
			m.Hit = io.Hit
45
		else
46
			local b = io.UserInputState == Enum.UserInputState.Begin
47
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
48
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
49
			end
50
			for _,t in pairs(CAS.Actions) do
51
				for _,k in pairs(t.Keys) do
52
					if k==io.KeyCode then
53
						t.Function(t.Name,io.UserInputState,io)
54
					end
55
				end
56
			end
57
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
58
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
59
	    end
60
	end)
61
	Event.Parent = NLS([==[
62
	local Player = game:GetService("Players").LocalPlayer
63
	local Event = script:WaitForChild("UserInput_Event")
64
65
	local UIS = game:GetService("UserInputService")
66
	local input = function(io,a)
67
		if a then return end
68
		--Since InputObject is a client-side instance, we create and pass table instead
69
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
70
	end
71
	UIS.InputBegan:Connect(input)
72
	UIS.InputEnded:Connect(input)
73
74
	local Mouse = Player:GetMouse()
75
	local h,t
76
	--Give the server mouse data 30 times every second, but only if the values changed
77
	--If player is not moving their mouse, client won't fire events
78
	while wait(1/30) do
79
		if h~=Mouse.Hit or t~=Mouse.Target then
80
			h,t=Mouse.Hit,Mouse.Target
81
			Event:FireServer({isMouse=true,Target=t,Hit=h})
82
		end
83
	end]==],Player.Character)
84
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
85
end
86
87
88
local player = owner
89
local char = player.Character
90
local invisible = false
91
local invisiblehammer = false
92
93
local tool = Instance.new("Tool",workspace)
94
tool.TextureId = "http://www.roblox.com/asset/?id=10684453"
95
tool.Enabled = true
96
tool.Name = "BanHammer"
97
local thma = Instance.new("Camera",tool)
98
thma.Name = "ThumbnailCamera"
99
local smack = Instance.new("Sound",tool)
100
smack.Name = "Smash"
101
smack.Volume = 1
102
smack.SoundId = "rbxassetid://147722910" -- rbxassetid://147722910 rbxassetid://514867425
103
local handle = Instance.new("Part",tool)
104
handle.Name = "Handle"
105
handle.Size = Vector3.new(1, 5.2, 1)
106
handle.Anchored = true
107
handle.Position = Vector3.new(0,6,0)
108
local txtfag = Instance.new("BillboardGui",handle)
109
txtfag.Name = "BanHammerLabel"
110
txtfag.Size = UDim2.new(2, 0, 1.2, 0)
111
txtfag.StudsOffset = Vector3.new(-5, 3, 0)
112
txtfag.Enabled = false
113
local textfag = Instance.new("TextLabel", txtfag)
114
textfag.Size = UDim2.new(6, 0, 1, 0)
115
textfag.FontSize = "Size8"
116
textfag.TextScaled = true
117
textfag.TextTransparency = 0
118
textfag.BackgroundTransparency = 1
119
textfag.TextTransparency = 0
120
textfag.TextStrokeTransparency = 0
121
textfag.Font = Enum.Font.Highway
122
textfag.Text = "The Ban Hammer"
123
textfag.TextStrokeColor3 = Color3.new(0.55, 0.9, 0.16)
124
local sparkles = Instance.new("Sparkles",handle)
125
sparkles.SparkleColor = Color3.new(0,0,0)
126
sparkles.Enabled = true
127
local mesh = Instance.new("SpecialMesh",handle)
128
mesh.Name = "Mesh"
129
mesh.MeshType = Enum.MeshType.FileMesh
130
mesh.MeshId = "http://www.roblox.com/asset/?id=10604848"
131
mesh.TextureId = "http://www.roblox.com/asset/?id=10605252"
132
mesh.Scale = Vector3.new(0.5,0.5,0.5)
133
mesh.Offset = Vector3.new(0,0,0)
134
mesh.VertexColor = Vector3.new(1,1,1)
135
script.Parent = tool
136
local animation = Instance.new("Animation",tool)
137
animation.Name = "Animation"
138
animation.AnimationId = "http://www.roblox.com/twohandswordwithswingout-item?id=32659706"
139
--Impletion [awful coding i know]
140
wait()
141
explode=false
142
soundlock=false
143
lock=false
144
script.Parent.Activated:connect(function(click)
145
	if lock==false then
146
	lock=true
147
	local char=script.Parent.Parent
148
	local anim=char.Humanoid:LoadAnimation(script.Parent.Animation)
149
	anim:Play()
150
	wait(1.4)
151
	lock=false
152
	end
153
end)
154
155
script.Parent.Handle.Touched:connect(function(hit)
156
	if tool.Parent.ClassName=="Model"then
157
	if hit.Parent:FindFirstChild("BanHammer")==nil then
158
	hit.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=432180642"
159
	local gethum=hit.Parent:GetChildren()
160
		for i=1,#gethum do
161
			if gethum[i].ClassName=="Humanoid" and gethum[i] ~= nil and hit.Parent.Name ~= tool.Parent.Name and lock==true then
162
				local hum=gethum[i]
163
				hum.Sit=true
164
				if soundlock==false then
165
					soundlock=true
166
					script.Parent.Smash:Play()
167
				end
168
			local character=hit.Parent
169
			local b=character:GetChildren()
170
				for i=1,#b do
171
					if b[i]:IsA("Part") and b[i] ~= nil then
172
						b[i].CanCollide=false
173
						b[i].Anchored=false
174
					end
175
				end
176
					local HumanoidRootPart=hit.Parent:findFirstChild("HumanoidRootPart")
177
					character.HumanoidRootPart.Velocity=tool.Parent.HumanoidRootPart.CFrame.lookVector * 1200 
178
					character.HumanoidRootPart.Velocity=character.HumanoidRootPart.Velocity + Vector3.new(0,300,0)
179
					wait(1.8)
180
					if explode==false then
181
						explode=true
182
						local expl=Instance.new("Explosion", workspace)
183
						expl.BlastPressure=900
184
						expl.BlastRadius=1
185
						expl.Position=HumanoidRootPart.Position
186
						for _,xccrptparts in pairs(character:GetChildren())do
187
							if xccrptparts.ClassName=="Part"then
188
							xccrptparts.Transparency = 0
189
							xccrptparts.Anchored = false
190
							end
191
							if xccrptparts.ClassName=="MeshPart"then
192
							xccrptparts.Transparency = 0
193
							xccrptparts.Anchored = false
194
							end
195
						end
196
						HumanoidRootPart.Transparency = 1
197
						local p=game.Players:GetPlayerFromCharacter(character)
198
						character.Humanoid:Destroy()
199
					end
200
				end
201
			end
202
	wait(1)
203
	soundlock=false
204
	explode=false
205
	end
206
	else
207
		if invisible==true then
208
	hit.Parent.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=252557606"
209
	local invisibility = coroutine.wrap(function()
210
		for _,en in pairs(hit.Parent:GetChildren())do
211
			if en.ClassName=="Part"then
212
				local turninv = coroutine.wrap(function(part)
213
					for count = 1,10 do
214
						part.Transparency = part.Transparency + 0.1
215
						wait(.1)
216
					end
217
				end)
218
				turninv(en)
219
			end
220
			if en.ClassName=="MeshPart"then
221
				local turninv = coroutine.wrap(function(part)
222
					for count = 1,10 do
223
						part.Transparency = part.Transparency + 0.1
224
						wait(.1)
225
					end
226
				end)
227
				turninv(en)
228
			end
229
			if en.ClassName=="Hat"then
230
				local turninv = coroutine.wrap(function(part)
231
					for count = 1,10 do
232
						part.Transparency = part.Transparency + 0.1
233
						wait(.1)
234
					end
235
				end)
236
				turninv(en.Handle)
237
			end
238
			if en.ClassName=="Accessory"then
239
				local turninv = coroutine.wrap(function(part)
240
					for count = 1,10 do
241
						part.Transparency = part.Transparency + 0.1
242
						wait(.1)
243
					end
244
				end)
245
				turninv(en.Handle)
246
			end
247
		end
248
		for count = 1,10 do
249
			hit.Parent.Head.face.Transparency = hit.Parent.Head.face.Transparency + 0.1
250
			if invisiblehammer == true then
251
			handle.Transparency = handle.Transparency + 0.1
252
			end
253
			textfag.TextTransparency = textfag.TextTransparency + 0.1
254
			textfag.TextStrokeTransparency = textfag.TextStrokeTransparency + 0.1
255
			sparkles.Enabled = false
256
			wait(.1)
257
		end 
258
	end)
259
	invisibility()
260
	hit.Parent:WaitForChild("Humanoid").HealthDisplayDistance = 0
261
	hit.Parent:WaitForChild("Humanoid").NameDisplayDistance = 0
262
end
263
	end
264
end)
265
266
using = false
267
268
script.Parent.Equipped:connect(function(equip)
269
	wait(.1)
270
	tool.Parent.Humanoid.MaxHealth=math.huge*math.huge
271
	tool.Parent.Humanoid.Health=math.huge*math.huge
272
	tool.Parent.Humanoid.WalkSpeed=100
273
	using = true
274
end)
275
276
script.Parent.Unequipped:connect(function(equip)
277
	if not tool.Parent:FindFirstChild("Humanoid")~=nil then
278
	if not tool.Parent.Humanoid.Health==0 then
279
	wait(.1)
280
	tool.Parent.Parent.Character.Humanoid.MaxHealth=100
281
	tool.Parent.Parent.Character.Humanoid.Health=100
282
	tool.Parent.Parent.Character.Humanoid.WalkSpeed=16
283
	sparkles.SparkleColor = Color3.new(0,0,0)
284
	using = false
285
	end
286
	end
287
end)
288
289
local depth = 1
290
local speed = 50
291
local itsalive = Instance.new("Sound",tool)
292
itsalive.Name = "NotEquippedMusic"
293
itsalive.SoundId = "rbxassetid://149119648"
294
itsalive.Volume = 8.75
295
itsalive.Looped = true
296
function alive()
297
for i = 1, speed do wait()
298
handle.CFrame = handle.CFrame * CFrame.new(0,-depth/speed,0) 
299
end
300
for i = 1, speed do wait()
301
handle.CFrame = handle.CFrame * CFrame.new(0,depth/speed,0) 
302
end
303
end
304
305
print("Ban hammer Created!")
306
307
while true do
308
	if using==true then
309
		txtfag.Enabled = false
310
		handle.Anchored = false
311
		itsalive:Stop()
312
		sparkles.SparkleColor = BrickColor.Random().Color
313
		if tool.Parent:FindFirstChild("Humanoid")~=nil then
314
			tool.Parent = workspace
315
			handle.Position = handle.Position + Vector3.new(0,3,0)
316
			using=false
317
		end
318
		if tool.Parent:WaitForChild("Humanoid").Health==0 then
319
			tool.Parent = workspace
320
			handle.Position = handle.Position + Vector3.new(0,3,0)
321
			using=false
322
		end
323
		wait(.5)
324
	else
325
txtfag.Enabled = true
326
handle.Anchored = true
327
itsalive:Play()
328
repeat
329
sparkles.SparkleColor = Color3.new(0,0,0)
330
alive()
331
until using==true
332
	end
333
end