View difference between Paste ID: GmRvqUHW and dGtxAdhU
SHOW: | | - or go back to the newest paste.
1
--https://github.com/Mokiros/roblox-FE-compatibility
2
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3-
warn'edit by boss_kiddos abye'
3+
local Player,game,owner = owner,game
4
local RealPlayer = Player
5
do
6
	print("FE Compatibility code V2 by Mokiros")
7
	local RealPlayer = RealPlayer
8
	script.Parent = RealPlayer.Character
9
10
	--Fake event to make stuff like Mouse.KeyDown work
11
	local Disconnect_Function = function(this)
12
		this[1].Functions[this[2]] = nil
13
	end
14
	local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
15
	local FakeEvent_Metatable = {__index={
16
		Connect = function(this,f)
17
			local i = tostring(math.random(0,10000))
18
			while this.Functions[i] do
19
				i = tostring(math.random(0,10000))
20
			end
21
			this.Functions[i] = f
22
			return setmetatable({this,i},Disconnect_Metatable)
23
		end
24
	}}
25
	FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
26
	local function fakeEvent()
27
		return setmetatable({Functions={}},FakeEvent_Metatable)
28
	end
29
30
	--Creating fake input objects with fake variables
31
    local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
32
    FakeMouse.keyUp = FakeMouse.KeyUp
33
    FakeMouse.keyDown = FakeMouse.KeyDown
34
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
35
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
36
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
37
	end}
38
	--Merged 2 functions into one by checking amount of arguments
39
	CAS.UnbindAction = CAS.BindAction
40
41
	--This function will trigger the events that have been :Connect()'ed
42
	local function TriggerEvent(self,ev,...)
43
		for _,f in pairs(self[ev].Functions) do
44
			f(...)
45
		end
46
	end
47
	FakeMouse.TriggerEvent = TriggerEvent
48
	UIS.TriggerEvent = TriggerEvent
49
50
	--Client communication
51
	local Event = Instance.new("RemoteEvent")
52
	Event.Name = "UserInput_Event"
53
	Event.OnServerEvent:Connect(function(plr,io)
54
	    if plr~=RealPlayer then return end
55
		FakeMouse.Target = io.Target
56
		FakeMouse.Hit = io.Hit
57
		if not io.isMouse then
58
			local b = io.UserInputState == Enum.UserInputState.Begin
59
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
60
				return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
61
			end
62
			if io.UserInputType == Enum.UserInputType.MouseButton2 then
63
				return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
64
			end
65
			for _,t in pairs(CAS.Actions) do
66
				for _,k in pairs(t.Keys) do
67
					if k==io.KeyCode then
68
						t.Function(t.Name,io.UserInputState,io)
69
					end
70
				end
71
			end
72
			FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
73
			UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
74
	    end
75
	end)
76
	Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
77
	local Mouse = owner:GetMouse()
78
	local UIS = game:GetService("UserInputService")
79
	local input = function(io,RobloxHandled)
80
		if RobloxHandled then return end
81
		--Since InputObject is a client-side instance, we create and pass table instead
82
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
83
	end
84
	UIS.InputBegan:Connect(input)
85
	UIS.InputEnded:Connect(input)
86
87
	local h,t
88
	--Give the server mouse data every second frame, but only if the values changed
89
	--If player is not moving their mouse, client won't fire events
90
	local HB = game:GetService("RunService").Heartbeat
91
	while true do
92
		if h~=Mouse.Hit or t~=Mouse.Target then
93
			h,t=Mouse.Hit,Mouse.Target
94
			Event:FireServer({isMouse=true,Target=t,Hit=h})
95
		end
96
		--Wait 2 frames
97
		for i=1,2 do
98
			HB:Wait()
99
		end
100
	end]==],script)
101
102
	----Sandboxed game object that allows the usage of client-side methods and services
103
	--Real game object
104
	local RealGame = game
105
106
	--Metatable for fake service
107
	local FakeService_Metatable = {
108
		__index = function(self,k)
109
			local s = rawget(self,"_RealService")
110
			if s then
111
				return typeof(s[k])=="function"
112
				and function(_,...)return s[k](s,...)end or s[k]
113
			end
114
		end,
115
		__newindex = function(self,k,v)
116
			local s = rawget(self,"_RealService")
117
			if s then s[k]=v end
118
		end
119
	}
120
	local function FakeService(t,RealService)
121
		t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
122
		return setmetatable(t,FakeService_Metatable)
123
	end
124
125
	--Fake game object
126
	local FakeGame = {
127
		GetService = function(self,s)
128
			return rawget(self,s) or RealGame:GetService(s)
129
		end,
130
		Players = FakeService({
131
			LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
132
		},"Players"),
133
		UserInputService = FakeService(UIS,"UserInputService"),
134
		ContextActionService = FakeService(CAS,"ContextActionService"),
135
		RunService = FakeService({
136
			_btrs = {},
137
			RenderStepped = RealGame:GetService("RunService").Heartbeat,
138
			BindToRenderStep = function(self,name,_,fun)
139
				self._btrs[name] = self.Heartbeat:Connect(fun)
140
			end,
141
			UnbindFromRenderStep = function(self,name)
142
				self._btrs[name]:Disconnect()
143
			end,
144
		},"RunService")
145
	}
146
	rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
147
	FakeGame.service = FakeGame.GetService
148
	FakeService(FakeGame,game)
149
	--Changing owner to fake player object to support owner:GetMouse()
150
	game,owner = FakeGame,FakeGame.Players.LocalPlayer
151
end
152
153
wait(0.2)
154
155
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
156
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
157
do
158
	print("FE Compatibility code by Mokiros")
159
	script.Parent = Player.Character
160
161
	--RemoteEvent for communicating
162
	local Event = Instance.new("RemoteEvent")
163
	Event.Name = "UserInput_Event"
164
165
	--Fake event to make stuff like Mouse.KeyDown work
166
	local function fakeEvent()
167
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
168
		t.connect = t.Connect
169
		return t
170
	end
171
172
	--Creating fake input objects with fake variables
173
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
174
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
175
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
176
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
177
	end}
178
	--Merged 2 functions into one by checking amount of arguments
179
	CAS.UnbindAction = CAS.BindAction
180
181
	--This function will trigger the events that have been :Connect()'ed
182
	local function te(self,ev,...)
183
		local t = m[ev]
184
		if t and t._fakeEvent and t.Function then
185
			t.Function(...)
186
		end
187
	end
188
	m.TrigEvent = te
189
	UIS.TrigEvent = te
190
191
	Event.OnServerEvent:Connect(function(plr,io)
192
	    if plr~=Player then return end
193
		if io.isMouse then
194
			m.Target = io.Target
195
			m.Hit = io.Hit
196
		else
197
			local b = io.UserInputState == Enum.UserInputState.Begin
198
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
199
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
200
			end
201
			for _,t in pairs(CAS.Actions) do
202
				for _,k in pairs(t.Keys) do
203
					if k==io.KeyCode then
204
						t.Function(t.Name,io.UserInputState,io)
205
					end
206
				end
207
			end
208
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
209
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
210
	    end
211
	end)
212
	Event.Parent = NLS([==[
213
	local Player = game:GetService("Players").LocalPlayer
214
	local Event = script:WaitForChild("UserInput_Event")
215
216
	local UIS = game:GetService("UserInputService")
217
	local input = function(io,a)
218
		if a then return end
219
		--Since InputObject is a client-side instance, we create and pass table instead
220
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
221
	end
222
	UIS.InputBegan:Connect(input)
223
	UIS.InputEnded:Connect(input)
224
225
	local Mouse = Player:GetMouse()
226
	local h,t
227
	--Give the server mouse data 30 times every second, but only if the values changed
228
	--If player is not moving their mouse, client won't fire events
229
	while wait(1/30) do
230
		if h~=Mouse.Hit or t~=Mouse.Target then
231
			h,t=Mouse.Hit,Mouse.Target
232
			Event:FireServer({isMouse=true,Target=t,Hit=h})
233
		end
234
	end]==],Player.Character)
235
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
236
end
237
--By Rufus14 and Edit by Shrolkers
238
239
local plr = game.Players.LocalPlayer
240
mouse = game.Players.LocalPlayer:GetMouse()
241
local Mouse = Player:GetMouse()
242
songplaying = false
243
song1 = Instance.new("Sound", game.Players.LocalPlayer.Character)
244
song1.SoundId = "rbxassetid://142278993"
245
song1.Volume = 3
246
song1.Looped = true
247
function song(key)
248
	key = key:lower()
249
	if key == "q" then
250
		songplaying = not songplaying
251
		if not songplaying then
252
			song1:Play()
253
		else
254
			song1:Stop()
255
		end
256
	end
257
end
258
mouse.KeyDown:connect(song)
259
bat = Instance.new("Part", game.Players.LocalPlayer.Character)
260
bat.Size = Vector3.new(1, 1, 5)
261
bat.CanCollide = false
262
bat:BreakJoints()
263
swoosh = Instance.new("Sound", bat)
264
swoosh.SoundId = "rbxassetid://1556015863"
265
swoosh.Volume = 5
266
hitsound = Instance.new("Sound", bat)
267
hitsound.SoundId = "rbxassetid://2560872529"
268
hitsound.Volume = 5
269
hitsoundmarker = Instance.new("Sound", bat)
270
hitsoundmarker.SoundId = "rbxassetid://131864673"
271
hitsoundmarker.Volume = 555555
272
weld = Instance.new("Weld", bat)
273
weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
274
weld.Part1 = bat
275
weld.C0 = weld.C0 * CFrame.Angles(0,3.15,0) * CFrame.new(0,-0.95,1.9)
276
print(weld.C0)
277
mesh = Instance.new("SpecialMesh", bat)
278
mesh.MeshId = "http://www.roblox.com/asset/?id=54983181"
279
mesh.TextureId = "http://www.roblox.com/asset/?id=54983107"
280
mesh.Scale = Vector3.new(2.3,2.3,1.8)
281
local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
282
game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Remove()
283
local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
284
rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
285
rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
286
rhandweld.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
287
local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
288
game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Remove()
289
local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
290
lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
291
lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
292
lhandweld.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
293
local llegclone = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
294
game.Players.LocalPlayer.Character.Torso["Left Hip"]:Remove()
295
local llegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
296
llegweld.Part0 = game.Players.LocalPlayer.Character.Torso
297
llegweld.Part1 = game.Players.LocalPlayer.Character["Left Leg"]
298
llegweld.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
299
local rlegclone = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
300
game.Players.LocalPlayer.Character.Torso["Right Hip"]:Remove()
301
local rlegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
302
rlegweld.Part0 = game.Players.LocalPlayer.Character.Torso
303
rlegweld.Part1 = game.Players.LocalPlayer.Character["Right Leg"]
304
rlegweld.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
305
local rootjointclone = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
306
game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Remove()
307
local humanoidrootpart = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
308
humanoidrootpart.Part0 = game.Players.LocalPlayer.Character.HumanoidRootPart
309
humanoidrootpart.Part1 = game.Players.LocalPlayer.Character.Torso
310
for i = 0,0.5 , 0.05 do
311
	humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.00790023804, 0.199968576, -0.00020980835, 0.999964595, -0.00790178124, 0.00306172855, 0.00790151209, 0.999969304, 0.000218808651, -0.0030639898, -0.000195354223, 0.999996841),i)
312
	llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.505001068, -1.86916244, -0.621334076, 0.999965012, 0.00531583838, -0.00659736991, -0.00790282805, 0.865899682, -0.500156105, 0.00305361301, 0.500189841, 0.865911663),i)
313
	lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.60521126, 0.0956981182, 0.261711121, 0.980589807, 0.186369807, -0.0609254427, -0.159354717, 0.938544989, 0.306180835, 0.114243567, -0.290528506, 0.95002687),i)
314
	rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500003815, -1.98082137, 0.341064453, 1.00000024, -4.760921e-06, 6.13927841e-06, 2.53296457e-06, 0.939691961, 0.342023224, -7.70017505e-06, -0.342023879, 0.939692199),i)
315
	rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54322338, 0.0253696442, -0.292896271, 0.992699027, -0.0961229801, 0.0728714988, 0.115717016, 0.929440677, -0.35035944, -0.0340529159, 0.35623306, 0.933778286),i)
316
	game:GetService("RunService").RenderStepped:wait()
317
end
318
canwalk = true
319
swinging = false
320
candamage = true
321
function swing()
322
	if not swinging then
323
		swinging = true
324
		canwalk = false
325
		game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 5
326
		game.Players.LocalPlayer.Character.Humanoid.JumpPower = 25
327
		for i = 0,1 , 0.05 do
328
			humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, -0.060305357, 0.342018127, 1, 0, 0, 0, 0.939693272, -0.342020303, 0, 0.342019916, 0.939693391),i)
329
			rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.70000172, -0.519617081, 1, 0, 0, 0, 0.866026163, -0.499999225, 0, 0.499999225, 0.866026402),i)
330
			lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.987316132, 0.282949448, -0.698820114, 0.939694464, -0.34202224, 2.70232778e-08, 0.0593919083, 0.163177595, -0.984809518, 0.336825609, 0.925419152, 0.173649967),i)
331
			rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.30303764, 1.01691437, 0.573373795, 0.984808326, 0.173646584, -6.79235441e-08, 0.1116198, -0.633033633, 0.766036034, 0.133019418, -0.754398465, -0.642799139),i)
332
			llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.9396944, 0.342021942, 1, 0, 0, 0, 0.939693332, 0.342020005, 0, -0.342020273, 0.93969363),i)
333
			game:GetService("RunService").RenderStepped:wait()
334
		end
335
		swoosh:Play()
336
		local se = Instance.new("Part", bat)
337
        se.Size = Vector3.new(1.5, 1, 3)
338
        se:BreakJoints()
339
        se.Transparency = 1
340
        se.CanCollide = false
341
        local dmgweld = Instance.new("Weld", se)
342
        dmgweld.Part0 = bat
343
        dmgweld.Part1 = se
344
        dmgweld.C0 = dmgweld.C0 * CFrame.new(0,0,1)
345
		local function setouch(part)
346
			local humanoid = part.Parent:findFirstChild("Humanoid")
347
			if humanoid and candamage then
348
					se:destroy()
349
					hitsound:Play()
350
					hitsoundmarker:Play()
351
					local dedsound = humanoid.Parent.Head:findFirstChild("Died")
352
					local kysniba = Instance.new("BodyVelocity", humanoid.Parent.Torso)
353
									kysniba.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
354
									kysniba.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * math.random(5,35)
355
										if dedsound then
356
											dedsound:Play()
357
											dedsound.Volume = 8
358
										end
359
				                        humanoid.Health = humanoid.Health - math.random(35,50)
360
				                        humanoid.PlatformStand = true
361
										wait()
362
										kysniba:destroy()
363
				                        local lshclone = humanoid.Parent.Torso["Left Shoulder"]:Clone()
364
				                        local rshclone = humanoid.Parent.Torso["Right Shoulder"]:Clone()
365
				                        local lhclone = humanoid.Parent.Torso["Left Hip"]:Clone()
366
				                        local rhclone = humanoid.Parent.Torso["Right Hip"]:Clone()
367
				                        local leftarm = humanoid.Parent["Left Arm"]
368
							            local rightrm = humanoid.Parent["Right Arm"]
369
							            local leftleg = humanoid.Parent["Left Leg"]
370
							            local rightleg = humanoid.Parent["Right Leg"]
371
							            humanoid.Parent.Torso["Left Hip"]:destroy()
372
							            local head = humanoid.Parent.Head
373
							            glue = Instance.new("Glue", humanoid.Parent.Torso)
374
							            glue.Part0 = humanoid.Parent.Torso
375
							            glue.Part1 = leftleg
376
							            glue.Name = "Left leg"
377
							            collider = Instance.new("Part", leftleg)
378
							            collider.Position = Vector3.new(0,999,0)
379
							            collider.Size = Vector3.new(1.5, 1, 1)
380
							            collider.Shape = "Cylinder"
381
							            local weld = Instance.new("Weld", collider)
382
							            weld.Part0 = leftleg
383
							            weld.Part1 = collider
384
							            weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
385
							            collider.TopSurface = "Smooth"
386
							            collider.BottomSurface = "Smooth"
387
							            collider.formFactor = "Symmetric"
388
							            glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
389
							            glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
390
							            collider.Transparency = 1
391
							            ------------
392
							            humanoid.Parent.Torso["Right Hip"]:destroy()
393
							            glue1 = Instance.new("Glue", humanoid.Parent.Torso)
394
							            glue1.Part0 = humanoid.Parent.Torso
395
							            glue1.Part1 = rightleg
396
							            glue1.Name = "Right leg"
397
							            collider1 = Instance.new("Part", rightleg)
398
							            collider1.Position = Vector3.new(0,9999,0)
399
							            collider1.Size = Vector3.new(1.5, 1, 1)
400
							            collider1.Shape = "Cylinder"
401
							            local weld1 = Instance.new("Weld", collider1)
402
							            weld1.Part0 = rightleg
403
							            weld1.Part1 = collider1
404
							            weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
405
							            collider1.TopSurface = "Smooth"
406
							            collider1.BottomSurface = "Smooth"
407
							            collider1.formFactor = "Symmetric"
408
							            glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
409
							            glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
410
							            collider1.Transparency = 1
411
							            ------------
412
							            humanoid.Parent.Torso["Right Shoulder"]:destroy()
413
							            glue11 = Instance.new("Glue", humanoid.Parent.Torso)
414
							            glue11.Part0 = humanoid.Parent.Torso
415
							            glue11.Part1 = rightrm
416
							            glue11.Name = "Right shoulder"
417
							            collider11 = Instance.new("Part", rightrm)
418
							            collider11.Position = Vector3.new(0,9999,0)
419
							            collider11.Size = Vector3.new(1.8,1,1)
420
							            collider11.Shape = "Cylinder"
421
							            local weld11 = Instance.new("Weld", collider11)
422
							            weld11.Part0 = rightrm
423
							            weld11.Part1 = collider11
424
							            weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
425
							            collider11.TopSurface = "Smooth"
426
							            collider11.BottomSurface = "Smooth"
427
							            collider11.formFactor = "Symmetric"
428
							            glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
429
							            glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
430
							            collider11.Transparency = 1
431
							            ------------
432
							            humanoid.Parent.Torso["Left Shoulder"]:destroy()
433
							            glue111 = Instance.new("Glue", humanoid.Parent.Torso)
434
							            glue111.Part0 = humanoid.Parent.Torso
435
							            glue111.Part1 = leftarm
436
							            glue111.Name = "Left shoulder"
437
							            collider111 = Instance.new("Part", leftarm)
438
							            collider111.Position = Vector3.new(0,9999,0)
439
							            collider111.Size = Vector3.new(1.5, 1, 1)
440
							            collider111.Shape = "Cylinder"
441
							            local weld111 = Instance.new("Weld", collider111)
442
							            weld111.Part0 = leftarm
443
							            weld111.Part1 = collider111
444
							            weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
445
							            collider111.TopSurface = "Smooth"
446
							            collider111.BottomSurface = "Smooth"
447
							            collider111.formFactor = "Symmetric"
448
							            glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
449
							            glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
450
							            collider111.Transparency = 1
451
							            -----------------
452
							            wait(3.5)
453
							            lshclone.Parent = humanoid.Parent.Torso
454
							            glue:destroy()
455
							            rshclone.Parent = humanoid.Parent.Torso
456
							            glue1:destroy()
457
							            lhclone.Parent = humanoid.Parent.Torso
458
							            glue11:destroy()
459
							            rhclone.Parent = humanoid.Parent.Torso
460
							            glue111:destroy()
461
							            collider:destroy()
462
							            collider1:destroy()
463
							            collider11:destroy()
464
							            collider111:destroy()
465
							            humanoid.PlatformStand = false
466
			end
467
		end
468
		se.Touched:connect(setouch)
469
		for i = 0,1 , 0.11 do
470
			weld.C0 = weld.C0:lerp(CFrame.new(-0.297571182, -1.49015808, -1.51836586, -0.985374331, -0.0475560725, -0.163633719, 0.00750970328, 0.947216451, -0.32050702, 0.170238599, -0.317048222, -0.933005512),i)
471
			humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(1.90734863e-06, -0.0151953697, -0.173664093, 1.00000513, -3.31550837e-07, -2.52574682e-06, 5.01750037e-08, 0.984812319, 0.173652053, 2.98023224e-08, -0.173651025, 0.98481524),i)
472
			rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500009537, -1.70720339, 1.0928154, 1, -3.39564826e-06, 3.12621842e-06, -1.00954344e-06, 0.500003278, 0.866023481, -4.5038305e-06, -0.866023481, 0.500003278),i)
473
			lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.76405525, 0.315278292, 0.180755615, 0.955111921, 0.296198726, -0.0052483133, -0.103770666, 0.351103872, 0.930568516, 0.277475923, -0.888252497, 0.366080195),i)
474
			rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.10239601, 0.189299107, -0.839540482, 0.938380003, 0.344308525, 0.0301573183, -0.148524553, 0.480493009, -0.864339054, -0.312090695, 0.806592703, 0.50202179),i)
475
			llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.500007629, -1.98484421, -0.173652649, 1.00000513, 5.01750037e-08, 2.98023224e-08, -3.31550837e-07, 0.984812319, -0.173651025, -2.52574682e-06, 0.173652053, 0.98481524),i)
476
			game:GetService("RunService").RenderStepped:wait()
477
		end
478
		for i = 0,0.5 , 0.03 do
479
			humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,0,0),i)
480
			weld.C0 = weld.C0:lerp(CFrame.new(-0.0159739517, -0.949999988, -1.89993286, -0.999964654, 0, -0.00840734318, 0, 1, 0, 0.00840734318, 0, -0.999964654),i)
481
			llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.740257263, -2.03609467, -0.136482239, 0.983402133, 0.178129673, -0.0344976112, -0.181415305, 0.96843487, -0.1709456, 0.00295820553, 0.174366668, 0.984676421),i)
482
			lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5622654, 0.129275084, -0.0601882935, 0.980589986, 0.172955066, -0.0923573449, -0.159350663, 0.977449715, 0.138561979, 0.114239655, -0.121155277, 0.98603791),i)
483
			rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500007629, -2.00265956, 0.172412872, 1, -1.20094264e-05, 1.7030412e-05, 8.86936687e-06, 0.984804928, 0.173664317, -1.88572412e-05, -0.173664317, 0.984804928),i)
484
			rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.53644848, 0.148818254, -0.0714874268, 0.992697001, -0.115257569, 0.0356137939, 0.115724243, 0.993216813, -0.01132611, -0.0340668, 0.0153647754, 0.999301434),i)
485
			game:GetService("RunService").RenderStepped:wait()
486
		end
487
		game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 15
488
		game.Players.LocalPlayer.Character.Humanoid.JumpPower = 50
489
		se:destroy()
490
		canwalk = true
491
		swinging = false
492
	end
493
end
494
function homerun(key)
495
	key = key:lower()
496
	if key == "e" then
497
		if not swinging then
498
			swinging = true
499
			canwalk = false
500
			wait(0.5)
501
			for i = 0,0.5 , 0.04 do
502
				humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.0025062561, -3.14712524e-05, -0.00749588013, 0.344882131, -0.00252126367, -0.938642621, 0.0078982953, 0.999968827, 0.0002160515, 0.938612878, -0.00748818787, 0.34489125),i)
503
				weld.C0 = weld.C0:lerp(CFrame.new(0.166256905, -0.98138237, 1.23845291, 0.0427939594, 0.998588681, -0.0317649394, -0.996390939, 0.0449908599, 0.0719992965, 0.0733263046, 0.0285686739, 0.996902406),i)
504
				llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.740257263, -2.03609467, -0.136482239, 0.983402133, 0.178129673, -0.0344976112, -0.181415305, 0.96843487, -0.1709456, 0.00295820553, 0.174366668, 0.984676421),i)
505
				lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.115190506, 0.512830734, -0.79851532, 0.673410773, -0.722994387, -0.154290587, -0.143455178, 0.0769419968, -0.986662924, 0.725221038, 0.686558425, -0.0519037582),i)
506
				rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500007629, -2.00265956, 0.172412872, 1, -1.20094264e-05, 1.7030412e-05, 8.86936687e-06, 0.984804928, 0.173664317, -1.88572412e-05, -0.173664317, 0.984804928),i)
507
				rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.29099751, 0.444964886, -0.534446716, -0.115245081, 0.0356208719, 0.992698252, 0.993218303, -0.0113236597, 0.115711786, 0.0153627321, 0.999301195, -0.0340743102),i)
508
				game:GetService("RunService").RenderStepped:wait()
509
			end
510
			wait(0.5)
511
			swoosh:Play()
512
			local se = Instance.new("Part", bat)
513
	        se.Size = Vector3.new(1.5, 1, 3)
514
	        se:BreakJoints()
515
	        se.Transparency = 1
516
	        se.CanCollide = false
517
	        local dmgweld = Instance.new("Weld", se)
518
	        dmgweld.Part0 = bat
519
	        dmgweld.Part1 = se
520
	        dmgweld.C0 = dmgweld.C0 * CFrame.new(0,0,1)
521
			local function setouch(part)
522
				local humanoid = part.Parent:findFirstChild("Humanoid")
523
				if humanoid and candamage then
524
						se:destroy()
525
						hitsound:Play()
526
						hitsoundmarker:Play()
527
						local dedsound = humanoid.Parent.Head:findFirstChild("Died")
528
						local kysniba = Instance.new("BodyVelocity", humanoid.Parent.Torso)
529
										kysniba.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
530
										kysniba.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.rightVector * math.random(-45,-40)
531
											if dedsound then
532
												dedsound:Play()
533
												dedsound.Volume = 8
534
											end
535
					                        humanoid.Health = humanoid.Health - math.random(35,50)
536
					                        humanoid.PlatformStand = true
537
											wait()
538
											kysniba:destroy()
539
					                        local lshclone = humanoid.Parent.Torso["Left Shoulder"]:Clone()
540
					                        local rshclone = humanoid.Parent.Torso["Right Shoulder"]:Clone()
541
					                        local lhclone = humanoid.Parent.Torso["Left Hip"]:Clone()
542
					                        local rhclone = humanoid.Parent.Torso["Right Hip"]:Clone()
543
					                        local leftarm = humanoid.Parent["Left Arm"]
544
								            local rightrm = humanoid.Parent["Right Arm"]
545
								            local leftleg = humanoid.Parent["Left Leg"]
546
								            local rightleg = humanoid.Parent["Right Leg"]
547
								            humanoid.Parent.Torso["Left Hip"]:destroy()
548
								            local head = humanoid.Parent.Head
549
								            glue = Instance.new("Glue", humanoid.Parent.Torso)
550
								            glue.Part0 = humanoid.Parent.Torso
551
								            glue.Part1 = leftleg
552
								            glue.Name = "Left leg"
553
								            collider = Instance.new("Part", leftleg)
554
								            collider.Position = Vector3.new(0,999,0)
555
								            collider.Size = Vector3.new(1.5, 1, 1)
556
								            collider.Shape = "Cylinder"
557
								            local weld = Instance.new("Weld", collider)
558
								            weld.Part0 = leftleg
559
								            weld.Part1 = collider
560
								            weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
561
								            collider.TopSurface = "Smooth"
562
								            collider.BottomSurface = "Smooth"
563
								            collider.formFactor = "Symmetric"
564
								            glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
565
								            glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
566
								            collider.Transparency = 1
567
								            ------------
568
								            humanoid.Parent.Torso["Right Hip"]:destroy()
569
								            glue1 = Instance.new("Glue", humanoid.Parent.Torso)
570
								            glue1.Part0 = humanoid.Parent.Torso
571
								            glue1.Part1 = rightleg
572
								            glue1.Name = "Right leg"
573
								            collider1 = Instance.new("Part", rightleg)
574
								            collider1.Position = Vector3.new(0,9999,0)
575
								            collider1.Size = Vector3.new(1.5, 1, 1)
576
								            collider1.Shape = "Cylinder"
577
								            local weld1 = Instance.new("Weld", collider1)
578
								            weld1.Part0 = rightleg
579
								            weld1.Part1 = collider1
580
								            weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
581
								            collider1.TopSurface = "Smooth"
582
								            collider1.BottomSurface = "Smooth"
583
								            collider1.formFactor = "Symmetric"
584
								            glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
585
								            glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
586
								            collider1.Transparency = 1
587
								            ------------
588
								            humanoid.Parent.Torso["Right Shoulder"]:destroy()
589
								            glue11 = Instance.new("Glue", humanoid.Parent.Torso)
590
								            glue11.Part0 = humanoid.Parent.Torso
591
								            glue11.Part1 = rightrm
592
								            glue11.Name = "Right shoulder"
593
								            collider11 = Instance.new("Part", rightrm)
594
								            collider11.Position = Vector3.new(0,9999,0)
595
								            collider11.Size = Vector3.new(1.8,1,1)
596
								            collider11.Shape = "Cylinder"
597
								            local weld11 = Instance.new("Weld", collider11)
598
								            weld11.Part0 = rightrm
599
								            weld11.Part1 = collider11
600
								            weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
601
								            collider11.TopSurface = "Smooth"
602
								            collider11.BottomSurface = "Smooth"
603
								            collider11.formFactor = "Symmetric"
604
								            glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
605
								            glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
606
								            collider11.Transparency = 1
607
								            ------------
608
								            humanoid.Parent.Torso["Left Shoulder"]:destroy()
609
								            glue111 = Instance.new("Glue", humanoid.Parent.Torso)
610
								            glue111.Part0 = humanoid.Parent.Torso
611
								            glue111.Part1 = leftarm
612
								            glue111.Name = "Left shoulder"
613
								            collider111 = Instance.new("Part", leftarm)
614
								            collider111.Position = Vector3.new(0,9999,0)
615
								            collider111.Size = Vector3.new(1.5, 1, 1)
616
								            collider111.Shape = "Cylinder"
617
								            local weld111 = Instance.new("Weld", collider111)
618
								            weld111.Part0 = leftarm
619
								            weld111.Part1 = collider111
620
								            weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
621
								            collider111.TopSurface = "Smooth"
622
								            collider111.BottomSurface = "Smooth"
623
								            collider111.formFactor = "Symmetric"
624
								            glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
625
								            glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
626
								            collider111.Transparency = 1
627
								            -----------------
628
								            wait(3.5)
629
								            lshclone.Parent = humanoid.Parent.Torso
630
								            glue:destroy()
631
								            rshclone.Parent = humanoid.Parent.Torso
632
								            glue1:destroy()
633
								            lhclone.Parent = humanoid.Parent.Torso
634
								            glue11:destroy()
635
								            rhclone.Parent = humanoid.Parent.Torso
636
								            glue111:destroy()
637
								            collider:destroy()
638
								            collider1:destroy()
639
								            collider11:destroy()
640
								            collider111:destroy()
641
								            humanoid.PlatformStand = false
642
				end
643
			end
644
			se.Touched:connect(setouch)
645
			for i = 0,1 , 0.06 do
646
				humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.00290107727, -3.14712524e-05, 0.00735473633, 0.339134485, -0.00288238749, 0.940737188, 0.00789805129, 0.999969661, 0.00021667406, -0.940710008, 0.0073564481, 0.339143455),i)
647
				weld.C0 = weld.C0:lerp(CFrame.new(0.363064766, -3.34135723, -0.00578689575, 0.129290998, 0.977891922, 0.164350972, 0.115099035, 0.149822131, -0.981990576, -0.98490411, 0.145879179, -0.0931837559),i)
648
				llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.740257263, -2.03609467, -0.136482239, 0.983402133, 0.178129673, -0.0344976112, -0.181415305, 0.96843487, -0.1709456, 0.00295820553, 0.174366668, 0.984676421),i)
649
				lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.463953018, 0.485588312, -1.28636932, 0.788734317, -0.595068872, -0.154285714, -0.154632434, 0.0508582667, -0.986663163, 0.594980121, 0.802068651, -0.0519035384),i)
650
				rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500007629, -2.00265956, 0.172412872, 1, -1.20094264e-05, 1.7030412e-05, 8.86936687e-06, 0.984804928, 0.173664317, -1.88572412e-05, -0.173664317, 0.984804928),i)
651
				rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.980017662, 0.469520569, -1.02002907, -0.115247473, 0.527205765, 0.841893554, 0.993219674, 0.0480508804, 0.105872333, 0.0153623596, 0.848385453, -0.529164553),i)
652
				game:GetService("RunService").RenderStepped:wait()
653
			end
654
			for i = 0,0.6 , 0.06 do
655
				humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.0037689209, -3.1709671e-05, -0.00695133209, 0.502638817, -0.0037825685, -0.864492178, 0.00789782684, 0.999969304, 0.000216558576, 0.864467442, -0.00693635643, 0.502654672),i)
656
				weld.C0 = weld.C0:lerp(CFrame.new(0.363064766, -3.34135723, -0.00578689575, 0.129290998, 0.977891922, 0.164350972, 0.115099035, 0.149822131, -0.981990576, -0.98490411, 0.145879179, -0.0931837559),i)
657
				llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.740257263, -2.03609467, -0.136482239, 0.983402133, 0.178129673, -0.0344976112, -0.181415305, 0.96843487, -0.1709456, 0.00295820553, 0.174366668, 0.984676421),i)
658
				lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.463953018, 0.485588312, -1.28636932, 0.788734317, -0.595068872, -0.154285714, -0.154632434, 0.0508582667, -0.986663163, 0.594980121, 0.802068651, -0.0519035384),i)
659
				rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500007629, -2.00265956, 0.172412872, 1, -1.20094264e-05, 1.7030412e-05, 8.86936687e-06, 0.984804928, 0.173664317, -1.88572412e-05, -0.173664317, 0.984804928),i)
660
				rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.980017662, 0.469520569, -1.02002907, -0.115247473, 0.527205765, 0.841893554, 0.993219674, 0.0480508804, 0.105872333, 0.0153623596, 0.848385453, -0.529164553),i)
661
				game:GetService("RunService").RenderStepped:wait()
662
			end
663
			se:destroy()
664
			swinging = false
665
			canwalk = true
666
		end
667
	end
668
end
669
function finish(key)
670
	key = key:lower()
671
	if key == "r" then
672
		if not swinging then
673
			swinging = true
674
			canwalk = false
675
			game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
676
			game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0
677
			wait(0.3)
678
			for i = 0,0.5 , 0.04 do
679
				humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.00790500641, -0.95325017, 0.00522613525, 0.999153674, -0.0285614356, 0.0298122466, 0.0324949361, 0.989460409, -0.141119018, -0.0254644509, 0.141966894, 0.989548504),i)
680
				weld.C0 = weld.C0:lerp(CFrame.new(1.68849564, -0.692239761, -0.428113937, -0.12418396, -0.0975907221, 0.987448454, -0.184139758, 0.980132401, 0.0737097934, -0.975023568, -0.172674939, -0.139687046),i)
681
				llegweld.C0 = llegweld.C0:lerp(CFrame.new(-1.00843811, -1.19844329, 0.914150238, 0.999923646, -0.000131767243, 0.0128494678, -0.0128492834, 0.000317718834, 0.999918461, -0.000132776797, -1.00000465, 0.000315986574),i)
682
				lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.115190506, 0.512830734, -0.79851532, 0.673410773, -0.722994387, -0.154290587, -0.143455178, 0.0769419968, -0.986662924, 0.725221038, 0.686558425, -0.0519037582),i)
683
				rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.504602432, -1.41426539, -0.43113327, 0.998532414, 0.0129502807, -0.0527050048, 0.0148650706, 0.868719757, 0.495082885, 0.0522002652, -0.495138437, 0.867249846),i)
684
				rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.3915844, 1.38915205, 0.475536346, 0.0243803822, 0.00994206313, 0.999659538, -0.446981192, -0.894325435, 0.0197958294, 0.894215584, -0.447310358, -0.0173569731),i)
685
				game:GetService("RunService").RenderStepped:wait()
686
			end
687
			for i = 1,10 do
688
				for i = 0,0.8 , 0.1 do
689
					humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.00790500641, -0.95325017, 0.00522613525, 0.999153674, -0.0285614356, 0.0298122466, 0.0324949361, 0.989460409, -0.141119018, -0.0254644509, 0.141966894, 0.989548504),i)
690
					weld.C0 = weld.C0:lerp(CFrame.new(1.68849564, -0.692239761, -0.428113937, -0.12418396, -0.0975907221, 0.987448454, -0.184139758, 0.980132401, 0.0737097934, -0.975023568, -0.172674939, -0.139687046),i)
691
					llegweld.C0 = llegweld.C0:lerp(CFrame.new(-1.00843811, -1.19844329, 0.914150238, 0.999923646, -0.000131767243, 0.0128494678, -0.0128492834, 0.000317718834, 0.999918461, -0.000132776797, -1.00000465, 0.000315986574),i)
692
					lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.115190506, 0.512830734, -0.79851532, 0.673410773, -0.722994387, -0.154290587, -0.143455178, 0.0769419968, -0.986662924, 0.725221038, 0.686558425, -0.0519037582),i)
693
					rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.504602432, -1.41426539, -0.43113327, 0.998532414, 0.0129502807, -0.0527050048, 0.0148650706, 0.868719757, 0.495082885, 0.0522002652, -0.495138437, 0.867249846),i)
694
					rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.3915844, 1.38915205, 0.475536346, 0.0243803822, 0.00994206313, 0.999659538, -0.446981192, -0.894325435, 0.0197958294, 0.894215584, -0.447310358, -0.0173569731),i)
695
					game:GetService("RunService").RenderStepped:wait()
696
				end
697
				swoosh:Play()
698
				local se = Instance.new("Part", bat)
699
	        se.Size = Vector3.new(1.5, 1, 3)
700
	        se:BreakJoints()
701
	        se.Transparency = 1
702
	        se.CanCollide = false
703
	        local dmgweld = Instance.new("Weld", se)
704
	        dmgweld.Part0 = bat
705
	        dmgweld.Part1 = se
706
	        dmgweld.C0 = dmgweld.C0 * CFrame.new(0,0,1)
707
			local function setouch(part)
708
				local humanoid = part.Parent:findFirstChild("Humanoid")
709
				if humanoid and candamage then
710
						kaykaykay = true
711
						hitsound:Play()
712
						hitsoundmarker:Play()
713
						local dedsound = humanoid.Parent.Head:findFirstChild("Died")
714
						local kysniba = Instance.new("BodyVelocity", humanoid.Parent.Torso)
715
										kysniba.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
716
										kysniba.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.rightVector * 0
717
											if dedsound then
718
												dedsound:Play()
719
												dedsound.Volume = 8
720
											end
721
					                        humanoid.Health = humanoid.Health - math.random(5,5)
722
					                        humanoid.PlatformStand = true
723
											wait()
724
											kysniba:destroy()
725
					                        local lshclone = humanoid.Parent.Torso["Left Shoulder"]:Clone()
726
					                        local rshclone = humanoid.Parent.Torso["Right Shoulder"]:Clone()
727
					                        local lhclone = humanoid.Parent.Torso["Left Hip"]:Clone()
728
					                        local rhclone = humanoid.Parent.Torso["Right Hip"]:Clone()
729
					                        local leftarm = humanoid.Parent["Left Arm"]
730
								            local rightrm = humanoid.Parent["Right Arm"]
731
								            local leftleg = humanoid.Parent["Left Leg"]
732
								            local rightleg = humanoid.Parent["Right Leg"]
733
								            humanoid.Parent.Torso["Left Hip"]:destroy()
734
								            local head = humanoid.Parent.Head
735
								            glue = Instance.new("Glue", humanoid.Parent.Torso)
736
								            glue.Part0 = humanoid.Parent.Torso
737
								            glue.Part1 = leftleg
738
								            glue.Name = "Left leg"
739
								            collider = Instance.new("Part", leftleg)
740
								            collider.Position = Vector3.new(0,999,0)
741
								            collider.Size = Vector3.new(1.5, 1, 1)
742
								            collider.Shape = "Cylinder"
743
								            local weld = Instance.new("Weld", collider)
744
								            weld.Part0 = leftleg
745
								            weld.Part1 = collider
746
								            weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
747
								            collider.TopSurface = "Smooth"
748
								            collider.BottomSurface = "Smooth"
749
								            collider.formFactor = "Symmetric"
750
								            glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
751
								            glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
752
								            collider.Transparency = 1
753
								            ------------
754
								            humanoid.Parent.Torso["Right Hip"]:destroy()
755
								            glue1 = Instance.new("Glue", humanoid.Parent.Torso)
756
								            glue1.Part0 = humanoid.Parent.Torso
757
								            glue1.Part1 = rightleg
758
								            glue1.Name = "Right leg"
759
								            collider1 = Instance.new("Part", rightleg)
760
								            collider1.Position = Vector3.new(0,9999,0)
761
								            collider1.Size = Vector3.new(1.5, 1, 1)
762
								            collider1.Shape = "Cylinder"
763
								            local weld1 = Instance.new("Weld", collider1)
764
								            weld1.Part0 = rightleg
765
								            weld1.Part1 = collider1
766
								            weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
767
								            collider1.TopSurface = "Smooth"
768
								            collider1.BottomSurface = "Smooth"
769
								            collider1.formFactor = "Symmetric"
770
								            glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
771
								            glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
772
								            collider1.Transparency = 1
773
								            ------------
774
								            humanoid.Parent.Torso["Right Shoulder"]:destroy()
775
								            glue11 = Instance.new("Glue", humanoid.Parent.Torso)
776
								            glue11.Part0 = humanoid.Parent.Torso
777
								            glue11.Part1 = rightrm
778
								            glue11.Name = "Right shoulder"
779
								            collider11 = Instance.new("Part", rightrm)
780
								            collider11.Position = Vector3.new(0,9999,0)
781
								            collider11.Size = Vector3.new(1.8,1,1)
782
								            collider11.Shape = "Cylinder"
783
								            local weld11 = Instance.new("Weld", collider11)
784
								            weld11.Part0 = rightrm
785
								            weld11.Part1 = collider11
786
								            weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
787
								            collider11.TopSurface = "Smooth"
788
								            collider11.BottomSurface = "Smooth"
789
								            collider11.formFactor = "Symmetric"
790
								            glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
791
								            glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
792
								            collider11.Transparency = 1
793
								            ------------
794
								            humanoid.Parent.Torso["Left Shoulder"]:destroy()
795
								            glue111 = Instance.new("Glue", humanoid.Parent.Torso)
796
								            glue111.Part0 = humanoid.Parent.Torso
797
								            glue111.Part1 = leftarm
798
								            glue111.Name = "Left shoulder"
799
								            collider111 = Instance.new("Part", leftarm)
800
								            collider111.Position = Vector3.new(0,9999,0)
801
								            collider111.Size = Vector3.new(1.5, 1, 1)
802
								            collider111.Shape = "Cylinder"
803
								            local weld111 = Instance.new("Weld", collider111)
804
								            weld111.Part0 = leftarm
805
								            weld111.Part1 = collider111
806
								            weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
807
								            collider111.TopSurface = "Smooth"
808
								            collider111.BottomSurface = "Smooth"
809
								            collider111.formFactor = "Symmetric"
810
								            glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
811
								            glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
812
								            collider111.Transparency = 1
813
								            -----------------
814
								            wait(3.5)
815
								            lshclone.Parent = humanoid.Parent.Torso
816
								            glue:destroy()
817
								            rshclone.Parent = humanoid.Parent.Torso
818
								            glue1:destroy()
819
								            lhclone.Parent = humanoid.Parent.Torso
820
								            glue11:destroy()
821
								            rhclone.Parent = humanoid.Parent.Torso
822
								            glue111:destroy()
823
								            collider:destroy()
824
								            collider1:destroy()
825
								            collider11:destroy()
826
								            collider111:destroy()
827
								            humanoid.PlatformStand = false
828
											
829
				end
830
			end
831
			se.Touched:connect(setouch)
832
				for i = 0,0.8 , 0.1 do
833
					humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.00790500641, -1.10856056, -0.113021851, 0.999153674, -0.0285614356, 0.0298122466, 0.015409233, 0.927881479, 0.372561187, -0.0383003242, -0.371782839, 0.927533865),i)
834
					weld.C0 = weld.C0:lerp(CFrame.new(1.75426292, -1.81475067, -0.224495888, -0.124183893, 0.409208655, 0.903953254, -0.184139788, 0.885677457, -0.426232308, -0.975023508, -0.219385028, -0.0346353203),i)
835
					llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.531410217, -1.51909602, 0.309326172, 0.999858439, 0.0112568531, -0.0129960477, 0.0027226212, 0.642678738, 0.766132534, 0.0169795267, -0.766057372, 0.642555475),i)
836
					lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53067207, 0.149219036, 0.221874237, 0.986711502, 0.108026817, 0.121435449, -0.151131794, 0.884698153, 0.440993249, -0.0597912408, -0.453483284, 0.88926661),i)
837
					rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.533989906, -0.802585959, -0.829696655, 0.997155249, -0.00385875348, -0.0753595084, -0.00967934448, 0.983901083, -0.178458288, 0.074837774, 0.178679526, 0.981062055),i)
838
					rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.38949299, 0.092348814, -0.696056366, 0.104881018, 0.0200879835, 0.994288206, 0.721826732, 0.686205924, -0.0900060534, -0.684091628, 0.727142394, 0.0574717149),i)
839
					game:GetService("RunService").RenderStepped:wait()
840
				end
841
				se:destroy()
842
			end
843
			wait(2)
844
			game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 15
845
			game.Players.LocalPlayer.Character.Humanoid.JumpPower = 50
846
			swinging = false
847
			canwalk = true
848
		end
849
	end
850
end
851
mouse.KeyDown:connect(finish)
852
mouse.KeyDown:connect(homerun)
853
mouse.Button1Down:connect(swing)
854
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 100
855
game.Players.LocalPlayer.Character.Humanoid.JumpPower = 50
856
local run = game.Players.LocalPlayer.Character.Head:findFirstChild("Running")
857
if run then
858
	playback = run.PlaybackSpeed
859
	run.Volume = 10
860
	run.PlaybackSpeed = 2
861
end
862
howmuch = 0
863
function change(key)
864
	if key == "w" or key == "a" or key == "s" or key == "d" then
865
		howmuch = howmuch + 1
866
	end
867
end
868
function otherchange(key)
869
	if key == "w" or key == "a" or key == "s" or key == "d" then
870
		howmuch = howmuch - 1
871
	end
872
end
873
mouse.KeyDown:connect(change)
874
mouse.KeyUp:connect(otherchange)
875
while true do
876
	if howmuch <= -1 then
877
		howmuch = 0
878
	end
879
	if howmuch >= 4 then
880
		howmuch = 0
881
	end
882
	if canwalk and howmuch < 1 then
883
		for i = 0,0.5 , 0.03 do
884
			humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,0,0),i)
885
			weld.C0 = weld.C0:lerp(CFrame.new(-0.0159739517, -0.949999988, -1.89993286, -0.999964654, 0, -0.00840734318, 0, 1, 0, 0.00840734318, 0, -0.999964654),i)
886
			llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.740257263, -2.03609467, -0.136482239, 0.983402133, 0.178129673, -0.0344976112, -0.181415305, 0.96843487, -0.1709456, 0.00295820553, 0.174366668, 0.984676421),i)
887
			lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5622654, 0.129275084, -0.0601882935, 0.980589986, 0.172955066, -0.0923573449, -0.159350663, 0.977449715, 0.138561979, 0.114239655, -0.121155277, 0.98603791),i)
888
			rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500007629, -2.00265956, 0.172412872, 1, -1.20094264e-05, 1.7030412e-05, 8.86936687e-06, 0.984804928, 0.173664317, -1.88572412e-05, -0.173664317, 0.984804928),i)
889
			rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.53644848, 0.148818254, -0.0714874268, 0.992697001, -0.115257569, 0.0356137939, 0.115724243, 0.993216813, -0.01132611, -0.0340668, 0.0153647754, 0.999301434),i)
890
			game:GetService("RunService").RenderStepped:wait()
891
		end
892
	end
893
	if canwalk and howmuch >= 1 then
894
		if canwalk then
895
			for i = 0,0.5 , 0.035 do
896
				humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.00790023804, 0.199968576, -0.00020980835, 0.999964595, -0.00790178124, 0.00306172855, 0.00790151209, 0.999969304, 0.000218808651, -0.0030639898, -0.000195354223, 0.999996841),i)
897
				llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.505001068, -1.86916244, -0.621334076, 0.999965012, 0.00531583838, -0.00659736991, -0.00790282805, 0.865899682, -0.500156105, 0.00305361301, 0.500189841, 0.865911663),i)
898
				lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.60521126, 0.0956981182, 0.261711121, 0.980589807, 0.186369807, -0.0609254427, -0.159354717, 0.938544989, 0.306180835, 0.114243567, -0.290528506, 0.95002687),i)
899
				rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500003815, -1.98082137, 0.341064453, 1.00000024, -4.760921e-06, 6.13927841e-06, 2.53296457e-06, 0.939691961, 0.342023224, -7.70017505e-06, -0.342023879, 0.939692199),i)
900
				rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54322338, 0.0253696442, -0.292896271, 0.992699027, -0.0961229801, 0.0728714988, 0.115717016, 0.929440677, -0.35035944, -0.0340529159, 0.35623306, 0.933778286),i)
901
				game:GetService("RunService").RenderStepped:wait()
902
			end
903
		end
904
		if canwalk then
905
			for i = 0,0.5 , 0.035 do
906
				humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,0,0),i)
907
				llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.508262634, -1.87163961, 0.440429688, 0.999970257, 0.00836944394, 0.00130646117, -0.00790115632, 0.866101623, 0.499812841, 0.00304995291, -0.499809325, 0.866141915),i)
908
				lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5253067, 0.0738544464, -0.454620361, 0.980590165, 0.0731252506, -0.181929275, -0.159353688, 0.83783412, -0.522152305, 0.114242911, 0.54100734, 0.833227038),i)
909
				rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.499994278, -1.92724752, -0.551742554, 1.00000608, 1.25449151e-06, 1.01868063e-05, 4.95591667e-06, 0.866037965, -0.499993861, -1.09765679e-05, 0.499994934, 0.866033196),i)
910
				rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.55067635, 0.144279242, 0.328227997, 0.992699504, -0.117612652, -0.026791174, 0.115719222, 0.865823865, 0.486786127, -0.0340576619, -0.486334682, 0.873112977),i)
911
				game:GetService("RunService").RenderStepped:wait()
912
			end
913
		end
914
	end
915
	wait()
916
end