View difference between Paste ID: 2ARBkP14 and KxMFAFS2
SHOW: | | - or go back to the newest paste.
1-
wait(1)
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
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
4
local RealPlayer = Player
5
do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end wait(1)
6
7
player = game.Players.LocalPlayer
8
char = player.Character
9
head = char.Head
10
torso = char.Torso
11
t = torso
12
hum = char.Humanoid
13
14
newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
15
local wld = Instance.new("Weld", wp0)
16
wld.Part0 = wp0
17
wld.Part1 = wp1
18
wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
19
if wp1.Name == "Head" then
20
	wld.Name="Neck"
21
end
22
return wld
23
end
24
25
for i,v in pairs (char:GetChildren()) do
26
	if v:IsA("Hat") or v:IsA("Accessory") then
27
		v:Destroy()
28
	end
29
end
30
Horn = Instance.new("Part")
31
ParticleEmitter1 = Instance.new("ParticleEmitter")
32
ParticleEmitter2 = Instance.new("ParticleEmitter")
33
Horn.Name = "Horns"
34
Horn.Parent = char
35
Horn.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
36
Horn.BottomSurface = Enum.SurfaceType.Smooth
37
Horn.TopSurface = Enum.SurfaceType.Smooth
38
Horn.CFrame = head.CFrame
39
ParticleEmitter1.Parent = Horn
40
ParticleEmitter1.Transparency = NumberSequence.new(1,0.75,1)
41
ParticleEmitter1.Rotation = NumberRange.new(-180, 180)
42
ParticleEmitter1.Size = NumberSequence.new(0.8,0)
43
ParticleEmitter1.LockedToPart=true
44
ParticleEmitter2.LockedToPart=true
45
ParticleEmitter1.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 0, 0))
46
ParticleEmitter1.LightEmission = 0.69999998807907
47
ParticleEmitter1.Texture = "rbxassetid://170257522"
48
ParticleEmitter1.EmissionDirection = Enum.NormalId.Left
49
ParticleEmitter1.ZOffset = 0.5
50
ParticleEmitter1.Acceleration = Vector3.new(0, 4, 0)
51
ParticleEmitter1.Lifetime = NumberRange.new(1.1)
52
ParticleEmitter1.Rate = 100
53
ParticleEmitter1.RotSpeed = NumberRange.new(-18, 18)
54
ParticleEmitter1.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 0, 0))
55
56
ParticleEmitter2.Parent = Horn
57
ParticleEmitter2.Transparency = NumberSequence.new(1,0.75,1)
58
ParticleEmitter2.Rotation = NumberRange.new(-180, 180)
59
ParticleEmitter2.Size = NumberSequence.new(0.8,0)
60
ParticleEmitter2.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 0, 0))
61
ParticleEmitter2.LightEmission = 0.69999998807907
62
ParticleEmitter2.Texture = "rbxassetid://170257522"
63
ParticleEmitter2.EmissionDirection = Enum.NormalId.Right
64
ParticleEmitter2.ZOffset = 0.5
65
ParticleEmitter2.Acceleration = Vector3.new(0, 4, 0)
66
ParticleEmitter2.Lifetime = NumberRange.new(1.1)
67
ParticleEmitter2.Rate = 100
68
ParticleEmitter2.RotSpeed = NumberRange.new(-18, 18)
69
ParticleEmitter2.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 0, 0))
70
71
72
73
Hat0 = Instance.new("Accessory")
74
Handle = Instance.new("Part")
75
SpecialMesh2 = Instance.new("SpecialMesh")
76
Hat0.Name = "DarkKnightHood"
77
Hat0.AttachmentPos = Vector3.new(0, 1.63999999, -0.00999999978)
78
Handle.Name = "Handle"
79
Handle.Parent = Hat0
80
Handle.Rotation = Vector3.new(-13.3299999, -0.25999999, -0.0799999982)
81
Handle.CanCollide = false
82
Handle.FormFactor = Enum.FormFactor.Custom
83
Handle.Size = Vector3.new(2.20000029, 3.80000067, 1.36999905)
84
Handle.CFrame = CFrame.new(-34.6326752, 7.71574116, 8.64290714, 0.999988198, 0.00145675475, -0.00462479144, -0.000351635739, 0.973076522, 0.23047556, 0.0048360303, -0.230471551, 0.973067045)
85
Handle.BottomSurface = Enum.SurfaceType.Smooth
86
Handle.TopSurface = Enum.SurfaceType.Smooth
87
Handle.Position = Vector3.new(-34.6326752, 7.71574116, 8.64290714)
88
Handle.Orientation = Vector3.new(-13.3299999, -0.269999981, -0.0199999996)
89
SpecialMesh0 = Instance.new("SpecialMesh")
90
SpecialMesh0.Parent = Handle
91
SpecialMesh0.MeshId = "rbxassetid://391929045"
92
SpecialMesh0.Offset = Vector3.new(0, 1, 0.25)
93
SpecialMesh0.Scale = Vector3.new(2.0999999, 2.0999999, 2.0999999)
94
SpecialMesh0.TextureId = "rbxassetid://391929221"
95
SpecialMesh0.MeshType = Enum.MeshType.FileMesh
96
SpecialMesh0.Scale = Vector3.new(2.0999999, 2.0999999, 2.0999999)
97
98
Accessory0 = Instance.new("Accessory")
99
Part1 = Instance.new("Part")
100
SpecialMesh2 = Instance.new("SpecialMesh")
101
Attachment3 = Instance.new("Attachment")
102
Vector3Value4 = Instance.new("Vector3Value")
103
Weld5 = Instance.new("Weld")
104
Accessory0.Name = "SilverthornAntlers"
105
Accessory0.AttachmentPos = Vector3.new(0, -0.75, 0.200000003)
106
H2 = Part1
107
Part1.Name = "Handle"
108
Part1.Parent = Accessory0
109
Part1.Rotation = Vector3.new(-13.3299999, -0.25999999, -0.0799999982)
110
Part1.CanCollide = false
111
Part1.Locked = true
112
Part1.FormFactor = Enum.FormFactor.Plate
113
Part1.Size = Vector3.new(1, 2, 1)
114
Part1.CFrame = CFrame.new(-34.6282234, 10.763752, 7.88773584, 0.999988198, 0.00145675475, -0.00462479144, -0.000351635739, 0.973076522, 0.23047556, 0.0048360303, -0.230471551, 0.973067045)
115
Part1.BottomSurface = Enum.SurfaceType.Smooth
116
Part1.TopSurface = Enum.SurfaceType.Smooth
117
Part1.Position = Vector3.new(-34.6282234, 10.763752, 7.88773584)
118
Part1.Orientation = Vector3.new(-13.3299999, -0.269999981, -0.0199999996)
119
SpecialMesh2.Parent = Part1
120
SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=1271547"
121
SpecialMesh2.Scale = Vector3.new(2, 2, 2)
122
SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=9254947"
123
SpecialMesh2.MeshType = Enum.MeshType.FileMesh
124
SpecialMesh2.Scale = Vector3.new(2, 2, 2)
125
Attachment3.Name = "HatAttachment"
126
Attachment3.Parent = Part1
127
Attachment3.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
128
Attachment3.CFrame = CFrame.new(8.65838956e-09, -0.650000095, 0.199727759, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
129
Attachment3.Position = Vector3.new(8.65838956e-09, -0.650000095, 0.199727759)
130
Attachment3.Axis = Vector3.new(1, -7.87137555e-09, 0)
131
Attachment3.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
132
Vector3Value4.Name = "OriginalSize"
133
Vector3Value4.Parent = Part1
134
Vector3Value4.Value = Vector3.new(1, 2, 1)
135
136
137
138
spawn(function()
139
	wait(0.2)
140
	Hat0.Parent=char
141
--	newWeld(head,Handle,0,0,0)
142
	Accessory0.Parent=char
143
--	newWeld(head,H2,0,0,0)
144
end)
145
146
147
148
149
150
shirt = char:FindFirstChild("Shirt")
151
pants = char:FindFirstChild("Pants")
152
sg = char:FindFirstChild("Shirt Graphic")
153
if shirt then shirt:Destroy() end
154
if pants then pants:Destroy() end
155
if  sg   then sg:Destroy() end
156
157
shirt = Instance.new("Shirt",char)
158
pants = Instance.new("Pants",char)
159
160
shirt.ShirtTemplate = "rbxassetid://767426316"
161
pants.PantsTemplate = "rbxassetid://201888161"
162
163
char['Torso'].Size = Vector3.new(4,4,2)
164
165
char['Right Arm'].Size = Vector3.new(2,4,2)
166
char['Left Arm'].Size = Vector3.new(2,4,2)
167
char['Right Leg'].Size = Vector3.new(2,4,2)
168
char['Left Leg'].Size = Vector3.new(2,4,2)
169
170
char['Head'].Size = Vector3.new(4,2,2)
171
local we = Instance.new("Weld",Horn)
172
we.Part0 = head
173
we.Part1 = Horn
174
spawn(function()
175
	local Ang = CFrame.Angles	--[Storing these as variables so I dont have to type them out.]
176
	local aSin = math.asin
177
	local aTan = math.atan
178
	
179
	--[Constants]:
180
	
181
	local Cam = game.Workspace.CurrentCamera
182
	
183
	local Plr = game.Players.LocalPlayer
184
	local Mouse = Plr:GetMouse()
185
	local Body = Plr.Character or Plr.CharacterAdded:wait()
186
	local Head = Body:WaitForChild("Head")
187
	local Hum = Body:WaitForChild("Humanoid")
188
	local Core = Body:WaitForChild("HumanoidRootPart")
189
	local IsR6 = (Hum.RigType.Value==0)	--[Checking if the player is using R15 or R6.]
190
	local Trso = (IsR6 and Body:WaitForChild("Torso")) or Body:WaitForChild("UpperTorso")
191
	local Neck = (IsR6 and Trso:WaitForChild("Neck")) or Head:WaitForChild("Neck")	--[Once we know the Rig, we know what to find.]
192
	local Waist = (not IsR6 and Trso:WaitForChild("Waist"))	--[R6 doesn't have a waist joint, unfortunately.]
193
194
	local MseGuide = false
195
196
	local TurnCharacterToMouse = false
197
198
	local HeadHorFactor = 1
199
	local HeadVertFactor = 0.6
200
	local BodyHorFactor = 0.5
201
	local BodyVertFactor = 0.4
202
203
	local UpdateSpeed = 0.5
204
	
205
	local NeckOrgnC0 = Neck.C0	--[Get the base C0 to manipulate off of.]
206
	local WaistOrgnC0 = (not IsR6 and Waist.C0)	--[Get the base C0 to manipulate off of.]
207
	
208
	--[Setup]:
209
	
210
	
211
	-- Activation]:
212
	if TurnCharacterToMouse == true then
213
		MseGuide = true
214
		HeadHorFactor = 0
215
		BodyHorFactor = 0
216
	end
217
	
218
	game:GetService("RunService").RenderStepped:Connect(function()
219
		local CamCF = Cam.CoordinateFrame
220
		if ((IsR6 and Body["Torso"]) or Body["UpperTorso"])~=nil and Body["Head"]~=nil then	--[Check for the Torso and Head...]
221
			local TrsoLV = Trso.CFrame.lookVector
222
			local HdPos = Head.CFrame.p
223
			if IsR6 and Neck or Neck and Waist then	--[Make sure the Neck still exists.]
224
				if Cam.CameraSubject:IsDescendantOf(Body) or Cam.CameraSubject:IsDescendantOf(Plr) then
225
					local Dist = nil;
226
					local Diff = nil;
227
					if not MseGuide then	--[If not tracking the Mouse then get the Camera.]
228
						Dist = (Head.CFrame.p-CamCF.p).magnitude
229
						Diff = Head.CFrame.Y-CamCF.Y
230
						if not IsR6 then	--[R6 and R15 Neck rotation C0s are different; R15: X axis inverted and Z is now the Y.]
231
							Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aSin(Diff/Dist)*HeadVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
232
							Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang((aSin(Diff/Dist)*BodyVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
233
						else	--[R15s actually have the properly oriented Neck CFrame.]
234
							Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aSin(Diff/Dist)*HeadVertFactor), 0, -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor),UpdateSpeed/2)
235
						end
236
					else
237
						local Point = Mouse.Hit.p
238
						Dist = (Head.CFrame.p-Point).magnitude
239
						Diff = Head.CFrame.Y-Point.Y
240
						if not IsR6 then
241
							Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aTan(Diff/Dist)*HeadVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
242
							Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang(-(aTan(Diff/Dist)*BodyVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
243
						else
244
							Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aTan(Diff/Dist)*HeadVertFactor), 0, (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor), UpdateSpeed/2)
245
						end
246
					end
247
				end
248
			end
249
		end
250
		if TurnCharacterToMouse == true then
251
			Hum.AutoRotate = false
252
			Core.CFrame = Core.CFrame:lerp(CFrame.new(Core.Position, Vector3.new(Mouse.Hit.p.x, Core.Position.Y, Mouse.Hit.p.z)), UpdateSpeed / 2)
253
		else
254
			Hum.AutoRotate = true
255
		end
256
	end)
257
end)
258
259
260
larm = char['Left Arm']
261
rarm = char['Right Arm']
262
lleg = char['Left Leg']
263
rleg = char['Right Leg']
264
hed  = char['Head']
265
root = char['HumanoidRootPart']
266
267
LeftArm = newWeld(torso, larm, -1.5, 1, 0)
268
269
RightArm = newWeld(torso, rarm, 1.5, 1, 0)
270
271
Head = newWeld(torso, hed, 0, 3, 0)
272
273
LeftLeg = newWeld(torso, lleg, -1, -2, 0)
274
275
RightLeg = newWeld(torso, rleg, 1, -2, 0)
276
277
Torso = newWeld(root, torso, 0, -2, 0)
278
279
Torso.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
280
Torso.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
281
LeftLeg.C0 = CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
282
LeftLeg.C1 = CFrame.new(-0.5, 1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
283
RightLeg.C0 = CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)
284
RightLeg.C1 = CFrame.new(0.5, 1, 0, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
285
LeftArm.C0 = CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
286
LeftArm.C1 = CFrame.new(0.5, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
287
RightArm.C0 = CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)
288
RightArm.C1 = CFrame.new(-0.5, 0.5, 0, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
289
Head.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
290
Head.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
291
292
function createSound(id,speed,vol,looped,parent)
293
	local sound = Instance.new("Sound",head)
294
	sound.SoundId = id
295
	sound.PlaybackSpeed = speed
296
	if parent then sound.Parent = parent end
297
	if vol then sound.Volume = vol end
298
	if looped then sound.Looped = looped end
299
	sound:Play()
300
	spawn(function()
301
		if looped == false then
302
			wait(sound.TimeLength)
303
			sound:Destroy()
304
		end
305
	end)
306
end
307
--BGM
308
createSound('rbxassetid://1337508713',1,1,true)
309
310
--Delete the animator
311
humanoid = char:FindFirstChildOfClass("Humanoid")
312
313
do
314
	char:WaitForChild("Animate"):Destroy()
315
	humanoid:WaitForChild("Animator"):Destroy()
316
end
317
318
pose = "Idle"
319
320
--Pose updater
321
spawn(function()
322
	while wait() do
323
		local velocity = char.HumanoidRootPart.Velocity
324
		local X = (char.HumanoidRootPart.Velocity).magnitude
325
		local vY = velocity.Y
326
		if vY > 0.8 then
327
			pose = "Jumping"
328
		elseif vY<-0.8 then
329
			pose = "Falling"
330
		end
331
		if X > 0.8 then
332
			pose = "Running"
333
		end
334
		if humanoid.MoveDirection == Vector3.new(0,0,0) then
335
			pose = "Idle"
336
		end
337
		if X < 0.3 and vY < 0.3 and X > -0.3 and vY > -0.3 then
338
			pose = "Idle"
339
		end
340
	end
341
end)
342
343
--Spell hand
344
Spells = Instance.new("Model")
345
Part1 = Instance.new("Part")
346
SurfaceGui2 = Instance.new("SurfaceGui")
347
ImageLabel3 = Instance.new("ImageLabel")
348
SurfaceGui4 = Instance.new("SurfaceGui")
349
ImageLabel5 = Instance.new("ImageLabel")
350
SurfaceGui6 = Instance.new("SurfaceGui")
351
ImageLabel7 = Instance.new("ImageLabel")
352
SurfaceGui8 = Instance.new("SurfaceGui")
353
ImageLabel9 = Instance.new("ImageLabel")
354
Weld10 = Instance.new("Weld")
355
Part11 = Instance.new("Part")
356
SurfaceGui12 = Instance.new("SurfaceGui")
357
ImageLabel13 = Instance.new("ImageLabel")
358
SurfaceGui14 = Instance.new("SurfaceGui")
359
ImageLabel15 = Instance.new("ImageLabel")
360
SurfaceGui16 = Instance.new("SurfaceGui")
361
ImageLabel17 = Instance.new("ImageLabel")
362
SurfaceGui18 = Instance.new("SurfaceGui")
363
ImageLabel19 = Instance.new("ImageLabel")
364
Weld20 = Instance.new("Weld")
365
Part21 = Instance.new("Part")
366
SurfaceGui22 = Instance.new("SurfaceGui")
367
ImageLabel23 = Instance.new("ImageLabel")
368
SurfaceGui24 = Instance.new("SurfaceGui")
369
ImageLabel25 = Instance.new("ImageLabel")
370
SurfaceGui26 = Instance.new("SurfaceGui")
371
ImageLabel27 = Instance.new("ImageLabel")
372
SurfaceGui28 = Instance.new("SurfaceGui")
373
ImageLabel29 = Instance.new("ImageLabel")
374
Weld30 = Instance.new("Weld")
375
Part31 = Instance.new("Part")
376
Weld32 = Instance.new("Weld")
377
Spells.Name = "Spells"
378
Spells.Parent = mas
379
Spells.PrimaryPart = Part31
380
Part1.Name = "Spell3"
381
Part1.Parent = Spells
382
Part1.Transparency = 1
383
Part1.Size = Vector3.new(3, 0.0500000007, 3)
384
Part1.CFrame = CFrame.new(-2.00700021, 1.75291348, 1.921, 1, 0, 0, 0, 0.999999642, 0, 0, 0, 1)
385
Part1.BottomSurface = Enum.SurfaceType.Smooth
386
Part1.TopSurface = Enum.SurfaceType.Smooth
387
Part1.Position = Vector3.new(-2.00700021, 1.75291348, 1.921)
388
SurfaceGui2.Parent = Part1
389
SurfaceGui2.Face = Enum.NormalId.Top
390
ImageLabel3.Parent = SurfaceGui2
391
ImageLabel3.Transparency = 1
392
ImageLabel3.Size = UDim2.new(1, 0, 1, 0)
393
ImageLabel3.BackgroundColor3 = Color3.new(1, 1, 1)
394
ImageLabel3.BackgroundTransparency = 1
395
ImageLabel3.Image = "rbxassetid://3337202"
396
SurfaceGui4.Parent = Part1
397
SurfaceGui4.Face = Enum.NormalId.Top
398
ImageLabel5.Parent = SurfaceGui4
399
ImageLabel5.Transparency = 1
400
ImageLabel5.Size = UDim2.new(1, 0, 1, 0)
401
ImageLabel5.BackgroundColor3 = Color3.new(1, 1, 1)
402
ImageLabel5.BackgroundTransparency = 1
403
ImageLabel5.Image = "rbxassetid://3337202"
404
SurfaceGui6.Parent = Part1
405
SurfaceGui6.Face = Enum.NormalId.Bottom
406
ImageLabel7.Parent = SurfaceGui6
407
ImageLabel7.Transparency = 1
408
ImageLabel7.Size = UDim2.new(1, 0, 1, 0)
409
ImageLabel7.BackgroundColor3 = Color3.new(1, 1, 1)
410
ImageLabel7.BackgroundTransparency = 1
411
ImageLabel7.Image = "rbxassetid://3337202"
412
SurfaceGui8.Parent = Part1
413
SurfaceGui8.Face = Enum.NormalId.Bottom
414
ImageLabel9.Parent = SurfaceGui8
415
ImageLabel9.Transparency = 1
416
ImageLabel9.Size = UDim2.new(1, 0, 1, 0)
417
ImageLabel9.BackgroundColor3 = Color3.new(1, 1, 1)
418
ImageLabel9.BackgroundTransparency = 1
419
ImageLabel9.Image = "rbxassetid://3337202"
420
Weld10.Name = "SpellWeld"
421
Weld10.Parent = Part1
422
Weld10.C1 = CFrame.new(0.000245000236, 1.24710596, -0.00010599941, 1, 0, 0, 0, 0.999999762, 0, 0, 0, 1)
423
Weld10.Part0 = Part31
424
Weld10.Part1 = Part1
425
Part11.Name = "Spell1"
426
Part11.Parent = Spells
427
Part11.Transparency = 1
428
Part11.Shape = Enum.PartType.Cylinder
429
Part11.Size = Vector3.new(3.5, 0.0500000007, 3.5)
430
Part11.CFrame = CFrame.new(-2.00700021, 3.00000024, 1.921, 1, 0, 0, 0, 0.999999404, 0, 0, 0, 1)
431
Part11.BottomSurface = Enum.SurfaceType.Smooth
432
Part11.TopSurface = Enum.SurfaceType.Smooth
433
Part11.Position = Vector3.new(-2.00700021, 3.00000024, 1.921)
434
SurfaceGui12.Parent = Part11
435
SurfaceGui12.Face = Enum.NormalId.Top
436
ImageLabel13.Parent = SurfaceGui12
437
ImageLabel13.Transparency = 1
438
ImageLabel13.Size = UDim2.new(1, 0, 1, 0)
439
ImageLabel13.BackgroundColor3 = Color3.new(1, 1, 1)
440
ImageLabel13.BackgroundTransparency = 1
441
ImageLabel13.Image = "rbxassetid://3337202"
442
SurfaceGui14.Parent = Part11
443
SurfaceGui14.Face = Enum.NormalId.Top
444
ImageLabel15.Parent = SurfaceGui14
445
ImageLabel15.Transparency = 1
446
ImageLabel15.Size = UDim2.new(1, 0, 1, 0)
447
ImageLabel15.BackgroundColor3 = Color3.new(1, 1, 1)
448
ImageLabel15.BackgroundTransparency = 1
449
ImageLabel15.Image = "rbxassetid://3337202"
450
SurfaceGui16.Parent = Part11
451
SurfaceGui16.Face = Enum.NormalId.Bottom
452
ImageLabel17.Parent = SurfaceGui16
453
ImageLabel17.Transparency = 1
454
ImageLabel17.Size = UDim2.new(1, 0, 1, 0)
455
ImageLabel17.BackgroundColor3 = Color3.new(1, 1, 1)
456
ImageLabel17.BackgroundTransparency = 1
457
ImageLabel17.Image = "rbxassetid://3337202"
458
SurfaceGui18.Parent = Part11
459
SurfaceGui18.Face = Enum.NormalId.Bottom
460
ImageLabel19.Parent = SurfaceGui18
461
ImageLabel19.Transparency = 1
462
ImageLabel19.Size = UDim2.new(1, 0, 1, 0)
463
ImageLabel19.BackgroundColor3 = Color3.new(1, 1, 1)
464
ImageLabel19.BackgroundTransparency = 1
465
ImageLabel19.Image = "rbxassetid://3337202"
466
Weld20.Name = "SpellWeld"
467
Weld20.Parent = Part11
468
Weld20.C1 = CFrame.new(0.000245000236, 1.88350677e-05, -0.00010599941, 1, 0, 0, 0, 0.999999523, 0, 0, 0, 1)
469
Weld20.Part0 = Part31
470
Weld20.Part1 = Part11
471
Part21.Name = "Spell2"
472
Part21.Parent = Spells
473
Part21.Transparency = 1
474
Part21.Size = Vector3.new(3.25, 0.0500000007, 3.25)
475
Part21.CFrame = CFrame.new(-2.00700021, 2.32607484, 1.921, 1, 0, 0, 0, 0.999999166, 0, 0, 0, 1)
476
Part21.BottomSurface = Enum.SurfaceType.Smooth
477
Part21.TopSurface = Enum.SurfaceType.Smooth
478
Part21.Position = Vector3.new(-2.00700021, 2.32607484, 1.921)
479
SurfaceGui22.Parent = Part21
480
SurfaceGui22.Face = Enum.NormalId.Top
481
ImageLabel23.Parent = SurfaceGui22
482
ImageLabel23.Transparency = 1
483
ImageLabel23.Size = UDim2.new(1, 0, 1, 0)
484
ImageLabel23.BackgroundColor3 = Color3.new(1, 1, 1)
485
ImageLabel23.BackgroundTransparency = 1
486
ImageLabel23.Image = "rbxassetid://3337202"
487
SurfaceGui24.Parent = Part21
488
SurfaceGui24.Face = Enum.NormalId.Top
489
ImageLabel25.Parent = SurfaceGui24
490
ImageLabel25.Transparency = 1
491
ImageLabel25.Size = UDim2.new(1, 0, 1, 0)
492
ImageLabel25.BackgroundColor3 = Color3.new(1, 1, 1)
493
ImageLabel25.BackgroundTransparency = 1
494
ImageLabel25.Image = "rbxassetid://3337202"
495
SurfaceGui26.Parent = Part21
496
SurfaceGui26.Face = Enum.NormalId.Bottom
497
ImageLabel27.Parent = SurfaceGui26
498
ImageLabel27.Transparency = 1
499
ImageLabel27.Size = UDim2.new(1, 0, 1, 0)
500
ImageLabel27.BackgroundColor3 = Color3.new(1, 1, 1)
501
ImageLabel27.BackgroundTransparency = 1
502
ImageLabel27.Image = "rbxassetid://3337202"
503
SurfaceGui28.Parent = Part21
504
SurfaceGui28.Face = Enum.NormalId.Bottom
505
ImageLabel29.Parent = SurfaceGui28
506
ImageLabel29.Transparency = 1
507
ImageLabel29.Size = UDim2.new(1, 0, 1, 0)
508
ImageLabel29.BackgroundColor3 = Color3.new(1, 1, 1)
509
ImageLabel29.BackgroundTransparency = 1
510
ImageLabel29.Image = "rbxassetid://3337202"
511
Weld30.Name = "SpellWeld"
512
Weld30.Parent = Part21
513
Weld30.C1 = CFrame.new(0.000245000236, 0.673944712, -0.00010599941, 1, 0, 0, 0, 0.999999285, 0, 0, 0, 1)
514
Weld30.Part0 = Part31
515
Weld30.Part1 = Part21
516
Part31.Name = "Handle"
517
Part31.Parent = Spells
518
Part31.Transparency = 1
519
Part31.Size = Vector3.new(2, 4, 2)
520
Part31.CFrame = CFrame.new(-2.00675511, 3.00001907, 1.92089403, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
521
Part31.BottomSurface = Enum.SurfaceType.Smooth
522
Part31.TopSurface = Enum.SurfaceType.Smooth
523
Part31.Position = Vector3.new(-2.00675511, 3.00001907, 1.92089403)
524
Weld32.Parent = Part31
525
Weld32.Part0 = Part31
526
Weld32.Part1 = char['Right Arm']
527
528
Spells.Parent = char
529
530
spawn(function()
531
	while wait() do
532
		Spells.Spell1.SpellWeld.C0 = Spells.Spell1.SpellWeld.C0*CFrame.Angles(0,math.rad(2),0)
533
		Spells.Spell2.SpellWeld.C0 = Spells.Spell2.SpellWeld.C0*CFrame.Angles(0,math.rad(-1.5),0)
534
		Spells.Spell3.SpellWeld.C0 = Spells.Spell3.SpellWeld.C0*CFrame.Angles(0,math.rad(1),0)
535
	end
536
end)
537
538
for i,v in pairs (Spells:GetChildren()) do
539
	v.Anchored=false
540
end
541
542
function swait()
543
	game:GetService("RunService").RenderStepped:Wait(0)
544
end
545
546
--Animator
547
movearms = true
548
movebody = true
549
movelegs = true
550
spawn(function()
551
	--Other
552
	while wait() do
553
		if pose == "Idle" and movebody==true and movearms==true then
554
			for i=0,0.1, 0.001333 do
555
				if pose~="Idle" or movebody~=true or movearms~=true then break end
556
				swait()
557
	LeftArm.C1 = LeftArm.C1:lerp(CFrame.new(1.92139721, 0.609127104, 0.197871476, -0.13787961, -0.0786464438, -0.987321615, -3.47089579e-09, 0.996842444, -0.0794048384, 0.990449011, -0.010948305, -0.137444243),i)
558
	RightArm.C1 = RightArm.C1:lerp(CFrame.new(-2.20093918, 0.755841017, -0.380287111, 0.168671146, 0.18313548, 0.968509912, 0.148882583, 0.966580868, -0.20869942, -0.974363387, 0.179395825, 0.135768622),i)
559
			end
560
			for i=0,0.1, 0.001333 do
561
				if pose~="Idle" or movebody~=true or movearms~=true then break end
562
				swait()
563
	LeftArm.C1 = LeftArm.C1:lerp(CFrame.new(1.93793058, 0.525867939, 0.0558444038, -0.0389509574, -0.0212362912, -0.99901545, 0.00805827603, 0.999734938, -0.0215657726, 0.999208629, -0.00889034942, -0.0387694985),i)
564
	RightArm.C1 = RightArm.C1:lerp(CFrame.new(-2.12205648, 0.581189692, -0.428195477, 0.182427317, 0.100968368, 0.978021324, 0.136899486, 0.982415557, -0.126957461, -0.973642051, 0.157051116, 0.165396914),i)
565
			end
566
		end
567
		if pose == "Running" and movebody==true and movelegs==true then
568
			for i=0,0.07, 0.0006 do
569
				if pose~="Running" or movebody~=true or movelegs~=true then break end
570
				swait()
571
LeftLeg.C1 = LeftLeg.C1:lerp(CFrame.new(-0.15999198, 2.24705672, 0.864792287, -0.025055496, -0.0938593671, -0.995270133, -0.146920413, 0.985117793, -0.0892032757, 0.988830924, 0.143990457, -0.0384724736),i)
572
RightLeg.C1 = RightLeg.C1:lerp(CFrame.new(0.113590628, 2.78344774, 0.198696569, -4.3675584e-08, 0.0404659845, 0.999180913, 0.199607119, 0.979073405, -0.0396516435, -0.979876041, 0.199443609, -0.00807734113),i)
573
			end
574
			for i=0,0.07, 0.0006 do
575
				if pose~="Running" or movebody~=true or movelegs~=true then break end
576
				swait()
577
LeftLeg.C1 = LeftLeg.C1:lerp(CFrame.new(-0.217573136, 2.06966305, 0.864792287, -0.0282963123, -0.0720653757, -0.996998429, -0.146330804, 0.98695153, -0.067186065, 0.988830924, 0.143990457, -0.0384724736),i)
578
RightLeg.C1 = RightLeg.C1:lerp(CFrame.new(0.113590628, 2.79427099, 0.02752655, -4.3675584e-08, 0.0404659845, 0.999180913, 0.105148442, 0.993641973, -0.0402416587, -0.99445653, 0.105062313, -0.00425497862),i)
579
			end
580
		end
581
	end
582
	
583
584
end)
585
586
spawn(function()
587
	--Other
588
	while wait() do
589
		if pose == "Idle" and movebody==true and movelegs==true then
590
			for i=0,0.08, 0.0005677 do
591
				if pose~="Idle" or movebody~=true or movelegs~=true then break end
592
				swait()
593
LeftLeg.C1 = LeftLeg.C1:lerp(CFrame.new(-0.208144277, 1.99190795, 0.413949221, -0.0282963067, -0.0720653683, -0.996998429, 0.117742933, 0.990214169, -0.0749167055, 0.992640853, -0.119509391, -0.0195342172),i)
594
RightLeg.C1 = RightLeg.C1:lerp(CFrame.new(0.0902807415, 2.19053221, 0.0564393736, 0.00101210177, 0.0393193997, 0.999226153, 0.116191842, 0.992454112, -0.0391706079, -0.99322629, 0.116141573, -0.00356412865),i)
595
			end
596
			for i=0,0.08, 0.0005677 do
597
				if pose~="Idle" or movebody~=true or movelegs~=true then break end
598
				swait()
599
LeftLeg.C1 = LeftLeg.C1:lerp(CFrame.new(-0.208144277, 2.21289301, 0.413949221, -0.0282963067, -0.0720653683, -0.996998429, 0.117742933, 0.990214169, -0.0749167055, 0.992640853, -0.119509391, -0.0195342172),i)
600
RightLeg.C1 = RightLeg.C1:lerp(CFrame.new(0.0902807415, 2.26938629, 0.0564393736, 0.00101210177, 0.0393193997, 0.999226153, 0.116191842, 0.992454112, -0.0391706079, -0.99322629, 0.116141573, -0.00356412865),i)
601
			end
602
		end
603
604
		if pose == "Running" and movearms==true and movebody==true then
605
			for i=0,0.063, 0.0006 do
606
				if pose~="Running" or movebody~=true or movearms~=true then break end
607
				swait()
608
	LeftArm.C1 = LeftArm.C1:lerp(CFrame.new(1.9257164, 0.677200794, -0.159240723, -0.144065306, -0.151931494, -0.977835357, -0.256799757, 0.960030913, -0.111330599, 0.95566684, 0.235069022, -0.177323118),i)
609
	RightArm.C1 = RightArm.C1:lerp(CFrame.new(-2.01159811, 0.541409969, -0.189548492, -0.114454262, 0.11331255, 0.986945033, 0.151508436, 0.98384279, -0.0953862146, -0.981807232, 0.138613135, -0.129772812),i)
610
			end
611
			for i=0,0.063, 0.0006 do
612
				if pose~="Running" or movebody~=true or movearms~=true then break end
613
				swait()
614
	LeftArm.C1 = LeftArm.C1:lerp(CFrame.new(1.92266786, 0.692670405, -0.0514299348, -0.133117691, -0.157718673, -0.978470564, -0.06509877, 0.986516297, -0.150159091, 0.988959908, 0.0437084138, -0.141590059),i)
615
	RightArm.C1 = RightArm.C1:lerp(CFrame.new(-2.01004601, 0.580142736, 0.045785062, -0.10774301, 0.123860687, 0.986433089, 0.0519879125, 0.991553247, -0.118825234, -0.992818654, 0.0384800434, -0.113272227),i)
616
			end
617
		end
618
	end
619
end)
620
621
spawn(function()
622
	while wait() do
623
		--MAINBODY
624
		if pose == "Idle" and movebody==true then
625
			for i=0,0.08, 0.0008 do
626
				if pose~="Idle" or movebody~=true then break end
627
				swait()
628
	Torso.C1 = Torso.C1:lerp(CFrame.new(-0.0568120815, -1.76807761, -0.325204164, -0.993514419, -0.109230503, 0.0315862447, 0.0506483465, -0.176418021, 0.983011425, -0.101802446, 0.978235841, 0.180806205),i)
629
	Head.C1 = Head.C1:lerp(CFrame.new(0.0760571063, -1.96275795, -0.0808709711, -0.992963433, 0.106468454, -0.0518465824, -0.0573577061, -0.0493686944, 0.997132301, 0.103603534, 0.993089736, 0.0551280938),i)
630
			end
631
			for i=0,0.08, 0.0008 do
632
				if pose~="Idle" or movebody~=true then break end
633
				swait()
634
	Torso.C1 = Torso.C1:lerp(CFrame.new(-0.050637722, -1.57592607, -0.289861679, -0.993514478, -0.109230503, 0.0315862447, 0.0506483503, -0.176418021, 0.983011425, -0.101802453, 0.978235841, 0.180806205),i)
635
	Head.C1 = Head.C1:lerp(CFrame.new(0.0760571063, -1.96275795, -0.0808709711, -0.992963433, 0.106468454, -0.0518465824, -0.0573577061, -0.0493686944, 0.997132301, 0.103603534, 0.993089736, 0.0551280938),i)
636
			end
637
		end
638
		if pose == "Running" and movebody == true then
639
			for i=0,0.08, 0.0008 do
640
				if pose~="Running" or movebody~=true then break end
641
				swait()
642
	Torso.C1 = Torso.C1:lerp(CFrame.new(-0.00214004517, -1.89437246, -0.72511673, -0.998660922, 0.0516983718, 0.0019045159, -0.0175054725, -0.372338474, 0.927931905, 0.0486816913, 0.926656008, 0.372744888),i)
643
	Head.C1 = Head.C1:lerp(CFrame.new(-0.0691558272, -1.96407938, 0.0606224984, -0.99810046, -0.0396612808, 0.0471421182, 0.0454219505, 0.043208681, 0.998033047, -0.0416202173, 0.998278499, -0.0413251184),i)
644
			end
645
			for i=0,0.08, 0.0008 do
646
				if pose~="Running" or movebody~=true then break end
647
				swait()
648
	Torso.C1 = Torso.C1:lerp(CFrame.new(-0.00342551619, -1.66900969, -0.670431733, -0.998660862, 0.0516983755, 0.00190451648, -0.0175054707, -0.372338533, 0.927931905, 0.0486816876, 0.926655948, 0.372744948),i)
649
	Head.C1 = Head.C1:lerp(CFrame.new(-0.0691558272, -1.96407938, 0.0606224984, -0.99810046, -0.0396612808, 0.0471421182, 0.0454219505, 0.043208681, 0.998033047, -0.0416202173, 0.998278499, -0.0413251184),i)
650
			end
651
		end
652
	end
653
end)
654
655
--Attack
656
mouse = player:GetMouse()
657
attacking = false
658
righthand = false
659
righting = false
660
lefting = false
661
662
663
664
function lazor()
665
	attacking = true
666
	movebody = false
667
	for i=0,0.13, 0.0013 do
668
		Torso.C1 = Torso.C1:lerp(CFrame.new(0.15688242, -1.76807761, -0.290470749, -0.716801167, -0.691800654, -0.0872230977, 0.0506483465, -0.176418021, 0.983011425, -0.695435643, 0.700206041, 0.161495224),i)
669
		LeftLeg.C1 = LeftLeg.C1:lerp(CFrame.new(-0.0380690396, 2.68862104, 0.427225471, -0.0158015247, 0.0321018472, -0.999359608, 0.120059952, 0.992313921, 0.029977167, 0.992640913, -0.119509406, -0.0195342209),i)
670
		RightLeg.C1 = RightLeg.C1:lerp(CFrame.new(0.113590628, 2.79427099, 0.02752655, -4.3675584e-08, 0.0404659845, 0.999180913, 0.105148442, 0.993641973, -0.0402416587, -0.99445653, 0.105062313, -0.00425497862),i)
671
		LeftArm.C1 = LeftArm.C1:lerp(CFrame.new(1.92139709, 0.609127104, 0.197871447, -0.13787961, -0.0786464438, -0.987321615, -3.47089579e-09, 0.996842444, -0.0794048384, 0.990449011, -0.010948305, -0.137444243),i)
672
		RightArm.C1 = RightArm.C1:lerp(CFrame.new(-1.06380701, 2.25257301, 0.536181211, -0.580544651, -0.0107682496, 0.814157248, -0.806997001, -0.125359416, -0.577096999, 0.108276591, -0.992052972, 0.0640868023),i)
673
		Head.C1 = Head.C1:lerp(CFrame.new(0.0249363557, -1.96275795, -0.108180299, -0.805434704, 0.592440784, -0.0169986095, -0.0573577061, -0.0493686944, 0.997132301, 0.589902639, 0.804099858, 0.0737443045),i)
674
		swait()
675
	end
676
	createSound("rbxassetid://1354419179",0.7,8)
677
	for i=1,30 do
678
		wait()
679
		pcall(function() createSound("rbxassetid://1354419179",0.8,5) end)
680
		local beam = Instance.new("Part",char)
681
		beam.Size = Vector3.new(6,6,100)
682
		beam.BrickColor = BrickColor.new("Really red")
683
		beam.Material = "Neon"
684
		beam.CanCollide=false
685
		beam.Transparency = 1
686
		beam.Anchored=true
687
	 	local position = mouse.Hit.p
688
		local distance = (rarm.CFrame.p - position).magnitude
689
		beam.Size = Vector3.new(6, 6, distance)
690
		beam.CFrame = CFrame.new(rarm.CFrame.p, position) * CFrame.new(0, 0, -distance / 2 + -2)
691
692
		if mouse.Target then
693
			if mouse.Target.Parent:FindFirstChildOfClass("Humanoid")  then
694
				local h = mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
695
				if h ~= hum then
696
					h.Health = h.Health - h.MaxHealth / 6
697
				end
698
			end
699
		end
700
		if mouse.Target then
701
			if mouse.Target.Parent.Parent:FindFirstChildOfClass("Humanoid")  then
702
				local h = mouse.Target.Parent.Parent:FindFirstChildOfClass("Humanoid")
703
				if h ~= hum then
704
					h.Health = h.Health - h.MaxHealth / 6
705
				end
706
			end
707
		end
708
		spawn(function()
709
			for i=1,10, 0.4 do
710
				swait()
711
				beam.Size = Vector3.new(i,i,beam.Size.Z)
712
				beam.Transparency = i/10
713
			end
714
			beam:Destroy()
715
		end)
716
	end
717
	wait(0.1)
718
	attacking=false
719
	movebody = true
720
end
721
pressingF = false
722
723
mouse.KeyDown:connect(function(key)
724
	local k = key:lower()
725
	if k == "f" then
726
		pressingF = true
727
		whip()
728
	end
729
end)
730
731
mouse.KeyUp:connect(function(key)
732
	local k = key:lower()
733
	if k == "f" then
734
		pressingF = false
735
	end
736
end)
737
738
function whip()
739
	attacking = true
740
	movebody = false
741
	local punched=false
742
	spawn(function()
743
		for i=0,0.13, 0.0013 do
744
			if movebody == true or attacking == false or punched == true then break end
745
			Torso.C1 = Torso.C1:lerp(CFrame.new(-0.0127004497, -1.79210389, 0.152598143, -0.9826141, 0.18552509, 0.00706116855, 0.0226545036, 0.0820649117, 0.996369541, 0.184272051, 0.979206741, -0.0848411322),i)
746
			LeftLeg.C1 = LeftLeg.C1:lerp(CFrame.new(-0.217573136, 1.44256806, 0.982333004, -0.0282963123, -0.0720653757, -0.996998429, -0.413804471, 0.90876627, -0.0539433509, 0.909925938, 0.411036015, -0.0555357076),i)
747
			RightLeg.C1 = RightLeg.C1:lerp(CFrame.new(0.113590628, 2.79427099, 0.02752655, -4.3675584e-08, 0.0404659845, 0.999180913, 0.105148442, 0.993641973, -0.0402416587, -0.99445653, 0.105062313, -0.00425497862),i)
748
			LeftArm.C1 = LeftArm.C1:lerp(CFrame.new(1.06116152, 0.197792649, 0.554134071, 0.283914477, 0.347440004, -0.893687844, 0.914802015, 0.181097761, 0.361027747, 0.287280321, -0.920048416, -0.26642254),i)
749
			RightArm.C1 = RightArm.C1:lerp(CFrame.new(-1.77309728, 0.576332927, 0.445536077, -0.348231971, -0.0812811628, 0.933877885, -0.936926842, 0.062104363, -0.343963623, -0.030040117, -0.994754493, -0.097781226),i)
750
			Head.C1 = Head.C1:lerp(CFrame.new(-0.0374811105, -1.96583605, -0.0436500385, -0.952512562, -0.303425491, 0.0255501121, 0.0333683975, -0.0206092, 0.999230623, -0.302665472, 0.952632308, 0.0297553428),i)
751
			swait()
752
		end
753
	end)
754
	createSound("rbxassetid://876800936",0.7,8)
755
	wait(0.1)
756
	local power = 3
757
	repeat
758
		wait()
759
		Spells.Spell3.Size = Vector3.new(power,0.05,power)
760
		Spells.Spell3.CanCollide=false
761
		Weld10 = Instance.new("Weld")
762
		Weld10.Name = "SpellWeld"
763
		Weld10.Parent = Part1
764
		Weld10.C1 = CFrame.new(0.000245000236, 1.24710596, -0.00010599941, 1, 0, 0, 0, 0.999999762, 0, 0, 0, 1)
765
		Weld10.Part0 = Part31
766
		Weld10.Part1 = Part1
767
		power = power + 0.05
768
	until pressingF == false or power > 7.5
769
	punched = true
770
	Spells.Spell3.Size = Vector3.new(3,0.05,3)
771
	Spells.Spell3.CanCollide=false
772
	Weld10 = Instance.new("Weld")
773
	Weld10.Name = "SpellWeld"
774
	Weld10.Parent = Part1
775
	Weld10.C1 = CFrame.new(0.000245000236, 1.24710596, -0.00010599941, 1, 0, 0, 0, 0.999999762, 0, 0, 0, 1)
776
	Weld10.Part0 = Part31
777
	Weld10.Part1 = Part1
778
	
779
	for i=0.1,0.2, 0.0013 do
780
		Torso.C1 = Torso.C1:lerp(CFrame.new(-0.050637722, -1.57592618, -0.289861709, -0.993514478, -0.109230503, 0.0315862447, 0.0506483503, -0.176418021, 0.983011425, -0.101802453, 0.978235841, 0.180806205),i)
781
		LeftLeg.C1 = LeftLeg.C1:lerp(CFrame.new(-0.208144277, 2.86795282, 0.434457392, -0.0282963067, -0.0720653683, -0.996998429, 0.117742933, 0.990214169, -0.0749167055, 0.992640853, -0.119509391, -0.0195342172),i)
782
		RightLeg.C1 = RightLeg.C1:lerp(CFrame.new(0.0902807415, 2.59190893, 0.0564393736, 0.00101210177, 0.0393193997, 0.999226153, 0.116191842, 0.992454112, -0.0391706079, -0.99322629, 0.116141573, -0.00356412865),i)
783
		LeftArm.C1 = LeftArm.C1:lerp(CFrame.new(1.93793046, 0.514535785, -0.13876757, -0.0389509574, -0.0212362912, -0.99901545, -0.186055884, 0.982444644, -0.0136298463, 0.98176682, 0.185341805, -0.0422182903),i)
784
		RightArm.C1 = RightArm.C1:lerp(CFrame.new(-1.68404174, 1.85182118, 0.334121138, 0.163626835, -0.0516487658, 0.985169411, -0.984848678, -0.0666964352, 0.160076901, 0.0574395247, -0.996435642, -0.0617795624),i)
785
		Head.C1 = Head.C1:lerp(CFrame.new(-0.0374811105, -1.92743921, -0.336152017, -0.952512562, -0.303425491, 0.0255501121, 0.0932713151, -0.210860342, 0.973056197, -0.289862543, 0.929231405, 0.229148),i)
786
		swait()
787
	end
788
	wait(1)
789
	attacking=false
790
	movebody = true
791
end
792
793
function throwsmallball()
794
	print'domini'
795
	movearms = false
796
	attacking = true
797
	righthand = not righthand
798
	if righting == true then return end
799
	if lefting == true then return end
800
	if righthand == true then
801
		if righting == true then return end
802
		righting=true
803
	else
804
		if lefting == true then return end
805
		lefting=true
806
	end
807
local Ball = Instance.new("Part")
808
local ParticleEmitter1 = Instance.new("ParticleEmitter")
809
local BodyThrust2 = Instance.new("BodyThrust")
810
local Attachment3 = Instance.new("Attachment")
811
local Attachment4 = Instance.new("Attachment")
812
Ball.Name = "Ball"
813
Ball.Parent = nil
814
Ball.Material = Enum.Material.Neon
815
Ball.BrickColor = BrickColor.new("Lime green")
816
Ball.Transparency = 0.6
817
Ball.Anchored = false
818
Ball.CanCollide = false
819
Ball.Shape = Enum.PartType.Ball
820
Ball.Size = Vector3.new(2,2,2)
821
Ball.CFrame = CFrame.new(-14.2000122, 1.5, -29.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
822
Ball.BottomSurface = Enum.SurfaceType.Smooth
823
Ball.TopSurface = Enum.SurfaceType.Smooth
824
Ball.Position = Vector3.new(0,1000,0)
825
local t = Instance.new("Trail",Ball)
826
t.Attachment0 = Attachment3
827
t.Attachment1 = Attachment4
828
t.Texture = 'http://www.roblox.com/asset/?id=55054494'
829
t.Color = ColorSequence.new(Color3.new(0,255,0))
830
t.LightEmission=1
831
t.LightInfluence=0
832
t.FaceCamera=false
833
t.Lifetime = 0.5
834
t.Enabled=false
835
ParticleEmitter1.Parent = Ball
836
ParticleEmitter1.Transparency = NumberSequence.new(0.5,0.45625001192093,0.0625,1)
837
ParticleEmitter1.Size = NumberSequence.new(1.2021857500076,0)
838
ParticleEmitter1.LightEmission = 1
839
ParticleEmitter1.Lifetime = NumberRange.new(1, 1)
840
ParticleEmitter1.Rate = 100
841
ParticleEmitter1.LockedToPart=true
842
ParticleEmitter1.Speed = NumberRange.new(0, 0)
843
ParticleEmitter1.Color = ColorSequence.new(Color3.new(0,255,0))
844
BodyThrust2.Parent = Ball
845
Attachment3.Parent = Ball
846
Attachment3.CFrame = CFrame.new(0, 0.8, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
847
Attachment3.Position = Vector3.new(0, 0.8, 0)
848
Attachment4.Parent = Ball
849
Attachment4.CFrame = CFrame.new(0, -0.8, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
850
Attachment4.Position = Vector3.new(0, -0.8, 0)
851
	local ball = Ball
852
	
853
	local w = nil
854
	
855
	ball.Parent=char
856
	ball.Anchored=false
857
	if righthand == true then
858
		w = Instance.new("Weld")
859
		w.Parent = ball
860
		w.Part0 = ball
861
		w.Part1 = rarm
862
		w.C0 = CFrame.new(0,4,0)
863
	else
864
		w = Instance.new("Weld")
865
		w.Parent = ball
866
		w.Part0 = ball
867
		w.Part1 = larm
868
		w.C0 = CFrame.new(0,4,0)
869
	end
870
	--createSound("rbxassetid://360129736",0.1,2,false,ball)
871
	if righthand == true then
872
		for i=0.1,0.13, 0.0013 do
873
			swait()
874
			LeftArm.C1 = LeftArm.C1:lerp(CFrame.new(1.92139721, 0.609127104, 0.197871476, -0.13787961, -0.0786464438, -0.987321615, -3.47089579e-09, 0.996842444, -0.0794048384, 0.990449011, -0.010948305, -0.137444243),i)
875
			RightArm.C1 = RightArm.C1:lerp(CFrame.new(-1.68974829, 2.40598106, 0.472159296, 0.0454996675, -0.116993919, 0.992089808, -0.292355925, -0.951196074, -0.0987632796, 0.955226541, -0.285549641, -0.0774829611),i)
876
		end
877
	elseif righthand == false then
878
		for i=0.1,0.13, 0.0013 do
879
			swait()
880
			RightArm.C1 = RightArm.C1:lerp(CFrame.new(-2.12205648, 0.581189692, -0.428195477, 0.182427317, 0.100968368, 0.978021324, 0.136899486, 0.982415557, -0.126957461, -0.973642051, 0.157051116, 0.165396914),i)
881
			LeftArm.C1 = LeftArm.C1:lerp(CFrame.new(1.93507421, 2.44304132, 0.185819805, 0.00639864849, -0.0794032067, -0.996822, 0.13311252, -0.987903535, 0.0795472413, -0.991080344, -0.1331985, 0.00424831593),i)
882
		end
883
	end
884
	wait(0.01)
885
	local point = mouse.Hit.p
886
	w:Destroy()
887
	ball.CFrame = CFrame.new(ball.CFrame.p,point)
888
	ball.Anchored=true
889
	local hit=false
890
	spawn(function()
891
		repeat
892
			if w then w:Destroy() end
893
			swait()
894
			ball.CFrame = ball.CFrame*CFrame.new(0,0,-2)
895
		until ball == nil or hit == true
896
	end)
897
	createSound("rbxassetid://551051176",1,4,false,ball)
898
	createSound("rbxassetid://679372486",1,2,false,ball)
899
	t.Enabled  = true
900
	spawn(function()
901
		local numb = 0
902
		while wait(0.03) do
903
			numb = numb + 1
904
			if w then w:Destroy() end
905
			for i,c in pairs (workspace:GetChildren()) do
906
				if c:IsA("Model") and c:FindFirstChildOfClass("Humanoid") then
907
					local v = c:FindFirstChild("Torso")
908
					if v == nil then v = c:FindFirstChild("HumanoidRootPart") end
909
					if v and v ~= char.HumanoidRootPart and v ~= torso then
910
						if (v.Position-ball.Position).magnitude < (v.Size).magnitude*2 then
911
							if hit == false then
912
								hit=true
913
								createSound("rbxassetid://142070127",1,4,false,v)
914
								local h = c:FindFirstChildOfClass("Humanoid")
915
								if h then
916
									h.Health = h.Health - math.random(h.MaxHealth/10,h.MaxHealth/3)
917
								end
918
								for i=1,5, 0.25 do
919
									swait()
920
									ball.Size = ball.Size+Vector3.new(i/5,i/5,i/5)
921
									ball.Transparency = i/5
922
								end
923
								ball:Destroy()
924
								break
925
							else
926
								break
927
							end
928
						end
929
					end
930
				end
931
			end
932
			if ball == nil then break end
933
			if ball.Parent == nil then break end
934
			if hit == true then break end
935
			if numb > 40 then ball:Destroy() break end
936
		end
937
	end)
938
	if righthand == true then
939
		for i=0.1,0.13, 0.001 do
940
			swait()
941
			LeftArm.C1 = LeftArm.C1:lerp(CFrame.new(1.92139721, 0.609127104, 0.197871476, -0.13787961, -0.0786464438, -0.987321615, -3.47089579e-09, 0.996842444, -0.0794048384, 0.990449011, -0.010948305, -0.137444243),i)
942
			RightArm.C1 = RightArm.C1:lerp(CFrame.new(-1.80503547, 1.5968492, 0.649080038, 0.0553190857, -0.0553134792, 0.996935487, -0.992296994, 0.107798807, 0.0610427633, -0.11084494, -0.992632806, -0.0489240773),i)
943
		end
944
	elseif righthand == false then
945
		for i=0.1,0.13, 0.001 do
946
			swait()
947
			RightArm.C1 = RightArm.C1:lerp(CFrame.new(-2.12205648, 0.581189692, -0.428195477, 0.182427317, 0.100968368, 0.978021324, 0.136899486, 0.982415557, -0.126957461, -0.973642051, 0.157051116, 0.165396914),i)
948
			LeftArm.C1 = LeftArm.C1:lerp(CFrame.new(2.04465604, 1.06834006, 0.579983354, 0.115892708, -0.00910150446, -0.993220031, 0.990238369, 0.0790203959, 0.114820689, 0.0774396211, -0.996831417, 0.0181705467),i)
949
		end
950
	end
951
	movearms = true
952
	attacking=false
953
	if righthand == true then
954
		righting=false
955
	else
956
		lefting=false
957
	end
958
end
959
960
961
function throwball()
962
	print'do'
963
	movearms = false
964
	attacking = true
965
local Ball = Instance.new("Part")
966
local ParticleEmitter1 = Instance.new("ParticleEmitter")
967
local BodyThrust2 = Instance.new("BodyThrust")
968
local Attachment3 = Instance.new("Attachment")
969
local Attachment4 = Instance.new("Attachment")
970
Ball.Name = "Ball"
971
Ball.Parent = nil
972
Ball.Material = Enum.Material.Neon
973
Ball.Color = Color3.new(1, 81/255, 0)
974
print(Ball.Color)
975
Ball.Transparency = 0.5
976
Ball.Anchored = true
977
Ball.CanCollide = false
978
Ball.Shape = Enum.PartType.Ball
979
Ball.Size = Vector3.new(3, 3, 3)
980
Ball.CFrame = CFrame.new(-14.2000122, 1.5, -29.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
981
Ball.BottomSurface = Enum.SurfaceType.Smooth
982
Ball.TopSurface = Enum.SurfaceType.Smooth
983
Ball.Position = Vector3.new(-14.2000122, 1.5, -29.5)
984
local t = Instance.new("Trail",Ball)
985
t.Attachment0 = Attachment3
986
t.Attachment1 = Attachment4
987
t.Texture = 'http://www.roblox.com/asset/?id=55054494'
988
t.Color = ColorSequence.new(Color3.new(255,51,0))
989
t.LightEmission=1
990
t.LightInfluence=0
991
t.FaceCamera=false
992
t.Lifetime = 0.5
993
ParticleEmitter1.Parent = Ball
994
ParticleEmitter1.Transparency = NumberSequence.new(0.5,0.45625001192093,0.0625,1)
995
ParticleEmitter1.Size = NumberSequence.new(1.2021857500076,0)
996
ParticleEmitter1.Color = ColorSequence.new(Color3.new(1, 0.14902, 0),Color3.new(1, 0.14902, 0))
997
ParticleEmitter1.LightEmission = 1
998
ParticleEmitter1.Lifetime = NumberRange.new(1, 1)
999
ParticleEmitter1.Rate = 100
1000
ParticleEmitter1.LockedToPart=true
1001
ParticleEmitter1.Speed = NumberRange.new(0, 0)
1002
ParticleEmitter1.Color = ColorSequence.new(Color3.new(1, 0.14902, 0),Color3.new(1, 0.14902, 0))
1003
BodyThrust2.Parent = Ball
1004
Attachment3.Parent = Ball
1005
Attachment3.CFrame = CFrame.new(0, 1.29023409, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
1006
Attachment3.Position = Vector3.new(0, 1.29023409, 0)
1007
Attachment4.Parent = Ball
1008
Attachment4.CFrame = CFrame.new(0, -1.24282432, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
1009
Attachment4.Position = Vector3.new(0, -1.24282432, 0)
1010
	local ball = Ball
1011
	
1012
	local w = Instance.new("Weld")
1013
	w.Parent = ball
1014
	w.Part0 = ball
1015
	w.Part1 = rarm
1016
	w.C0 = CFrame.new(0,4,0)
1017
	
1018
	ball.Parent=char
1019
	ball.Anchored=false
1020
	spawn(function()
1021
		for i=0,5, 0.05 do
1022
			ball.Size = Vector3.new(i,i,i)
1023
			if w ~= nil then w:Destroy() end
1024
			w = Instance.new("Weld")
1025
			w.Parent = ball
1026
			w.Part0 = ball
1027
			w.Part1 = rarm
1028
			w.C0 = CFrame.new(0,4,0)
1029
			swait()
1030
		end
1031
	end)
1032
	createSound("rbxassetid://876800936",0.3,4,false,ball)
1033
	for i=0,0.13, 0.0013 do
1034
		swait()
1035
		LeftArm.C1 = LeftArm.C1:lerp(CFrame.new(1.92139709, 0.609127164, 0.197871447, -0.13787961, -0.0786464438, -0.987321615, -3.47089579e-09, 0.996842444, -0.0794048384, 0.990449011, -0.0109483041, -0.137444243),i)
1036
		RightArm.C1 = RightArm.C1:lerp(CFrame.new(-1.93205297, 1.92837679, -0.249813452, -0.0421406105, 0.0412775576, 0.99825865, 0.24969551, -0.967005312, 0.0505259223, 0.967406988, 0.251389891, 0.0304433741),i)
1037
	end
1038
	wait(0.01)
1039
	local point = mouse.Hit.p
1040
	w:Destroy()
1041
	ball.CFrame = CFrame.new(ball.CFrame.p,point)
1042
	ball.Anchored=true
1043
	local hit=false
1044
	spawn(function()
1045
		repeat
1046
			if w then w:Destroy() end
1047
			swait()
1048
			ball.CFrame = ball.CFrame*CFrame.new(0,0,-2)
1049
		until ball == nil or hit == true
1050
	end)
1051
	createSound("rbxassetid://551051176",1,4,false,ball)
1052
	createSound("rbxassetid://679372486",0.5,4,false,ball)
1053
	
1054
	spawn(function()
1055
		local numb = 0
1056
		while wait(0.03) do
1057
			numb = numb + 0.1
1058
			if w then w:Destroy() end
1059
			for i,c in pairs (workspace:GetChildren()) do
1060
				if c:IsA("Model") and c:FindFirstChildOfClass("Humanoid") then
1061
					local v = c:FindFirstChild("Torso")
1062
					if v == nil then v = c:FindFirstChild("HumanoidRootPart") end
1063
					if v and v ~= char.HumanoidRootPart and v ~= torso then
1064
						if (v.Position-ball.Position).magnitude < (v.Size).magnitude*2 then
1065
							if hit == false then
1066
								hit=true
1067
								createSound("rbxassetid://142070127",0.8,4,false,v)
1068
								local h = c:FindFirstChildOfClass("Humanoid")
1069
								if h then
1070
									h.Health = h.Health - math.random(h.MaxHealth/3,h.MaxHealth/1.5)
1071
								end
1072
								for i=1,10, 0.25 do
1073
									swait()
1074
									ball.Size = ball.Size+Vector3.new(i/5,i/5,i/5)
1075
									ball.Transparency = i/10
1076
								end
1077
								ball:Destroy()
1078
								break
1079
							else
1080
								break
1081
							end
1082
						end
1083
					end
1084
				end
1085
			end
1086
			if ball == nil then break end
1087
			if ball.Parent == nil then break end
1088
			if hit == true then break end
1089
			if numb > 100 then ball:Destroy() break end
1090
		end
1091
	end)
1092
	for i=0.1,0.13, 0.001 do
1093
		swait()
1094
		local point = mouse.Hit.p
1095
		LeftArm.C1 = LeftArm.C1:lerp(CFrame.new(1.93793035, 0.525868058, 0.0558443964, -0.0389509574, -0.0212362912, -0.99901545, 0.00805827603, 0.999734938, -0.0215657726, 0.999208629, -0.00889034942, -0.0387694985),i)
1096
		RightArm.C1 = RightArm.C1:lerp(CFrame.new(-2.12205672, 1.05030358, 0.322834671, 0.182427317, 0.100968368, 0.978021324, -0.969601631, 0.183454365, 0.161917478, -0.163073719, -0.977829218, 0.131366178),i)
1097
1098
	end
1099
	movearms = true
1100
	attacking=false
1101
	wait(10)
1102
	ball:Destroy()
1103
end
1104
1105
mouse.KeyDown:connect(function(k)
1106
	local key = k:lower()
1107
	if attacking == true then return end
1108
	if key == "q" then
1109
		throwball()
1110
	end
1111
	if key == "e" then
1112
		throwsmallball()
1113
	end
1114
	if key == "g" then
1115
		lazor()
1116
	end
1117
end)
1118
1119
local mouse = game.Players.LocalPlayer:GetMouse() 
1120
repeat wait() until mouse
1121
local plr = game.Players.LocalPlayer 
1122
local torso = plr.Character.Torso 
1123
local flying = true
1124
local deb = true 
1125
local ctrl = {f = 0, b = 0, l = 0, r = 0} 
1126
local lastctrl = {f = 0, b = 0, l = 0, r = 0} 
1127
local maxspeed = 90 
1128
local speed = 0 
1129
function Fly() 
1130
local bg = Instance.new("BodyGyro", torso) 
1131
bg.P = 9e4 
1132
bg.maxTorque = Vector3.new(9e9, 9e9, 9e9) 
1133
bg.cframe = torso.CFrame 
1134
local bv = Instance.new("BodyVelocity", torso) 
1135
bv.velocity = Vector3.new(0,0.1,0) 
1136
bv.maxForce = Vector3.new(9e9, 9e9, 9e9) 
1137
repeat wait() 
1138
plr.Character.Humanoid.PlatformStand = true 
1139
if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then 
1140
speed = speed+.5+(speed/maxspeed) 
1141
if speed > maxspeed then 
1142
speed = maxspeed 
1143
end 
1144
elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then 
1145
speed = speed-1 
1146
if speed < 0 then 
1147
speed = 0 
1148
end 
1149
end 
1150
if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then 
1151
bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed 
1152
lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r} 
1153
elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then 
1154
bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed 
1155
else 
1156
bv.velocity = Vector3.new(0,0.1,0) 
1157
end 
1158
bg.cframe = bg.cframe:lerp(game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0), 0.2)
1159
until not flying 
1160
ctrl = {f = 0, b = 0, l = 0, r = 0} 
1161
lastctrl = {f = 0, b = 0, l = 0, r = 0} 
1162
speed = 0 
1163
bg:Destroy() 
1164
bv:Destroy() 
1165
plr.Character.Humanoid.PlatformStand = false 
1166
end 
1167
mouse.KeyDown:connect(function(key) 
1168
if key:lower() == "e" then 
1169
elseif key:lower() == "w" then 
1170
ctrl.f = 1 
1171
elseif key:lower() == "s" then 
1172
ctrl.b = -1 
1173
elseif key:lower() == "a" then 
1174
ctrl.l = -1 
1175
elseif key:lower() == "d" then 
1176
ctrl.r = 1 
1177
end 
1178
end) 
1179
mouse.KeyUp:connect(function(key) 
1180
if key:lower() == "w" then 
1181
ctrl.f = 0 
1182
elseif key:lower() == "s" then 
1183
ctrl.b = 0 
1184
elseif key:lower() == "a" then 
1185
ctrl.l = 0 
1186
elseif key:lower() == "d" then 
1187
ctrl.r = 0 
1188
end 
1189
end)
1190
1191
UIS = game:GetService("UserInputService")
1192
UIS.InputBegan:connect(function(keyCode,Should)
1193
	if Should == false then
1194
		local KC = keyCode.KeyCode
1195
		if KC == Enum.KeyCode.LeftShift then
1196
			flying = true
1197
			Fly()
1198
		end
1199
	end
1200
end)
1201
1202
UIS.InputEnded:connect(function(keyCode,Should)
1203
	if Should == false then
1204
		local KC = keyCode.KeyCode
1205
		if KC == Enum.KeyCode.LeftShift then
1206
			flying = false
1207
		end
1208
	end
1209
end)