· 7 years ago · Feb 20, 2019, 07:54 PM
1if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2local Player,Mouse,mouse,UserInputService,ContextActionService = owner
3do
4 print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
5 script.Parent = Player.Character
6
7 --RemoteEvent for communicating
8 local Event = Instance.new("RemoteEvent")
9 Event.Name = "UserInput_Event"
10
11 --Fake event to make stuff like Mouse.KeyDown work
12 local function fakeEvent()
13 local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
14 t.connect = t.Connect
15 return t
16 end
17
18 --Creating fake input objects with fake variables
19 local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
20 local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
21 local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
22 CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
23 end}
24 --Merged 2 functions into one by checking amount of arguments
25 CAS.UnbindAction = CAS.BindAction
26
27 --This function will trigger the events that have been :Connect()'ed
28 local function te(self,ev,...)
29 local t = m[ev]
30 if t and t._fakeEvent and t.Function then
31 t.Function(...)
32 end
33 end
34 m.TrigEvent = te
35 UIS.TrigEvent = te
36
37 Event.OnServerEvent:Connect(function(plr,io)
38 if plr~=Player then return end
39 if io.isMouse then
40 m.Target = io.Target
41 m.Hit = io.Hit
42 else
43 local b = io.UserInputState == Enum.UserInputState.Begin
44 if io.UserInputType == Enum.UserInputType.MouseButton1 then
45 return m:TrigEvent(b and "Button1Down" or "Button1Up")
46 end
47 for _,t in pairs(CAS.Actions) do
48 for _,k in pairs(t.Keys) do
49 if k==io.KeyCode then
50 t.Function(t.Name,io.UserInputState,io)
51 end
52 end
53 end
54 m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
55 UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
56 end
57 end)
58 Event.Parent = NLS([==[
59 local Player = game:GetService("Players").LocalPlayer
60 local Event = script:WaitForChild("UserInput_Event")
61
62 local UIS = game:GetService("UserInputService")
63 local input = function(io,a)
64 if a then return end
65 --Since InputObject is a client-side instance, we create and pass table instead
66 Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
67 end
68 UIS.InputBegan:Connect(input)
69 UIS.InputEnded:Connect(input)
70
71 local Mouse = Player:GetMouse()
72 local h,t
73 --Give the server mouse data 30 times every second, but only if the values changed
74 --If player is not moving their mouse, client won't fire events
75 while wait(1/30) do
76 if h~=Mouse.Hit or t~=Mouse.Target then
77 h,t=Mouse.Hit,Mouse.Target
78 Event:FireServer({isMouse=true,Target=t,Hit=h})
79 end
80 end]==],Player.Character)
81 Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
82end
83
84
85
86wait(1)
87
88player = owner
89char = player.Character
90head = char.Head
91torso = char.Torso
92t = torso
93hum = char.Humanoid
94
95newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
96local wld = Instance.new("Weld", wp0)
97wld.Part0 = wp0
98wld.Part1 = wp1
99wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
100if wp1.Name == "Head" then
101 wld.Name="Neck"
102end
103return wld
104end
105
106for i,v in pairs (char:GetChildren()) do
107 if v:IsA("Hat") or v:IsA("Accessory") then
108 v:Destroy()
109 end
110end
111Horn = Instance.new("Part")
112ParticleEmitter1 = Instance.new("ParticleEmitter")
113ParticleEmitter2 = Instance.new("ParticleEmitter")
114Horn.Name = "Horns"
115Horn.Parent = char
116Horn.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
117Horn.BottomSurface = Enum.SurfaceType.Smooth
118Horn.TopSurface = Enum.SurfaceType.Smooth
119Horn.CFrame = head.CFrame
120ParticleEmitter1.Parent = Horn
121ParticleEmitter1.Transparency = NumberSequence.new(1,0.75,1)
122ParticleEmitter1.Rotation = NumberRange.new(-180, 180)
123ParticleEmitter1.Size = NumberSequence.new(0.8,0)
124ParticleEmitter1.LockedToPart=true
125ParticleEmitter2.LockedToPart=true
126ParticleEmitter1.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 0, 0))
127ParticleEmitter1.LightEmission = 0.69999998807907
128ParticleEmitter1.Texture = "rbxassetid://170257522"
129ParticleEmitter1.EmissionDirection = Enum.NormalId.Left
130ParticleEmitter1.ZOffset = 0.5
131ParticleEmitter1.Acceleration = Vector3.new(0, 4, 0)
132ParticleEmitter1.Lifetime = NumberRange.new(1.1)
133ParticleEmitter1.Rate = 100
134ParticleEmitter1.RotSpeed = NumberRange.new(-18, 18)
135ParticleEmitter1.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 0, 0))
136
137ParticleEmitter2.Parent = Horn
138ParticleEmitter2.Transparency = NumberSequence.new(1,0.75,1)
139ParticleEmitter2.Rotation = NumberRange.new(-180, 180)
140ParticleEmitter2.Size = NumberSequence.new(0.8,0)
141ParticleEmitter2.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 0, 0))
142ParticleEmitter2.LightEmission = 0.69999998807907
143ParticleEmitter2.Texture = "rbxassetid://170257522"
144ParticleEmitter2.EmissionDirection = Enum.NormalId.Right
145ParticleEmitter2.ZOffset = 0.5
146ParticleEmitter2.Acceleration = Vector3.new(0, 4, 0)
147ParticleEmitter2.Lifetime = NumberRange.new(1.1)
148ParticleEmitter2.Rate = 100
149ParticleEmitter2.RotSpeed = NumberRange.new(-18, 18)
150ParticleEmitter2.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 0, 0))
151
152
153
154Hat0 = Instance.new("Accessory")
155Handle = Instance.new("Part")
156SpecialMesh2 = Instance.new("SpecialMesh")
157Hat0.Name = "DarkKnightHood"
158Hat0.AttachmentPos = Vector3.new(0, 1.63999999, -0.00999999978)
159Handle.Name = "Handle"
160Handle.Parent = Hat0
161Handle.Rotation = Vector3.new(-13.3299999, -0.25999999, -0.0799999982)
162Handle.CanCollide = false
163Handle.FormFactor = Enum.FormFactor.Custom
164Handle.Size = Vector3.new(2.20000029, 3.80000067, 1.36999905)
165Handle.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)
166Handle.BottomSurface = Enum.SurfaceType.Smooth
167Handle.TopSurface = Enum.SurfaceType.Smooth
168Handle.Position = Vector3.new(-34.6326752, 7.71574116, 8.64290714)
169Handle.Orientation = Vector3.new(-13.3299999, -0.269999981, -0.0199999996)
170SpecialMesh0 = Instance.new("SpecialMesh")
171SpecialMesh0.Parent = Handle
172SpecialMesh0.MeshId = "rbxassetid://391929045"
173SpecialMesh0.Offset = Vector3.new(0, 1, 0.25)
174SpecialMesh0.Scale = Vector3.new(2.0999999, 2.0999999, 2.0999999)
175SpecialMesh0.TextureId = "rbxassetid://391929221"
176SpecialMesh0.MeshType = Enum.MeshType.FileMesh
177SpecialMesh0.Scale = Vector3.new(2.0999999, 2.0999999, 2.0999999)
178
179Accessory0 = Instance.new("Accessory")
180Part1 = Instance.new("Part")
181SpecialMesh2 = Instance.new("SpecialMesh")
182Attachment3 = Instance.new("Attachment")
183Vector3Value4 = Instance.new("Vector3Value")
184Weld5 = Instance.new("Weld")
185Accessory0.Name = "SilverthornAntlers"
186Accessory0.AttachmentPos = Vector3.new(0, -0.75, 0.200000003)
187H2 = Part1
188Part1.Name = "Handle"
189Part1.Parent = Accessory0
190Part1.Rotation = Vector3.new(-13.3299999, -0.25999999, -0.0799999982)
191Part1.CanCollide = false
192Part1.Locked = true
193Part1.FormFactor = Enum.FormFactor.Plate
194Part1.Size = Vector3.new(1, 2, 1)
195Part1.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)
196Part1.BottomSurface = Enum.SurfaceType.Smooth
197Part1.TopSurface = Enum.SurfaceType.Smooth
198Part1.Position = Vector3.new(-34.6282234, 10.763752, 7.88773584)
199Part1.Orientation = Vector3.new(-13.3299999, -0.269999981, -0.0199999996)
200SpecialMesh2.Parent = Part1
201SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=1271547"
202SpecialMesh2.Scale = Vector3.new(2, 2, 2)
203SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=9254947"
204SpecialMesh2.MeshType = Enum.MeshType.FileMesh
205SpecialMesh2.Scale = Vector3.new(2, 2, 2)
206Attachment3.Name = "HatAttachment"
207Attachment3.Parent = Part1
208Attachment3.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
209Attachment3.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)
210Attachment3.Position = Vector3.new(8.65838956e-09, -0.650000095, 0.199727759)
211Attachment3.Axis = Vector3.new(1, -7.87137555e-09, 0)
212Attachment3.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
213Vector3Value4.Name = "OriginalSize"
214Vector3Value4.Parent = Part1
215Vector3Value4.Value = Vector3.new(1, 2, 1)
216
217
218
219spawn(function()
220 wait(0.2)
221 Hat0.Parent=char
222-- newWeld(head,Handle,0,0,0)
223 Accessory0.Parent=char
224-- newWeld(head,H2,0,0,0)
225end)
226
227
228
229
230
231shirt = char:FindFirstChild("Shirt")
232pants = char:FindFirstChild("Pants")
233sg = char:FindFirstChild("Shirt Graphic")
234if shirt then shirt:Destroy() end
235if pants then pants:Destroy() end
236if sg then sg:Destroy() end
237
238shirt = Instance.new("Shirt",char)
239pants = Instance.new("Pants",char)
240
241shirt.ShirtTemplate = "rbxassetid://767426316"
242pants.PantsTemplate = "rbxassetid://201888161"
243
244char['Torso'].Size = Vector3.new(4,4,2)
245
246char['Right Arm'].Size = Vector3.new(2,4,2)
247char['Left Arm'].Size = Vector3.new(2,4,2)
248char['Right Leg'].Size = Vector3.new(2,4,2)
249char['Left Leg'].Size = Vector3.new(2,4,2)
250
251char['Head'].Size = Vector3.new(4,2,2)
252local we = Instance.new("Weld",Horn)
253we.Part0 = head
254we.Part1 = Horn
255spawn(function()
256 local Ang = CFrame.Angles --[Storing these as variables so I dont have to type them out.]
257 local aSin = math.asin
258 local aTan = math.atan
259
260 --[Constants]:
261
262 local Cam = game.Workspace.CurrentCamera
263
264 local Plr = owner
265 local Body = Plr.Character or Plr.CharacterAdded:wait()
266 local Head = Body:WaitForChild("Head")
267 local Hum = Body:WaitForChild("Humanoid")
268 local Core = Body:WaitForChild("HumanoidRootPart")
269 local IsR6 = (Hum.RigType.Value==0) --[Checking if the player is using R15 or R6.]
270 local Trso = (IsR6 and Body:WaitForChild("Torso")) or Body:WaitForChild("UpperTorso")
271 local Neck = (IsR6 and Trso:WaitForChild("Neck")) or Head:WaitForChild("Neck") --[Once we know the Rig, we know what to find.]
272 local Waist = (not IsR6 and Trso:WaitForChild("Waist")) --[R6 doesn't have a waist joint, unfortunately.]
273
274 local MseGuide = false
275
276 local TurnCharacterToMouse = false
277
278 local HeadHorFactor = 1
279 local HeadVertFactor = 0.6
280 local BodyHorFactor = 0.5
281 local BodyVertFactor = 0.4
282
283 local UpdateSpeed = 0.5
284
285 local NeckOrgnC0 = Neck.C0 --[Get the base C0 to manipulate off of.]
286 local WaistOrgnC0 = (not IsR6 and Waist.C0) --[Get the base C0 to manipulate off of.]
287
288 --[Setup]:
289
290
291 -- Activation]:
292 if TurnCharacterToMouse == true then
293 MseGuide = true
294 HeadHorFactor = 0
295 BodyHorFactor = 0
296 end
297
298 game:GetService("RunService").Stepped:Connect(function()
299 local CamCF = Cam.CoordinateFrame
300 if ((IsR6 and Body["Torso"]) or Body["UpperTorso"])~=nil and Body["Head"]~=nil then --[Check for the Torso and Head...]
301 local TrsoLV = Trso.CFrame.lookVector
302 local HdPos = Head.CFrame.p
303 if IsR6 and Neck or Neck and Waist then --[Make sure the Neck still exists.]
304 if Cam.CameraSubject:IsDescendantOf(Body) or Cam.CameraSubject:IsDescendantOf(Plr) then
305 local Dist = nil;
306 local Diff = nil;
307 if not MseGuide then --[If not tracking the Mouse then get the Camera.]
308 Dist = (Head.CFrame.p-CamCF.p).magnitude
309 Diff = Head.CFrame.Y-CamCF.Y
310 if not IsR6 then --[R6 and R15 Neck rotation C0s are different; R15: X axis inverted and Z is now the Y.]
311 Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aSin(Diff/Dist)*HeadVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
312 Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang((aSin(Diff/Dist)*BodyVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
313 else --[R15s actually have the properly oriented Neck CFrame.]
314 Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aSin(Diff/Dist)*HeadVertFactor), 0, -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor),UpdateSpeed/2)
315 end
316 else
317 local Point = Mouse.Hit.p
318 Dist = (Head.CFrame.p-Point).magnitude
319 Diff = Head.CFrame.Y-Point.Y
320 if not IsR6 then
321 Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aTan(Diff/Dist)*HeadVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
322 Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang(-(aTan(Diff/Dist)*BodyVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
323 else
324 Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aTan(Diff/Dist)*HeadVertFactor), 0, (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor), UpdateSpeed/2)
325 end
326 end
327 end
328 end
329 end
330 if TurnCharacterToMouse == true then
331 Hum.AutoRotate = false
332 Core.CFrame = Core.CFrame:lerp(CFrame.new(Core.Position, Vector3.new(Mouse.Hit.p.x, Core.Position.Y, Mouse.Hit.p.z)), UpdateSpeed / 2)
333 else
334 Hum.AutoRotate = true
335 end
336 end)
337end)
338
339
340larm = char['Left Arm']
341rarm = char['Right Arm']
342lleg = char['Left Leg']
343rleg = char['Right Leg']
344hed = char['Head']
345root = char['HumanoidRootPart']
346
347LeftArm = newWeld(torso, larm, -1.5, 1, 0)
348
349RightArm = newWeld(torso, rarm, 1.5, 1, 0)
350
351Head = newWeld(torso, hed, 0, 3, 0)
352
353LeftLeg = newWeld(torso, lleg, -1, -2, 0)
354
355RightLeg = newWeld(torso, rleg, 1, -2, 0)
356
357Torso = newWeld(root, torso, 0, -2, 0)
358
359Torso.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
360Torso.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
361LeftLeg.C0 = CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
362LeftLeg.C1 = CFrame.new(-0.5, 1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
363RightLeg.C0 = CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)
364RightLeg.C1 = CFrame.new(0.5, 1, 0, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
365LeftArm.C0 = CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
366LeftArm.C1 = CFrame.new(0.5, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
367RightArm.C0 = CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)
368RightArm.C1 = CFrame.new(-0.5, 0.5, 0, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
369Head.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
370Head.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
371
372function createSound(id,speed,vol,looped,parent)
373 local sound = Instance.new("Sound",head)
374 sound.SoundId = id
375 sound.PlaybackSpeed = speed
376 if parent then sound.Parent = parent end
377 if vol then sound.Volume = vol end
378 if looped then sound.Looped = looped end
379 sound:Play()
380 spawn(function()
381 if looped == false then
382 wait(sound.TimeLength)
383 sound:Destroy()
384 end
385 end)
386end
387--BGM
388createSound('rbxassetid://1337508713',1,1,true)
389
390--Delete the animator
391humanoid = char:FindFirstChildOfClass("Humanoid")
392
393do
394 char:WaitForChild("Animate"):Destroy()
395 humanoid:WaitForChild("Animator"):Destroy()
396end
397
398pose = "Idle"
399
400--Pose updater
401spawn(function()
402 while wait() do
403 local velocity = char.HumanoidRootPart.Velocity
404 local X = (char.HumanoidRootPart.Velocity).magnitude
405 local vY = velocity.Y
406 if vY > 0.8 then
407 pose = "Jumping"
408 elseif vY<-0.8 then
409 pose = "Falling"
410 end
411 if X > 0.8 then
412 pose = "Running"
413 end
414 if humanoid.MoveDirection == Vector3.new(0,0,0) then
415 pose = "Idle"
416 end
417 if X < 0.3 and vY < 0.3 and X > -0.3 and vY > -0.3 then
418 pose = "Idle"
419 end
420 end
421end)
422
423--Spell hand
424Spells = Instance.new("Model")
425Part1 = Instance.new("Part")
426SurfaceGui2 = Instance.new("SurfaceGui")
427ImageLabel3 = Instance.new("ImageLabel")
428SurfaceGui4 = Instance.new("SurfaceGui")
429ImageLabel5 = Instance.new("ImageLabel")
430SurfaceGui6 = Instance.new("SurfaceGui")
431ImageLabel7 = Instance.new("ImageLabel")
432SurfaceGui8 = Instance.new("SurfaceGui")
433ImageLabel9 = Instance.new("ImageLabel")
434Weld10 = Instance.new("Weld")
435Part11 = Instance.new("Part")
436SurfaceGui12 = Instance.new("SurfaceGui")
437ImageLabel13 = Instance.new("ImageLabel")
438SurfaceGui14 = Instance.new("SurfaceGui")
439ImageLabel15 = Instance.new("ImageLabel")
440SurfaceGui16 = Instance.new("SurfaceGui")
441ImageLabel17 = Instance.new("ImageLabel")
442SurfaceGui18 = Instance.new("SurfaceGui")
443ImageLabel19 = Instance.new("ImageLabel")
444Weld20 = Instance.new("Weld")
445Part21 = Instance.new("Part")
446SurfaceGui22 = Instance.new("SurfaceGui")
447ImageLabel23 = Instance.new("ImageLabel")
448SurfaceGui24 = Instance.new("SurfaceGui")
449ImageLabel25 = Instance.new("ImageLabel")
450SurfaceGui26 = Instance.new("SurfaceGui")
451ImageLabel27 = Instance.new("ImageLabel")
452SurfaceGui28 = Instance.new("SurfaceGui")
453ImageLabel29 = Instance.new("ImageLabel")
454Weld30 = Instance.new("Weld")
455Part31 = Instance.new("Part")
456Weld32 = Instance.new("Weld")
457Spells.Name = "Spells"
458Spells.Parent = mas
459Spells.PrimaryPart = Part31
460Part1.Name = "Spell3"
461Part1.Parent = Spells
462Part1.Transparency = 1
463Part1.Size = Vector3.new(3, 0.0500000007, 3)
464Part1.CFrame = CFrame.new(-2.00700021, 1.75291348, 1.921, 1, 0, 0, 0, 0.999999642, 0, 0, 0, 1)
465Part1.BottomSurface = Enum.SurfaceType.Smooth
466Part1.TopSurface = Enum.SurfaceType.Smooth
467Part1.Position = Vector3.new(-2.00700021, 1.75291348, 1.921)
468SurfaceGui2.Parent = Part1
469SurfaceGui2.Face = Enum.NormalId.Top
470ImageLabel3.Parent = SurfaceGui2
471ImageLabel3.Transparency = 1
472ImageLabel3.Size = UDim2.new(1, 0, 1, 0)
473ImageLabel3.BackgroundColor3 = Color3.new(1, 1, 1)
474ImageLabel3.BackgroundTransparency = 1
475ImageLabel3.Image = "rbxassetid://3337202"
476SurfaceGui4.Parent = Part1
477SurfaceGui4.Face = Enum.NormalId.Top
478ImageLabel5.Parent = SurfaceGui4
479ImageLabel5.Transparency = 1
480ImageLabel5.Size = UDim2.new(1, 0, 1, 0)
481ImageLabel5.BackgroundColor3 = Color3.new(1, 1, 1)
482ImageLabel5.BackgroundTransparency = 1
483ImageLabel5.Image = "rbxassetid://3337202"
484SurfaceGui6.Parent = Part1
485SurfaceGui6.Face = Enum.NormalId.Bottom
486ImageLabel7.Parent = SurfaceGui6
487ImageLabel7.Transparency = 1
488ImageLabel7.Size = UDim2.new(1, 0, 1, 0)
489ImageLabel7.BackgroundColor3 = Color3.new(1, 1, 1)
490ImageLabel7.BackgroundTransparency = 1
491ImageLabel7.Image = "rbxassetid://3337202"
492SurfaceGui8.Parent = Part1
493SurfaceGui8.Face = Enum.NormalId.Bottom
494ImageLabel9.Parent = SurfaceGui8
495ImageLabel9.Transparency = 1
496ImageLabel9.Size = UDim2.new(1, 0, 1, 0)
497ImageLabel9.BackgroundColor3 = Color3.new(1, 1, 1)
498ImageLabel9.BackgroundTransparency = 1
499ImageLabel9.Image = "rbxassetid://3337202"
500Weld10.Name = "SpellWeld"
501Weld10.Parent = Part1
502Weld10.C1 = CFrame.new(0.000245000236, 1.24710596, -0.00010599941, 1, 0, 0, 0, 0.999999762, 0, 0, 0, 1)
503Weld10.Part0 = Part31
504Weld10.Part1 = Part1
505Part11.Name = "Spell1"
506Part11.Parent = Spells
507Part11.Transparency = 1
508Part11.Shape = Enum.PartType.Cylinder
509Part11.Size = Vector3.new(3.5, 0.0500000007, 3.5)
510Part11.CFrame = CFrame.new(-2.00700021, 3.00000024, 1.921, 1, 0, 0, 0, 0.999999404, 0, 0, 0, 1)
511Part11.BottomSurface = Enum.SurfaceType.Smooth
512Part11.TopSurface = Enum.SurfaceType.Smooth
513Part11.Position = Vector3.new(-2.00700021, 3.00000024, 1.921)
514SurfaceGui12.Parent = Part11
515SurfaceGui12.Face = Enum.NormalId.Top
516ImageLabel13.Parent = SurfaceGui12
517ImageLabel13.Transparency = 1
518ImageLabel13.Size = UDim2.new(1, 0, 1, 0)
519ImageLabel13.BackgroundColor3 = Color3.new(1, 1, 1)
520ImageLabel13.BackgroundTransparency = 1
521ImageLabel13.Image = "rbxassetid://3337202"
522SurfaceGui14.Parent = Part11
523SurfaceGui14.Face = Enum.NormalId.Top
524ImageLabel15.Parent = SurfaceGui14
525ImageLabel15.Transparency = 1
526ImageLabel15.Size = UDim2.new(1, 0, 1, 0)
527ImageLabel15.BackgroundColor3 = Color3.new(1, 1, 1)
528ImageLabel15.BackgroundTransparency = 1
529ImageLabel15.Image = "rbxassetid://3337202"
530SurfaceGui16.Parent = Part11
531SurfaceGui16.Face = Enum.NormalId.Bottom
532ImageLabel17.Parent = SurfaceGui16
533ImageLabel17.Transparency = 1
534ImageLabel17.Size = UDim2.new(1, 0, 1, 0)
535ImageLabel17.BackgroundColor3 = Color3.new(1, 1, 1)
536ImageLabel17.BackgroundTransparency = 1
537ImageLabel17.Image = "rbxassetid://3337202"
538SurfaceGui18.Parent = Part11
539SurfaceGui18.Face = Enum.NormalId.Bottom
540ImageLabel19.Parent = SurfaceGui18
541ImageLabel19.Transparency = 1
542ImageLabel19.Size = UDim2.new(1, 0, 1, 0)
543ImageLabel19.BackgroundColor3 = Color3.new(1, 1, 1)
544ImageLabel19.BackgroundTransparency = 1
545ImageLabel19.Image = "rbxassetid://3337202"
546Weld20.Name = "SpellWeld"
547Weld20.Parent = Part11
548Weld20.C1 = CFrame.new(0.000245000236, 1.88350677e-05, -0.00010599941, 1, 0, 0, 0, 0.999999523, 0, 0, 0, 1)
549Weld20.Part0 = Part31
550Weld20.Part1 = Part11
551Part21.Name = "Spell2"
552Part21.Parent = Spells
553Part21.Transparency = 1
554Part21.Size = Vector3.new(3.25, 0.0500000007, 3.25)
555Part21.CFrame = CFrame.new(-2.00700021, 2.32607484, 1.921, 1, 0, 0, 0, 0.999999166, 0, 0, 0, 1)
556Part21.BottomSurface = Enum.SurfaceType.Smooth
557Part21.TopSurface = Enum.SurfaceType.Smooth
558Part21.Position = Vector3.new(-2.00700021, 2.32607484, 1.921)
559SurfaceGui22.Parent = Part21
560SurfaceGui22.Face = Enum.NormalId.Top
561ImageLabel23.Parent = SurfaceGui22
562ImageLabel23.Transparency = 1
563ImageLabel23.Size = UDim2.new(1, 0, 1, 0)
564ImageLabel23.BackgroundColor3 = Color3.new(1, 1, 1)
565ImageLabel23.BackgroundTransparency = 1
566ImageLabel23.Image = "rbxassetid://3337202"
567SurfaceGui24.Parent = Part21
568SurfaceGui24.Face = Enum.NormalId.Top
569ImageLabel25.Parent = SurfaceGui24
570ImageLabel25.Transparency = 1
571ImageLabel25.Size = UDim2.new(1, 0, 1, 0)
572ImageLabel25.BackgroundColor3 = Color3.new(1, 1, 1)
573ImageLabel25.BackgroundTransparency = 1
574ImageLabel25.Image = "rbxassetid://3337202"
575SurfaceGui26.Parent = Part21
576SurfaceGui26.Face = Enum.NormalId.Bottom
577ImageLabel27.Parent = SurfaceGui26
578ImageLabel27.Transparency = 1
579ImageLabel27.Size = UDim2.new(1, 0, 1, 0)
580ImageLabel27.BackgroundColor3 = Color3.new(1, 1, 1)
581ImageLabel27.BackgroundTransparency = 1
582ImageLabel27.Image = "rbxassetid://3337202"
583SurfaceGui28.Parent = Part21
584SurfaceGui28.Face = Enum.NormalId.Bottom
585ImageLabel29.Parent = SurfaceGui28
586ImageLabel29.Transparency = 1
587ImageLabel29.Size = UDim2.new(1, 0, 1, 0)
588ImageLabel29.BackgroundColor3 = Color3.new(1, 1, 1)
589ImageLabel29.BackgroundTransparency = 1
590ImageLabel29.Image = "rbxassetid://3337202"
591Weld30.Name = "SpellWeld"
592Weld30.Parent = Part21
593Weld30.C1 = CFrame.new(0.000245000236, 0.673944712, -0.00010599941, 1, 0, 0, 0, 0.999999285, 0, 0, 0, 1)
594Weld30.Part0 = Part31
595Weld30.Part1 = Part21
596Part31.Name = "Handle"
597Part31.Parent = Spells
598Part31.Transparency = 1
599Part31.Size = Vector3.new(2, 4, 2)
600Part31.CFrame = CFrame.new(-2.00675511, 3.00001907, 1.92089403, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
601Part31.BottomSurface = Enum.SurfaceType.Smooth
602Part31.TopSurface = Enum.SurfaceType.Smooth
603Part31.Position = Vector3.new(-2.00675511, 3.00001907, 1.92089403)
604Weld32.Parent = Part31
605Weld32.Part0 = Part31
606Weld32.Part1 = char['Right Arm']
607
608Spells.Parent = char
609
610spawn(function()
611 while wait() do
612 Spells.Spell1.SpellWeld.C0 = Spells.Spell1.SpellWeld.C0*CFrame.Angles(0,math.rad(2),0)
613 Spells.Spell2.SpellWeld.C0 = Spells.Spell2.SpellWeld.C0*CFrame.Angles(0,math.rad(-1.5),0)
614 Spells.Spell3.SpellWeld.C0 = Spells.Spell3.SpellWeld.C0*CFrame.Angles(0,math.rad(1),0)
615 end
616end)
617
618for i,v in pairs (Spells:GetChildren()) do
619 v.Anchored=false
620end
621
622function swait()
623 game:GetService("RunService").Stepped:Wait(0)
624end
625
626--Animator
627movearms = true
628movebody = true
629movelegs = true
630spawn(function()
631 --Other
632 while wait() do
633 if pose == "Idle" and movebody==true and movearms==true then
634 for i=0,0.1, 0.001333 do
635 if pose~="Idle" or movebody~=true or movearms~=true then break end
636 swait()
637 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)
638 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)
639 end
640 for i=0,0.1, 0.001333 do
641 if pose~="Idle" or movebody~=true or movearms~=true then break end
642 swait()
643 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)
644 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)
645 end
646 end
647 if pose == "Running" and movebody==true and movelegs==true then
648 for i=0,0.07, 0.0006 do
649 if pose~="Running" or movebody~=true or movelegs~=true then break end
650 swait()
651LeftLeg.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)
652RightLeg.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)
653 end
654 for i=0,0.07, 0.0006 do
655 if pose~="Running" or movebody~=true or movelegs~=true then break end
656 swait()
657LeftLeg.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)
658RightLeg.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)
659 end
660 end
661 end
662
663
664end)
665
666spawn(function()
667 --Other
668 while wait() do
669 if pose == "Idle" and movebody==true and movelegs==true then
670 for i=0,0.08, 0.0005677 do
671 if pose~="Idle" or movebody~=true or movelegs~=true then break end
672 swait()
673LeftLeg.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)
674RightLeg.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)
675 end
676 for i=0,0.08, 0.0005677 do
677 if pose~="Idle" or movebody~=true or movelegs~=true then break end
678 swait()
679LeftLeg.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)
680RightLeg.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)
681 end
682 end
683
684 if pose == "Running" and movearms==true and movebody==true then
685 for i=0,0.063, 0.0006 do
686 if pose~="Running" or movebody~=true or movearms~=true then break end
687 swait()
688 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)
689 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)
690 end
691 for i=0,0.063, 0.0006 do
692 if pose~="Running" or movebody~=true or movearms~=true then break end
693 swait()
694 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)
695 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)
696 end
697 end
698 end
699end)
700
701spawn(function()
702 while wait() do
703 --MAINBODY
704 if pose == "Idle" and movebody==true then
705 for i=0,0.08, 0.0008 do
706 if pose~="Idle" or movebody~=true then break end
707 swait()
708 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)
709 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)
710 end
711 for i=0,0.08, 0.0008 do
712 if pose~="Idle" or movebody~=true then break end
713 swait()
714 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)
715 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)
716 end
717 end
718 if pose == "Running" and movebody == true then
719 for i=0,0.08, 0.0008 do
720 if pose~="Running" or movebody~=true then break end
721 swait()
722 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)
723 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)
724 end
725 for i=0,0.08, 0.0008 do
726 if pose~="Running" or movebody~=true then break end
727 swait()
728 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)
729 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)
730 end
731 end
732 end
733end)
734
735--Attack
736attacking = false
737righthand = false
738righting = false
739lefting = false
740
741
742
743function lazor()
744 attacking = true
745 movebody = false
746 for i=0,0.13, 0.0013 do
747 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)
748 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)
749 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)
750 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)
751 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)
752 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)
753 swait()
754 end
755 createSound("rbxassetid://1354419179",0.7,8)
756 for i=1,30 do
757 wait()
758 pcall(function() createSound("rbxassetid://1354419179",0.8,5) end)
759 local beam = Instance.new("Part",char)
760 beam.Size = Vector3.new(6,6,100)
761 beam.BrickColor = BrickColor.new("Really red")
762 beam.Material = "Neon"
763 beam.CanCollide=false
764 beam.Transparency = 1
765 beam.Anchored=true
766 local position = mouse.Hit.p
767 local distance = (rarm.CFrame.p - position).magnitude
768 beam.Size = Vector3.new(6, 6, distance)
769 beam.CFrame = CFrame.new(rarm.CFrame.p, position) * CFrame.new(0, 0, -distance / 2 + -2)
770
771 if mouse.Target then
772 if mouse.Target.Parent:FindFirstChildOfClass("Humanoid") then
773 local h = mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
774 if h ~= hum then
775 h.Health = h.Health - h.MaxHealth / 6
776 end
777 end
778 end
779 if mouse.Target then
780 if mouse.Target.Parent.Parent:FindFirstChildOfClass("Humanoid") then
781 local h = mouse.Target.Parent.Parent:FindFirstChildOfClass("Humanoid")
782 if h ~= hum then
783 h.Health = h.Health - h.MaxHealth / 6
784 end
785 end
786 end
787 spawn(function()
788 for i=1,10, 0.4 do
789 swait()
790 beam.Size = Vector3.new(i,i,beam.Size.Z)
791 beam.Transparency = i/10
792 end
793 beam:Destroy()
794 end)
795 end
796 wait(0.1)
797 attacking=false
798 movebody = true
799end
800pressingF = false
801
802mouse.KeyDown:connect(function(key)
803 local k = key:lower()
804 if k == "f" then
805 pressingF = true
806 whip()
807 end
808end)
809
810mouse.KeyUp:connect(function(key)
811 local k = key:lower()
812 if k == "f" then
813 pressingF = false
814 end
815end)
816
817function whip()
818 attacking = true
819 movebody = false
820 local punched=false
821 spawn(function()
822 for i=0,0.13, 0.0013 do
823 if movebody == true or attacking == false or punched == true then break end
824 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)
825 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)
826 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)
827 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)
828 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)
829 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)
830 swait()
831 end
832 end)
833 createSound("rbxassetid://876800936",0.7,8)
834 wait(0.1)
835 local power = 3
836 repeat
837 wait()
838 Spells.Spell3.Size = Vector3.new(power,0.05,power)
839 Spells.Spell3.CanCollide=false
840 Weld10 = Instance.new("Weld")
841 Weld10.Name = "SpellWeld"
842 Weld10.Parent = Part1
843 Weld10.C1 = CFrame.new(0.000245000236, 1.24710596, -0.00010599941, 1, 0, 0, 0, 0.999999762, 0, 0, 0, 1)
844 Weld10.Part0 = Part31
845 Weld10.Part1 = Part1
846 power = power + 0.05
847 until pressingF == false or power > 7.5
848 punched = true
849 Spells.Spell3.Size = Vector3.new(3,0.05,3)
850 Spells.Spell3.CanCollide=false
851 Weld10 = Instance.new("Weld")
852 Weld10.Name = "SpellWeld"
853 Weld10.Parent = Part1
854 Weld10.C1 = CFrame.new(0.000245000236, 1.24710596, -0.00010599941, 1, 0, 0, 0, 0.999999762, 0, 0, 0, 1)
855 Weld10.Part0 = Part31
856 Weld10.Part1 = Part1
857
858 for i=0.1,0.2, 0.0013 do
859 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)
860 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)
861 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)
862 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)
863 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)
864 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)
865 swait()
866 end
867 wait(1)
868 attacking=false
869 movebody = true
870end
871
872function throwsmallball()
873 print'domini'
874 movearms = false
875 attacking = true
876 righthand = not righthand
877 if righting == true then return end
878 if lefting == true then return end
879 if righthand == true then
880 if righting == true then return end
881 righting=true
882 else
883 if lefting == true then return end
884 lefting=true
885 end
886local Ball = Instance.new("Part")
887local ParticleEmitter1 = Instance.new("ParticleEmitter")
888local BodyThrust2 = Instance.new("BodyThrust")
889local Attachment3 = Instance.new("Attachment")
890local Attachment4 = Instance.new("Attachment")
891Ball.Name = "Ball"
892Ball.Parent = nil
893Ball.Material = Enum.Material.Neon
894Ball.BrickColor = BrickColor.new("Lime green")
895Ball.Transparency = 0.6
896Ball.Anchored = false
897Ball.CanCollide = false
898Ball.Shape = Enum.PartType.Ball
899Ball.Size = Vector3.new(2,2,2)
900Ball.CFrame = CFrame.new(-14.2000122, 1.5, -29.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
901Ball.BottomSurface = Enum.SurfaceType.Smooth
902Ball.TopSurface = Enum.SurfaceType.Smooth
903Ball.Position = Vector3.new(0,1000,0)
904local t = Instance.new("Trail",Ball)
905t.Attachment0 = Attachment3
906t.Attachment1 = Attachment4
907t.Texture = 'http://www.roblox.com/asset/?id=55054494'
908t.Color = ColorSequence.new(Color3.new(0,255,0))
909t.LightEmission=1
910t.LightInfluence=0
911t.FaceCamera=false
912t.Lifetime = 0.5
913t.Enabled=false
914ParticleEmitter1.Parent = Ball
915ParticleEmitter1.Transparency = NumberSequence.new(0.5,0.45625001192093,0.0625,1)
916ParticleEmitter1.Size = NumberSequence.new(1.2021857500076,0)
917ParticleEmitter1.LightEmission = 1
918ParticleEmitter1.Lifetime = NumberRange.new(1, 1)
919ParticleEmitter1.Rate = 100
920ParticleEmitter1.LockedToPart=true
921ParticleEmitter1.Speed = NumberRange.new(0, 0)
922ParticleEmitter1.Color = ColorSequence.new(Color3.new(0,255,0))
923BodyThrust2.Parent = Ball
924Attachment3.Parent = Ball
925Attachment3.CFrame = CFrame.new(0, 0.8, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
926Attachment3.Position = Vector3.new(0, 0.8, 0)
927Attachment4.Parent = Ball
928Attachment4.CFrame = CFrame.new(0, -0.8, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
929Attachment4.Position = Vector3.new(0, -0.8, 0)
930 local ball = Ball
931
932 local w = nil
933
934 ball.Parent=char
935 ball.Anchored=false
936 if righthand == true then
937 w = Instance.new("Weld")
938 w.Parent = ball
939 w.Part0 = ball
940 w.Part1 = rarm
941 w.C0 = CFrame.new(0,4,0)
942 else
943 w = Instance.new("Weld")
944 w.Parent = ball
945 w.Part0 = ball
946 w.Part1 = larm
947 w.C0 = CFrame.new(0,4,0)
948 end
949 --createSound("rbxassetid://360129736",0.1,2,false,ball)
950 if righthand == true then
951 for i=0.1,0.13, 0.0013 do
952 swait()
953 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)
954 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)
955 end
956 elseif righthand == false then
957 for i=0.1,0.13, 0.0013 do
958 swait()
959 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)
960 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)
961 end
962 end
963 wait(0.01)
964 local point = mouse.Hit.p
965 w:Destroy()
966 ball.CFrame = CFrame.new(ball.CFrame.p,point)
967 ball.Anchored=true
968 local hit=false
969 spawn(function()
970 repeat
971 if w then w:Destroy() end
972 swait()
973 ball.CFrame = ball.CFrame*CFrame.new(0,0,-2)
974 until ball == nil or hit == true
975 end)
976 createSound("rbxassetid://551051176",1,4,false,ball)
977 createSound("rbxassetid://679372486",1,2,false,ball)
978 t.Enabled = true
979 spawn(function()
980 local numb = 0
981 while wait(0.03) do
982 numb = numb + 1
983 if w then w:Destroy() end
984 for i,c in pairs (workspace:GetChildren()) do
985 if c:IsA("Model") and c:FindFirstChildOfClass("Humanoid") then
986 local v = c:FindFirstChild("Torso")
987 if v == nil then v = c:FindFirstChild("HumanoidRootPart") end
988 if v and v ~= char.HumanoidRootPart and v ~= torso then
989 if (v.Position-ball.Position).magnitude < (v.Size).magnitude*2 then
990 if hit == false then
991 hit=true
992 createSound("rbxassetid://142070127",1,4,false,v)
993 local h = c:FindFirstChildOfClass("Humanoid")
994 if h then
995 h.Health = h.Health - math.random(h.MaxHealth/10,h.MaxHealth/3)
996 end
997 for i=1,5, 0.25 do
998 swait()
999 ball.Size = ball.Size+Vector3.new(i/5,i/5,i/5)
1000 ball.Transparency = i/5
1001 end
1002 ball:Destroy()
1003 break
1004 else
1005 break
1006 end
1007 end
1008 end
1009 end
1010 end
1011 if ball == nil then break end
1012 if ball.Parent == nil then break end
1013 if hit == true then break end
1014 if numb > 40 then ball:Destroy() break end
1015 end
1016 end)
1017 if righthand == true then
1018 for i=0.1,0.13, 0.001 do
1019 swait()
1020 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)
1021 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)
1022 end
1023 elseif righthand == false then
1024 for i=0.1,0.13, 0.001 do
1025 swait()
1026 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)
1027 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)
1028 end
1029 end
1030 movearms = true
1031 attacking=false
1032 if righthand == true then
1033 righting=false
1034 else
1035 lefting=false
1036 end
1037end
1038
1039
1040function throwball()
1041 print'do'
1042 movearms = false
1043 attacking = true
1044local Ball = Instance.new("Part")
1045local ParticleEmitter1 = Instance.new("ParticleEmitter")
1046local BodyThrust2 = Instance.new("BodyThrust")
1047local Attachment3 = Instance.new("Attachment")
1048local Attachment4 = Instance.new("Attachment")
1049Ball.Name = "Ball"
1050Ball.Parent = nil
1051Ball.Material = Enum.Material.Neon
1052Ball.Color = Color3.new(1, 81/255, 0)
1053print(Ball.Color)
1054Ball.Transparency = 0.5
1055Ball.Anchored = true
1056Ball.CanCollide = false
1057Ball.Shape = Enum.PartType.Ball
1058Ball.Size = Vector3.new(3, 3, 3)
1059Ball.CFrame = CFrame.new(-14.2000122, 1.5, -29.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
1060Ball.BottomSurface = Enum.SurfaceType.Smooth
1061Ball.TopSurface = Enum.SurfaceType.Smooth
1062Ball.Position = Vector3.new(-14.2000122, 1.5, -29.5)
1063local t = Instance.new("Trail",Ball)
1064t.Attachment0 = Attachment3
1065t.Attachment1 = Attachment4
1066t.Texture = 'http://www.roblox.com/asset/?id=55054494'
1067t.Color = ColorSequence.new(Color3.new(255,51,0))
1068t.LightEmission=1
1069t.LightInfluence=0
1070t.FaceCamera=false
1071t.Lifetime = 0.5
1072ParticleEmitter1.Parent = Ball
1073ParticleEmitter1.Transparency = NumberSequence.new(0.5,0.45625001192093,0.0625,1)
1074ParticleEmitter1.Size = NumberSequence.new(1.2021857500076,0)
1075ParticleEmitter1.Color = ColorSequence.new(Color3.new(1, 0.14902, 0),Color3.new(1, 0.14902, 0))
1076ParticleEmitter1.LightEmission = 1
1077ParticleEmitter1.Lifetime = NumberRange.new(1, 1)
1078ParticleEmitter1.Rate = 100
1079ParticleEmitter1.LockedToPart=true
1080ParticleEmitter1.Speed = NumberRange.new(0, 0)
1081ParticleEmitter1.Color = ColorSequence.new(Color3.new(1, 0.14902, 0),Color3.new(1, 0.14902, 0))
1082BodyThrust2.Parent = Ball
1083Attachment3.Parent = Ball
1084Attachment3.CFrame = CFrame.new(0, 1.29023409, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
1085Attachment3.Position = Vector3.new(0, 1.29023409, 0)
1086Attachment4.Parent = Ball
1087Attachment4.CFrame = CFrame.new(0, -1.24282432, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
1088Attachment4.Position = Vector3.new(0, -1.24282432, 0)
1089 local ball = Ball
1090
1091 local w = Instance.new("Weld")
1092 w.Parent = ball
1093 w.Part0 = ball
1094 w.Part1 = rarm
1095 w.C0 = CFrame.new(0,4,0)
1096
1097 ball.Parent=char
1098 ball.Anchored=false
1099 spawn(function()
1100 for i=0,5, 0.05 do
1101 ball.Size = Vector3.new(i,i,i)
1102 if w ~= nil then w:Destroy() end
1103 w = Instance.new("Weld")
1104 w.Parent = ball
1105 w.Part0 = ball
1106 w.Part1 = rarm
1107 w.C0 = CFrame.new(0,4,0)
1108 swait()
1109 end
1110 end)
1111 createSound("rbxassetid://876800936",0.3,4,false,ball)
1112 for i=0,0.13, 0.0013 do
1113 swait()
1114 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)
1115 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)
1116 end
1117 wait(0.01)
1118 local point = mouse.Hit.p
1119 w:Destroy()
1120 ball.CFrame = CFrame.new(ball.CFrame.p,point)
1121 ball.Anchored=true
1122 local hit=false
1123 spawn(function()
1124 repeat
1125 if w then w:Destroy() end
1126 swait()
1127 ball.CFrame = ball.CFrame*CFrame.new(0,0,-2)
1128 until ball == nil or hit == true
1129 end)
1130 createSound("rbxassetid://551051176",1,4,false,ball)
1131 createSound("rbxassetid://679372486",0.5,4,false,ball)
1132
1133 spawn(function()
1134 local numb = 0
1135 while wait(0.03) do
1136 numb = numb + 0.1
1137 if w then w:Destroy() end
1138 for i,c in pairs (workspace:GetChildren()) do
1139 if c:IsA("Model") and c:FindFirstChildOfClass("Humanoid") then
1140 local v = c:FindFirstChild("Torso")
1141 if v == nil then v = c:FindFirstChild("HumanoidRootPart") end
1142 if v and v ~= char.HumanoidRootPart and v ~= torso then
1143 if (v.Position-ball.Position).magnitude < (v.Size).magnitude*2 then
1144 if hit == false then
1145 hit=true
1146 createSound("rbxassetid://142070127",0.8,4,false,v)
1147 local h = c:FindFirstChildOfClass("Humanoid")
1148 if h then
1149 h.Health = h.Health - math.random(h.MaxHealth/3,h.MaxHealth/1.5)
1150 end
1151 for i=1,10, 0.25 do
1152 swait()
1153 ball.Size = ball.Size+Vector3.new(i/5,i/5,i/5)
1154 ball.Transparency = i/10
1155 end
1156 ball:Destroy()
1157 break
1158 else
1159 break
1160 end
1161 end
1162 end
1163 end
1164 end
1165 if ball == nil then break end
1166 if ball.Parent == nil then break end
1167 if hit == true then break end
1168 if numb > 100 then ball:Destroy() break end
1169 end
1170 end)
1171 for i=0.1,0.13, 0.001 do
1172 swait()
1173 local point = mouse.Hit.p
1174 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)
1175 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)
1176
1177 end
1178 movearms = true
1179 attacking=false
1180 wait(10)
1181 ball:Destroy()
1182end
1183
1184mouse.KeyDown:connect(function(k)
1185 local key = k:lower()
1186 if attacking == true then return end
1187 if key == "q" then
1188 throwball()
1189 end
1190 if key == "e" then
1191 throwsmallball()
1192 end
1193 if key == "g" then
1194 lazor()
1195 end
1196end)
1197
1198repeat wait() until mouse
1199local plr = owner
1200local torso = plr.Character.Torso
1201local flying = true
1202local deb = true
1203local ctrl = {f = 0, b = 0, l = 0, r = 0}
1204local lastctrl = {f = 0, b = 0, l = 0, r = 0}
1205local maxspeed = 90
1206local speed = 0
1207function Fly()
1208local bg = Instance.new("BodyGyro", torso)
1209bg.P = 9e4
1210bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
1211bg.cframe = torso.CFrame
1212local bv = Instance.new("BodyVelocity", torso)
1213bv.velocity = Vector3.new(0,0.1,0)
1214bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
1215repeat wait()
1216plr.Character.Humanoid.PlatformStand = true
1217if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
1218speed = speed+.5+(speed/maxspeed)
1219if speed > maxspeed then
1220speed = maxspeed
1221end
1222elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
1223speed = speed-1
1224if speed < 0 then
1225speed = 0
1226end
1227end
1228if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
1229bv.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
1230lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
1231elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
1232bv.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
1233else
1234bv.velocity = Vector3.new(0,0.1,0)
1235end
1236bg.cframe = bg.cframe:lerp(game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0), 0.2)
1237until not flying
1238ctrl = {f = 0, b = 0, l = 0, r = 0}
1239lastctrl = {f = 0, b = 0, l = 0, r = 0}
1240speed = 0
1241bg:Destroy()
1242bv:Destroy()
1243plr.Character.Humanoid.PlatformStand = false
1244end
1245mouse.KeyDown:connect(function(key)
1246if key:lower() == "e" then
1247elseif key:lower() == "w" then
1248ctrl.f = 1
1249elseif key:lower() == "s" then
1250ctrl.b = -1
1251elseif key:lower() == "a" then
1252ctrl.l = -1
1253elseif key:lower() == "d" then
1254ctrl.r = 1
1255end
1256end)
1257mouse.KeyUp:connect(function(key)
1258if key:lower() == "w" then
1259ctrl.f = 0
1260elseif key:lower() == "s" then
1261ctrl.b = 0
1262elseif key:lower() == "a" then
1263ctrl.l = 0
1264elseif key:lower() == "d" then
1265ctrl.r = 0
1266end
1267end)
1268
1269UIS = game:GetService("UserInputService")
1270UIS.InputBegan:connect(function(keyCode,Should)
1271 if Should == false then
1272 local KC = keyCode.KeyCode
1273 if KC == Enum.KeyCode.LeftShift then
1274 flying = true
1275 Fly()
1276 end
1277 end
1278end)
1279
1280UIS.InputEnded:connect(function(keyCode,Should)
1281 if Should == false then
1282 local KC = keyCode.KeyCode
1283 if KC == Enum.KeyCode.LeftShift then
1284 flying = false
1285 end
1286 end
1287end)