View difference between Paste ID: 2JHRYub4 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
local player = owner
88
local char = player.Character
89
local invisible = false
90
local invisiblehammer = false
91
92
local tool = Instance.new("Tool",workspace)
93
tool.TextureId = "http://www.roblox.com/asset/?id=10684453"
94
tool.Enabled = true
95
tool.Name = "BanHammer"
96
local thma = Instance.new("Camera",tool)
97
thma.Name = "ThumbnailCamera"
98
local smack = Instance.new("Sound",tool)
99
smack.Name = "Smash"
100
smack.Volume = 1
101
smack.SoundId = "rbxassetid://147722910" -- rbxassetid://147722910 rbxassetid://514867425
102
local handle = Instance.new("Part",tool)
103
handle.Name = "Handle"
104
handle.Size = Vector3.new(1, 5.2, 1)
105
handle.Anchored = true
106
handle.Position = Vector3.new(0,6,0)
107
local txtfag = Instance.new("BillboardGui",handle)
108
txtfag.Name = "BanHammerLabel"
109
txtfag.Size = UDim2.new(2, 0, 1.2, 0)
110
txtfag.StudsOffset = Vector3.new(-5, 3, 0)
111
txtfag.Enabled = false
112
local textfag = Instance.new("TextLabel", txtfag)
113
textfag.Size = UDim2.new(6, 0, 1, 0)
114
textfag.FontSize = "Size8"
115
textfag.TextScaled = true
116
textfag.TextTransparency = 0
117
textfag.BackgroundTransparency = 1
118
textfag.TextTransparency = 0
119
textfag.TextStrokeTransparency = 0
120
textfag.Font = Enum.Font.Highway
121
textfag.Text = "The Ban Hammer"
122
textfag.TextStrokeColor3 = Color3.new(0.55, 0.9, 0.16)
123
local sparkles = Instance.new("Sparkles",handle)
124
sparkles.SparkleColor = Color3.new(0,0,0)
125
sparkles.Enabled = true
126
local mesh = Instance.new("SpecialMesh",handle)
127
mesh.Name = "Mesh"
128
mesh.MeshType = Enum.MeshType.FileMesh
129
mesh.MeshId = "http://www.roblox.com/asset/?id=10604848"
130
mesh.TextureId = "http://www.roblox.com/asset/?id=10605252"
131
mesh.Scale = Vector3.new(0.5,0.5,0.5)
132
mesh.Offset = Vector3.new(0,0,0)
133
mesh.VertexColor = Vector3.new(1,1,1)
134
script.Parent = tool
135
local animation = Instance.new("Animation",tool)
136
animation.Name = "Animation"
137
animation.AnimationId = "http://www.roblox.com/twohandswordwithswingout-item?id=32659706"
138
--Impletion [awful coding i know]
139
wait()
140
explode=false
141
soundlock=false
142
lock=false
143
script.Parent.Activated:connect(function(click)
144
	if lock==false then
145
	lock=true
146
	local char=script.Parent.Parent
147
	local anim=char.Humanoid:LoadAnimation(script.Parent.Animation)
148
	anim:Play()
149
	wait(1.4)
150
	lock=false
151
	end
152
end)
153
154
script.Parent.Handle.Touched:connect(function(hit)
155
	if tool.Parent.ClassName=="Model"then
156
	if hit.Parent:FindFirstChild("BanHammer")==nil then
157
	hit.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=432180642"
158
	local gethum=hit.Parent:GetChildren()
159
		for i=1,#gethum do
160
			if gethum[i].ClassName=="Humanoid" and gethum[i] ~= nil and hit.Parent.Name ~= tool.Parent.Name and lock==true then
161
				local hum=gethum[i]
162
				hum.Sit=true
163
				if soundlock==false then
164
					soundlock=true
165
					script.Parent.Smash:Play()
166
				end
167
			local character=hit.Parent
168
			local b=character:GetChildren()
169
				for i=1,#b do
170
					if b[i]:IsA("Part") and b[i] ~= nil then
171
						b[i].CanCollide=false
172
						b[i].Anchored=false
173
					end
174
				end
175
					local HumanoidRootPart=hit.Parent:findFirstChild("HumanoidRootPart")
176
					character.HumanoidRootPart.Velocity=tool.Parent.HumanoidRootPart.CFrame.lookVector * 1200 
177
					character.HumanoidRootPart.Velocity=character.HumanoidRootPart.Velocity + Vector3.new(0,300,0)
178
					wait(1.8)
179
					if explode==false then
180
						explode=true
181
						local expl=Instance.new("Explosion", workspace)
182
						expl.BlastPressure=900
183
						expl.BlastRadius=1
184
						expl.Position=HumanoidRootPart.Position
185
						for _,xccrptparts in pairs(character:GetChildren())do
186
							if xccrptparts.ClassName=="Part"then
187
							xccrptparts.Transparency = 0
188
							xccrptparts.Anchored = false
189
							end
190
							if xccrptparts.ClassName=="MeshPart"then
191
							xccrptparts.Transparency = 0
192
							xccrptparts.Anchored = false
193
							end
194
						end
195
						HumanoidRootPart.Transparency = 1
196
						local p=game.Players:GetPlayerFromCharacter(character)
197
						character.Humanoid:Destroy()
198
					end
199
				end
200
			end
201
	wait(1)
202
	soundlock=false
203
	explode=false
204
	end
205
	else
206
		if invisible==true then
207
	hit.Parent.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=252557606"
208
	local invisibility = coroutine.wrap(function()
209
		for _,en in pairs(hit.Parent:GetChildren())do
210
			if en.ClassName=="Part"then
211
				local turninv = coroutine.wrap(function(part)
212
					for count = 1,10 do
213
						part.Transparency = part.Transparency + 0.1
214
						wait(.1)
215
					end
216
				end)
217
				turninv(en)
218
			end
219
			if en.ClassName=="MeshPart"then
220
				local turninv = coroutine.wrap(function(part)
221
					for count = 1,10 do
222
						part.Transparency = part.Transparency + 0.1
223
						wait(.1)
224
					end
225
				end)
226
				turninv(en)
227
			end
228
			if en.ClassName=="Hat"then
229
				local turninv = coroutine.wrap(function(part)
230
					for count = 1,10 do
231
						part.Transparency = part.Transparency + 0.1
232
						wait(.1)
233
					end
234
				end)
235
				turninv(en.Handle)
236
			end
237
			if en.ClassName=="Accessory"then
238
				local turninv = coroutine.wrap(function(part)
239
					for count = 1,10 do
240
						part.Transparency = part.Transparency + 0.1
241
						wait(.1)
242
					end
243
				end)
244
				turninv(en.Handle)
245
			end
246
		end
247
		for count = 1,10 do
248
			hit.Parent.Head.face.Transparency = hit.Parent.Head.face.Transparency + 0.1
249
			if invisiblehammer == true then
250
			handle.Transparency = handle.Transparency + 0.1
251
			end
252
			textfag.TextTransparency = textfag.TextTransparency + 0.1
253
			textfag.TextStrokeTransparency = textfag.TextStrokeTransparency + 0.1
254
			sparkles.Enabled = false
255
			wait(.1)
256
		end 
257
	end)
258
	invisibility()
259
	hit.Parent:WaitForChild("Humanoid").HealthDisplayDistance = 0
260
	hit.Parent:WaitForChild("Humanoid").NameDisplayDistance = 0
261
end
262
	end
263
end)
264
265
using = false
266
267
script.Parent.Equipped:connect(function(equip)
268
	wait(.1)
269
	tool.Parent.Humanoid.MaxHealth=math.huge*math.huge
270
	tool.Parent.Humanoid.Health=math.huge*math.huge
271
	tool.Parent.Humanoid.WalkSpeed=100
272
	using = true
273
end)
274
275
script.Parent.Unequipped:connect(function(equip)
276
	if not tool.Parent:FindFirstChild("Humanoid")~=nil then
277
	if not tool.Parent.Humanoid.Health==0 then
278
	wait(.1)
279
	tool.Parent.Parent.Character.Humanoid.MaxHealth=100
280
	tool.Parent.Parent.Character.Humanoid.Health=100
281
	tool.Parent.Parent.Character.Humanoid.WalkSpeed=16
282
	sparkles.SparkleColor = Color3.new(0,0,0)
283
	using = false
284
	end
285
	end
286
end)
287
288
local depth = 1
289
local speed = 50
290
local itsalive = Instance.new("Sound",tool)
291
itsalive.Name = "NotEquippedMusic"
292
itsalive.SoundId = "rbxassetid://149119648"
293
itsalive.Volume = 8.75
294
itsalive.Looped = true
295
function alive()
296
for i = 1, speed do wait()
297
handle.CFrame = handle.CFrame * CFrame.new(0,-depth/speed,0) 
298
end
299
for i = 1, speed do wait()
300
handle.CFrame = handle.CFrame * CFrame.new(0,depth/speed,0) 
301
end
302
end
303
304
print("Ban hammer Created!")
305
306
while true do
307
	if using==true then
308
		txtfag.Enabled = false
309
		handle.Anchored = false
310
		itsalive:Stop()
311
		sparkles.SparkleColor = BrickColor.Random().Color
312
		if tool.Parent:FindFirstChild("Humanoid")~=nil then
313
			tool.Parent = workspace
314
			handle.Position = handle.Position + Vector3.new(0,3,0)
315
			using=false
316
		end
317
		if tool.Parent:WaitForChild("Humanoid").Health==0 then
318
			tool.Parent = workspace
319
			handle.Position = handle.Position + Vector3.new(0,3,0)
320
			using=false
321
		end
322
		wait(.5)
323
	else
324
txtfag.Enabled = true
325
handle.Anchored = true
326
itsalive:Play()
327
repeat
328
sparkles.SparkleColor = Color3.new(0,0,0)
329
alive()
330
until using==true
331
	end
332
end