View difference between Paste ID: LMBKRHnn and wK9xpKbD
SHOW: | | - or go back to the newest paste.
1
--[[                                                                                                                                                                                                                                                                                
2
Herex's Mechanic Gauntlets
3
Heyo, Fen's first 2014 script. If ever you want details of Herex, who he is, and his backstory, 
4
just message me.
5
]] 
6-
Player = game:GetService("Players").LocalPlayer
6+
Player = game:GetService("Players").andreiek
7
Character = Player.Character 
8
PlayerGui = Player.PlayerGui 
9
Backpack = Player.Backpack 
10
Torso = Character.Torso 
11
Head = Character.Head 
12
Humanoid = Character.Humanoid
13
LeftArm = Character["Left Arm"] 
14
LeftLeg = Character["Left Leg"] 
15
RightArm = Character["Right Arm"] 
16
RightLeg = Character["Right Leg"] 
17
LS = Torso["Left Shoulder"] 
18
LH = Torso["Left Hip"] 
19
RS = Torso["Right Shoulder"] 
20
RH = Torso["Right Hip"] 
21
Neck = Torso.Neck
22
it=Instance.new
23
vt=Vector3.new
24
cf=CFrame.new
25
euler=CFrame.fromEulerAnglesXYZ
26
angles=CFrame.Angles
27
necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
28
necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
29
RootPart=Character.HumanoidRootPart
30
RootJoint=RootPart.RootJoint
31
RootCF=euler(-1.57,0,3.14)
32
attack = false 
33
attackdebounce = false 
34
MMouse=nil
35
combo=0
36
Mode="Normal"
37
throwcube=false
38
--player 
39
player = nil 
40
--save shoulders 
41
RSH, LSH = nil, nil 
42
--welds 
43
RW, LW = Instance.new("Weld"), Instance.new("Weld") 
44
RW.Name="Right Shoulder" LW.Name="Left Shoulder"
45
local AnimJoints = {} 
46
table.insert(AnimJoints,RW)
47
table.insert(AnimJoints,LW)
48
 
49
 
50
if Character:findFirstChild("Mechanic Gauntlets",true) ~= nil then 
51
Character:findFirstChild("Mechanic Gauntlets",true).Parent = nil 
52
end 
53
 
54
 
55
function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
56
local fp = it("Part")
57
fp.formFactor = formfactor 
58
fp.Parent = parent
59
fp.Reflectance = reflectance
60
fp.Transparency = transparency
61
fp.CanCollide = false 
62
fp.Locked=true
63
fp.BrickColor = brickcolor
64
fp.Name = name
65
fp.Size = size
66
fp.Position = Torso.Position 
67
fp.BottomSurface="Smooth"
68
fp.TopSurface="Smooth"
69
fp:BreakJoints()
70
return fp 
71
end 
72
 
73
function mesh(Mesh,part,meshtype,meshid,offset,scale)
74
local mesh = it(Mesh) 
75
mesh.Parent = part
76
if Mesh=="SpecialMesh" then
77
mesh.MeshType = meshtype
78
mesh.MeshId = meshid
79
end
80
mesh.Offset=offset
81
mesh.Scale=scale
82
return mesh
83
end
84
 
85
function weld(parent,part0,part1,c0)
86
local weld = it("Weld") 
87
weld.Parent = parent
88
weld.Part0 = part0 
89
weld.Part1 = part1 
90
weld.C0 = c0
91
return weld
92
end
93
 
94
function SetWeld(weld, i, loops, origpos,origangle, nextpos,nextangle,smooth) 
95
        smooth = smooth or 1 
96
        local obj 
97
        for i, v in pairs(AnimJoints) do 
98
                if v[1] == weld then 
99
                        obj = v 
100
                        break 
101
                end 
102
        end 
103
        if not obj then 
104
                obj = {weld,NV} 
105
                table.insert(AnimJoints,obj) 
106
        end 
107
        
108
        local perc = (smooth == 1 and math.sin((math.pi/2)/loops*i)) or i/loops 
109
        
110
        local tox,toy,toz = 0,0,0 
111
        tox = math.abs(origangle.x - nextangle.x) *perc 
112
        toy = math.abs(origangle.y - nextangle.y) *perc 
113
        toz = math.abs(origangle.z - nextangle.z) *perc 
114
        tox = (origangle.x > nextangle.x and -tox) or tox 
115
        toy = (origangle.y > nextangle.y and -toy) or toy 
116
        toz = (origangle.z > nextangle.z and -toz) or toz 
117
        
118
        local tox2,toy2,toz2 = 0,0,0 
119
        tox2 = math.abs(origpos.x - nextpos.x) *perc 
120
        toy2 = math.abs(origpos.y - nextpos.y) *perc 
121
        toz2 = math.abs(origpos.z - nextpos.z) *perc 
122
        tox2 = (origpos.x > nextpos.x and -tox2) or tox2 
123
        toy2 = (origpos.y > nextpos.y and -toy2) or toy2 
124
        toz2 = (origpos.z > nextpos.z and -toz2) or toz2 
125
        
126
        obj[2] = Vector3.new(origangle.x + tox, origangle.y + toy, origangle.z + toz) 
127
        weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz) 
128
end 
129
 
130
local Hitbox=part(3,nil,0,0,BrickColor.new("White"),"Hitbox",vt(1,1,1))
131
Hitbox.Anchored=true
132
Hitbox.Transparency=1
133
local modelzorz = Instance.new("Model") 
134
modelzorz.Parent = Character 
135
modelzorz.Name = "Mechanic Gauntlets" 
136
 
137
--[[LEFT GAUNTLET]]--
138
local Lprt1=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Left Part1",vt(1,1,1))
139
local Lprt3=part(3,modelzorz,0,0,BrickColor.new("White"),"Left Part3",vt(1,1,1))
140
local Lprt5=part(3,modelzorz,0,0,BrickColor.new("White"),"Left Part5",vt(1,1,1))
141
local Lprt6=part(3,modelzorz,0,0,BrickColor.new("White"),"Left Part6",vt(1,1,1))
142
local Lprt7=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Left Part7",vt(1,1,1))
143
local Lprt8=part(3,modelzorz,0,0,BrickColor.new("Black"),"Left Part8",vt(1,1,1))
144
local Lprt9=part(3,modelzorz,0,0,BrickColor.new("White"),"Left Part9",vt(1,1,1))
145
local Lprt10=part(3,modelzorz,0,0,BrickColor.new("White"),"Left Part10",vt(1,1,1))
146
local Lprt11=part(3,modelzorz,0,0,BrickColor.new("White"),"Left Part11",vt(1,1,1))
147
 
148
Lmsh1=mesh("BlockMesh",Lprt1,"","",vt(0,0,0),vt(1.03,1,1.03))
149
Lmsh3=mesh("BlockMesh",Lprt3,"","",vt(0,0,0),vt(0.1,1.05,1.06))
150
Lmsh5=mesh("BlockMesh",Lprt5,"","",vt(0,0,0),vt(1.025,2,0.2))
151
Lmsh6=mesh("BlockMesh",Lprt6,"","",vt(0,0,0),vt(0.2,2,1.025))
152
Lmsh7=mesh("CylinderMesh",Lprt7,"","",vt(0,0,0),vt(0.4,0.2,0.4))
153
Lmsh8=mesh("CylinderMesh",Lprt8,"","",vt(0,0,0),vt(0.3,0.21,0.3))
154
Lmsh9=mesh("SpecialMesh",Lprt9,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.17,0.17,0.1))
155
Lmsh10=mesh("SpecialMesh",Lprt10,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.07,0.07,0.1))
156
Lmsh11=mesh("BlockMesh",Lprt11,"","",vt(0,0,0),vt(0.15,0.02,0.02))
157
 
158
local Lwld1=weld(Lprt1,Lprt1,LeftArm,euler(0,0,0)*cf(0,0.51,0))
159
local Lwld3=weld(Lprt3,Lprt3,Lprt1,euler(0,0,0)*cf(0.3,0,0))
160
local Lwld5=weld(Lprt5,Lprt5,Lprt1,euler(0,0,0)*cf(0,-0.55,0))
161
local Lwld6=weld(Lprt6,Lprt6,Lprt1,euler(0,0,0)*cf(0,-0.55,0))
162
local Lwld7=weld(Lprt7,Lprt7,Lprt1,euler(0,0,1.57)*cf(0.45,-1.2,0))
163
local Lwld8=weld(Lprt8,Lprt8,Lprt7,euler(0,0,0)*cf(0,0,0))
164
local Lwld9=weld(Lprt9,Lprt9,Lprt7,euler(1.57,0,0)*cf(-0.02,0.1,0))
165
local Lwld10=weld(Lprt10,Lprt10,Lprt7,euler(1.57,0,0)*cf(0,0.1,0))
166
local Lwld11=weld(Lprt11,Lprt11,Lprt7,euler(0,0,0)*cf(0.07,0.1,0))
167
 
168
numb=0.4
169
for i=1,4 do
170
local Lprt2=part(3,modelzorz,0,0,BrickColor.new("White"),"Left Part2",vt(1,1,1))
171
Lmsh2=mesh("BlockMesh",Lprt2,"","",vt(0,0,0),vt(1.06,1.05,0.1))
172
local Lwld2=weld(Lprt2,Lprt2,Lprt1,euler(0,0,0)*cf(0,0,numb))
173
local Lprt4=part(3,modelzorz,0,0,BrickColor.new("Light stone grey"),"Left Part4",vt(1,1,1))
174
Lmsh4=mesh("SpecialMesh",Lprt4,"Wedge","",vt(0,0,0),vt(0.09,0.1,0.3))
175
local Lwld4=weld(Lprt4,Lprt4,Lprt2,euler(1.57,-1.57,0)*cf(0.54,0.5,0))
176
numb=numb-0.275
177
end
178
 
179
numb=0
180
for i=1,4 do
181
local Lprt7=part(3,modelzorz,0,0,BrickColor.new("Light stone grey"),"Left Part7",vt(1,1,1))
182
Lmsh7=mesh("SpecialMesh",Lprt7,"Wedge","",vt(0,0,0),vt(0.2,0.1,0.3))
183
local Lwld7=weld(Lprt7,Lprt7,Lprt1,euler(1.57,0,3.14)*cf(0,-0.5,0.54)*euler(0,numb,0))
184
numb=numb+1.57
185
end
186
 
187
--[[RIGHT GAUNTLET]]--
188
local Rprt1=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Right Part1",vt(1,1,1))
189
local Rprt3=part(3,modelzorz,0,0,BrickColor.new("White"),"Right Part3",vt(1,1,1))
190
local Rprt5=part(3,modelzorz,0,0,BrickColor.new("White"),"Right Part5",vt(1,1,1))
191
local Rprt6=part(3,modelzorz,0,0,BrickColor.new("White"),"Right Part6",vt(1,1,1))
192
local Rprt7=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Right Part7",vt(1,1,1))
193
local Rprt8=part(3,modelzorz,0,0,BrickColor.new("Black"),"Right Part8",vt(1,1,1))
194
local Rprt9=part(3,modelzorz,0,0,BrickColor.new("White"),"Right Part9",vt(1,1,1))
195
local Rprt10=part(3,modelzorz,0,0,BrickColor.new("White"),"Right Part10",vt(1,1,1))
196
local Rprt11=part(3,modelzorz,0,0,BrickColor.new("White"),"Right Part11",vt(1,1,1))
197
 
198
Rmsh1=mesh("BlockMesh",Rprt1,"","",vt(0,0,0),vt(1.03,1,1.03))
199
Rmsh3=mesh("BlockMesh",Rprt3,"","",vt(0,0,0),vt(0.1,1.05,1.06))
200
Rmsh5=mesh("BlockMesh",Rprt5,"","",vt(0,0,0),vt(1.025,2,0.2))
201
Rmsh6=mesh("BlockMesh",Rprt6,"","",vt(0,0,0),vt(0.2,2,1.025))
202
Rmsh7=mesh("CylinderMesh",Rprt7,"","",vt(0,0,0),vt(0.4,0.2,0.4))
203
Rmsh8=mesh("CylinderMesh",Rprt8,"","",vt(0,0,0),vt(0.3,0.21,0.3))
204
Rmsh9=mesh("SpecialMesh",Rprt9,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.17,0.17,0.1))
205
Rmsh10=mesh("SpecialMesh",Rprt10,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.07,0.07,0.1))
206
Rmsh11=mesh("BlockMesh",Rprt11,"","",vt(0,0,0),vt(0.15,0.02,0.02))
207
 
208
local Rwld1=weld(Rprt1,Rprt1,RightArm,euler(0,3.14,0)*cf(0,0.51,0))
209
local Rwld3=weld(Rprt3,Rprt3,Rprt1,euler(0,0,0)*cf(0.3,0,0))
210
local Rwld5=weld(Rprt5,Rprt5,Rprt1,euler(0,0,0)*cf(0,-0.55,0))
211
local Rwld6=weld(Rprt6,Rprt6,Rprt1,euler(0,0,0)*cf(0,-0.55,0))
212
local Rwld7=weld(Rprt7,Rprt7,Rprt1,euler(0,0,1.57)*cf(0.45,-1.2,0))
213
local Rwld8=weld(Rprt8,Rprt8,Rprt7,euler(0,0,0)*cf(0,0,0))
214
local Rwld9=weld(Rprt9,Rprt9,Rprt7,euler(1.57,0,0)*cf(-0.02,0.1,0))
215
local Rwld10=weld(Rprt10,Rprt10,Rprt7,euler(1.57,0,0)*cf(0,0.1,0))
216
local Rwld11=weld(Rprt11,Rprt11,Rprt7,euler(0,0,0)*cf(0.07,0.1,0))
217
 
218
numb=0.4
219
for i=1,4 do
220
local Rprt2=part(3,modelzorz,0,0,BrickColor.new("White"),"Right Part2",vt(1,1,1))
221
Rmsh2=mesh("BlockMesh",Rprt2,"","",vt(0,0,0),vt(1.06,1.05,0.1))
222
local Rwld2=weld(Rprt2,Rprt2,Rprt1,euler(0,0,0)*cf(0,0,numb))
223
local Rprt4=part(3,modelzorz,0,0,BrickColor.new("Light stone grey"),"Right Part4",vt(1,1,1))
224
Rmsh4=mesh("SpecialMesh",Rprt4,"Wedge","",vt(0,0,0),vt(0.09,0.1,0.3))
225
local Rwld4=weld(Rprt4,Rprt4,Rprt2,euler(1.57,-1.57,0)*cf(0.54,0.5,0))
226
numb=numb-0.275
227
end
228
 
229
numb=0
230
for i=1,4 do
231
local Rprt7=part(3,modelzorz,0,0,BrickColor.new("Light stone grey"),"Right Part7",vt(1,1,1))
232
Rmsh7=mesh("SpecialMesh",Rprt7,"Wedge","",vt(0,0,0),vt(0.2,0.1,0.3))
233
local Rwld7=weld(Rprt7,Rprt7,Rprt1,euler(1.57,0,3.14)*cf(0,-0.5,0.54)*euler(0,numb,0))
234
numb=numb+1.57
235
end
236
 
237
if (script.Parent.className ~= "HopperBin") then 
238
Tool = Instance.new("HopperBin") 
239
Tool.Parent = Backpack 
240
Tool.Name = "Mechanic Gauntlets" 
241
script.Parent = Tool 
242
end 
243
Bin = Tool
244
 
245
local Bg = it("BodyGyro") 
246
Bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge 
247
Bg.P = 20e+003 
248
Bg.Parent = nil 
249
 
250
so = function(id,par,vol,pit) 
251
coroutine.resume(coroutine.create(function()
252
local sou = Instance.new("Sound",par or workspace)
253
sou.Volume=vol
254
sou.Pitch=pit or 1
255
sou.SoundId=id
256
wait() 
257
sou:play() 
258
wait(6) 
259
sou:Remove() 
260
end))
261
end
262
 
263
function hideanim() 
264
equipped=false
265
end 
266
 
267
function equipanim() 
268
equipped=true
269
Neck.C0=necko
270
for i = 0,1,0.1 do 
271
wait() 
272
LW.C0=cf(-1.5,0.5,0)*euler(0.2*i,1.57*i,0)
273
LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0) 
274
RW.C0=cf(1.5,0.5,0)*euler(0.1*i,0,-0.2*i)
275
end
276
end 
277
 
278
function attackone()
279
attack=true
280
local armprt=part(3,modelzorz,0,0,BrickColor.new("White"),"Part",vt(1,1,1))
281
armprt.Transparency=1
282
local armprtwld=weld(armprt,armprt,LeftArm,euler(0,0,0)*cf(0,1,0))
283
for i=0,1,0.2 do
284
wait()
285
ElecEffect(armprt.CFrame,1,1,1)
286
RootJoint.C0=RootCF*euler(0,0,0.2*i)
287
LW.C0=cf(-1.5,0.5,0)*euler((walkoffset1-walkoffset1*i)+.2,1.57,0)
288
LW.C1=cf(0, 0.5, 0)*euler(-0.2-0.4*i,0,0) 
289
RW.C0=cf(1.5,0.5,0)*euler((walkoffset1-walkoffset1*i)+.1,0,-0.2+0.8*i)
290
end
291
local boom=part(3,workspace,0,0,BrickColor.new("White"),"Part",vt(1,1,1))
292
boom.Transparency=1
293
boom.Anchored=true
294
boom.CFrame=Head.CFrame*cf(0,-1,-4)
295
so("http://www.roblox.com/asset/?id=153092315",boom,1,0.5)
296
for i=0,1,0.2 do
297
wait()
298
ElecEffect(armprt.CFrame,1,1,1)
299
Neck.C0=necko*euler(0,0,0.6*i)
300
RootJoint.C0=RootCF*euler(0,0,0.2-0.8*i)
301
LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.37*i,1.57,0)
302
LW.C1=cf(0, 0.5, 0)*euler(-0.6+0.2*i,0,0) 
303
RW.C0=cf(1.5,0.5,0)*euler(0.1,0,0.6)
304
end
305
boommsh=mesh("SpecialMesh",boom,"Sphere","",vt(0,0,0),vt(2.5,2.5,2.5))
306
boom.Transparency=0.5
307
boom.Anchored=true
308
boom.CFrame=Head.CFrame*cf(0,-1,-4)
309
Hitbox.Parent=workspace
310
Hitbox.CFrame=boom.CFrame
311
con1=Hitbox.Touched:connect(function(hit) Damagefunc1(hit,1,5,0) end) 
312
coroutine.resume(coroutine.create(function(Part,Mesh)
313
while Part.Parent~=nil do
314
wait()
315
derp=math.random()
316
Mesh.Scale=vt(2.5+derp,2.5+derp,2.5+derp)
317
ElecEffect(Part.CFrame,2,2,2)
318
MagicBlock(BrickColor.new("White"),Part.CFrame,1,1,1,0.1,0.1,0.1)
319
Hitbox.CFrame=boom.CFrame*cf(math.random(-1,0)+math.random(),math.random(-1,0)+math.random(),math.random(-1,0)+math.random())
320
end
321
end),boom,boommsh)
322
for i=0,1,0.2 do
323
wait()
324
LW.C0=cf(-1.5,0.5,0)*euler(1.57,1.57,0)
325
LW.C1=cf(0, 0.5, 0)*euler(-0.4+0.1*i,0,0) 
326
end
327
coroutine.resume(coroutine.create(function(Part1,Part2,Part3,Con)
328
wait(2)
329
Con:disconnect()
330
Part2.Parent=nil
331
Part3.Parent=nil
332
Part1.Parent=nil
333
wait(1)
334
end),Hitbox,boom,armprt,con1)
335
--[[Hitbox.Parent=nil
336
con1:disconnect()
337
boom.Parent=nil
338
armprt.Parent=nil]]
339
attack=false
340
end
341
 
342
function attacktwo()
343
attack=true
344
for i=0,1,0.2 do
345
wait()
346
Neck.C0=necko*euler(0,0,0.6-0.6*i)
347
RootJoint.C0=RootCF*euler(0,0,-0.6+0.6*i)
348
LW.C0=cf(-1.5,0.5,0)*euler(1.57,1.57-1.57*i,0)
349
LW.C1=cf(0, 0.5, 0)*euler(-0.3+0.3*i,0,0) 
350
RW.C0=cf(1.5,0.5,0)*euler(0.1+1.47*i,0,0.6-0.6*i)
351
end
352
local boom=part(3,modelzorz,0,0,BrickColor.new("White"),"Part",vt(1,1,1))
353
boom.Transparency=0.5
354
boommsh=mesh("SpecialMesh",boom,"Sphere","",vt(0,0,0),vt(0,0,0))
355
local boomwld=weld(boom,boom,Head,euler(0,0,0)*cf(0,1,4))
356
con1=Hitbox.Touched:connect(function(hit) Damagefunc1(hit,5,10,20) end) 
357
for i=0,1,0.2 do
358
wait()
359
ElecEffect(boom.CFrame,3,3,3)
360
LW.C0=cf(-1.5,0.5,0)*euler(1.57,0,0.1*i)
361
RW.C0=cf(1.5,0.5,0)*euler(1.57,0,-0.1*i)
362
boommsh.Scale=vt(0.5*(i*3),0.5*(i*3),0.5*(i*3))
363
Hitbox.CFrame=boom.CFrame
364
end
365
con1:disconnect()
366
boomwld.Parent=nil
367
boom.Anchored=true
368
coroutine.resume(coroutine.create(function(Part)
369
local c=game.Workspace:GetChildren()
370
for i=1,#c do
371
local hum=c[i]:findFirstChild("Humanoid")
372
if hum~=nil and hum.Health~=0 then
373
local head=c[i]:findFirstChild("Head")
374
if head~=nil then
375
local targ=head.Position - Part.Position
376
local mag=targ.magnitude
377
if mag<=10 and c[i].Name~=Player.Name then 
378
attackdebounce=false
379
Damagefunc1(head,10,20,70)
380
end
381
end
382
end
383
end
384
so("http://www.roblox.com/asset/?id=2974249",Part,1,1) 
385
so("http://www.roblox.com/asset/?id=1369158",Part,1,2) 
386
numb=0
387
for i=0,20 do
388
wait()
389
MagicBlock(BrickColor.new("White"),Part.CFrame,0.5,0.5,0.5,1,1,1)
390
if numb>=8 then
391
MagicRing(BrickColor.new("White"),Part.CFrame,1,1,1,math.random(-50,50),math.random(-50,50),math.random(-50,50),0.5,0.5,0.5)
392
numb=0
393
end
394
numb=numb+1
395
end
396
end),boom)
397
for i=0,1,0.2 do
398
wait()
399
LW.C0=cf(-1.5,0.5,0)*euler(1.57,0,0.1-0.7*i)
400
RW.C0=cf(1.5,0.5,0)*euler(1.57,0,-0.1+0.7*i)
401
end
402
wait(0.2)
403
boom.Parent=nil
404
attack=false
405
end
406
 
407
function attackthree()
408
attack=true
409
for i=0,1,0.1 do
410
wait()
411
LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.57*i,0,-0.6)
412
RW.C0=cf(1.5,0.5,0)*euler(1.57-1.57*i,0,0.6)
413
end
414
so("http://www.roblox.com/asset/?id=153092348",Torso,1,1) 
415
vel=Instance.new("BodyVelocity")
416
vel.Parent=RootPart
417
vel.maxForce=vt(4e+005,4e+005,4e+005)*1
418
vel.velocity=Head.CFrame.lookVector*50
419
ArmHit=false
420
armcon=RightArm.Touched:connect(function(hit) 
421
if hit~=nil and hit.Parent:findFirstChild("Humanoid")~=nil and ArmHit==false then
422
armcon:disconnect()
423
vel.Parent=nil
424
ArmHit=true
425
print("HITTED")
426
Damagefunc1(hit,10,30,20)
427
MagicBlock(BrickColor.new("White"),hit.CFrame*cf(0,-1,0),0.5,0.5,0.5,1,1,1)
428
for i=1,3 do
429
Lightning(hit.Position,hit.Position+vt(math.random(-10,10),math.random(-10,10),math.random(-10,10)),5,1,"White",0.3,0.1)
430
end
431
so("http://www.roblox.com/asset/?id=153092334",Torso,1,1) 
432
for i=0,1,0.2 do
433
wait()
434
Neck.C0=necko*euler(0,0,-1+2*i)
435
RootJoint.C0=RootCF*euler(0,0,1-2*i)
436
LW.C0=cf(-1.5,0.5,0)*euler(-0.2,0,-0.6)
437
RW.C0=cf(1.5,0.5,0)*euler(1.57-1.77*i,0,1)
438
end
439
wait(0.4)
440
if Anim=="Idle" then
441
for i=0,1,0.1 do
442
wait()
443
Neck.C0=necko*euler(0,0,1-1*i)
444
RootJoint.C0=RootCF*euler(0,0,-1+1*i)
445
LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.4*i,1.57*i,-0.6+0.6*i)
446
LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0) 
447
RW.C0=cf(1.5,0.5,0)*euler(-0.2+0.3*i,0,1-1.2*i)
448
end
449
end
450
end
451
end) 
452
for i=0,1,0.2 do
453
wait()
454
MagicBlock(BrickColor.new("White"),RightArm.CFrame*cf(0,-2.5,0),0.5,0.5,0.5,0.6,0.6,0.6)
455
Neck.C0=necko*euler(0,0,-1*i)
456
RootJoint.C0=RootCF*euler(0,0,1*i)
457
LW.C0=cf(-1.5,0.5,0)*euler(-0.2*i,0,-0.6)
458
RW.C0=cf(1.5,0.5,0)*euler(1.57*i,0,0.6+0.4*i)
459
end
460
for i=0,1,0.1 do
461
wait()
462
MagicBlock(BrickColor.new("White"),RightArm.CFrame*cf(0,-2.5,0),0.5,0.5,0.5,0.6,0.6,0.6)
463
end
464
vel.Parent=nil
465
wait(0.5)
466
if ArmHit==false then
467
armcon:disconnect()
468
if Anim=="Idle" then
469
for i=0,1,0.1 do
470
wait()
471
Neck.C0=necko*euler(0,0,-1+1*i)
472
RootJoint.C0=RootCF*euler(0,0,1-1*i)
473
LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.4*i,1.57*i,-0.6+0.6*i)
474
LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0) 
475
RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,1-1.2*i)
476
end
477
end
478
end
479
attack=false
480
end
481
 
482
function Electra()
483
attack=true
484
Mode="Electra"
485
Anim="Switching"
486
for i=0,1,0.1 do
487
wait()
488
LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.4*i,1.57-1.57*i,-0.2*i)
489
LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0) 
490
RW.C0=cf(1.5,0.5,0)*euler(0.1-0.3*i,0,-0.2+0.4*i)
491
RootJoint.C0=RootCF*cf(0,2*i,0)*euler(0,0,0)
492
end
493
wait(1)
494
attack=false
495
end
496
 
497
function Normal()
498
attack=true
499
Mode="Normal"
500
RootJoint.C0=RootCF
501
wait(1)
502
attack=false
503
end
504
 
505
function MakeCube()
506
attack=true
507
for i=0,1,0.1 do
508
wait()
509
MagicBlock(BrickColor.new("White"),Torso.CFrame*cf(0,0.5,-2),0.5,0.5,0.5,0.3,0.3,0.3)
510
ElecEffect(Torso.CFrame*cf(0,0.5,-2),1,1,1)
511
Neck.C0=necko*euler(0.1*i,0,0)
512
LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.27*i,1.57-1.57*i,0.4*i)
513
LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0) 
514
RW.C0=cf(1.5,0.5,0)*euler(0.1+1.37*i,0,-0.2-0.2*i)
515
end
516
numb=2
517
for i=0,1,0.1 do
518
MagicBlock(BrickColor.new("White"),Torso.CFrame*cf(0,0.5,-2),0.5,0.5,0.5,0.3,0.3,0.3)
519
ElecEffect(Torso.CFrame*cf(0,0.5,-2),1,1,1)
520
Neck.C0=necko*euler(0.1+0.1*(i*numb),0,0)
521
LW.C0=cf(-1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,0.4+0.1*(i*numb))
522
RW.C0=cf(1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,-0.4-0.1*(i*numb))
523
numb=numb-0.1
524
wait()
525
end
526
NewCube()
527
wait(0.5)
528
for i=0,1,0.1 do
529
wait()
530
Neck.C0=necko*euler(0.2-0.2*i,0,0)
531
LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.37*i,1.57*i,0.5-0.5*i)
532
LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0) 
533
RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,-0.5+0.3*i)
534
end
535
Neck.C0=necko
536
attack=false
537
end
538
 
539
function GetCube()
540
if MMouse.Target.Name=="Cube Vertex2" and MMouse.Target.Parent:findFirstChild("Cube Vertex1")~=nil then
541
attack=true
542
throwcube=false
543
print("GOT CUBE")
544
mainpart=MMouse.Target
545
coroutine.resume(coroutine.create(function(Model)
546
while holdz==true do
547
wait()
548
Model["Cube Vertex1"].CFrame=Torso.CFrame*cf(0,0.5,-2)
549
end
550
end),mainpart.Parent)
551
for i=0,1,0.1 do
552
wait()
553
ElecEffect(Torso.CFrame*cf(0,0.5,-2),1,1,1)
554
Neck.C0=necko*euler(0.1*i,0,0)
555
LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.27*i,1.57-1.57*i,0.4*i)
556
LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0) 
557
RW.C0=cf(1.5,0.5,0)*euler(0.1+1.37*i,0,-0.2-0.2*i)
558
end
559
while holdz==true do
560
wait()
561
ElecEffect(Torso.CFrame*cf(0,0.5,-2),1,1,1)
562
end
563
if throwcube==false then
564
for i=0,1,0.1 do
565
wait()
566
Neck.C0=necko*euler(0.1-0.1*i,0,0)
567
LW.C0=cf(-1.5,0.5,0)*euler(1.47-1.27*i,1.57*i,0.4-0.4*i)
568
LW.C1=cf(0, 0.5, 0)*euler(0.2*i,0,0) 
569
RW.C0=cf(1.5,0.5,0)*euler(1.47-1.37*i,0,-0.4+0.4*i)
570
end
571
end
572
attack=false
573
end
574
end
575
 
576
function ThrowCube()
577
attack=true
578
print(mainpart)
579
Main=mainpart.Parent["Cube Vertex1"]
580
CF=Main.CFrame
581
for i=0,20 do
582
wait()
583
Main.CFrame=CF*cf(0,0,-i)
584
end
585
numb=1
586
for i=0,1,0.1 do
587
wait()
588
Main.CFrame=CF*cf(0,0,-20-10*(i*numb))
589
numb=numb-0.05
590
end
591
attack=false
592
end
593
 
594
function Apocalypse()
595
attack=true
596
c=workspace:children()
597
for i=1,#c do
598
if c[i].Name=="Cube" then
599
coroutine.resume(coroutine.create(function(Model)
600
while Model.Parent~=nil do
601
MagicBlock(BrickColor.new("White"),Model["Cube Vertex2"].CFrame,0.5,0.5,0.5,0.4,0.4,0.4)
602
wait()
603
end
604
end),c[i])
605
end
606
end
607
for i=0,1,0.2 do
608
wait()
609
LW.C0=cf(-1.5+0.5*i,0.5,-0.5*i)*euler(0.2+0.2*i,1.57-1.57*i,0.6*i)
610
LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0) 
611
RW.C0=cf(1.5-0.5*i,0.5,-0.5*i)*euler(0.1+0.3*i,0,-0.2-0.4*i)
612
end
613
numb=2
614
for i=0,1,0.1 do
615
wait()
616
Neck.C0=necko*euler(0.1*(i*numb),0,0)
617
LW.C0=cf(-1,0.5,-0.5)*euler(0.4+0.2*(i*numb),0,0.6+0.4*(i*numb))
618
RW.C0=cf(1,0.5,-0.5)*euler(0.4+0.2*(i*numb),0,-0.6-0.4*(i*numb))
619
numb=numb-0.1
620
end
621
c3=workspace:children()
622
for i=1,#c3 do
623
if c3[i].Name=="Cube" then
624
CubeMod=c3[i]
625
for i=1,2 do
626
MagicRing(BrickColor.new("White"),CubeMod["Cube Vertex2"].CFrame,1,1,1,math.random(-50,50),math.random(-50,50),math.random(-50,50),0.8,0.8,0.8)
627
MagicCircle(BrickColor.new("Blue"),CubeMod["Cube Vertex2"].CFrame,1,1,1,2,2,2,0.05)
628
end
629
local c2=game.Workspace:GetChildren()
630
for i=1,#c2 do
631
local hum=c2[i]:findFirstChild("Humanoid")
632
if hum~=nil and hum.Health~=0 then
633
local head=c2[i]:findFirstChild("Head")
634
if head~=nil then
635
local targ=head.Position - CubeMod["Cube Vertex2"].Position
636
local mag=targ.magnitude
637
if mag<=10 and c2[i].Name~=Player.Name then 
638
attackdebounce=false
639
Damagefunc1(head,20,40,0)
640
end
641
end
642
end
643
end
644
CubeMod:Destroy()
645
end
646
end
647
for i=0,1,0.2 do
648
wait()
649
Neck.C0=necko*euler(0.1+0.05*i,0,0)
650
LW.C0=cf(-1-0.5*i,0.5,-0.5+0.5*i)*euler(0.6+0.87*i,0,1-2.47*i)
651
RW.C0=cf(1+0.5*i,0.5,-0.5+0.5*i)*euler(0.6+0.87*i,0,-1+2.47*i)
652
end
653
numb=2
654
for i=0,1,0.1 do
655
wait()
656
Neck.C0=necko*euler(0.15+0.05*i,0,0)
657
LW.C0=cf(-1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,-1.47-0.1*(i*numb))
658
RW.C0=cf(1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,1.47+0.1*(i*numb))
659
numb=numb-0.1
660
end
661
for i=0,1,0.1 do
662
wait()
663
Neck.C0=necko*euler(0.2-0.2*i,0,0)
664
LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.37*i,1.57*i,-1.57+1.57*i)
665
LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0) 
666
RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,1.57-1.37*i)
667
end
668
attack=false
669
end
670
 
671
function NewCube()
672
Cube=Instance.new("Model")
673
Cube.Parent=workspace
674
Cube.Name="Cube"
675
local cubevertex=part(3,Cube,0,0.6,BrickColor.new("White"),"Cube Vertex1",vt(1,1,1))
676
cubevertex.Anchored=true
677
cubevertex.CFrame=Torso.CFrame*cf(0,0.5,-2)
678
cubevertexmsh=mesh("SpecialMesh",cubevertex,"Sphere","",vt(0,0,0),vt(0.3,0.3,0.3))
679
local cube=part(3,Cube,0,0.3,BrickColor.new("Bright blue"),"Cube Vertex2",vt(1,1,1))
680
cube.CFrame=Torso.CFrame
681
cubemsh=mesh("BlockMesh",cube,"","",vt(0,0,0),vt(0.7,0.7,0.7))
682
local actualcube=part(3,Cube,0,0.2,BrickColor.new("White"),"Cube",vt(1,1,1))
683
actualcube.CFrame=Torso.CFrame
684
actualcubemsh=mesh("SpecialMesh",actualcube,"Sphere","",vt(0,0,0),vt(0.4,0.4,0.4))
685
local cubewld=weld(actualcube,actualcube,cube,cf(0,0,0))
686
local spark=Instance.new("Sparkles")
687
spark.Parent=cube
688
spark.Color=Color3.new(0,0,255)
689
spark.Enabled=true
690
coroutine.resume(coroutine.create(function(Part,Weld)
691
numb1=0
692
numb2=0
693
numb3=0
694
while Part.Parent~=nil do
695
wait()
696
Weld.C0=Weld.C0*angles(numb1,numb2,numb3)
697
numb1=math.pi/math.random(10,20)
698
numb2=math.pi/math.random(20,30)
699
numb3=math.pi/math.random(20,30)
700
end
701
end),actualcube,cubewld)
702
prop=Instance.new("RocketPropulsion")
703
prop.MaxSpeed=5000
704
prop.CartoonFactor=0
705
prop.MaxThrust=10000
706
prop.Parent=cube
707
prop.Target=cubevertex
708
prop.ThrustD=1.5
709
prop.TurnD=0
710
prop.TurnP=0
711
print(prop.ThrustD)
712
prop:Fire()
713
end
714
 
715
function rayCast(Pos, Dir, Max, Ignore)  -- Origin Position , Direction, MaxDistance , IgnoreDescendants
716
return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) 
717
end 
718
 
719
function Lightning(p0,p1,tym,ofs,col,th,tra)
720
local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
721
for i=1,tym do 
722
local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true  li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col)
723
li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(th,th,magz/tym) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) 
724
light1=Instance.new("PointLight")
725
light1.Brightness=.8
726
light1.Color=Color3.new(.2,255,.2)
727
light1.Range=8
728
light1.Parent=li
729
local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
730
if tym == i then 
731
local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
732
li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
733
else
734
li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2)
735
end
736
curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,.4)
737
end
738
end
739
 
740
function ElecEffect(cff,x,y,z)
741
local prt=part(3,workspace,0,0,BrickColor.new("White"),"Part",vt(1,1,1))
742
prt.Anchored=true
743
xval=math.random()
744
yval=math.random()
745
zval=math.random()
746
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(xval,yval,zval))
747
coroutine.resume(coroutine.create(function(Part,Mesh,Frame,xvaal,yvaal,zvaal)
748
Part.CFrame=Frame*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
749
for i=1,8 do
750
wait()
751
xvaal=xvaal-0.1
752
yvaal=yvaal-0.1
753
zvaal=zvaal-0.1
754
Mesh.Scale=vt(xvaal,yvaal,zvaal)
755
Part.Transparency=Part.Transparency+0.09
756
end
757
Part.Parent=nil
758
end),prt,msh,cff,xval,yval,zval)
759
end
760
 
761
function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3)
762
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
763
prt.Anchored=true
764
prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
765
local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
766
coroutine.resume(coroutine.create(function(Part,Mesh) 
767
for i=0,1,0.1 do
768
wait()
769
Part.CFrame=Part.CFrame
770
Part.Transparency=i
771
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
772
end
773
Part.Parent=nil
774
end),prt,msh)
775
end
776
 
777
function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
778
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
779
prt.Anchored=true
780
prt.CFrame=cframe
781
local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
782
coroutine.resume(coroutine.create(function(Part,Mesh) 
783
for i=0,1,delay do
784
wait()
785
Part.CFrame=Part.CFrame
786
Part.Transparency=i
787
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
788
end
789
Part.Parent=nil
790
end),prt,msh)
791
end
792
 
793
function MagicRing(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
794
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
795
prt.Anchored=true
796
prt.CFrame=cframe*euler(x2,y2,z2)
797
local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
798
coroutine.resume(coroutine.create(function(Part,Mesh) 
799
for i=0,1,0.03 do
800
wait()
801
Part.CFrame=Part.CFrame
802
Part.Transparency=i
803
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
804
end
805
Part.Parent=nil
806
end),prt,msh)
807
end
808
 
809
so = function(id,par,vol,pit) 
810
coroutine.resume(coroutine.create(function()
811
local sou = Instance.new("Sound",par or workspace)
812
sou.Volume=vol
813
sou.Pitch=pit or 1
814
sou.SoundId=id
815
wait() 
816
sou:play() 
817
wait(6) 
818
sou:Remove() 
819
end))
820
end
821
 
822
function findNearestTorso(pos)
823
        local list = game:service("Workspace"):children()
824
        local torso = nil
825
        local dist = 50
826
        local temp = nil
827
        local human = nil
828
        local temp2 = nil
829
        for x = 1, #list do
830
                temp2 = list[x]
831
                if (temp2.className == "Model") and (temp2 ~= Character) and (temp2.Name ~= "Fenrier") then
832
                        temp = temp2:findFirstChild("Torso")
833
                        human = temp2:findFirstChild("Humanoid")
834
                        if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
835
                                if (temp.Position - pos).magnitude < dist then
836
                                        torso = temp
837
                                        dist = (temp.Position - pos).magnitude
838
                                end
839
                        end
840
                end
841
        end
842
        return torso
843
end
844
 
845
Damagefunc1=function(hit,minim,maxim,Knockback)
846
        if hit.Parent==nil then
847
                return
848
        end
849
        CPlayer=Bin 
850
        h=hit.Parent:FindFirstChild("Humanoid")
851
        if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
852
        if attackdebounce == false then 
853
        attackdebounce = true 
854
        coroutine.resume(coroutine.create(function() 
855
        wait(0.2) 
856
        attackdebounce = false 
857
        end)) 
858
--[[                if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
859
                        return
860
                end]]
861
--                        hs(hit,1.2) 
862
                        c=Instance.new("ObjectValue")
863
                        c.Name="creator"
864
                        c.Value=game:service("Players").LocalPlayer
865
                        c.Parent=h
866
                        game:GetService("Debris"):AddItem(c,.5)
867
                Damage=math.random(minim,maxim)
868
--                h:TakeDamage(Damage)
869
                blocked=false
870
                block=hit.Parent:findFirstChild("Block")
871
                if block~=nil then
872
                print("herp")
873
                if block.Value>0 then
874
                blocked=true
875
                block.Value=block.Value-1
876
                print(block.Value)
877
                end
878
                end
879
                if blocked==false then
880
--                h:TakeDamage(Damage)
881
                h.Health=h.Health-Damage
882
                showDamage(hit.Parent,Damage,.5,BrickColor:Red())
883
                else
884
                h.Health=h.Health-(Damage/2)
885
                showDamage(hit.Parent,1,.5,BrickColor.new("Bright blue"))
886
                end
887
                vp=Instance.new("BodyVelocity")
888
                vp.P=500
889
                vp.maxForce=Vector3.new(math.huge,0,math.huge)
890
--                vp.velocity=Character.Torso.CFrame.lookVector*Knockback
891
                vp.velocity=Head.CFrame.lookVector*Knockback+Head.Velocity/1.05
892
                if Knockback>0 then
893
                        vp.Parent=hit.Parent.Torso
894
                end
895
                game:GetService("Debris"):AddItem(vp,.25)
896
                                c=Instance.new("ObjectValue")
897
                        c.Name="creator"
898
                        c.Value=Player
899
                        c.Parent=h
900
                        game:GetService("Debris"):AddItem(c,.5)
901
                CRIT=false
902
                hitDeb=true
903
                AttackPos=6
904
        end
905
        end 
906
end
907
 
908
showDamage=function(Char,Dealt,du,Color)
909
        m=Instance.new("Model")
910
        m.Name=tostring(Dealt)
911
        h=Instance.new("Humanoid")
912
        h.Health=0
913
        h.MaxHealth=0
914
        h.Parent=m
915
        c=Instance.new("Part")
916
        c.Transparency=0
917
        c.BrickColor=Color
918
        c.Name="Head"
919
        c.TopSurface=0
920
        c.BottomSurface=0
921
        c.formFactor="Plate"
922
        c.Size=Vector3.new(1,.4,1)
923
        ms=Instance.new("CylinderMesh")
924
        ms.Scale=Vector3.new(.8,.8,.8)
925
        if CRIT==true then
926
                ms.Scale=Vector3.new(1,1.25,1)
927
        end
928
        ms.Parent=c
929
        c.Reflectance=0
930
        Instance.new("BodyGyro").Parent=c
931
        c.Parent=m
932
        c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
933
        f=Instance.new("BodyPosition")
934
        f.P=2000
935
        f.D=100
936
        f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
937
        f.position=c.Position+Vector3.new(0,3,0)
938
        f.Parent=c
939
        game:GetService("Debris"):AddItem(m,.5+du)
940
        c.CanCollide=false
941
        m.Parent=workspace
942
        c.CanCollide=false
943
end
944
 
945
function ob1d(mouse) 
946
if holdz==true then
947
throwcube=true
948
holdz=false
949
ThrowCube()
950
return end
951
if attack == true then return end 
952
hold=true
953
if combo==0 then
954
combo=1
955
attackone()
956
elseif combo==1 then
957
combo=2
958
attacktwo()
959
elseif combo==2 then
960
combo=3
961
attackthree()
962
end
963
coroutine.resume(coroutine.create(function() 
964
wait(0.5)
965
if attack==false then
966
combo=0
967
Neck.C0=necko
968
RootJoint.C0=RootCF
969
LW.C0=cf(-1.5,0.5,0)*euler(0.2,1.57,0)
970
LW.C1=cf(0, 0.5, 0)*euler(-0.2,0,0) 
971
RW.C0=cf(1.5,0.5,0)*euler(0.1,0,-0.2)
972
end
973
end))
974
end 
975
 
976
function ob1u(mouse) 
977
hold = false 
978
end 
979
 
980
buttonhold = false 
981
holdz=false
982
 
983
eul=0
984
function key(key) 
985
if attack == true then return end 
986
--[[if key=="f" then
987
if Mode=="Normal" then
988
Electra()
989
elseif Mode=="Electra" then
990
Normal()
991
end
992
end]]--
993
if key=="q" then
994
Apocalypse()
995
end
996
if key=="f" then
997
print("YUNO")
998
MakeCube()
999
end
1000
if key=="z" then
1001
holdz=true
1002
GetCube()
1003
end
1004
end 
1005
 
1006
function key2(key) 
1007
if key=="z" then
1008
holdz=false
1009
end
1010
end 
1011
 
1012
function s(mouse) 
1013
mouse.Button1Down:connect(function() ob1d(mouse) end) 
1014
mouse.Button1Up:connect(function() ob1u(mouse) end) 
1015
mouse.KeyDown:connect(key) 
1016
mouse.KeyUp:connect(key2) 
1017
unsheathed = true 
1018
player = Player 
1019
ch = Character 
1020
MMouse = mouse 
1021
RSH = ch.Torso["Right Shoulder"] 
1022
LSH = ch.Torso["Left Shoulder"] 
1023
-- 
1024
RSH.Parent = nil 
1025
LSH.Parent = nil 
1026
-- 
1027
RW.Part0 = ch.Torso 
1028
RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) 
1029
RW.C1 = CFrame.new(0, 0.5, 0) 
1030
RW.Part1 = ch["Right Arm"] 
1031
RW.Parent = ch.Torso 
1032
--_G.R = RW 
1033
-- 
1034
LW.Part0 = ch.Torso 
1035
LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) 
1036
LW.C1 = CFrame.new(0, 0.5, 0) 
1037
LW.Part1 = ch["Left Arm"] 
1038
LW.Parent = ch.Torso 
1039
--_G.L = LW 
1040
--
1041
equipanim() 
1042
end 
1043
 
1044
function ds(mouse) 
1045
hideanim() 
1046
wait(0) 
1047
RW.Parent = nil 
1048
LW.Parent = nil 
1049
RSH.Parent = player.Character.Torso 
1050
LSH.Parent = player.Character.Torso 
1051
end 
1052
 
1053
Bin.Selected:connect(s) 
1054
Bin.Deselected:connect(ds) 
1055
Humanoid.Died:connect(function() 
1056
c=workspace:children()
1057
for i=1,#c do
1058
if c[i].Name=="Cube" then
1059
c[i]:Remove()
1060
end
1061
end
1062
end)
1063
--[[function onRunning(speed)
1064
if attack==true then return end
1065
        if speed>0 then 
1066
walking = true 
1067
for i = 0,1,0.1 do 
1068
wait() 
1069
LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.4*i,1.57,0)
1070
end
1071
        else 
1072
walking = false 
1073
for i = 0,1,0.1 do 
1074
wait() 
1075
LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.4*i,1.57,0)
1076
end
1077
        end  
1078
end
1079
Character.Humanoid.Running:connect(onRunning) ]]
1080
Anim="Idle"
1081
walkoffset1=0
1082
walkoffset2=0
1083
Switching=false
1084
while true do
1085
wait()
1086
if Mode=="Normal" then
1087
        local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude 
1088
        if RootPart.Velocity.y > 2 then 
1089
        if Anim~="Jump" then
1090
        Anim="Jump"
1091
coroutine.resume(coroutine.create(function()
1092
for i=0,1,0.2 do
1093
wait()
1094
LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.6*i,1.57-1.57*i,0)
1095
LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0) 
1096
RW.C0=cf(1.5,0.5,0)*euler(0.1-0.1*i,0,-0.2)
1097
end
1098
end))
1099
        end
1100
        elseif RootPart.Velocity.y < -2 then 
1101
        if Anim~="Fall" then
1102
        Anim="Fall"
1103
coroutine.resume(coroutine.create(function()
1104
for i=0,1,0.2 do
1105
wait()
1106
LW.C0=cf(-1.5,0.5,0)*euler(-0.4+2.8*i,0,0)
1107
RW.C0=cf(1.5,0.5,0)*euler(0,0,-0.2)
1108
end
1109
end))
1110
        end
1111
        elseif torvel < 1 then 
1112
        if Anim~="Idle" then
1113
        Anim="Idle"
1114
coroutine.resume(coroutine.create(function()
1115
wait(0.1)
1116
while Switching==true do
1117
wait()
1118
end
1119
while Anim=="Idle" do
1120
for i = 0,1,0.02 do 
1121
if Anim=="Idle" and attack==false then
1122
wait() 
1123
LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.1*i,1.57-0.05*i,0)
1124
RW.C0=cf(1.5,0.5-0.1*i,0)*euler(0.1+0.1*i,0,-0.2)
1125
end
1126
end
1127
for i = 0,1,0.02 do 
1128
if Anim=="Idle" and attack==false then
1129
wait() 
1130
LW.C0=cf(-1.5,0.5,0)*euler(0.1+0.1*i,1.52+0.05*i,0)
1131
RW.C0=cf(1.5,0.4+0.1*i,0)*euler(0.2-0.1*i,0,-0.2)
1132
end
1133
end
1134
wait(0)
1135
end
1136
if Anim=="Walk" and attack==false then
1137
print("Switch to Walk")
1138
Switching=true
1139
walkoffset1=0
1140
walkoffset2=0
1141
for i=0,1,0.15 do
1142
wait()
1143
walkoffset1=0.2+0.8*i
1144
walkoffset2=0.1-0.9*i
1145
LW.C0=cf(-1.5,0.5,0)*euler(walkoffset1,1.57-1.57*i,0)
1146
LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0) 
1147
RW.C0=cf(1.5,0.5,0)*euler(walkoffset2,0,-0.2+0.2*i)
1148
end
1149
Switching=false
1150
elseif Anim=="Run" and attack==false then
1151
print("Switch to Run")
1152
Switching=true
1153
for i=0,1,0.1 do
1154
wait()
1155
if Anim=="Run" and attack==false then
1156
print("runnin")
1157
RootJoint.C0=RootCF*euler(0.5*i,0,0)
1158
Neck.C0=necko*euler(-0.3*i,0,0)
1159
LW.C0=cf(-1.5,0.5,0)*euler(0.2-1.2*i,1.57-1.57*i,0)
1160
LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0) 
1161
RW.C0=cf(1.5,0.5,0)*euler(0.1-1.1*i,0,-0.2+0.2*i)
1162
end
1163
end
1164
Switching=false
1165
end
1166
end))
1167
        end
1168
        elseif torvel < 19 then 
1169
        if Anim~="Walk" then
1170
        Anim="Walk"
1171
coroutine.resume(coroutine.create(function()
1172
wait(0.1)
1173
while Switching==true do
1174
wait()
1175
end
1176
while Anim=="Walk" do
1177
for i=0,1,0.15 do
1178
if Anim=="Walk" and attack==false then
1179
wait()
1180
walkoffset1=1-2*i
1181
walkoffset2=-1+2*i
1182
LW.C0=cf(-1.5,0.5,0)*euler(walkoffset1,0,0)
1183
RW.C0=cf(1.5,0.5,0)*euler(walkoffset2,0,0)
1184
end
1185
end
1186
for i=0,1,0.15 do
1187
if Anim=="Walk" and attack==false then
1188
wait()
1189
walkoffset1=-1+2*i
1190
walkoffset2=1-2*i
1191
LW.C0=cf(-1.5,0.5,0)*euler(walkoffset1,0,0)
1192
RW.C0=cf(1.5,0.5,0)*euler(walkoffset2,0,0)
1193
end
1194
end
1195
wait(0)
1196
end
1197
if Anim=="Idle" and attack==false then
1198
print("Switch to Idle")
1199
Switching=true
1200
for i=0,1,0.1 do
1201
wait()
1202
if Anim=="Idle" and attack==false then
1203
LW.C0=cf(-1.5,0.5,0)*euler((walkoffset1-walkoffset1*i)+(0.2*i),1.57*i,0)
1204
LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0) 
1205
RW.C0=cf(1.5,0.5,0)*euler((walkoffset2-walkoffset2*i)+(0.1*i),0,-0.2*i)
1206
end
1207
end
1208
walkoffset1=0
1209
walkoffset2=0
1210
Switching=false
1211
end
1212
end))
1213
        end
1214
        elseif torvel >= 30 then 
1215
        if Anim~="Run" then
1216
        Anim="Run"
1217
coroutine.resume(coroutine.create(function()
1218
while Anim=="Run" do
1219
wait()
1220
if Anim=="Run" and attack==false then
1221
LW.C0=cf(-1.5,0.5,0)*euler(-1,0,0)
1222
LW.C1=cf(0, 0.5, 0)*euler(0,0,0) 
1223
RW.C0=cf(1.5,0.5,0)*euler(-1,0,0)
1224
end
1225
end
1226
if Anim=="Idle" and attack==false then
1227
print("Switch to Idle")
1228
Switching=true
1229
for i=0,1,0.1 do
1230
wait()
1231
RootJoint.C0=RootCF*euler(0.5-0.5*i,0,0)
1232
Neck.C0=necko*euler(-0.3+0.3*i,0,0)
1233
LW.C0=cf(-1.5,0.5,0)*euler(-1+1.2*i,1.57*i,0)
1234
LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0) 
1235
RW.C0=cf(1.5,0.5,0)*euler(-1+1.1*i,0,-0.2*i)
1236
end
1237
Switching=false
1238
end
1239
end))
1240
        end 
1241
        end
1242
elseif Mode=="Electra" then
1243
end
1244
end
1245
print("Mechanic Gauntlets loaded.")
1246
 
1247
--[[ 
1248
Copyrighted (C) Fenrier 2014
1249
]]