View difference between Paste ID: PAUpsARC and Mif0LDkB
SHOW: | | - or go back to the newest paste.
1
--MADE BY CoolLegend (NOT THE SCRIPT) All you got to do is create local and run it.
2
function Part(Par, Anc, Colli, Tran, Ref, Col, Siz)
3
        local p = Instance.new("Part")
4
        p.formFactor = "Custom"
5
        p.TopSurface = 0
6
        p.BottomSurface = 0
7
        p.Transparency = Tran
8
        p.Reflectance = Ref
9
        p.Anchored = Anc
10
        p.CanCollide = Colli
11
        p.BrickColor = Col
12
        p.Size = Siz
13
        p.Locked = true
14
        p.Parent = Par
15
        p:BreakJoints()
16
        return p
17
end
18
function Weld(P0, P1, C0, C1)
19
        local w = Instance.new("Weld")
20
        w.Part0 = P0
21
        w.Part1 = P1
22
        if C0 then
23
                w.C0 = C0
24
        end
25
        if C1 then
26
                w.C1 = C1
27
        end
28
        w.Parent = P0
29
        return w
30
end
31
V3 = Vector3.new
32
C3 = Color3.new
33
BN = BrickColor.new
34
CN = CFrame.new
35
CA = CFrame.Angles
36
MR = math.rad
37
MRA = math.random
38
MP = math.pi
39
MH = math.huge
40
UD = UDim2.new
41
Asset = "http://www.roblox.com/asset/?id="
42
Noob = nil
43
function MakeMotor(torso, p1, c0, c1)
44
        local mot = Instance.new("Motor6D")
45
        mot.C0 = c0
46
        mot.C1 = c1
47
        mot.Part0 = torso
48
        mot.Part1 = p1
49
        mot.Parent = torso
50
        return mot
51
end
52
function Set(tab)
53
        for _,v in pairs(tab) do
54
                local motor = v[1]
55
                local vel = v[2]
56
                local des = v[3]
57
                motor.MaxVelocity = vel
58
                motor.DesiredAngle = des
59
        end
60
end
61
function Animate(Hum, RSH, LSH, RH, LH)
62
        local pose = "Standing"
63
        local function sit()
64
                pose = "Seated"
65
        end
66
        local function jump()
67
                pose = "Jumping"
68
        end
69
        local function died()
70
                pose = "Dead"
71
        end
72
        local function falling()
73
                pose = "Falling"
74
        end
75
        local function climbing()
76
                pose = "Climbing"
77
        end
78
        local function run(speed)
79
                if speed > 0.5 then
80
                        pose = "Running"
81
                else
82
                        pose = "Standing"
83
                end
84
        end
85
        local function move()
86
                if pose == "Seated" then
87
                        Set({{RSH, 0.15, math.pi/2}, {LSH, 0.15, -math.pi/2}, {LH, 0.15, math.pi/2}, {RH, 0.15, -math.pi/2}})
88
                        return
89
                end
90
                if pose == "Jumping" then
91
                        Set({{RSH, 0.3, math.pi}, {LSH, 0.3, -math.pi}, {LH, 0.3, 0}, {RH, 0.3, 0}})
92
                        return
93
                end
94
                if pose == "Standing" then
95
                        Set({{RSH, 0.25, 0}, {LSH, 0.25, 0}, {LH, 0.25, 0}, {RH, 0.25, 0}})
96
                        return
97
                end
98
                if pose == "Falling" then
99
                        Set({{RSH, 0.35, math.pi}, {LSH, 0.35, -math.pi}, {LH, 0.35, 0}, {RH, 0.35, 0}})
100
                        return
101
                end
102
                if pose == "Running" then
103
                        Set({{RSH, 0.2, -0.8}, {LSH, 0.2, 0.8}, {LH, 0.2, 0}, {RH, 0.2, 0}})
104
                elseif pose == "Climbing" then
105
                        Set({{RSH, 0.35, 2.8}, {LSH, 0.35, -2.8}, {LH, 0.35, 0.1}, {RH, 0.35, 0.1}})
106
                end
107
        end
108
        Hum.Jumping:connect(jump)
109
        Hum.Running:connect(run)
110
        Hum.Seated:connect(sit)
111
        Hum.Died:connect(died)
112
        Hum.FreeFalling:connect(falling)
113
        Hum.Climbing:connect(climbing)
114
        coroutine.resume(coroutine.create(function()
115
                while pose ~= "Dead" do
116
                        wait(0.04)
117
                        move()
118
                end
119
        end))
120
end
121
function MakeNoob(pos, scale)
122
        local Nub = Instance.new("Model")
123
        Nub.Name = "Cannoneer nub"
124
        local Torso = Part(Nub, false, false, 0, 0, BN("Bright blue"), V3(2*scale, 2*scale, 1*scale))
125
        Torso.Name = "Torso"
126
        local Head = Part(Nub, false, false, 0, 0, BN("Bright yellow"), V3(2*scale, 1*scale, 1*scale))
127
        Head.Name = "Head"
128
        local Neck = MakeMotor(Torso, Head, CN(0, 1*scale, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), CN(0, -0.5*scale, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0))
129
        local HeadMesh = Instance.new("SpecialMesh",Head)
130
        HeadMesh.Scale = V3(1.25, 1.25, 1.25)
131
        local Face = Instance.new("Decal",Head)
132
        Face.Face = "Front"
133
        Face.Texture = Asset..(13038247)
134
        local Rarm = Part(Nub, false, false, 0, 0, BN("Bright yellow"), V3(1*scale, 2*scale, 1*scale))
135
        Rarm.Name = "Right Arm"
136
        local Larm = Part(Nub, false, false, 0, 0, BN("Bright yellow"), V3(1*scale, 2*scale, 1*scale))
137
        Larm.Name = "Left Arm"
138
        local Rleg = Part(Nub, false, false, 0, 0, BN("Br. yellowish green"), V3(1*scale, 2*scale, 1*scale))
139
        Rleg.Name = "Right Leg"
140
        local Lleg = Part(Nub, false, false, 0, 0, BN("Br. yellowish green"), V3(1*scale, 2*scale, 1*scale))
141
        Lleg.Name = "Left Leg"
142
        local RSH = MakeMotor(Torso, Rarm, CN(1*scale, 0.5*scale, 0) * CA(0, MR(90), 0), CN(-0.5*scale, 0.5*scale, 0) * CA(0, MR(90), 0))
143
        local LSH = MakeMotor(Torso, Larm, CN(-1*scale, 0.5*scale, 0) * CA(0, MR(-90), 0), CN(0.5*scale, 0.5*scale, 0) * CA(0, MR(-90), 0))
144
        local RH = MakeMotor(Torso, Rleg, CN(0.5*scale, -1*scale, 0) * CA(0, MR(-90), 0), CN(0, 1*scale, 0) * CA(0, MR(-90), 0))
145
        local LH = MakeMotor(Torso, Lleg, CN(-0.5*scale, -1*scale, 0) * CA(0, MR(90), 0), CN(0, 1*scale, 0) * CA(0, MR(90), 0))
146
        local Hum = Instance.new("Humanoid")
147
        local Speed = 14+(2*scale)
148
        Hum.Parent = Nub
149
        Hum.Died:connect(function()
150
                wait(6)
151
                Nub:remove()
152
                wait(5)
153
                MakeNoob(pos, scale)
154
        end)
155
        Nub.Parent = workspace
156
        Nub:MakeJoints()
157
        Hum.MaxHealth = 50+(scale*70)
158
        Hum.Health = 50+(scale*70)
159
        Nub:MoveTo(pos)
160
        coroutine.resume(coroutine.create(function()
161
                repeat wait()
162
                Hum.Health = Hum.MaxHealth
163
                until Hum.Health >= Hum.MaxHealth-1
164
        end))
165
        Animate(Hum,RSH,LSH,RH,LH)
166
        local Char = Nub
167
        local necko = CN(0, 1*scale, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
168
        local ShootColors = {"Bright yellow", "New Yeller", "Bright orange", "Neon orange", "Really red", "Bright red"}
169
        local Attacking = false
170
        local Accuracy = 5
171
        local Debounce = true
172
        local Hurt = false
173
        local Damage = {15,42}
174
        local Selected = false
175
        local ContentProvider = game:GetService("ContentProvider")
176
        local function RC(Pos, Dir, Max, Ignore)
177
                return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999)), Ignore)
178
        end
179
        local function RayC(Start, En, MaxDist, Ignore)
180
                return RC(Start, (En - Start), MaxDist, Ignore)
181
        end
182
        local function ComputePos(pos1, pos2)
183
                return CN(pos1, V3(pos2.x, pos1.y, pos2.z))
184
        end
185
        local function DetectSurface(pos, part)
186
                local surface = nil
187
                local pospos = part.CFrame
188
                local pos2 = pospos:pointToObjectSpace(pos)
189
                local siz = part.Size
190
                local shaep = part.Shape
191
                if shaep == Enum.PartType.Ball or shaep == Enum.PartType.Cylinder then
192
                        surface = {"Anything", CN(pospos.p, pos)*CN(0, 0, -(pospos.p - pos).magnitude)*CA(MR(-90), 0, 0)}
193
                else
194
                        if pos2.Y > ((siz.Y/2)-0.04) then
195
                                surface = {"Top", CA(0, 0, 0)}
196
                        elseif pos2.Y < -((siz.Y/2)-0.04) then
197
                                surface = {"Bottom", CA(-MP, 0, 0)}
198
                        elseif pos2.X > ((siz.X/2)-0.04) then
199
                                surface = {"Right", CA(0, 0, MR(-90))}
200
                        elseif pos2.X < -((siz.X/2)-0.04) then
201
                                surface = {"Left", CA(0, 0, MR(90))}
202
                        elseif pos2.Z > ((siz.Z/2)-0.04) then
203
                                surface = {"Back", CA(MR(90), 0, 0)}
204
                        elseif pos2.Z < -((siz.Z/2)-0.04) then
205
                                surface = {"Front", CA(MR(-90), 0, 0)}
206
                        end
207
                end
208
                return surface
209
        end
210
        local function waitChild(n, p)
211
                local c = p:findFirstChild(n)
212
                if c then return c end
213
                while true do
214
                        c = p.ChildAdded:wait()
215
                        if c.Name == n then return c end
216
                end
217
        end
218
        local function Notime(func)
219
                coroutine.resume(coroutine.create(function()
220
                        func()
221
                end))
222
        end
223
        RSH.Part0 = Torso
224
        LSH.Part0 = Torso
225
        RH.Part0 = Torso
226
        LH.Part0 = Torso
227
        local Add = {
228
                Mesh = function(P, ID, Scale, Tex)
229
                        local m = Instance.new("SpecialMesh")
230
                        m.MeshType = "FileMesh"
231
                        m.MeshId = ID or ""
232
                        m.Scale = Scale or V3(1, 1, 1)
233
                        m.TextureId = Tex or ""
234
                        m.Parent = P
235
                        return m
236
                end,
237
                Sphere = function(P, Scale)
238
                        local m = Instance.new("SpecialMesh")
239
                        m.MeshType = "Sphere"
240
                        m.Scale = Scale or V3(1, 1, 1)
241
                        m.Parent = P
242
                        return m
243
                end
244
        }
245
        local Sounds = {
246
                Shoot = {Id = "http://www.roblox.com/asset/?id=2697431", Pitch = 0.3, Volume = 0.5},
247
                Boom = {Id = "http://www.roblox.com/asset/?id=2692806", Pitch = 0.55, Volume = 0.4},
248
                Slash = {Id = "rbxasset://sounds//swordslash.wav", Pitch = 0.5, Volume = 0.5},
249
                Hit = {Id = "http://www.roblox.com/asset/?id=2801263", Pitch = 0.85, Volume = 0.35},
250
                Reload = {Id = "rbxasset://sounds\\metal.ogg", Pitch = 1, Volume = 0.45},
251
        }
252
        for _,v in pairs(Sounds) do
253
                ContentProvider:Preload(v.Id)
254
        end
255
        local function PlaySound(Sound, bool)
256
                local s = Instance.new("Sound")
257
                s.Looped = false
258
                s.Volume = Sound.Volume
259
                s.SoundId = Sound.Id
260
                if bool then
261
                        s.Pitch = MRA((Sound.Pitch*0.75)*1000, (Sound.Pitch*1.15)*1000)/1000
262
                else
263
                        s.Pitch = Sound.Pitch
264
                end
265
                s.Parent = Torso
266
                s:play()
267
                Notime(function()
268
                        wait(0.5)
269
                        s:remove()
270
                end)
271
        end
272
        local function GetParts(pos, dist)
273
                local parts = {}
274
                local function o(p)
275
                        for _,v in pairs(p:children()) do
276
                                if v:IsA("BasePart") then
277
                                        if (pos - v.Position).magnitude <= dist then
278
                                                table.insert(parts, {v, (pos - v.Position).magnitude, v.Anchored})
279
                                        end
280
                                end
281
                                o(v)
282
                        end
283
                end
284
                o(workspace)
285
                return parts
286
        end
287
        local function GetHum(P)
288
                for _,v in pairs(P:children()) do
289
                        if v:IsA("Humanoid") then
290
                                if v.Health > 0 then
291
                                        return v
292
                                end
293
                        end
294
                end
295
        end
296
        local function GetGroup(Pos, Distance, Hit)
297
                local tab = {}
298
                for _,v in pairs(workspace:children()) do
299
                        local h = GetHum(v)
300
                        local t = v:findFirstChild("Torso")
301
                        if h and t and v ~= Hit.Parent then
302
                                if (t.Position - Pos).magnitude <= Distance then
303
                                        table.insert(tab, {h, v, (t.Position - Pos).magnitude})
304
                                end
305
                        end
306
                end
307
                if Hit then
308
                        local h = GetHum(Hit.Parent)
309
                        if h then
310
                                table.insert(tab, {h, Hit.Parent, 0})
311
                        end
312
                end
313
                return tab
314
        end
315
        local Model = Instance.new("Model")
316
        Model.Name = "Hand Cannon"
317
        local FTorso = Part(Model, false, false, 1, 0, Torso.BrickColor, V3(2*scale, 2*scale, 1*scale))
318
        local FW = Weld(Torso, FTorso)
319
        local RAB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
320
        local LAB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
321
        local RLB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
322
        local LLB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
323
        local RABW = Weld(Torso, RAB, CN(), CN(-1.5*scale, -0.5*scale, 0))
324
        local LABW = Weld(Torso, LAB, CN(), CN(1.5*scale, -0.5*scale, 0))
325
        local RLBW = Weld(Torso, RLB, CN(), CN(-0.5*scale, 1*scale, 0))
326
        local LLBW = Weld(Torso, LLB, CN(), CN(0.5*scale, 1*scale, 0))
327
        local RAW = Weld(RAB, nil, CN(), CN(0, 0.5*scale, 0))
328
        local LAW = Weld(LAB, nil, CN(), CN(0, 0.5*scale, 0))
329
        local RLW = Weld(RLB, nil, CN(), CN(0, 1*scale, 0))
330
        local LLW = Weld(LLB, nil, CN(), CN(0, 1*scale, 0))
331
        local TW = Weld(Torso, nil, CN(0.7*scale, 0.8*scale, 1.2*scale), CA(0, MR(180), MR(55)))
332
        local Weapon = Instance.new("Model")
333
        Weapon.Name = "Cannon"
334
        local HB = Part(Weapon, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
335
        local HBW = Weld(Rarm, HB, CN(0, -0.7*scale, 0), CA(0, MR(90), MR(90)))
336
        local HW = Weld(HB, nil)
337
        local Handle = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(0.5*scale, 0.5*scale, 0.3*scale))
338
        Add.Mesh(Handle, "http://www.roblox.com/asset/?id=3270017", V3(1*scale, 0.7*scale, 2.2*scale), "")
339
        TW.Part1 = Handle
340
        local Main = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(1.5*scale, 1.5*scale, 3*scale))
341
        Add.Mesh(Main, "http://www.roblox.com/asset/?id=3270017", V3(1.6*scale, 1.6*scale, 15*scale), "")
342
        Weld(Handle, Main, CA(0, MR(90), MR(90)), CN(1*scale, 0, 0.2*scale))
343
        local Main2 = Part(Weapon, false, false, 0, 0, BN("Gun metallic"), V3(1*scale, 1*scale, 1.5*scale))
344
        Add.Mesh(Main2, "http://www.roblox.com/asset/?id=3270017", V3(1.2*scale, 1.2*scale, 8*scale), "")
345
        Weld(Main, Main2, CN(), CN(0, 0, 1.7*scale))
346
        local Handle2 = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(0.5*scale, 0.5*scale, 0.3*scale))
347
        Add.Mesh(Handle2, "http://www.roblox.com/asset/?id=3270017", V3(0.7*scale, 0.8*scale, 2.2*scale), "")
348
        Weld(Main2, Handle2, CA(0, MR(90), MR(90)), CN(-0.65*scale, 0, 0))
349
        local Tip = Part(Weapon, false, false, 0, 0, BN("Earth yellow"), V3(1.6*scale, 1.6*scale, 0.6*scale))
350
        Add.Sphere(Tip, V3(1.05, 1.05, 1))
351
        Weld(Main, Tip, CN(), CN(0, 0, -1.15*scale))
352
        local Tip4 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(1.2*scale, 1.2*scale, 0.3*scale))
353
        Add.Mesh(Tip4, "http://www.roblox.com/asset/?id=3270017", V3(1.7*scale, 1.7*scale, 10*scale), "")
354
        Weld(Main, Tip4, CN(), CN(0, 0, -0.15*scale))
355
        for i = 1.3, 1.45, 0.1 do
356
                local Tip3 = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(1.2*scale, 1.2*scale, 0.3*scale))
357
                Add.Mesh(Tip3, "http://www.roblox.com/asset/?id=3270017", V3(i*scale, i*scale, 2*scale), "")
358
                Weld(Main2, Tip3, CN(), CN(0, 0, 0.6*scale))
359
        end
360
        for i = -0.95, 0.66, 1.55 do
361
                local Tip3 = Part(Weapon, false, false, 0, 0, BN("Dark Curry"), V3(1.2*scale, 1.2*scale, 0.3*scale))
362
                Add.Mesh(Tip3, "http://www.roblox.com/asset/?id=3270017", V3(1.65*scale, 1.65*scale, 3*scale), "")
363
                Weld(Main, Tip3, CN(), CN(0, 0, i*scale))
364
        end
365
        for i = 1.3, 1.5, 0.1 do
366
                local Tip2 = Part(Weapon, false, false, 0, 0, BN("Earth yellow"), V3(1.6*scale, 1.6*scale, 0.6*scale))
367
                Add.Mesh(Tip2, "http://www.roblox.com/asset/?id=3270017", V3(i*scale, i*scale, 2*scale), "")
368
                Weld(Main, Tip2, CN(), CN(0, 0, 1.1*scale))
369
        end
370
        for i = -0.3, 1, 0.15 do
371
                local p = Part(Weapon, false, false, 0.7, 0, BN("Black"), V3(0.2, 0.2, 0.2))
372
                Add.Sphere(p, V3(6*scale, 6*scale, 2*scale))
373
                Weld(Main2, p, CN(0, 0, i*scale))
374
        end
375
        Weapon.Parent = Model
376
        Model.Parent = Char
377
        
378
        local function Show_Damage(P, D)
379
                local mo = Instance.new("Model")
380
                mo.Name = "- "..D
381
                local p = Part(mo, false, false, 0, 0, BN("Bright red"), V3(0.2, 0.2, 0.2))
382
                p.Name = "Head"
383
                local m = Instance.new("SpecialMesh")
384
                m.MeshType = "Brick"
385
                m.Scale = Vector3.new(4.5, 2.3, 4.5)
386
                m.Parent = p
387
                local bp = Instance.new("BodyPosition", p)
388
                bp.maxForce = V3(MH, MH, MH)
389
                bp.P = 9001
390
                bp.position = CN(P) * CN(0, 1.5, 0).p
391
                local h = Instance.new("Humanoid")
392
                h.Health = 0
393
                h.MaxHealth = 0
394
                h.Name = "asd"
395
                h.Parent = mo
396
                local nah = true
397
                mo.Parent = workspace
398
                p.CFrame = CN(P) 
399
                Notime(function()
400
                        wait(1.5)
401
                        for i = 0, 1, 0.05 do
402
                                p.Transparency = i
403
                                if nah then mo.Name = "" nah = false else mo.Name = "- "..D nah = true end
404
                                wait()
405
                        end
406
                        mo:remove()
407
                end)
408
        end
409
        local function Kill(hit)
410
                if Debounce and Hurt then
411
                        local Hu = GetHum(hit.Parent)
412
                        if Hu then
413
                                Debounce = false
414
                                local Dmg = MRA(Damage[1], Damage[2])
415
                                Hu.Health = Hu.Health - Dmg
416
                                pcall(function() Show_Damage(Tip.Position, Dmg) end)
417
                                PlaySound(Sounds.Hit, true)
418
                                local chance = MRA(1, 10)
419
                                if chance >=5 then
420
                                        Hu.PlatformStand = true
421
                                        wait(0.1)
422
                                        hit.Velocity = (CN(Torso.CFrame * CN(0, 0.5, 0).p, hit.Position).lookVector * 45)
423
                                        hit.RotVelocity = V3(MRA(-10, 10), MRA(-10, 10), MRA(-10, 10))
424
                                        wait(0.3)
425
                                        Hu.PlatformStand = false
426
                                end
427
                        end
428
                end
429
        end
430
        Main.Touched:connect(Kill)
431
        local function Attach(t)
432
                RSH.Part0 = t
433
                LSH.Part0 = t
434
                RH.Part0 = t
435
                LH.Part0 = t
436
                RABW.Part0 = t
437
                LABW.Part0 = t
438
                LLBW.Part0 = t
439
                RLBW.Part0 = t
440
                if t == Torso then
441
                        FTorso.Transparency = 1
442
                else
443
                        Torso.Transparency = 1
444
                end
445
                t.Transparency = 0
446
        end
447
        local function SelectAnim()
448
                RAW.Part1 = Rarm
449
                for i = 0.25, 1, 0.25 do
450
                        RAW.C0 = CA(MR(-10*i), 0, MR(-5*i))
451
                        wait()
452
                end
453
                for i = 0.1, 1, 0.1 do
454
                        RAW.C0 = CA(MR(-10-90*i), 0, MR(-5-30*i))
455
                        wait()
456
                end
457
                for i = 0.5, 1, 0.5 do
458
                        RAW.C0 = CA(MR(-100-5*i), 0, MR(-35))
459
                        wait()
460
                end
461
                HW.Part1 = Handle
462
                HW.C0 = CA(MR(50), 0, MR(-37))
463
                TW.Part1 = nil
464
                Attach(FTorso)
465
                LAW.Part1 = Larm
466
                for i = 0.25, 1, 0.25 do
467
                        RAW.C0 = CA(MR(-105+10*i), 0, MR(-35+5*i))
468
                        LAW.C0 = CA(MR(15*i), 0, MR(5*i))
469
                        FW.C0 = CA(0, MR(-5*i), 0)
470
                        HW.C0 = CA(MR(50-5*i), 0, MR(-37))
471
                        wait()
472
                end
473
                for i = 0.06, 1, 0.06 do
474
                        RAW.C0 = CA(MR(-95+95*i), MR(35*i), MR(-30+50*i))
475
                        LAW.C0 = CA(MR(15+25*i), 0, MR(5+15*i)) * CN(0, (-0.4*scale)*i, 0)
476
                        FW.C0 = CA(0, MR(-5-30*i), 0)
477
                        HW.C0 = CA(MR(45), 0, MR(-37+15*i))
478
                        wait()
479
                end
480
                Hum.WalkSpeed = Speed-3
481
                for i = 0.1, 1, 0.1 do
482
                        RAW.C0 = CA(MR(15*i), MR(35+10*i), MR(20+8*i))
483
                        LAW.C0 = CA(MR(40+7*i), 0, MR(20+6*i)) * CN(0, (-0.4*scale)-(0.2*scale)*i, 0)
484
                        FW.C0 = CA(0, MR(-35-10*i), 0)
485
                        HW.C0 = CA(MR(45-11*i), 0, MR(-22+15*i))
486
                        wait()
487
                end
488
                for i = 0.25, 1, 0.25 do
489
                        RAW.C0 = CA(MR(15+5*i), MR(45+5*i), MR(28+2*i))
490
                        LAW.C0 = CA(MR(47+3*i), 0, MR(26+4*i)) * CN(0, -0.6*scale, 0)
491
                        FW.C0 = CA(0, MR(-45-5*i), 0)
492
                        HW.C0 = CA(MR(34-4*i), 0, MR(-7+7*i))
493
                        wait()
494
                end
495
        end
496
        local function DeselAnim()
497
                for i = 0.25, 1, 0.25 do
498
                        RAW.C0 = CA(MR(20-5*i), MR(50-5*i), MR(30-5*i))
499
                        LAW.C0 = CA(MR(50-5*i), 0, MR(30-5*i)) * CN(0, -((0.6+0.1)*scale)*i, 0)
500
                        FW.C0 = CA(0, MR(-50+5*i), 0)
501
                        HW.C0 = CA(MR(30+5*i), 0, MR(-10*i))
502
                        wait()
503
                end
504
                for i = 0.15, 1, 0.15 do
505
                        RAW.C0 = CA(MR(15-30*i), MR(45-10*i), MR(25-5*i))
506
                        LAW.C0 = CA(MR(45-20*i), 0, MR(25-15*i)) * CN(0, -0.5+0.2*i, 0)
507
                        FW.C0 = CA(0, MR(-45+10*i), 0)
508
                        HW.C0 = CA(MR(35+10*i), 0, MR(-10-15*i))
509
                        wait()
510
                end
511
                for i = 0.12, 1, 0.12 do
512
                        RAW.C0 = CA(MR(-15-70*i), MR(35-30*i), MR(20-30*i))
513
                        LAW.C0 = CA(MR(25-25*i), 0, MR(10-10*i)) * CN(0, -0.3+0.3*i, 0)
514
                        FW.C0 = CA(0, MR(-35+20*i), 0)
515
                        HW.C0 = CA(MR(45+5*i), 0, MR(-25-12*i))
516
                        wait()
517
                end
518
                LAW.Part1 = nil
519
                HW.C0 = CA(MR(50), 0, MR(-37))
520
                for i = 0.25, 1, 0.25 do
521
                        RAW.C0 = CA(MR(-85-20*i), MR(5-5*i), MR(-10-25*i))
522
                        FW.C0 = CA(0, MR(-15+15*i), 0)
523
                        wait()
524
                end
525
                Attach(Torso)
526
                HW.Part1 = nil
527
                TW.Part1 = Handle
528
                Hum.WalkSpeed = 16
529
                for i = 0.15, 1, 0.15 do
530
                        RAW.C0 = CA(MR(-105+95*i), 0, MR(-35+30*i))
531
                        wait()
532
                end
533
                for i = 0.33, 1, 0.33 do
534
                        RAW.C0 = CA(MR(-10+10*i), 0, MR(-5+5*i))
535
                        wait()
536
                end
537
                RAW.Part1 = nil
538
        end
539
        local function Explode(Par, Pos, surface)
540
                Notime(function()
541
                        local cf = CN(Pos) * CA(Par.CFrame:toEulerAnglesXYZ()) * surface[2] * CN(0, 1, 0)
542
                        local col = Par.BrickColor.Color
543
                        local r, g, b = col.r, col.g, col.b
544
                        local col1, col2, col3 = C3(MRA(r*60, r*100)/100, MRA(g*60, g*100)/100, MRA(b*60, b*100)/100), C3(MRA(r*60, r*100)/100, MRA(g*60, g*100)/100, MRA(b*60, b*100)/100), C3(MRA(r*60, r*100)/100, MRA(g*60, g*100)/100, MRA(b*60, b*100)/100)
545
                        local p = Part(workspace, true, false, 0, 0, BN(col1.r, col1.g, col1.b), V3(0.2, 0.2, 0.2))
546
                        local p2 = Part(workspace, true, false, 0, 0, BN(col2.r, col2.g, col2.b), V3(0.2, 0.2, 0.2))
547
                        local p3 = Part(workspace, true, false, 0, 0, BN(col3.r, col3.g, col3.b), V3(0.2, 0.2, 0.2))
548
                        p.CFrame = cf
549
                        p2.CFrame = cf
550
                        p3.CFrame = cf
551
                        local m = Add.Mesh(p, "http://www.roblox.com/asset/?id=20329976", V3(1, 1, 1))
552
                        local m2 = Add.Mesh(p2, "http://www.roblox.com/asset/?id=20329976", V3(1, 1, 1))
553
                        local m3 = Add.Mesh(p3, "http://www.roblox.com/asset/?id=20329976", V3(1, 1, 1))
554
                        for i = -0.2, 1, 0.12 do
555
                                p2.Transparency = i+0.1
556
                                p.Transparency = i
557
                                p3.Transparency = i+0.2
558
                                m.Scale = V3(scale+(2.5*scale)*i, (1.4*scale)+scale*i, scale+(2.5*scale)*i)
559
                                m2.Scale = V3((0.8*scale)+(2*scale)*i, (1.2*scale)+scale*i, (0.8*scale)+(2*scale)*i)
560
                                m3.Scale = V3((0.5*scale)+scale*i, scale+scale*i, (0.5*scale)+scale*i)
561
                                wait()
562
                        end
563
                        p2:remove()
564
                        p3:remove()
565
                        p:remove()
566
                end)
567
        end
568
        local function Shoot(Pos)
569
                coroutine.resume(coroutine.create(function()
570
                local acc = Accuracy*100
571
                local Start = Main2.CFrame * CN(0, 0, -0.5).p
572
                local Face = CN(Start, Pos) * CA(MR(MRA(-acc, acc))/100, MR(MRA(-acc, acc))/100, MR(MRA(-acc, acc))/100)
573
                local Cannonball = Part(Model, true, false, 0, 0, BN("Black"), V3(1.3*scale, 1.3*scale, 1.3*scale))
574
                Add.Sphere(Cannonball)
575
                Cannonball.CFrame = Face
576
                local Go = 3*scale
577
                local Drop = 0.55/(Go*3)
578
                local Dist = 500*scale
579
                local lastP = Start
580
                local omg = 0
581
                for i = Go, Dist, Go do
582
                        Drop = Drop + 1/(Go*3)
583
                        omg = omg + Drop
584
                        local dropping = CA(MR(-Drop), 0, 0)
585
                        if omg > 130 then
586
                                dropping = CN()
587
                        end
588
                        Face = Face * dropping * CN(0, 0, -Go)
589
                        Cannonball.CFrame = Face
590
                        local Magn = (Face.p - lastP).magnitude
591
                        local T = Part(Model, true, false, 0.1, 0, BN("Mid gray"), V3(0.2, 1, 0.2))
592
                        local M = Instance.new("SpecialMesh",T)
593
                        M.MeshType = "Head"
594
                        M.Scale = V3(4.5*scale, Magn, 4.5*scale)
595
                        T.CFrame = CN(lastP, Face.p) * CA(MR(-90), 0, 0) * CN(0, Magn/2, 0)
596
                        Notime(function()
597
                                wait(0.1)
598
                                for i = 0.1, 1, 0.1 do
599
                                        T.Transparency = i+0.1
600
                                        M.Scale = V3(5-5*i, Magn+0.5, 5-5*i)
601
                                        wait()
602
                                end
603
                                T:remove()
604
                        end)
605
                        local Hit, Hitpos = RayC(lastP, Face.p, Go*2, Char)
606
                        lastP = Face.p
607
                        if Hit then
608
                                PlaySound(Sounds.Boom, true)
609
                                local s = DetectSurface(Hitpos, Hit)
610
                                Explode(Hit, Hitpos, s)
611
                                Cannonball.CFrame = CN(Hitpos)
612
                                local hu = GetHum(Hit.Parent)
613
                                if hu == nil and Hit.Parent.className ~= "Hat" and Hit.Anchored then
614
                                        coroutine.resume(coroutine.create(function()
615
                                                wait(10)
616
                                                for i = 0, 1, 0.04 do
617
                                                        Cannonball.Transparency = i
618
                                                        wait()
619
                                                end
620
                                                Cannonball:remove()
621
                                        end))
622
                                else
623
                                        Cannonball:remove()
624
                                end
625
                                local Noobs = GetGroup(Hitpos, 5*scale, Hit)
626
                                for _,v in pairs(Noobs) do
627
                                        local dm = 60/((v[3]+3)/3)
628
                                        local multi = (scale+10)/10
629
                                        dm = MRA(dm*0.9, dm*1.04)*multi
630
                                        v[1].Health = v[1].Health - dm
631
                                        local t = v[2]:findFirstChild("Head")
632
                                        if t then
633
                                                Show_Damage(t.Position, dm)
634
                                        end
635
                                end
636
                                local Parts = GetParts(Hitpos, 6*scale)
637
                                for _,v in pairs(Parts) do
638
                                        if v[3] == false then
639
                                                Notime(function()
640
                                                        if v[1].Name == "Brick wall" then
641
                                                                v[1]:BreakJoints()
642
                                                                v[1].Velocity = (CN(Hitpos, v[1].Position).lookVector * (110/((v[2]+2)/3)))
643
                                                                wait(0.1)
644
                                                                v[1].Velocity = (CN(Hitpos, v[1].Position).lookVector * (110/((v[2]+2)/3)))
645
                                                        else
646
                                                                v[1].Velocity = (CN(Hitpos, v[1].Position).lookVector * (80/((v[2]+2)/3)))
647
                                                        end
648
                                                end)
649
                                        end
650
                                end
651
                                break
652
                        end
653
                        wait()
654
                end
655
                end))
656
        end
657
        local function ShootAnim(pos)
658
                RLW.Part1 = Rleg
659
                LLW.Part1 = Lleg
660
                local cf = ComputePos(Torso.Position, pos)
661
                local bp = Instance.new("BodyPosition",Torso)
662
                bp.maxForce = V3(MH, 0, MH)
663
                bp.P = 11000
664
                PlaySound(Sounds.Shoot, true)
665
                local effect = Part(Model, false, false, 0, 0, BN(ShootColors[MRA(1,#ShootColors)]), V3(0.2, 0.2, 0.2))
666
                local effect2 = Part(Model, false, false, 0, 0, BN(ShootColors[MRA(1,#ShootColors)]), V3(0.2, 0.2, 0.2))
667
                local m1 = Add.Mesh(effect, "http://www.roblox.com/asset/?id=20329976", V3(1,1,1))
668
                local m2 = Add.Mesh(effect2, "http://www.roblox.com/asset/?id=20329976", V3(1,1,1))
669
                local w1 = Weld(Main2, effect, CA(MR(-90), 0, 0), CN(0, -1, 0))
670
                local w2 = Weld(Main2, effect2, CA(MR(-90), 0, 0), CN(0, -1, 0))
671
                for i = 0, 1, 0.5 do
672
                        RAW.C0 = CA(MR(20-50*i), MR(50-25*i), MR(30+45*i))
673
                        LAW.C0 = CA(MR(50-10*i), 0, MR(30+20*i)) * CN(0, (-0.6*scale)-(0.3*scale)*i, 0) 
674
                        RLW.C0 = CA(MR(30*i), 0, MR(-15*i))
675
                        LLW.C0 = CA(MR(10*i), 0, MR(-35*i))
676
                        FW.C0 = CA(MR(5*i), MR(-50-15*i), 0)
677
                        HW.C0 = CA(MR(30), MR(35*i), MR(-25*i))
678
                        Neck.C0 = necko * CA(MR(10*i), 0, 0)
679
                        bp.position = cf * CN(0, 0, (3*scale)*i).p
680
                        m1.Scale = V3((0.5*scale)+(0.6*scale)*i, (0.4*scale)+(0.2*scale)*i, (0.5*scale)+(0.6*scale)*i)
681
                        m2.Scale = V3((0.3*scale)+(0.5*scale)*i, (0.5*scale)+scale*i, (0.3*scale)+(0.5*scale)*i)
682
                        w1.C1 = CN(0, -scale-(0.2*scale)*i, 0)
683
                        w2.C1 = CN(0, -scale-(0.5*scale)*i, 0)
684
                        effect.Transparency = 0.2*i
685
                        effect2.Transparency = 0.2*i
686
                        wait()
687
                end
688
                for i = 0.2, 1, 0.2 do
689
                        RAW.C0 = CA(MR(-30-10*i), MR(25-5*i), MR(75+5*i))
690
                        LAW.C0 = CA(MR(40-5*i), 0, MR(50+5*i)) * CN(0, (-0.9*scale)-(0.05*scale)*i, 0)
691
                        RLW.C0 = CA(MR(30+5*i), 0, MR(-15))
692
                        LLW.C0 = CA(MR(10+5*i), 0, MR(-35-5*i))
693
                        FW.C0 = CA(MR(5+5*i), MR(-65-5*i), 0)
694
                        HW.C0 = CA(MR(30), MR(35+5*i), MR(-25-5*i))
695
                        Neck.C0 = necko * CA(MR(10+5*i), 0, 0)
696
                        bp.position = cf * CN(0, 0, (3*scale)+scale*i).p
697
                        m1.Scale = V3(scale+scale*i, (0.7*scale)+(0.9*scale)*i, scale+scale*i)
698
                        m2.Scale = V3((0.8*scale)+(0.6*scale)*i, (1.5*scale)+(1.6*scale)*i, (0.8*scale)+(0.6*scale)*i)
699
                        w1.C1 = CN(0, (-1.2*scale)-(0.6*scale)*i, 0)
700
                        w2.C1 = CN(0, (-1.5*scale)-(1.8*scale)*i, 0)
701
                        effect.Transparency = 0.2+0.9*i
702
                        effect2.Transparency = 0.2+0.9*i
703
                        wait()
704
                end
705
                effect:remove()
706
                effect2:remove()
707
                for i = 0.2, 1, 0.2 do
708
                        bp.position = cf * CN(0, 0, (4*scale)+(0.8*scale)*i).p
709
                        wait()
710
                end
711
                for i = 0.08, 1, 0.06 do
712
                        RAW.C0 = CA(MR(-40+50*i), MR(20+15*i), MR(80-35*i))
713
                        LAW.C0 = CA(MR(35-30*i), 0, MR(55-45*i)) * CN(0, (-0.95*scale)+(0.5*scale)*i, 0)
714
                        RLW.C0 = CA(MR(35-35*i), 0, MR(-15+25*i))
715
                        LLW.C0 = CA(MR(15-15*i), 0, MR(-40+30*i))
716
                        FW.C0 = CA(MR(10-7*i), MR(-70+40*i), 0)
717
                        HW.C0 = CA(MR(30), MR(40-40*i), MR(-30-10*i))
718
                        Neck.C0 = necko * CA(MR(15+5*i), 0, MR(20*i))
719
                        bp.position = cf * CN(0, 0, (4.8*scale)+(0.8*scale)*i).p
720
                        wait()
721
                end
722
                bp:remove()
723
                for i = 0.33, 1, 0.33 do
724
                        RAW.C0 = CA(MR(10+10*i), MR(35+5*i), MR(45-5*i))
725
                        LAW.C0 = CA(MR(5), 0, MR(10)) * CN(0, (-0.45*scale)+(0.1*scale)*i, 0)
726
                        FW.C0 = CA(MR(3-3*i), MR(-30+5*i), 0)
727
                        HW.C0 = CA(MR(30), 0, MR(-40-10*i))
728
                        wait()
729
                end
730
                for i = 0.12, 1, 0.12 do
731
                        RAW.C0 = CA(MR(20+5*i), MR(40+5*i), MR(40+5*i))
732
                        LAW.C0 = CA(MR(5), 0, MR(10)) * CN(0, (-0.35*scale)-(0.3*scale)*i, 0)
733
                        FW.C0 = CA(0, MR(-25+5*i), 0)
734
                        HW.C0 = CA(MR(30), 0, MR(-50-5*i))
735
                        wait()
736
                end
737
                local b = Part(Model, false, false, 0, 0, BN("Black"), V3(1.1*scale, 1.1*scale, 1.1*scale))
738
                local m = Add.Sphere(b)
739
                local w = Weld(Larm, b, CN(), CN(0, 1.4*scale, 0))
740
                for i = 0.16, 1, 0.16 do
741
                        LAW.C0 = CA(MR(5+30*i), 0, MR(10+10*i)) * CN(0, (-0.65*scale)+(0.65*scale)*i, 0)
742
                        RAW.C0 = CA(MR(25), MR(45+3*i), MR(40))
743
                        m.Scale = V3(0.5+0.5*i, 0.5+0.5*i, 0.5+0.5*i)
744
                        Neck.C0 = necko * CA(MR(20-10*i), 0, MR(20-15*i))
745
                        wait()
746
                end
747
                for i = 0.1, 1, 0.1 do
748
                        LAW.C0 = CA(MR(35+105*i), 0, MR(20+20*i)) * CN(0, (-0.9*scale)*i, 0)
749
                        RAW.C0 = CA(MR(25), MR(48+6*i), MR(40))
750
                        Neck.C0 = necko * CA(MR(10-10*i), 0, MR(5-35*i))
751
                        wait()
752
                end
753
                for i = 0.16, 1, 0.16 do
754
                        LAW.C0 = CA(MR(140-10*i), 0, MR(40-15*i)) * CN(0, (-0.9*scale)-(0.2*scale)*i, 0)
755
                        RAW.C0 = CA(MR(25), MR(54), MR(40))
756
                        Neck.C0 = necko * CA(MR(5*i), 0, MR(-30))
757
                        w.C0 = CN((1.5*scale)*i, (0.55*scale)*i, (1.1*scale)*i)
758
                        wait()
759
                end
760
                PlaySound(Sounds.Reload, true)
761
                b:remove()
762
                w:remove()
763
                for i = 0.2, 1, 0.2 do
764
                        LAW.C0 = CA(MR(130-10*i), 0, MR(25-15*i)) * CN(0, (-1.1*scale)+(0.2*scale)*i, 0)
765
                        RAW.C0 = CA(MR(25-10*i), MR(54), MR(40))
766
                        Neck.C0 = necko * CA(MR(5-3*i), 0, MR(-30+5*i))
767
                        HW.C0 = CA(MR(30), 0, MR(-55+10*i))
768
                        FW.C0 = CA(0, MR(-20-5*i), 0)
769
                        wait()
770
                end
771
                for i = 0.11, 1, 0.11 do
772
                        LAW.C0 = CA(MR(120-60*i), 0, MR(10+15*i)) * CN(0, (-0.9*scale)+(0.3*scale)*i, 0)
773
                        RAW.C0 = CA(MR(15+5*i), MR(54-4*i), MR(40-10*i))
774
                        Neck.C0 = necko * CA(MR(2-2*i), 0, MR(-25+25*i))
775
                        HW.C0 = CA(MR(30), 0, MR(-45+45*i))
776
                        FW.C0 = CA(0, MR(-25-20*i), 0)
777
                        RLW.C0 = CA(0, 0, MR(10-8*i))
778
                        LLW.C0 = CA(0, 0, MR(-10+8*i))
779
                        wait()
780
                end
781
                Neck.C0 = necko
782
                for i = 0.25, 1, 0.25 do
783
                        LAW.C0 = CA(MR(60-10*i), 0, MR(25+5*i)) * CN(0, -0.6*scale, 0)
784
                        RAW.C0 = CA(MR(20), MR(50), MR(30))
785
                        HW.C0 = CA(MR(30), 0, 0)
786
                        FW.C0 = CA(0, MR(-45-5*i), 0)
787
                        RLW.C0 = CA(0, 0, MR(2-2*i))
788
                        LLW.C0 = CA(0, 0, MR(-2+2*i))
789
                        wait()
790
                end
791
                RLW.Part1 = nil
792
                LLW.Part1 = nil
793
                RAW.C0 = CA(MR(20), MR(50), MR(30))
794
                LAW.C0 = CA(MR(50), 0, MR(30)) * CN(0, -0.6*scale, 0)
795
                FW.C0 = CA(0, MR(-50), 0)
796
                HW.C0 = CA(MR(30), 0, 0)
797
                Neck.C0 = necko
798
        end
799
        local function Melee()
800
                PlaySound(Sounds.Slash, true)
801
                for i = 0.25, 1, 0.25 do
802
                        RAW.C0 = CA(MR(20+5*i), MR(50-5*i), MR(30+3*i))
803
                        LAW.C0 = CA(MR(50), 0, MR(30+4*i)) * CN(0, (-0.6*scale)-(0.05*scale)*i, 0)
804
                        HW.C0 = CA(MR(30), MR(5*i), 0)
805
                        FW.C0 = CA(0, MR(-50-5*i), 0)
806
                        wait()
807
                end
808
                for i = 0.12, 1, 0.12 do
809
                        RAW.C0 = CA(MR(25+25*i), MR(45-30*i), MR(33+7*i))
810
                        LAW.C0 = CA(MR(50), 0, MR(34+11*i)) * CN(0, (-0.65*scale)-(0.25*scale)*i, 0)
811
                        HW.C0 = CA(MR(30), MR(5+25*i), 0)
812
                        FW.C0 = CA(0, MR(-55-25*i), 0)
813
                        wait()
814
                end
815
                for i = 0.33, 1, 0.33 do
816
                        RAW.C0 = CA(MR(50+15*i), MR(15-5*i), MR(40-10*i)) * CN(0, (-0.2*scale)*i, 0)
817
                        LAW.C0 = CA(MR(50+10*i), 0, MR(45-5*i)) * CN(0, (-0.9*scale)+(0.15*scale)*i, 0)
818
                        HW.C0 = CA(MR(30+2*i), MR(30+5*i), 0)
819
                        FW.C0 = CA(0, MR(-80+10*i), MR(-5*i))
820
                        wait()
821
                end
822
                Hurt = true
823
                Debounce = true
824
                for i = 0.07, 1, 0.07 do
825
                        RAW.C0 = CA(MR(65+55*i), MR(10), MR(30-70*i)) * CN(0, (-0.2*scale)-(1.1*scale)*i, 0)
826
                        LAW.C0 = CA(MR(60+120*i), 0, MR(40-70*i)) * CN(0, (-0.75*scale)+(0.7*scale)*i, 0)
827
                        HW.C0 = CA(MR(32+6*i), MR(35+20*i), MR(-4*i))
828
                        FW.C0 = CA(0, MR(-70+110*i), 0)
829
                        wait()
830
                end
831
                for i = 0.16, 1, 0.16 do
832
                        RAW.C0 = CA(MR(120+10*i), MR(10), MR(-40-5*i)) * CN(0, (-1.3*scale)-(0.1*scale)*i, 0)
833
                        LAW.C0 = CA(MR(180+15*i), 0, MR(-30-20*i)) * CN(0, (-0.05*scale)+(0.1*scale)*i, 0)
834
                        HW.C0 = CA(MR(38+2*i), MR(55-6*i), MR(-4-1*i))
835
                        FW.C0 = CA(0, MR(40+10*i), 0)
836
                        wait()
837
                end
838
                Hurt = false
839
                for i = 0.2, 1, 0.2 do
840
                        RAW.C0 = CA(MR(130+5*i), MR(10), MR(-45-2*i)) * CN(0, (-1.4*scale)-(0.05*scale)*i, 0)
841
                        LAW.C0 = CA(MR(195+5*i), 0, MR(-50-8*i)) * CN(0, (0.05*scale)+(0.05*scale)*i, 0)
842
                        HW.C0 = CA(MR(40), MR(49-2*i), MR(-5))
843
                        FW.C0 = CA(0, MR(50+3*i), 0)
844
                        wait()
845
                end
846
                wait(0.2)
847
                for i = 0.2, 1, 0.2 do
848
                        RAW.C0 = CA(MR(135-10*i), MR(10+5*i), MR(-47+10*i)) * CN(0, (-1.45*scale)+(0.25*scale)*i, 0)
849
                        LAW.C0 = CA(MR(200-10*i), 0, MR(-58+10*i)) * CN(0, (0.1*scale)-(0.1*scale)*i, 0)
850
                        HW.C0 = CA(MR(40), MR(47-5*i), MR(-5+5*i))
851
                        FW.C0 = CA(0, MR(53-10*i), 0)
852
                        wait()
853
                end
854
                for i = 0.08, 1, 0.08 do
855
                        RAW.C0 = CA(MR(125-90*i), MR(15+30*i), MR(-37+57*i)) * CN(0, (-1.2*scale)+(1.1*scale)*i, 0)
856
                        LAW.C0 = CA(MR(190-125*i), 0, MR(-48+68*i)) * CN(0, (-0.5*scale)*i, 0)
857
                        HW.C0 = CA(MR(40-7*i), MR(42-37*i), 0)
858
                        FW.C0 = CA(0, MR(43-82*i), 0)
859
                        wait()
860
                end
861
                for i = 0.2, 1, 0.2 do
862
                        RAW.C0 = CA(MR(35-15*i), MR(45+5*i), MR(20+10*i)) * CN(0, (-0.1*scale)+(0.1*scale)*i, 0)
863
                        LAW.C0 = CA(MR(65-15*i), 0, MR(20+10*i)) * CN(0, (-0.5*scale)-(0.1*scale)*i, 0)
864
                        HW.C0 = CA(MR(33-3*i), MR(5-5*i), 0)
865
                        FW.C0 = CA(0, MR(-41-9*i), 0)
866
                        wait()
867
                end
868
                RLW.Part1 = nil
869
                LLW.Part1 = nil
870
                RAW.C0 = CA(MR(20), MR(50), MR(30))
871
                LAW.C0 = CA(MR(50), 0, MR(30)) * CN(0, -0.6*scale, 0)
872
                FW.C0 = CA(0, MR(-50), 0)
873
                HW.C0 = CA(MR(30), 0, 0)
874
                Neck.C0 = necko
875
        end
876
        wait(1)
877
        Selected = true
878
        SelectAnim()
879
        wait(1.5)
880
        while Hum.Health > 0 do
881
                local list = game.Players:GetPlayers()
882
                local targ = list[MRA(1,#list)].Character:findFirstChild("Torso")
883
                if targ then
884
                        local choice = MRA(1,6)
885
                        if choice == 1 then
886
                                repeat
887
                                        wait(0.2)
888
                                        if targ.Parent == nil then break end
889
                                        Hum:MoveTo(CN(targ.Position, Torso.Position) * CN(0, 0, -(scale)).p, targ)
890
                                until (Torso.Position - targ.Position).magnitude < (scale*2)+1
891
                                Melee()
892
                        else
893
                                local bg = Instance.new("BodyGyro")
894
                                bg.P = 3000
895
                                bg.maxTorque = V3(MH, MH, MH)
896
                                bg.cframe = ComputePos(Torso.Position, targ.Position)
897
                                bg.Parent = Torso
898
                                local pos = Torso.Position
899
                                local pos2 = targ.Position
900
                                for i = 1, 10, 1 do
901
                                        wait(0.1)
902
                                        bg.cframe = ComputePos(Torso.Position, targ.Position)
903
                                        pos2 = targ.Position
904
                                end
905
                                bg:remove()
906
                                wait(0.2)
907
                                if Hum.Health >0 then
908
                                local magn = ((Torso.Position - pos2).magnitude+5)/((scale+10)/10)
909
                                local pos = pos2 + V3(0, magn/11, 0)
910
                                Shoot(pos)
911
                                ShootAnim(pos)
912
                                local p = RayC(pos, pos-V3(0, 10, 0), scale*4, Char)
913
                                if p then
914
                                        Hum:MoveTo(CN(pos, Torso.Position) * CN(0, 0, -2).p, p)
915
                                end
916
                                end
917
                        end
918
                end
919
                wait(0.2)
920
        end
921
        return Nub
922
end
923
for i = 1, 1 do
924
coroutine.resume(coroutine.create(function()
925
local nub = MakeNoob(V3(MRA(-50, 50),20,MRA(-50, 50)), 30)
926
end))
927
end