View difference between Paste ID: mECXczhE and uA3R13Pv
SHOW: | | - or go back to the newest paste.
1
--Natsu Dragon Slayer Script, by Vegetathesayajin.
2
--Put your name on line 6 where it says "PutYaNaimHere".
3
--You can use this for your game, My script no use.
4
 
5
local Shared = nil
6-
if not Shared or game.Players.LocalPlayer.Vegetathesayajin == Shared then
6+
if not Shared or game.Players.LocalPlayer.gyropromainia456 == Shared then
7
wait(1/30)
8
pcall(function()
9
    game.Players.LocalPlayer.Character.Animate.Disabled = true
10
end)
11
local active = true
12
local player = game.Players.LocalPlayer
13
local mouse = player:GetMouse()
14
local stats = {
15
    ["Power"] = 100,
16
    ["HP"] = 999999999999,
17
    ["HPRegen"] = 999999999,
18
    ["MP"] = 999999999,
19
    ["MPRegen"] = 999999999,
20
    ["MPCharge"] = 999999999,
21
    ["WalkSpeed"] = 35
22
}
23
local state = {}
24
local c0 = {
25
    ["Neck"] = {Vector3.new(0,1.5,0),CFrame.Angles(math.pi/-2,0,0)},
26
    ["Right Shoulder"] = {Vector3.new(1.5,0.5,0),CFrame.Angles(0,math.pi/2,0)},
27
    ["Left Shoulder"] = {Vector3.new(-1.5,0.5,0),CFrame.Angles(0,math.pi/-2,0)},
28
    ["Right Hip"] = {Vector3.new(0.5,-1,0),CFrame.Angles(0,math.pi/2,0)},
29
    ["Left Hip"] = {Vector3.new(-0.5,-1,0),CFrame.Angles(0,math.pi/-2,0)}
30
}
31
local c1 = {
32
    ["Neck"] = CFrame.Angles(math.pi/-2,0,0),
33
    ["Right Shoulder"] = CFrame.new(0,0.5,0)*CFrame.Angles(0,math.pi/2,0),
34
    ["Left Shoulder"] = CFrame.new(0,0.5,0)*CFrame.Angles(0,math.pi/-2,0),
35
    ["Right Hip"] = CFrame.new(0,1,0)*CFrame.Angles(0,math.pi/2,0),
36
    ["Left Hip"] = CFrame.new(0,1,0)*CFrame.Angles(0,math.pi/-2,0)
37
}
38
local bodyPart = {}
39
local limb = {}
40
local humanoidState = {}
41
local humanoidCurrentState = "Standing"
42
for _,v in pairs({"Climbing","FallingDown","FreeFalling","GettingUp","Jumping","Ragdoll","Running","Seated","Strafing","Swimming"}) do
43
    local number = {"Running","Strafing","Climbing","Swimming"}
44
    for _,p in pairs(number) do number[p] = true end
45
    humanoidState[v] = {
46
    ["Connection"] = nil,
47
    ["Value"] = number[v] and 0 or false}
48
end
49
local humanoid
50
local bpos
51
local gyro
52
local bvel
53
local ui
54
local skillName = {
55
    ["z"] = "Iron Fist",
56
    ["x"] = "Crushing Fang",
57
    ["c"] = "Flame Elbow",
58
    ["v"] = "Claw",
59
        ["g"] = "FireBreath",
60
        ["f"] = "Eagle",
61
    ["b"] = "Roar",
62
    ["n"] = "Wing Attack",
63
    ["m"] = "Sword Horn"
64
}
65
local skillFunc = {
66
    ["Iron Fist"] = function()
67
        local cam = workspace.CurrentCamera
68
        local target = CFrame.new(bodyPart.Torso.Position,mouse.Hit.p)
69
        local strength = state.MPCharge*stats.Power
70
        for i=1,5 do
71
            wait(1/30)
72
            gyro.cframe = target*CFrame.Angles(-math.pi/3,-math.pi/4,0)
73
            bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*2
74
            bodyPart.Torso.Velocity = Vector3.new()
75
            translateLimb("Neck",Vector3.new(math.pi/6,0,0),Vector3.new(),0.75)
76
            translateLimb("Right Shoulder",Vector3.new(0,-math.pi/3,math.pi/2),Vector3.new(),0.75)
77
            translateLimb("Left Shoulder",Vector3.new(0,-math.pi/8,-math.pi/1.5),Vector3.new(0.25,0,-0.25),0.75)
78
            translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/6),Vector3.new(0,0.75,-0.75),0.75)
79
            translateLimb("Left Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
80
            flame(CFrame.new((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
81
        end
82
        for i=1,5 do
83
            wait(1/30)
84
            local ratio = i/5
85
            gyro.cframe = target*CFrame.Angles(-math.pi/3,math.pi/2,0)
86
            bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*2*(1-ratio)
87
            bodyPart.Torso.Velocity = Vector3.new()
88
            translateLimb("Neck",Vector3.new(),Vector3.new(),0.75)
89
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/5,math.pi/1.5),Vector3.new(-0.5,0,-0.5),0.75)
90
            translateLimb("Left Shoulder",Vector3.new(-math.pi/6,0,math.pi/24),Vector3.new(),0.75)
91
            translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/6),Vector3.new(0,0.5,-0.5),0.75)
92
            translateLimb("Left Hip",Vector3.new(-math.pi/12,0,math.pi/12),Vector3.new(),0.75)
93
            AoE((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p,math.max(2,math.min(5,state.MPCharge)),strength/10,target.lookVector*strength/10,true)
94
            flame(CFrame.new((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
95
        end
96
    end,
97
    ["Crushing Fang"] = function()
98
        local cam = workspace.CurrentCamera
99
        local target = CFrame.new(bodyPart.Torso.Position,mouse.Hit.p)
100
        local strength = state.MPCharge*stats.Power
101
        for i=1,5 do
102
            wait(1/30)
103
            local ratio = math.min(1,i/3)
104
            gyro.cframe = target*CFrame.Angles(math.pi/6*ratio,0,math.pi/3*ratio)
105
            bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector
106
            bodyPart.Torso.Velocity = Vector3.new()
107
            translateLimb("Right Shoulder",Vector3.new(0,-math.pi/3,math.pi/2),Vector3.new(),0.75)
108
            translateLimb("Left Shoulder",Vector3.new(-math.pi/6,0,math.pi/12),Vector3.new(0.25,0,-0.25),0.75)
109
            translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(0,0.5,-0.25),0.75)
110
            translateLimb("Left Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
111
            flame(CFrame.new((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
112
        end
113
        for i=1,5 do
114
            wait(1/30)
115
            local ratio = math.min(1,i/3)
116
            gyro.cframe = target*CFrame.Angles(math.pi/6-(math.pi+math.pi/6)*ratio,0,math.pi/3)
117
            bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*(1-ratio)
118
            bodyPart.Torso.Velocity = Vector3.new()
119
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/8,math.pi/2),Vector3.new(),0.75)
120
            translateLimb("Left Shoulder",Vector3.new(-math.pi/6,0,math.pi/12),Vector3.new(0.25,0,-0.25),0.75)
121
            translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(0,0.5,-0.25),0.75)
122
            translateLimb("Left Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
123
            AoE((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p,math.max(2,math.min(5,state.MPCharge)),strength/50,target.lookVector*strength/500,true)
124
            flame(CFrame.new((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
125
        end
126
    end,
127
    ["Flame Elbow"] = function()
128
        local cam = workspace.CurrentCamera
129
        local cf = bodyPart.Torso.CFrame
130
        local lookXZ = CFrame.new(cf.p,mouse.Hit.p*Vector3.new(1,0,1)+Vector3.new(0,cf.p.y,0))
131
        local strength = state.MPCharge*stats.Power
132
        function booster(size)
133
            local dir = bodyPart["Right Arm"].CFrame
134
            local maxSize = math.min(10,math.ceil(size/2))
135
            for i=1,maxSize do
136
                wait(1/30)
137
                local ratio = i/maxSize
138
                local pos = (dir*CFrame.new(0,1+i*math.min(30,math.max(2,size*ratio))/4,0)).p
139
                flame(CFrame.new(pos)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),9,size*ratio)
140
                AoE(pos,math.max(2,size*ratio),strength/100,(dir*CFrame.Angles(math.pi/2,0,0)).lookVector*strength/1000)
141
            end
142
        end
143
        for i=1,30 do
144
            wait(1/30)
145
            gyro.cframe = lookXZ*CFrame.Angles(0,-math.pi/3,0)
146
            bodyPart.Torso.CFrame = (bodyPart.Torso.CFrame-bodyPart.Torso.CFrame.p)+cf.p
147
            bodyPart.Torso.Velocity = Vector3.new()
148
            translateLimb("Neck",Vector3.new(0,0,math.pi/4),Vector3.new(),0.75)
149
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/3,math.pi/2),Vector3.new(-0.25,0,-0.5),0.75)
150
            translateLimb("Left Shoulder",Vector3.new(-math.pi/6,0,math.pi/12),Vector3.new(),0.75)
151
            translateLimb("Right Hip",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.75)
152
            translateLimb("Left Hip",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.75)
153
            if i > 3 then
154
                coroutine.wrap(booster)(i)
155
            end
156
        end
157
        for i=1,5 do
158
            wait(0.01)
159
            gyro.cframe = lookXZ*CFrame.Angles(0,math.pi/2,0)
160
            bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,0,-5*i)*CFrame.Angles(0,math.pi/2,0)
161
            bodyPart.Torso.Velocity = Vector3.new()
162
            translateLimb("Neck",Vector3.new(),Vector3.new(),0.9)
163
            translateLimb("Right Shoulder",Vector3.new(0,-math.pi/2,math.pi/2),Vector3.new(),0.9)
164
            translateLimb("Left Shoulder",Vector3.new(-math.pi/6,0,math.pi/12),Vector3.new(),0.9)
165
            translateLimb("Right Hip",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.75)
166
            translateLimb("Left Hip",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.75)
167
            AoE((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p,2,strength*10,lookXZ.lookVector*strength*100,true)
168
        end
169
    end,
170
    ["Eagle"] = function()
171
        local cam = workspace.CurrentCamera
172
        local target = CFrame.new(bodyPart.Torso.Position,mouse.Hit.p)
173
        local strength = state.MPCharge*stats.Power
174
        for i=1,5 do
175
            wait(1/30)
176
            gyro.cframe = target*CFrame.Angles(-math.pi/3,-math.pi/4,0)
177
            bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*2
178
            bodyPart.Torso.Velocity = Vector3.new()
179
            translateLimb("Neck",Vector3.new(math.pi/6,0,0),Vector3.new(),0.75)
180
            translateLimb("Right Shoulder",Vector3.new(0,-math.pi/3,math.pi/2),Vector3.new(),0.75)
181
            translateLimb("Left Shoulder",Vector3.new(0,-math.pi/8,-math.pi/1.5),Vector3.new(0.25,0,-0.25),0.75)
182
            translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/6),Vector3.new(0,0.75,-0.75),0.75)
183
            translateLimb("Left Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
184
            flame(CFrame.new((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
185
        end
186
                for i=1,5 do
187
            wait(1/30)
188
            gyro.cframe = target*CFrame.Angles(-math.pi/3,-math.pi/4,0)
189
            bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*2
190
            bodyPart.Torso.Velocity = Vector3.new()
191
            translateLimb("Neck",Vector3.new(math.pi/6,0,0),Vector3.new(),0.75)
192
            translateLimb("Right Shoulder",Vector3.new(0,-math.pi/7,math.pi/1),Vector3.new(),0.75)
193
            translateLimb("Left Shoulder",Vector3.new(0,-math.pi/8,-math.pi/3),Vector3.new(0.50,0,-0.30),0.90)
194
            translateLimb("Right Hip",Vector3.new(-math.pi/6,0,-math.pi/6),Vector3.new(0,0.75,-0.20),0.50)
195
            translateLimb("Left Hip",Vector3.new(-math.pi/6,0,-math.pi/12),Vector3.new(),0.50)
196
                        AoE((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p,math.max(2,math.min(5,state.MPCharge)),strength/10,target.lookVector*strength/10,true)
197
        end
198
        for i=1,5 do
199
            wait(1/30)
200
            local ratio = i/5
201
            gyro.cframe = target*CFrame.Angles(-math.pi/3,math.pi/2,0)
202
            bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*2*(1-ratio)
203
            bodyPart.Torso.Velocity = Vector3.new()
204
            translateLimb("Neck",Vector3.new(),Vector3.new(),0.75)
205
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/5,math.pi/1.5),Vector3.new(-0.5,0,-0.5),0.75)
206
            translateLimb("Left Shoulder",Vector3.new(-math.pi/6,0,math.pi/24),Vector3.new(),0.75)
207
            translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/6),Vector3.new(0,0.5,-0.5),0.75)
208
            translateLimb("Left Hip",Vector3.new(-math.pi/12,0,math.pi/12),Vector3.new(),0.75)
209
                        explosion((bodyPart["Right Arm"]),5,2,0)
210
            AoE((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p,math.max(2,math.min(5,state.MPCharge)),strength/10,target.lookVector*strength/10,true)
211
            flame(CFrame.new((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
212
        end
213
    end,
214
    ["Claw"] = function()
215
        local cam = workspace.CurrentCamera
216
        local target = CFrame.new(bodyPart.Torso.Position,mouse.Hit.p)
217
        local strength = state.MPCharge*stats.Power
218
        for i=1,10 do
219
            wait(1/30)
220
            local hit,pos = advRay(bodyPart.Torso.Position,target.lookVector*5,{player.Character})
221
            gyro.cframe = target*CFrame.Angles(0,math.pi/2,math.pi/3)
222
            bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*(bodyPart.Torso.Position-pos).magnitude
223
            bodyPart.Torso.Velocity = Vector3.new()
224
            translateLimb("Neck",Vector3.new(0,math.pi/12,-math.pi/3),Vector3.new(),0.75)
225
            translateLimb("Right Shoulder",Vector3.new(-math.pi/3,0,0),Vector3.new(),0.75)
226
            translateLimb("Left Shoulder",Vector3.new(-math.pi/3,0,0),Vector3.new(0.25,0,-0.25),0.75)
227
            translateLimb("Right Hip",Vector3.new(-math.pi/8,0,0),Vector3.new(),0.75)
228
            translateLimb("Left Hip",Vector3.new(math.pi/8,0,-math.pi/12),Vector3.new(-0.5,0.5,0),0.75)
229
            AoE((bodyPart["Right Leg"].CFrame*CFrame.new(0,-1,0)).p,math.max(2,math.min(5,state.MPCharge)),strength/10,target.lookVector*strength/10,true)
230
            flame(CFrame.new((bodyPart["Right Leg"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
231
            if hit then
232
                bodyPart.Torso.Velocity = bodyPart.Torso.Velocity+Vector3.new(0,60,0)-target.lookVector*20
233
                break
234
            end
235
        end
236
    end,
237
            ["FireBreath"] = function()
238
        local cam = workspace.CurrentCamera
239
        local mouseHit = mouse.Hit.p
240
        local cf = bodyPart.Torso.CFrame
241
        local lookXZ = CFrame.new(cf.p,mouseHit*Vector3.new(1,0,1)+Vector3.new(0,cf.p.y,0))
242
        local target = (mouseHit-cf.p).unit
243
        local dir = math.pi/2-math.acos(target.y)
244
        local strength = state.MPCharge*stats.Power
245
        for i=1,50 do
246
            wait(1/30)
247
            local ratio = math.sin(i/100*math.pi)
248
            local offset = math.sin(-ratio*math.pi/8)
249
            gyro.cframe = lookXZ*CFrame.Angles(math.pi/4*ratio,0,0)
250
            bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,offset,-offset)*CFrame.Angles(math.pi/4*ratio,0,0)
251
            bodyPart.Torso.Velocity = Vector3.new()
252
            translateLimb("Neck",Vector3.new(math.pi/12*ratio,0,0),Vector3.new(),1)
253
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/12,-math.pi/12),Vector3.new(),0.5)
254
            translateLimb("Left Shoulder",Vector3.new(0,-math.pi/12,math.pi/12),Vector3.new(),0.5)
255
            translateLimb("Right Hip",Vector3.new(-math.pi/24,0,-math.pi/4*ratio),Vector3.new(),1)
256
            translateLimb("Left Hip",Vector3.new(-math.pi/24,0,math.pi/4*ratio),Vector3.new(),1)
257
        end
258
        for i=1,5 do
259
            wait(1/30)
260
            local ratio = 1-i/5
261
            local offset = math.sin(i/5*dir)+math.sin(-ratio*math.pi/8)
262
            local rot = dir*i/5
263
            gyro.cframe = lookXZ*CFrame.Angles(math.pi/4*ratio+rot,0,0)
264
            bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,-math.abs(offset),offset)*CFrame.Angles(math.pi/4*ratio+rot,0,0)
265
            bodyPart.Torso.Velocity = Vector3.new()
266
            translateLimb("Neck",Vector3.new(math.pi/12*ratio,0,0),Vector3.new(),1)
267
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/3,math.pi/1.5),Vector3.new(-0.75,0,-0.5),0.5)
268
            translateLimb("Left Shoulder",Vector3.new(0,-math.pi/3.5,-math.pi/1.5),Vector3.new(0.75,0,-0.5),0.5)
269
            translateLimb("Right Hip",Vector3.new(-math.pi/24,0,-math.pi/4*ratio-rot),Vector3.new(),1)
270
            translateLimb("Left Hip",Vector3.new(-math.pi/24,0,math.pi/4*ratio+rot),Vector3.new(),1)
271
        end
272
        --rune(bodyPart.Head.CFrame*CFrame.new(0,0,-3)*CFrame.Angles(math.pi/2,0,0),5,13/3)
273
        for i=1,50 do
274
            wait(1/30)
275
            mouseHit = mouseHit:Lerp(mouse.Hit.p,0.1)
276
            lookXZ = CFrame.new(cf.p,mouseHit*Vector3.new(1,0,1)+Vector3.new(0,cf.p.y,0))
277
            target = (mouseHit-cf.p).unit
278
            dir = math.pi/2-math.acos(target.y)
279
            local offset = math.sin(dir)
280
            gyro.cframe = lookXZ*CFrame.Angles(dir,0,0)
281
            bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,-math.abs(offset),offset)*CFrame.Angles(dir,0,0)
282
            bodyPart.Torso.Velocity = Vector3.new()
283
            translateLimb("Neck",Vector3.new(),Vector3.new(),1)
284
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/3,math.pi/1.5),Vector3.new(-0.75,0,-0.5),0.5)
285
            translateLimb("Left Shoulder",Vector3.new(0,-math.pi/3.5,-math.pi/1.5),Vector3.new(0.75,0,-0.5),0.5)
286
            translateLimb("Right Hip",Vector3.new(-math.pi/24,0,-dir),Vector3.new(),0.5)
287
            translateLimb("Left Hip",Vector3.new(-math.pi/24,0,dir),Vector3.new(),0.5)
288
            coroutine.wrap(function()
289
                local direction = bodyPart.Head.CFrame
290
                for n=1,10 do
291
                    wait(1/30)
292
                    local scale = math.min(30,n*3)
293
                    flame(CFrame.new((direction*CFrame.new(0,0,-5-n*scale/4)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),9,scale)
294
                    AoE((direction*CFrame.new(0,0,-5-n*scale/4)).p,scale,strength/100,target*strength/1000,false)
295
                end
296
            end)()
297
        end
298
    end,
299
    ["Roar"] = function()
300
        local cam = workspace.CurrentCamera
301
        local mouseHit = mouse.Hit.p
302
        local cf = bodyPart.Torso.CFrame
303
        local lookXZ = CFrame.new(cf.p,mouseHit*Vector3.new(1,0,1)+Vector3.new(0,cf.p.y,0))
304
        local target = (mouseHit-cf.p).unit
305
        local dir = math.pi/2-math.acos(target.y)
306
        local strength = state.MPCharge*stats.Power
307
        for i=1,50 do
308
            wait(1/30)
309
            local ratio = math.sin(i/100*math.pi)
310
            local offset = math.sin(-ratio*math.pi/8)
311
            gyro.cframe = lookXZ*CFrame.Angles(math.pi/4*ratio,0,0)
312
            bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,offset,-offset)*CFrame.Angles(math.pi/4*ratio,0,0)
313
            bodyPart.Torso.Velocity = Vector3.new()
314
            translateLimb("Neck",Vector3.new(math.pi/12*ratio,0,0),Vector3.new(),1)
315
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/12,-math.pi/12),Vector3.new(),0.5)
316
            translateLimb("Left Shoulder",Vector3.new(0,-math.pi/12,math.pi/12),Vector3.new(),0.5)
317
            translateLimb("Right Hip",Vector3.new(-math.pi/24,0,-math.pi/4*ratio),Vector3.new(),1)
318
            translateLimb("Left Hip",Vector3.new(-math.pi/24,0,math.pi/4*ratio),Vector3.new(),1)
319
        end
320
        for i=1,5 do
321
            wait(1/30)
322
            local ratio = 1-i/5
323
            local offset = math.sin(i/5*dir)+math.sin(-ratio*math.pi/8)
324
            local rot = dir*i/5
325
            gyro.cframe = lookXZ*CFrame.Angles(math.pi/4*ratio+rot,0,0)
326
            bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,-math.abs(offset),offset)*CFrame.Angles(math.pi/4*ratio+rot,0,0)
327
            bodyPart.Torso.Velocity = Vector3.new()
328
            translateLimb("Neck",Vector3.new(math.pi/12*ratio,0,0),Vector3.new(),1)
329
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/3,math.pi/1.5),Vector3.new(-0.75,0,-0.5),0.5)
330
            translateLimb("Left Shoulder",Vector3.new(0,-math.pi/3.5,-math.pi/1.5),Vector3.new(0.75,0,-0.5),0.5)
331
            translateLimb("Right Hip",Vector3.new(-math.pi/24,0,-math.pi/4*ratio-rot),Vector3.new(),1)
332
            translateLimb("Left Hip",Vector3.new(-math.pi/24,0,math.pi/4*ratio+rot),Vector3.new(),1)
333
        end
334
        --rune(bodyPart.Head.CFrame*CFrame.new(0,0,-3)*CFrame.Angles(math.pi/2,0,0),5,13/3)
335
        for i=1,50 do
336
            wait(1/30)
337
            mouseHit = mouseHit:Lerp(mouse.Hit.p,0.1)
338
            lookXZ = CFrame.new(cf.p,mouseHit*Vector3.new(1,0,1)+Vector3.new(0,cf.p.y,0))
339
            target = (mouseHit-cf.p).unit
340
            dir = math.pi/2-math.acos(target.y)
341
            local offset = math.sin(dir)
342
            gyro.cframe = lookXZ*CFrame.Angles(dir,0,0)
343
            bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,-math.abs(offset),offset)*CFrame.Angles(dir,0,0)
344
            bodyPart.Torso.Velocity = Vector3.new()
345
            translateLimb("Neck",Vector3.new(),Vector3.new(),1)
346
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/3,math.pi/1.5),Vector3.new(-0.75,0,-0.5),0.5)
347
            translateLimb("Left Shoulder",Vector3.new(0,-math.pi/3.5,-math.pi/1.5),Vector3.new(0.75,0,-0.5),0.5)
348
            translateLimb("Right Hip",Vector3.new(-math.pi/24,0,-dir),Vector3.new(),0.5)
349
            translateLimb("Left Hip",Vector3.new(-math.pi/24,0,dir),Vector3.new(),0.5)
350
            coroutine.wrap(function()
351
                local direction = bodyPart.Head.CFrame
352
                for n=1,10 do
353
                    wait(1/30)
354
                    local scale = math.min(30,n*3)
355
                    flame(CFrame.new((direction*CFrame.new(0,0,-5-n*scale/4)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),9,scale)
356
                    AoE((direction*CFrame.new(0,0,-5-n*scale/4)).p,scale,strength/100,target*strength/1000,false)
357
                end
358
            end)()
359
        end
360
    end,
361
    ["Wing Attack"] = function()
362
        local cam = workspace.CurrentCamera
363
        local cf = bodyPart.Torso.CFrame
364
        local lookXZ = CFrame.new(cf.p,mouse.Hit.p*Vector3.new(1,0,1)+Vector3.new(0,cf.p.y,0))
365
        local target = CFrame.new(cf.p,mouse.Hit.p)
366
        local strength = state.MPCharge*stats.Power
367
        for i=1,5 do
368
            wait(1/30)
369
            gyro.cframe = lookXZ*CFrame.Angles(-math.pi/6,0,0)
370
            bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+(lookXZ*CFrame.Angles(math.pi/6,0,0)).lookVector*3
371
            bodyPart.Torso.Velocity = Vector3.new()
372
            translateLimb("Neck",Vector3.new(math.pi/12,0,0),Vector3.new(),0.75)
373
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/3,math.pi/1.5),Vector3.new(),0.75)
374
            translateLimb("Left Shoulder",Vector3.new(0,-math.pi/4,-math.pi/1.5),Vector3.new(),0.75)
375
            translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/6),Vector3.new(0,0.75,-0.75),0.75)
376
            translateLimb("Left Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
377
        end
378
        function wing()
379
            local dir1 = bodyPart["Right Arm"].CFrame
380
            local dir2 = bodyPart["Left Arm"].CFrame
381
            for n=1,10 do
382
                wait(1/30)
383
                if dir1 then
384
                    local hit,pos = advRay(dir1.p,(dir1*CFrame.new(0,-1-n*5,0)).p-dir1.p,{player.Character})
385
                    flame(CFrame.new(pos)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),9,10,true)
386
                    AoE(pos,hit and 20 or 10,strength/(hit and 1 or 10),(dir1*CFrame.Angles(-math.pi,0,0)).lookVector*strength/10,true)
387
                    if hit then
388
                        local x = Instance.new("Explosion",workspace)
389
                        x.Position = pos
390
                        x.BlastPressure = 0
391
                        x.BlastRadius = 3
392
                        dir1 = nil
393
                    end
394
                end
395
                if dir2 then
396
                    local hit,pos = advRay(dir2.p,(dir2*CFrame.new(0,-1-n*5,0)).p-dir2.p,{player.Character})
397
                    flame(CFrame.new(pos)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),9,10,true)
398
                    AoE(pos,hit and 20 or 10,strength/(hit and 1 or 10),(dir2*CFrame.Angles(-math.pi,0,0)).lookVector*strength/(hit and 1 or 10),true)
399
                    if hit then
400
                        local x = Instance.new("Explosion",workspace)
401
                        x.Position = pos
402
                        x.BlastPressure = 0
403
                        x.BlastRadius = 3
404
                        dir2 = nil
405
                    end
406
                end
407
                if not dir1 and not dir2 then break end
408
            end
409
        end
410
        for i=1,10 do
411
            wait(1/30)
412
            local ratio = i/10
413
            gyro.cframe = lookXZ*CFrame.Angles(-math.pi/6+math.pi/3*ratio,0,0)
414
            bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+(lookXZ*CFrame.Angles(math.pi/6,0,0)).lookVector*3
415
            bodyPart.Torso.Velocity = Vector3.new()
416
            translateLimb("Neck",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.75)
417
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/12,math.pi*1.25),Vector3.new(),0.5)
418
            translateLimb("Left Shoulder",Vector3.new(0,-math.pi/12,-math.pi*1.25),Vector3.new(),0.5)
419
            translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
420
            translateLimb("Left Hip",Vector3.new(-math.pi/12,0,math.pi/12),Vector3.new(),0.75)
421
            if i > 3 then
422
                coroutine.wrap(wing)()
423
            end
424
        end
425
        for i=1,10 do
426
            wait(1/30)
427
            gyro.cframe = lookXZ*CFrame.Angles(math.pi/6-(math.pi/3+math.pi/6)*math.min(1,i/3),0,0)
428
            bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+(lookXZ*CFrame.Angles(math.pi/6,0,0)).lookVector*3*(1-i/10)
429
            bodyPart.Torso.Velocity = Vector3.new()
430
            translateLimb("Neck",Vector3.new(math.pi/12,0,0),Vector3.new(),0.75)
431
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/12,-math.pi/6),Vector3.new(),0.25)
432
            translateLimb("Left Shoulder",Vector3.new(0,-math.pi/12,math.pi/6),Vector3.new(),0.25)
433
            translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
434
            translateLimb("Left Hip",Vector3.new(-math.pi/12,0,math.pi/12),Vector3.new(),0.75)
435
            coroutine.wrap(wing)()
436
        end
437
        bodyPart.Torso.Velocity = lookXZ.lookVector*20
438
    end
439
}
440
function getRegion(point,range,ignore)
441
    return workspace:FindPartsInRegion3WithIgnoreList(Region3.new(point-Vector3.new(1,1,1)*range/2,point+Vector3.new(1,1,1)*range/2),ignore,100)
442
end
443
function getHumanoid(v)
444
    if v and v.Parent then
445
        local h = v.Parent:findFirstChild("Humanoid") or v.Parent.Parent:findFirstChild("Humanoid")
446
        if not h then
447
            for _,p in ipairs(v.Parent:GetChildren()) do
448
                if p:isA("Humanoid") then
449
                    h = p
450
                end
451
            end
452
            if not h and v.Parent.Parent and v.Parent.Parent ~= game and v.Parent.Parent ~= workspace then
453
                for _,p in ipairs(v.Parent.Parent:GetChildren()) do
454
                    if p:isA("Humanoid") then
455
                        h = p
456
                    end
457
                end
458
            end
459
        end
460
        return h
461
    end
462
end
463
function advRay(start,point)
464
    local dis = (start-(start+point)).magnitude
465
    local dir = ((start+point)-start).unit
466
    if dis > 999 then
467
        dis = 999
468
    end
469
    point = dis*dir
470
    hit,pos = workspace:FindPartOnRayWithIgnoreList(Ray.new(start,point),{player.Character})
471
    if hit and not hit.CanCollide and not getHumanoid(hit) then
472
        function persistentRay(list)
473
            hit,pos = workspace:FindPartOnRayWithIgnoreList(Ray.new(start,point),{player.Character,unpack(list)})
474
            if hit and not hit.CanCollide and not getHumanoid(hit) then
475
                hit,pos = persistentRay({hit,unpack(list)})
476
            end
477
            return hit,pos
478
        end
479
        hit,pos = persistentRay({hit})
480
    end
481
    return hit,pos
482
end
483
function AoE(point,radius,damage,push,trip)
484
    ypcall(function()
485
        local push = push or Vector3.new()
486
        local hit = getRegion(point,radius,{player.Character})
487
        local humanoidList = {}
488
        for _,v in pairs(hit) do
489
            local h = getHumanoid(v)
490
            if not v.Anchored then
491
                if h then
492
                    if not humanoidList[h] then
493
                        humanoidList[h] = true
494
                        h:TakeDamage(damage)
495
                        if h.Parent:findFirstChild("Torso") and h.Parent.Torso:isA("BasePart") then
496
                            if push.magnitude > 0 then
497
                                local v = Instance.new("BodyVelocity",h.Parent.Torso)
498
                                v.maxForce = Vector3.new(1,1,1)*10000000000
499
                                v.velocity = push/0.1
500
                                game.Debris:AddItem(v,0.1)
501
                            end
502
                            if trip then
503
                                local v = Instance.new("BodyAngularVelocity",h.Parent.Torso)
504
                                v.maxTorque = Vector3.new(1,1,1)*10000000000
505
                                v.angularvelocity = Vector3.new(math.pi,0,math.pi)/0.1
506
                                game.Debris:AddItem(v,0.1)
507
                            end
508
                        end
509
                    end
510
                else v:BreakJoints()
511
                    v.Velocity = v.Velocity+push/v:GetMass()
512
                end
513
            end
514
        end
515
    end)
516
end
517
function preloadCharacter()
518
    humanoid = player.Character.Humanoid
519
    state = {
520
        ["Move"] = "Iron Fist",
521
        ["CD"] = 0,
522
        ["MP"] = 0,
523
        ["MPCharge"] = 0,
524
        ["LastCharge"] = 0,
525
        ["Falling"] = false,
526
        ["W"] = 0,
527
        ["A"] = 0,
528
        ["S"] = 0,
529
        ["D"] = 0,
530
        ["J"] = 0,
531
        ["Sprint"] = false,
532
        ["Charge"] = false,
533
        ["Skill"] = false
534
    }
535
    for _,v in pairs({"Head","Torso","Right Arm","Left Arm","Right Leg","Left Leg"}) do
536
        bodyPart[v] = player.Character:findFirstChild(v)
537
    end
538
    for _,v in pairs({"Neck","Right Shoulder","Left Shoulder","Right Hip","Left Hip"}) do
539
        if bodyPart.Torso:findFirstChild(v) then
540
            limb[v] = {
541
                ["Weld"] = bodyPart.Torso[v],
542
                ["Rotation"] = Vector3.new(),
543
                ["Offset"] = Vector3.new(),
544
                ["C0"] = c0[v],
545
                ["C1"] = c1[v]
546
            }
547
            bodyPart.Torso[v].DesiredAngle = 0
548
        end
549
    end
550
    for n,v in pairs(humanoidState) do
551
        pcall(function() v.Connection:disconnect() end)
552
        v.Connection = humanoid[n]:connect(function(p)
553
            local running = nil
554
            if string.match("RunningStrafingClimbingSwimming",n) then
555
                if p > 0.1 then
556
                    running = n == "Climbing" and n or "Running"
557
                else running = "Standing"
558
                end
559
            end
560
            local falling = string.match("JumpingGettingUpFreeFallingFallingDown",n) and "Falling"
561
            humanoidCurrentState = running or falling or n
562
            v.Value = p
563
        end)
564
    end
565
    bpos = Instance.new("BodyPosition",bodyPart.Torso)
566
    bpos.D = 200
567
    bpos.maxForce = Vector3.new(0,99999,0)
568
    bpos.position = bodyPart.Torso.Position
569
    gyro = Instance.new("BodyGyro",bodyPart.Torso)
570
    gyro.D = 100
571
    gyro.maxTorque = Vector3.new(1,1,1)*99999
572
    gyro.cframe = bodyPart.Torso.CFrame
573
    bvel = Instance.new("BodyVelocity",bodyPart.Torso)
574
    bvel.maxForce = Vector3.new(1,0,1)*9999
575
    bvel.velocity = Vector3.new()
576
    ui = Instance.new("ScreenGui",player.PlayerGui)
577
    local txt = Instance.new("TextLabel",ui)
578
    txt.Name = "MP"
579
    txt.BackgroundTransparency = 1
580
    txt.Position = UDim2.new(0,210,1,-60)
581
    txt.Font = "ArialBold"
582
    txt.FontSize = "Size18"
583
    txt.Text = "Magic Power: 0"
584
    txt.TextColor3 = Color3.new(1,1,1)
585
    txt.TextStrokeTransparency = 0.9
586
    txt.TextXAlignment = "Left"
587
    txt.TextYAlignment = "Bottom"
588
    local txt = txt:Clone()
589
    txt.Name = "Charge"
590
    txt.Text = "Charge: 0"
591
    txt.Position = UDim2.new(0,210,1,-80)
592
    txt.Parent = ui
593
    local txt = txt:Clone()
594
    txt.Name = "Move"
595
    txt.Text = "Move: Iron Fist"
596
    txt.Position = UDim2.new(0,210,1,-100)
597
    txt.Parent = ui
598
end
599
preloadCharacter()
600
function translateLimb(v,rot,pos,alpha)
601
    rot = rot or limb[v].Rotation
602
    pos = pos or limb[v].Offset
603
    limb[v].Rotation = limb[v].Rotation:Lerp(rot,alpha)
604
    limb[v].Offset = limb[v].Offset:Lerp(pos,alpha)
605
end
606
function rune(cf,size,lifespan)
607
    coroutine.wrap(function()
608
        local p = Instance.new("Part")
609
        plight = Instance.new("PointLight",p)
610
        plight.Color = BrickColor.new("Bright red").Color
611
        p.formFactor = 0
612
        p.Size = Vector3.new()
613
        p.BrickColor = BrickColor.new("Bright red")
614
        p.Anchored = true
615
        p.Locked = true
616
        p.CanCollide = false
617
        p.CFrame = cf*CFrame.Angles(math.pi/2,0,0)
618
        p.TopSurface = 0
619
        p.BottomSurface = 0
620
        p.Parent = player.Character
621
        local m = Instance.new("SpecialMesh",p)
622
        local wave = p:Clone()
623
        wave.CFrame = cf
624
        wave.Parent = player.Character
625
        wave.Mesh.MeshType = Enum.MeshType.Sphere
626
        wave.Mesh.Scale = Vector3.new(0,size/10,0)
627
        m.MeshId = "http://www.roblox.com/asset/?id=47260990"
628
        m.Scale = Vector3.new(size,size,size/10)
629
        p.Transparency = 1
630
        game.Debris:AddItem(p)
631
        game.Debris:AddItem(wave)
632
        for i=1,5 do
633
            p.Transparency = 1-math.sin(i/10*math.pi)*0.75
634
            p.CFrame = p.CFrame*CFrame.Angles(0,0,(i/5)*math.pi/12)
635
            wave.Mesh.Scale = Vector3.new(size*i,size/10,size*i)/2
636
            wave.Transparency = i/5
637
            wait(1/30)
638
        end
639
        wave:Remove()
640
        delay(lifespan,function()
641
            for i=1,20 do
642
                local ratio = math.sin(i/40*math.pi)*0.75
643
                p.Transparency = 0.25+ratio
644
                wait(1/30)
645
            end
646
            p:Remove()
647
        end)
648
    end)()
649
end
650
function explosion(where,heat,size,pres)
651
        a = Instance.new("Explosion",Workspace)
652
        a.BlastRadius = size
653
        a.BlastPressure = pres
654
        a.Position = where.Position
655
    local f = Instance.new("Fire",p)
656
    f.Size = size
657
    f.Heat = heat
658
        f:Remove()
659
end
660
function flame(cf,heat,size,instant)
661
    local p = Instance.new("Part")
662
    p.formFactor = 3
663
    p.Anchored = true
664
    p.CanCollide = false
665
    p.Locked = true
666
    p.Transparency = 1
667
    p.Size = Vector3.new()
668
    p.CFrame = cf
669
    p.Parent = player.Character
670
    local f = Instance.new("Fire",p)
671
    f.Size = size
672
    f.Heat = heat
673
    game.Debris:AddItem(p,1.1)
674
    delay(0.1,function()
675
        f.Enabled = false
676
        if instant then
677
            p:Destroy()
678
        end
679
    end)
680
end
681
mouse.KeyDown:connect(function(key)
682
    state.W = key == "w" and 1 or state.W
683
    state.A = key == "a" and 1 or state.A
684
    state.S = key == "s" and 1 or state.S
685
    state.D = key == "d" and 1 or state.D
686
    state.J = key == " " and 1 or state.J
687
    state.Sprint = key == "q" or state.Sprint
688
    if skillName[key] and not state.Skill then
689
        state.Move = skillName[key]
690
        ui.Move.Text = "Move: "..skillName[key]
691
        if state.CD > 0 and not state.Charge and state.MP > 0 then
692
            state.MPCharge = math.min(state.MP,state.LastCharge)
693
            ui.Charge.Text = "Charge: "..state.MPCharge
694
            state.Skill = true
695
            ypcall(function()
696
                skillFunc[state.Move]()
697
            end)
698
            state.Skill = false
699
            state.CD = state.MP > 0 and 0.2 or 0
700
            state.MP = math.max(0,state.MP-state.MPCharge)
701
            state.LastCharge = state.MPCharge
702
            state.MPCharge = 0
703
            ui.Charge.Text = "Charge: 0"
704
        end
705
    end
706
end)
707
mouse.KeyUp:connect(function(key)
708
    state.W = key == "w" and 0 or state.W
709
    state.A = key == "a" and 0 or state.A
710
    state.S = key == "s" and 0 or state.S
711
    state.D = key == "d" and 0 or state.D
712
    state.J = key == " " and 0 or state.J
713
    if key == "q" then
714
        state.Sprint = false
715
    end
716
end)
717
mouse.Button1Down:connect(function()
718
    if not state.Skill then
719
        state.Charge = true
720
    end
721
end)
722
mouse.Button1Up:connect(function()
723
    if not state.Skill and state.Charge then
724
        state.Charge = false
725
        state.Skill = true
726
        delay(1/30,function()
727
            rune(bodyPart.Torso.CFrame-Vector3.new(0,2.5,0),20,1)
728
        end)
729
        local pos = bodyPart.Torso.Position
730
        for i=1,10 do
731
            wait(1/30)
732
            bodyPart.Torso.CFrame = CFrame.new(pos,pos+bodyPart.Torso.CFrame.lookVector)
733
            bodyPart.Torso.Velocity = Vector3.new()
734
            translateLimb("Right Shoulder",Vector3.new(0,math.pi/2.5+(math.random()-0.5)*math.pi/48,math.pi/2+(math.random()-0.5)*math.pi/48),Vector3.new(-0.25,0,-0.75),0.9)
735
            translateLimb("Left Shoulder",Vector3.new(0,-math.pi/2.5+(math.random()-0.5)*math.pi/48,-math.pi/2+(math.random()-0.5)*math.pi/48),Vector3.new(0.25,0,-0.75),0.9)
736
            translateLimb("Right Hip",Vector3.new(-math.pi/48,0,0),Vector3.new(),0.75)
737
            translateLimb("Left Hip",Vector3.new(-math.pi/48,0,0),Vector3.new(),0.75)
738
        end
739
        ypcall(function()
740
            skillFunc[state.Move]()
741
        end)
742
        state.Skill = false
743
        state.CD = 0.2
744
        state.MP = math.max(0,state.MP-state.MPCharge)
745
        state.LastCharge = state.MPCharge
746
        state.MPCharge = 0
747
        ui.Charge.Text = "Charge: 0"
748
    end
749
end)
750
while active do
751
    local t = wait(1/30)
752
    state.CD = math.max(0,state.CD-t)
753
    humanoid.PlatformStand = true
754
    local cam = workspace.CurrentCamera
755
    local pos = bodyPart.Torso.Position
756
    local camXZ = CFrame.new(pos,pos+cam.CoordinateFrame.lookVector*Vector3.new(1,0,1))
757
    local platform,pos = advRay(bodyPart.Torso.Position,Vector3.new(0,state.Falling and ((bodyPart.Torso.Velocity.y*t))-4.5 or -4.5,0))
758
    --local platform,pos = advRay(bodyPart.Torso.Position,Vector3.new(0,-4.5,0))
759
    local moveZ = (not state.Charge and not state.Skill) and state.W-state.S or 0
760
    local moveX = (not state.Charge and not state.Skill) and state.A-state.D or 0
761
    local jump = (not state.Charge and not state.Skill) and state.J or 0
762
    state.Falling = not platform
763
    bpos.maxForce = Vector3.new(0,(state.Falling and 0 or 1)*(1-jump),0)*99999*(state.Skill and 0 or 1)
764
    bpos.position = Vector3.new(0,pos.y+3,0)
765
    bvel.maxForce = Vector3.new(1,state.J*10,1)*9999*(state.Falling and 0 or 1)
766
    bvel.velocity = ((moveZ == 0 and moveX == 0) and Vector3.new() or (camXZ.lookVector*moveZ+(camXZ*CFrame.Angles(0,math.pi/2,0)).lookVector*moveX).unit*stats.WalkSpeed)+Vector3.new(0,jump*40,0)
767
    local pos = bodyPart.Torso.Position
768
    if not state.Skill then
769
        gyro.cframe = camXZ
770
        if state.CD <= 0 then
771
            state.MP = math.min(stats.MP,state.MP+stats.MPRegen*t)
772
        end
773
        if state.Charge then
774
            state.MPCharge = math.min(state.MP,state.MPCharge+stats.MPCharge*t)
775
            ui.Charge.Text = "Charge: "..state.MPCharge
776
            translateLimb("Right Shoulder",Vector3.new(0,-math.pi/4+(math.random()-0.5)*math.pi/48,math.pi/2+(math.random()-0.5)*math.pi/48),Vector3.new(),0.5)
777
            translateLimb("Left Shoulder",Vector3.new(0,math.pi/4+(math.random()-0.5)*math.pi/48,-math.pi/2+(math.random()-0.5)*math.pi/48),Vector3.new(),0.5)
778
            translateLimb("Right Hip",Vector3.new(-math.pi/48,0,0),Vector3.new(),0.5)
779
            translateLimb("Left Hip",Vector3.new(-math.pi/48,0,0),Vector3.new(),0.5)
780
        else translateLimb("Neck",Vector3.new(),Vector3.new(),0.25)
781
            if state.Falling then
782
                translateLimb("Right Shoulder",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.5)
783
                translateLimb("Left Shoulder",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.5)
784
                translateLimb("Right Hip",Vector3.new(0,0,math.pi/24),Vector3.new(0,0.25,-0.25),0.5)
785
                translateLimb("Left Hip",Vector3.new(0,0,math.pi/24),Vector3.new(),0.5)
786
            elseif moveZ > 0 then
787
                if state.Sprint then
788
                    bvel.velocity = bvel.velocity*Vector3.new(3,1,3)
789
                    local ratio = math.sin(tick()*math.pi*5)
790
                    local swing = math.pi/2
791
                    gyro.cframe = gyro.cframe*CFrame.Angles(-math.pi/3,ratio*swing/4,0)
792
                    translateLimb("Right Shoulder",Vector3.new(0,math.max(0,ratio*swing/1.5),math.pi/6+ratio*swing*2),Vector3.new(),0.25)
793
                    translateLimb("Left Shoulder",Vector3.new(0,math.min(0,ratio*swing/1.5),-math.pi/6+ratio*swing*2),Vector3.new(),0.25)
794
                    translateLimb("Right Hip",Vector3.new(0,0,math.pi/6-ratio*swing*1.5),Vector3.new(),0.25)
795
                    translateLimb("Left Hip",Vector3.new(0,0,-math.pi/6-ratio*swing*1.5),Vector3.new(),0.25)
796
                else local ratio = math.sin(tick()*math.pi*3)
797
                    local swing = math.pi/4
798
                    gyro.cframe = gyro.cframe*CFrame.Angles(0,ratio*swing/12,0)
799
                    translateLimb("Right Shoulder",Vector3.new(0,math.max(0,ratio*swing/3),ratio*swing),Vector3.new(),0.25)
800
                    translateLimb("Left Shoulder",Vector3.new(0,math.min(0,ratio*swing/3),ratio*swing),Vector3.new(),0.25)
801
                    translateLimb("Right Hip",Vector3.new(0,0,-ratio*swing),Vector3.new(),0.25)
802
                    translateLimb("Left Hip",Vector3.new(0,0,-ratio*swing),Vector3.new(),0.25)
803
                end
804
            elseif moveZ < 0 then
805
                local ratio = math.sin(-tick()*math.pi*3)
806
                local swing = math.pi/4
807
                gyro.cframe = gyro.cframe*CFrame.Angles(math.pi/24,ratio*swing/12,0)
808
                translateLimb("Right Shoulder",Vector3.new(0,math.max(0,ratio*swing/3),ratio*swing),Vector3.new(),0.25)
809
                translateLimb("Left Shoulder",Vector3.new(0,math.min(0,ratio*swing/3),ratio*swing),Vector3.new(),0.25)
810
                translateLimb("Right Hip",Vector3.new(0,0,-ratio*swing),Vector3.new(),0.25)
811
                translateLimb("Left Hip",Vector3.new(0,0,-ratio*swing),Vector3.new(),0.25)
812
            elseif moveX ~= 0 then
813
                local ratio = math.sin(tick()*math.pi*3)*moveX
814
                local swing = math.pi/6
815
                gyro.cframe = gyro.cframe*CFrame.Angles(0,ratio*swing/12,0)
816
                translateLimb("Right Shoulder",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.25)
817
                translateLimb("Left Shoulder",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.25)
818
                translateLimb("Right Hip",Vector3.new(ratio*swing,0,math.max(0,ratio*swing/2)),Vector3.new(),0.25)
819
                translateLimb("Left Hip",Vector3.new(ratio*swing,0,math.max(0,ratio*swing/2)),Vector3.new(),0.25)
820
            else local ratio = math.sin(tick()*math.pi/2)
821
                local swing = math.pi/48
822
                translateLimb("Right Shoulder",Vector3.new(-swing+ratio*swing,0,0),Vector3.new(),0.125)
823
                translateLimb("Left Shoulder",Vector3.new(-swing+ratio*swing,0,0),Vector3.new(),0.125)
824
                translateLimb("Right Hip",Vector3.new(),Vector3.new(),0.125)
825
                translateLimb("Left Hip",Vector3.new(),Vector3.new(),0.125)
826
            end
827
        end
828
    end
829
    ui.MP.Text = "Magic Power: "..state.MP
830
    for _,v in pairs(limb) do
831
        v.Weld.C0 = CFrame.new(v.C0[1]+v.Offset)*v.C0[2]*CFrame.Angles(v.Rotation.x,v.Rotation.y,v.Rotation.z)
832
        v.Weld.C1 = v.C1
833
    end
834
end
835
else script:Clone().Parent = game.Players[Shared].Character
836
end