View difference between Paste ID: nqYAp9SL and V3tRHcF6
SHOW: | | - or go back to the newest paste.
1
name = 'Epic Staff'
2
PLAYERS = game:GetService('Players')
3
ply = PLAYERS.LocalPlayer
4
char = ply.Character
5
pcall(function() char:FindFirstChild("legetdgq"):Remove() end)
6
m = Instance.new("Model",char) m.Name = "XxbudlimitedsxX"
7
hop = Instance.new("HopperBin",ply.Backpack)
8
hop.Name = name
9
debris = game:GetService("Debris")
10
11
cfn,ang,v3n,ud2n,V2 = CFrame.new,CFrame.Angles,Vector3.new,UDim2.new,Vector2.new
12
floatforce = 196.25
13
14
torso,head = char.Torso,char.Head
15
attacking = false
16
17
rs = torso["Right Shoulder"]
18
ls = torso["Left Shoulder"]
19
rh = torso["Right Hip"]
20
lh = torso["Left Hip"]
21
neck = torso["Neck"]
22
rw,lw = nil,nil
23
rhw,lhw = nil,nil
24
local orgc1 = rs.C1
25
26
rarm = char["Right Arm"]
27
larm = char["Left Arm"]
28
rleg = char["Right Leg"]
29
lleg = char["Left Leg"]
30
31
normposr = cfn(1.5,.5,0)
32
normposl = cfn(-1.5,.5,0)
33
normposl2 = cfn(.5,-1.5,0)
34
normposr2 = cfn(-.5,-1.5,0)
35
normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)
36
37
holdpos = normposr*ang(math.pi/2,0,0)
38
holdpos2 = normposl*ang(math.pi/2,0,0)
39
40
--------UTILITIES START-------
41
function genNew(ClassName, Parent, Properties)
42
        local nObj = Instance.new(ClassName, Parent)
43
        if Properties["FormFactor"] then
44
                nObj["FormFactor"] = Properties["FormFactor"]
45
        end
46
        for Prop, Value in pairs(Properties) do
47
                nObj[Prop] = Value
48
        end
49
        return nObj
50
end
51
52
T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee)
53
		if typee == 'wedge' then
54
			c = Instance.new("WedgePart",m)
55
			elseif typee == 'seat' then
56
				c = Instance.new("Seat",m)
57
			elseif typee == 'vseat' then
58
				c = Instance.new("VehicleSeat",m)
59
			else
60
				c = Instance.new("Part",m)
61
		end
62
		c.TopSurface,c.BottomSurface = 0,0
63
		c.Locked = true
64
		c.formFactor = "Custom"
65
		c.Size = Vector3.new(x,y,z)
66
		if color ~= "random" then
67
			c.BrickColor = BrickColor.new(color)
68
			else c.BrickColor = BrickColor:random()
69
		end
70
		c.Transparency = transparency
71
		c.CanCollide = cancollide
72
		if anchored ~= nil then c.Anchored = anchored end
73
		if parent ~= nil then c.Parent = parent end
74
		return c
75
	end
76
	,
77
	["C"] = function(func) coroutine.resume(coroutine.create(func)) end
78
	,
79
	["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent)
80
		w = Instance.new("Motor",m)
81
		if parent ~= nil then w.Parent = parent end
82
		w.Part0,w.Part1 = part0,part1
83
		w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
84
		return w
85
	end
86
	,
87
	["BG"] = function(parent)
88
		local c = Instance.new("BodyGyro",parent)
89
		c.P = 20e+003
90
		c.cframe = parent.CFrame
91
		c.maxTorque = Vector3.new(c.P,c.P,c.P)
92
		return c
93
		end
94
	,
95
	["BP"] = function(parent,position)
96
		local bp = Instance.new("BodyPosition",parent)
97
		bp.maxForce = Vector3.new()*math.huge
98
		bp.position = position
99
		return bp
100
	end
101
	,
102
	["F"] = function(parent,size,heat,color,secondcolor,enabled)
103
		f = Instance.new("Fire",parent)
104
		f.Size = size
105
		f.Heat = heat
106
		if enabled ~= nil then f.Enabled = enabled end
107
		if color ~= nil then f.Color = BrickColor.new(color).Color end
108
		if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
109
		return f
110
	end
111
	,
112
113
	["FM"] = function(parent,meshid,x,y,z,meshtexture)
114
		if meshid == "cylinder" then
115
			mesh = Instance.new("CylinderMesh",parent)
116
			mesh.Scale = Vector3.new(x,y,z)
117
			return mesh
118
		elseif meshid == 'block' then
119
			mesh = Instance.new("BlockMesh",parent)
120
			mesh.Scale = Vector3.new(x,y,z)
121
			return mesh
122
		end
123
		mesh = Instance.new("SpecialMesh",parent)
124
125
		if meshid == 'wedge' then
126
			mesh.MeshType = 'Wedge'
127
		elseif meshid == 'sphere' then
128
			mesh.MeshType = 3
129
		elseif type(meshid) == "number" then
130
			mesh.MeshId = "rbxassetid://"..meshid
131
		else
132
			mesh.MeshId = "rbxassetid://"..meshids[meshid]
133
		end
134
		mesh.Scale = Vector3.new(x,y,z)
135
		if meshtexture then
136
			if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
137
			mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
138
		end
139
		return mesh
140
	end,
141
142
	["Dec"] = function(parent,face,id,transparency)
143
		c = Instance.new("Decal",parent)
144
		c.Face = face
145
		c.Texture = id
146
		if transparency then c.Transparency = transparency end
147
		return c
148
	end,
149
	["S"] = function(id,pitch,volume,parent)
150
		cur = nil
151
		found = false
152
		if type(id) == 'string' then
153
			for i,v in pairs(char.Head:children()) do
154
				if v:IsA("Sound") and v.Name == id and not found then
155
					cur = v
156
					if parent then cur = v:Clone() cur.Parent = parent end
157
					cur.Pitch = pitch
158
					if volume then cur.Volume = volume end
159
					cur:Play()
160
					found = true
161
					return cur
162
				end
163
			end
164
		elseif type(id) == 'number' then
165
			local a = char.Head:FindFirstChild('exteo')
166
			a.SoundId = 'rbxassetid://'..id
167
			a.Pitch = pitch
168
			if volume then a.Volume = volume end
169
			a:Play()
170
			return a
171
		end
172
	end
173
}
174
function FindHumanoid(a,b)
175
	for i,v in pairs(a:children()) do
176
		if v:IsA('Humanoid') then
177
			if not b then
178
				if v.Parent ~= char then return v end
179
			else return v end
180
		end
181
	end
182
end
183
function damage(hit,amount,delay) ---- VAHINKO DAMAGE
184
hum = FindHumanoid(hit)
185
	if hum then
186
		if delay then
187
			local found = CheckTag(hum,'tag')
188
			if not found then
189
				local a = AddTag(hum,'tag')
190
				debris:AddItem(a,delay)
191
				hum.Health = hum.Health - amount
192
			end
193
		else hum.Health = hum.Health - amount
194
		end
195
		return hum
196
	end
197
end
198
199
rtorso = torso
200
201
lock = {["R"] =
202
	function(a)
203
		if a == 1 then
204
			rabrick = T.P(1,1,1,"White",1,false,false)
205
			rw = T.W(rabrick,rtorso,1.5,.5,0,0,0,0)
206
			T.W(rarm,rabrick,0,-.5,0,0,0,0)
207
		elseif a == 2 then
208
			rlbrick = T.P(1,1,1,"White",1,false,false)
209
			rhw = T.W(rlbrick,rtorso,-.5,-1.5,0,0,0,0)
210
			T.W(rleg,rlbrick,0,-.5,0,0,0,0)
211
		elseif a == 0 then
212
			rs.Parent = rtorso
213
			rw.Parent = nil
214
			rabrick:Destroy() rabrick = nil
215
		elseif a == -1 then
216
			rhw.Parent = nil
217
			rh.Parent = rtorso
218
			rlbrick:Destroy() rlbrick = nil
219
		end
220
	end
221
	, ["L"] = function(a)
222
		if a == 1 then
223
			labrick = T.P(1,1,1,"White",1,false,false)
224
			lw = T.W(labrick,rtorso,-1.5,.5,0,0,0,0)
225
			T.W(larm,labrick,0,-.5,0,0,0,0)
226
		elseif a == 2 then
227
			llbrick = T.P(1,1,1,"White",1,false,false)
228
			lhw = T.W(llbrick,rtorso,.5,-1.5,0,0,0,0)
229
			T.W(lleg,llbrick,0,-.5,0,0,0,0)
230
		elseif a == 0 then
231
			ls.Parent = rtorso
232
			lw.Parent = nil
233
			labrick:Destroy() labrick = nil
234
		elseif a == -1 then
235
			lhw.Parent = nil
236
			lh.Parent = rtorso
237
			llbrick:Destroy() llbrick = nil
238
		end
239
	end
240
}
241
242
function spaas(position,radius,number,number2,color)
243
	mode = Instance.new("Model",m)
244
245
	for i = 1,number2 do
246
		pos = position+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
247
		mag = (position-pos).magnitude
248
249
		col = color or 'Toothpaste'
250
		local laz = T.P(.1,mag,.1,col,0,false,true,mode)
251
252
		T.FM(laz,'cylinder',.3,1,.3)
253
		laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
254
255
		cframe = (laz.CFrame*cfn(0,-mag/2,0)).p
256
		pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
257
		mag2 = (cframe-pos2).magnitude
258
		local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
259
		T.FM(laz2,'cylinder',.3,1,.3)
260
		laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
261
262
		previo = laz2
263
		for i = 1,number do
264
			cframe = (previo.CFrame*cfn(0,-mag/2,0)).p
265
			pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
266
			mag2 = (cframe-pos2).magnitude
267
268
			local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
269
			T.FM(laz2,'cylinder',.3,1,.3)
270
			laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
271
272
			previo = laz2
273
		end
274
275
	end
276
	debris:AddItem(mode,.1)
277
	return mode
278
end
279
function lightning(startpos,endpos,times,offse,livetime,col,dmg)
280
local curpos = startpos
281
for i = 1,times do
282
	mag = (startpos-endpos).magnitude offs = {-offse,offse}
283
	offset = v3n(offs[M.R(1,2)],offs[M.R(1,2)],offs[M.R(1,2)])
284
	laz = T.P(.1,.1,mag/times,col,0,false,true,m)
285
	if dmg then laz.Touched:connect(function(hit) damage(hit.Parent,dmg[1],dmg[2]) end) end
286
	apos = (cfn(curpos,endpos)*cfn(0,0,-mag/times)).p+offset
287
	if times == i then
288
		mag2 = (curpos-endpos).magnitude
289
		laz.Size = v3n(.1,.1,mag2)
290
		laz.CFrame = cfn(curpos,endpos)*cfn(0,0,-mag2/2)
291
	else
292
		laz.CFrame = cfn(curpos,apos)*cfn(0,0,-mag/times/2)
293
	end
294
	curpos = laz.CFrame*cfn(0,0,-mag/times/2).p debris:AddItem(laz,livetime)
295
end
296
end
297
------MESHIDS---
298
meshids = {["penguin"] = 15853464, ["ring"] = 3270017,
299
["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
300
["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
301
["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557,
302
["ramen"] = 19380188,["lightning"] = 72583597,["bullet"]=2697549,['cheese'] = 1090700,["pan"] = 24342877,["ketchup"] = 29690481,
303
["duck"] = 9419831,["unicorn"]=84003494}---some meshids
304
textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153,
305
["cheese"] = 1090703} 
306
soundids = {["bell"] = 20005706,["flintlock"] = 13510352,["falcon"] = 1387390,['sensa'] = 4700455,
307
['midas'] = 17385513;
308
['spark'] = 10756118;
309
['boom'] = 10730819;
310
['plank'] = 10548112;
311
['harmonica1'] = 33069371;
312
['harmonica2'] = 33069412;
313
['thump'] = 10730819;
314
['hit'] = 2801263;
315
['crunch'] = 15047813;
316
}
317
function AddTag(object,tagname)	local tag = Instance.new("BoolValue",object) tag.Name = tagname return tag end
318
function CheckTag(object,tagname) local found = object:FindFirstChild(tagname) if found then return found else return _ end end
319
function RemoveTag(object,tagname) local found = CheckTag(object,tagname) if found then found:Remove() end end
320
for i,v in pairs(soundids) do ---Remove sounds
321
	for _,q in pairs(char.Head:children()) do
322
		if q.Name == i then q:Remove() end
323
	end
324
end
325
for i,v in pairs(soundids) do ----Add sounds
326
sound = Instance.new("Sound")
327
sound.SoundId = "http://www.roblox.com/asset/?id="..v
328
sound.Name = i
329
sound.Parent = char.Head
330
end
331
genNew('Sound',char.Head,{
332
	Name = 'slash';
333
	SoundId = 'rbxasset://sounds//swordslash.wav'
334
})
335
336
waitbp = function(a,r) while (a.Parent.Position-a.position).magnitude > r do wait() end end
337
338
M = {["R"] = function(a,b) return math.random(a,b) end,
339
["Cos"] = function(a) return math.cos(a) end,
340
["Sin"] = function(a) return math.sin(a) end,
341
["D"] = function(a) return math.rad(a) end
342
}
343
344
function findground(position,radius,ignore)
345
	if ignore then
346
		ig = ignore table.insert(ig,m)
347
	else ig = {m}
348
	end
349
	local ray = Ray.new(position.p,position.p+(position.p-v3n(0,200,0)).unit*radius)
350
	local obj,pos2 = Workspace:FindPartOnRayWithIgnoreList(ray,ig)
351
	if obj and pos2 then return obj,pos2 else return nil end
352
end
353
rweld = _
354
faketorso = _
355
function faketor()
356
	if rtorso == torso then 
357
		torso.Transparency = 1
358
		faketorso = T.P(2,2,1,'White',0,false,false,char)
359
		rweld = T.W(faketorso,torso,0,0,0,0,0,0)
360
		rtorso = faketorso hw.Part1 = rtorso
361
		for i,v in pairs({lh,ls,rh,rs}) do v.Part0 = rtorso end
362
	elseif rtorso ~= torso then 
363
		rtorso = torso 
364
		for i,v in pairs({lh,ls,rh,rs}) do v.Part0 = rtorso end
365
		hw.Part1 = torso
366
		faketorso:Remove()
367
		rweld:Remove()
368
		torso.Transparency = 0
369
	end
370
371
end
372
373
function calcp(a,b) --- Direction CFrame
374
	return cfn(a,v3n(b.x,a.y,b.z))
375
end
376
377
function weldall(q) 
378
if q == 1 then a,b = 1,2 else a,b = -1,0 end
379
for i = a,b do lock.R(i) lock.L(i) end
380
end
381
		
382
function speak(a,b)
383
game:GetService('Chat'):Chat(p,a,b)
384
end
385
function FindPlayers(a,b,c) --- Finds Players near a part
386
list = {}
387
for _,v in pairs(Workspace:children()) do
388
	if v:IsA("Model") then
389
		for _,child in pairs(v:children()) do
390
			if child:IsA("Humanoid") then
391
				if c and child.Parent ~= char then
392
					if (a-child.Torso.Position).magnitude < b then
393
					table.insert(list,child.Parent)
394
					end
395
				elseif not c then
396
					if (a-child.Torso.Position).magnitude < b then
397
					table.insert(list,child.Parent)
398
					end
399
				end
400
			end
401
		end
402
	end
403
end
404
return list
405
end
406
--------UTILITIES END-------
407
Staff = Instance.new("Model",m)
408
409
hdl = T.P(.5,4,.5,'White',0,false,false,Staff)
410
T.FM(hdl,'cylinder',1,1,1)
411
hw = T.W(hdl,rtorso,0,0,.75,0,0,M.D(-45))
412
413
p = T.P(2,2,2,'Black',0,false,false,Staff) p.Shape = 0
414
T.W(p,hdl,0,3,0,0,0,0)
415
p2 = T.P(1,1,1,'White',0,false,false,Staff)
416
T.FM(p2,'crown',.9,.9,.9)
417
T.W(p2,hdl,0,2,.2,math.pi,0,0)
418
419
hat = T.P(1,1,1,'White',0,false,false,Staff)
420
T.FM(hat,49927327,1,1,1,'rainbow')
421
T.W(hat,p,0,1.4,0,0,0,0)
422
hat = T.P(1,1,1,'White',0,false,false,Staff)
423
T.FM(hat,22053998,1.2,1,1,'rainbow')
424
425
T.W(hat,p,0,.5,-.5,0,0,0)
426
p2 = T.P(.5,1.5,.4,'White',0,false,false,Staff)
427
T.FM(p2,'sphere',1,1,1)
428
T.W(p2,p,0,-1,-.75,0,0,0)
429
mouth = T.P(.5,.1,.1,'Nougat',0,false,false,Staff)
430
mouth_mesh = T.FM(mouth,'sphere',1,1,1)
431
mouth_weld = T.W(mouth,p,0,-.5,-.8,0,0,0) mouth_weld_normal = mouth_weld.C1
432
433
434
equipped = false
435
436
-----------ZOMBIE MAKER FUNCTION------------
437
function Exorcism()
438
pos = torso.Position+torso.CFrame.lookVector*3+v3n(0,-3,0)
439
440
person = Instance.new("Model",Workspace)
441
person.Name = 'Zombie'
442
443
----PARTS-------
444
local hed = T.P(1,1,1,'White',0,true,false,person) hed.Name = 'Head'
445
Instance.new("SpecialMesh",hed).Scale = v3n(1.25,1.25,1.25)
446
local tor = T.P(2,2,1,'White',0,true,false,person) tor.Name = 'Torso'
447
local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Left Arm'
448
q = T.W(ar,tor,-.5,0.5,0,0,math.pi/2,0,tor)
449
q.C0 = cfn(1,0.5,0)*ang(0,math.pi/2,0)
450
local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Right Arm'
451
q2 = T.W(ar,tor,.5,0.5,0,0,math.pi/2,0,tor)
452
q2.C0 = cfn(-1,0.5,0)*ang(0,math.pi/2,0)
453
454
local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Right Leg'
455
T.W(ar,tor,-.5,-2,0,0,0,0,tor) 
456
local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Left Leg'
457
T.W(ar,tor,.5,-2,0,0,0,0,tor)
458
459
T.W(hed,tor,0,1.5,0,0,0,0,tor)
460
461
----PARTS-------
462
463
q.MaxVelocity = .1
464
q.DesiredAngle = math.pi/2
465
q2.MaxVelocity = .1
466
q2.DesiredAngle = math.pi/2
467
468
local hum = Instance.new("Humanoid",person)
469
Instance.new("Skin",person).SkinColor = BrickColor.new('Earth green')
470
tor.CFrame = calcp(torso.Position+torso.CFrame.lookVector*5,torso.Position)
471
472
shirt = Instance.new('Shirt',person)
473
shirt.ShirtTemplate = 'http://www.roblox.com/asset/?id=79001892'
474
475
pants = Instance.new('Pants',person)
476
pants.PantsTemplate = 'http://www.roblox.com/asset/?id=79001892'
477
crown = T.P(1,1,1,'White',0,false,false)
478
T.FM(crown,1031410,1,1,1,1031417)
479
T.W(crown,hed,-.2,.85,0,0,0,M.D(20))
480
face = T.Dec(hed,'Front','http://www.roblox.com/asset/?id=65180938')
481
482
---DYING---
483
hum.Died:connect(function() wait(2) hum.Parent:Remove() end)
484
---DYING---
485
end
486
-----------ZOMBIE MAKER FUNCTION------------
487
488
489
function Equip()
490
	if not equipped then
491
		equipped = true
492
		hw.Part1 = rarm
493
		speak('At your service','Blue')
494
		hw.C1 = cfn(0,-1,0)*ang(-math.pi/2,0,0)
495
	elseif equipped then
496
		equipped = false
497
		hw.Part1 = rtorso
498
		hw.C1 = cfn(0,0,.75)*ang(0,0,M.D(-45))
499
	end
500
	normh = hw.C1
501
end
502
function Fly(mouse)
503
	bp = T.BP(torso,torso.Position)
504
	bg = T.BG(torso)
505
	holding = true
506
	lock.R(1) lock.L(1) 	lock.R(2) lock.L(2)
507
	rw.C1 = normposr*ang(0,0,M.D(30))
508
	lw.C1 = normposl*ang(0,0,M.D(-30))
509
	rhw.C1 = normposr2*ang(0,0,M.D(-30))*cfn(-.4,.1,0)
510
	lhw.C1 = normposl2*ang(0,0,M.D(30))*cfn(.4,.1,0)
511
	while holding do
512
		unit = (torso.Position-mouse.hit.p).unit
513
		bp.position = bp.position+unit*-5
514
		bg.cframe = cfn(torso.Position,mouse.hit.p)*ang(-math.pi/2,0,0)
515
		wait()
516
	end
517
	for i = -1,0 do lock.R(i) lock.L(i) end
518
	bp:Remove()
519
	bg:Remove()
520
end
521
522
function earthdragon(mouse)
523
local ground,_ = findground(torso.CFrame,10,{char})
524
local mag = (torso.Position-mouse.hit.p).magnitude
525
	if ground then
526
	T.C(function()
527
	local dragon = Instance.new("Model",m)
528
	local main = T.P(1,1,1,'White',1,false,true)
529
	local old = main
530
	s = 10
531
	T.C(function()
532
	while wait() do
533
		wait()
534
		if #dragon:children() > 0 then
535
			
536
			old.CFrame = cfn(main.Position,old.Position)
537
			for i,v in pairs(dragon:children()) do
538
				if i == #dragon:children() then
539
				old = v
540
				v.CFrame = cfn(old.Position,v.Position)*cfn(0,0,-s)
541
				else
542
				v.CFrame = cfn(old.Position,v.Position)*cfn(0,0,-s)
543
				end
544
				old = v
545
			end
546
		end
547
	end
548
	end)
549
	
550
		for i = 1,mag/10 do
551
			local cube = genNew('Part',dragon,{
552
				BrickColor = ground.BrickColor;
553
				Size = v3n(s,s,s);
554
				Anchored = true;
555
				TopSurface = ground.TopSurface;
556
				BottomSurface = ground.BottomSurface;
557
				CanCollide = false;
558
				Material = ground.Material;
559
				})
560
			cube.CFrame = p.CFrame
561
		end
562
		local r = mag/2
563
		holding = true
564
		
565
		local cf = cfn(torso.Position,mouse.hit.p)*cfn(0,0,-r)*ang(0,-math.pi/2,0)
566
		for i = 0,360-s,3 do
567
			wait()
568
			main.CFrame = cf*cfn(M.Cos(M.D(i))*r,M.Sin(M.D(i))*r,0)
569
		end
570
		dragon:Remove()
571
		end)
572
	end
573
end
574
575
neck2 = _
576
function necko(a) if a == 1 then neck2 = T.W(char.Head,faketorso,0,1.5,0,0,0,0) normposn2 = neck2.C0 elseif a == 0 then neck2:Remove() end end
577
578
ef = function(a)
579
	T.C(function()
580
		local p = T.P(1,1,1,'White',0,false,true)
581
		p.CFrame = a
582
		local msh = T.FM(p,'ring',1,1,1)
583
		for i,v in pairs(FindPlayers(p.Position,5)) do damage(v,5,.1) end
584
		for i = 1,5 do
585
			msh.Scale = v3n(i,i,1)
586
			p.Transparency = i/5
587
			wait()
588
		end
589
		p:Remove()
590
	end)
591
end
592
	
593
function Punches()
594
	faketor()
595
	lock.R(1) lock.L(1)
596
	hw.Part1 = torso
597
	o = 1*.95
598
	for _ = 1,5 do
599
	speak('One','Red')
600
	T.S('hit',2)
601
	for i = 0,1,o do
602
	wait()
603
	rweld.C1 = cfn()*ang(0,M.D(40*i),0)
604
	rw.C1 = normposr*ang(M.D(90*i),0,M.D(40*i))
605
	lw.C1 = normposl*ang(M.D(90*i),0,M.D(40*i))
606
	end
607
	
608
	ef(rarm.CFrame*cfn(0,-1,0)*ang(math.pi/2,0,0))
609
	for i = 1,0,-o do
610
	wait()
611
	rweld.C1 = cfn()*ang(0,M.D(40*i),0)
612
	rw.C1 = normposr*ang(M.D(90*i),0,M.D(40*i))
613
	lw.C1 = normposl*ang(M.D(90*i),0,M.D(40*i))
614
	end
615
	speak('Two','Red')
616
	T.S('hit',2)
617
	for i = 0,1,o do
618
	wait()
619
	rweld.C1 = cfn()*ang(0,M.D(-40*i),0)
620
	rw.C1 = normposr*ang(M.D(90*i),0,M.D(-40*i))
621
	lw.C1 = normposl*ang(M.D(90*i),0,M.D(-40*i))
622
	end
623
	ef(larm.CFrame*cfn(0,-1,0)*ang(math.pi/2,0,0))
624
	for i = 1,0,-o do
625
	wait()
626
	rweld.C1 = cfn()*ang(0,M.D(-40*i),0)
627
	rw.C1 = normposr*ang(M.D(90*i),0,M.D(-40*i))
628
	lw.C1 = normposl*ang(M.D(90*i),0,M.D(-40*i))
629
	end
630
	end
631
	replics = {'Even my granny punches harder!';'You Weakling!';'Do it H-A-R-D-E-R!';'U gotta do better!';'That wuldnt hurt a fly!';'YOU CANT BE SERIOUS!';'That was WAY TOO SLOW!';'You totally MISSED!';}
632
	speak(replics[math.random(#replics)],'Red')
633
	rweld.C1 = cfn()
634
	faketor()
635
	lock.R(0) lock.L(0)
636
end
637
638
function Kick()
639
faketor()
640
necko(1)
641
weldall(1)
642
local con = lleg.Touched:connect(function(hit) hum = damage(hit.Parent,30,.5) if hum then
643
hum.Sit = true
644
hum.Torso.Velocity = calcp(torso.Position,hum.Torso.Position).lookVector*100+v3n(0,100,0)
645
end
646
end)
647
o = 1/5
648
for i = 0,1,o do
649
lhw.C1 = normposl2*ang(M.D(-90*i),0,0)
650
rhw.C1 = normposr2*ang(M.D(45*i),0,0)
651
rw.C1 = normposr*ang(M.D(160*i),0,0)
652
lw.C1 = normposl*ang(M.D(160*i),0,0)
653
rweld.C1 = cfn()*ang(M.D(-20*i),0,0)
654
neck2.C0 = normposn2*ang(M.D(20*i),0,0)*cfn(0,0,.3*i)
655
wait()
656
end
657
for i = 1,0,-o do
658
lhw.C1 = normposl2*ang(M.D(-90*i),0,0)
659
rhw.C1 = normposr2*ang(M.D(45*i),0,0)
660
rw.C1 = normposr*ang(M.D(160*i),0,0)
661
lw.C1 = normposl*ang(M.D(160*i),0,0)
662
rweld.C1 = cfn()*ang(M.D(-20*i),0,0)
663
neck2.C0 = normposn2*ang(M.D(20*i),0,0)*cfn(0,0,.3*i)
664
wait()
665
end
666
667
for i = 0,1,o do
668
rhw.C1 = normposr2*ang(M.D(-45*i),0,0)*cfn(0,0,.4*i)
669
lhw.C1 = normposl2*ang(M.D(80*i),0,0)*cfn(0,-.3*i,-.2*i)
670
rw.C1 = normposr*ang(M.D(-60*i),0,0)
671
lw.C1 = normposl*ang(M.D(-60*i),0,0)
672
rweld.C1 = cfn()*ang(M.D(30*i),0,0)
673
neck2.C0 = normposn2*ang(M.D(-20*i),0,0)*cfn(0,0,-.2*i)
674
wait()
675
end
676
for i = 1,0,-o do
677
rhw.C1 = normposr2*ang(M.D(-45*i),0,0)*cfn(0,0,.4*i)
678
lhw.C1 = normposl2*ang(M.D(80*i),0,0)*cfn(0,-.3*i,-.2*i)
679
rw.C1 = normposr*ang(M.D(-60*i),0,0)
680
lw.C1 = normposl*ang(M.D(-60*i),0,0)
681
rweld.C1 = cfn()*ang(M.D(30*i),0,0)
682
neck2.C0 = normposn2*ang(M.D(-20*i),0,0)*cfn(0,0,-.2*i)
683
wait()
684
end
685
faketor() con:disconnect()
686
weldall(0)
687
end
688
689
sword = _
690
691
function SwordOut()
692
	lock.R(1)
693
	if not sword then
694
		speak('Time for sword training','Blue')
695
		for i = 0,1,.1 do
696
			rw.C1 = normposr*ang(M.D(90*i),0,0)
697
			wait()
698
		end
699
		for i = 0,1,.2 do
700
			rw.C1 = holdpos*ang(M.D(40*i),0,M.D(10*i))
701
			mouth_mesh.Scale = v3n(1,2*i,1)
702
			mouth_weld.C1 = mouth_weld_normal*cfn(0,.2*i,-.1*i)
703
			wait()
704
		end
705
		sword = Instance.new("Model",m)
706
		sword_hdl = T.P(.1,2,.1,'White',0,false,false,sword) T.FM(sword_hdl,'cylinder',1,1,1)
707
		sword_tip = T.P(.3,1,.3,'New Yeller',0,false,false,sword)
708
		
709
		sword_hdl_wld = T.W(sword_hdl,mouth,0,0,0,math.pi/2,0,0)
710
		sword_tip_wld = T.W(sword_tip,sword_hdl,0,-2.5,0,0,0,0)
711
		for i = 0,1,.2 do
712
			sword_tip.Size = v3n(.3,5*i,.3)
713
			sword_tip_wld.Parent,sword_tip_wld.Part1 = m,sword_hdl
714
			sword_tip_wld.C1 = cfn(0,3*i,0)
715
			sword_hdl_wld.C1 = cfn(0,0,-1.25*i)*ang(-math.pi/2+M.D(90*i),0,M.D(45*i))
716
			wait()
717
		end
718
		sword_hdl_wld.Part1 = rarm
719
		sword_hdl_wld.C1 = cfn(0,-1,0)*ang(-math.pi/2,0,0) npos = sword_hdl_wld.C1
720
		for i = 1,0,-.2 do
721
			rw.C1 = holdpos*ang(M.D(40*i),0,M.D(10*i))
722
			mouth_mesh.Scale = v3n(1,(2*i)+1,1)
723
			mouth_weld.C1 = mouth_weld_normal*cfn(0,.2*i,-.1*i)
724
			wait()
725
		end
726
		rw.C1 = holdpos
727
		lock.R(0)
728
	else sword:Remove() sword = nil lock.R(0)
729
	end
730
end
731
function Slash()
732
	local con = sword_tip.Touched:connect(function(hit) damage(hit.Parent,10,.1) end)
733
	lock.R(1) T.S('slash',1)
734
	for i = 0,1,1/3 do
735
	rw.C1 = holdpos*ang( M.D(30*i),M.D(60*i),M.D(-40*i) )
736
	wait()
737
	end
738
	old = rw.C1
739
	for i = 0,1,1/3 do
740
	rw.C1 = old*ang(M.D(-120*i),0,0)
741
	wait()
742
	end
743
	for i = 1,0,-1/3 do
744
	rw.C1 = old*ang(M.D(-120*i),0,0)
745
	wait()
746
	end
747
	for i = 1,0,-1/3 do
748
	rw.C1 = holdpos*ang( M.D(30*i),M.D(60*i),M.D(-40*i) )
749
	wait()
750
	end
751
	lock.R(0)
752
	con:disconnect()
753
end
754
755
function Grab() 
756
if not huma then
757
	found = _
758
	for i,v in pairs(FindPlayers(torso.Position,10,'')) do
759
		if not found then
760
			found = v
761
		end
762
	end
763
	if found then huma = found.Humanoid
764
	lock.R(1)
765
	huma_wld = T.W(huma.Torso,torso,0,.1,-1.1,0,0,0)
766
	rw.C1 = holdpos*ang(M.D(30),0,M.D(30))
767
	sword_hdl_wld.C1 = npos*ang(0,0,M.D(90))
768
	huma.PlatformStand = true
769
	huma_con = huma.Changed:connect(function(prop) if prop == 'PlatformStand' then huma.PlatformStand = true end end)
770
	end
771
else
772
	speak('Muahahahaa!','Blue')
773
	f = T.F(p,5,3,'Magenta')
774
	wait(2)
775
	f.Parent = huma.Torso
776
	huma.Health = 0
777
	huma = _
778
	huma_wld:Remove()
779
	sword_hdl_wld.C1 = npos
780
	lock.R(0)
781
end
782
end
783
function Release()
784
	if huma then
785
		huma_wld:Remove()
786
		huma_con:disconnect()
787
		huma.PlatformStand = false
788
		huma = nil
789
		sword_hdl_wld.C1 = npos
790
		lock.R(0)
791
	end
792
end
793
794
function Dance()
795
	faketor()
796
	weldall(1)
797
	for _,v in pairs({{0,1,.2},{1,0,-.2}}) do
798
	for i = v[1],v[2],v[3] do
799
		rweld.C1 = cfn()*ang(0,M.D(90*i),0)
800
		rw.C1 = normposr*cfn(-.3*i,.4*i,0)*ang(0,0,M.D(120*i))
801
		lw.C1 = normposl*cfn(.3*i,0,0)*ang(0,0,M.D(-50*i))
802
		wait()
803
	end
804
	end
805
	for _,v in pairs({{0,1,.2},{1,0,-.2}}) do
806
	for i = v[1],v[2],v[3] do
807
		rweld.C1 = cfn()*ang(0,M.D(-90*i),0)
808
		lw.C1 = normposl*cfn(.3*i,0,0)*ang(0,0,M.D(-120*i))
809
		rw.C1 = normposr*cfn(-.3*i,.4*i,0)*ang(0,0,M.D(50*i))
810
		wait()
811
	end
812
	end
813
	faketor()
814
	weldall(0)
815
end
816
charge = 0
817
function Rasengan()
818
lock.R(1) lock.L(1)
819
	for i = 0,1,.1 do
820
		rw.C1 = normposr*cfn(-.2*i,0,-.3*i)*ang(M.D(90*i),0,M.D(-40*i))
821
		lw.C1 = normposl*cfn(.2*i,0,-.3*i)*ang(M.D(90*i),0,M.D(40*i))
822
		wait()
823
	end
824
	local brick = T.P(1,1,1,'Deep blue',.5,false,false)
825
	local wld = T.W(brick,larm,0,-1.5,0,0,0,0)
826
	local msh = T.FM(brick,'sphere',1,1,1)
827
	holding = true
828
	T.C(function() while holding do spaas(brick.Position,1,3,5,'New Yeller')  wait(.3) end end)
829
	while holding do
830
		if charge < 5 then
831
			charge = charge+1
832
			msh.Scale = v3n(charge,charge,charge)
833
		else break
834
		end
835
		wait(.5)
836
	end
837
	for i = 1,-.5,-.1 do
838
		rw.C1 = normposr*cfn(-.2*i,0,-.3*i)*ang(M.D(90*i),0,M.D(-40*i))
839
		lw.C1 = normposl*cfn(.2*i,0,-.3*i)*ang(M.D(90*i),0,M.D(40*i))
840
		wait()
841
	end
842
	char.Humanoid.WalkSpeed = 100
843
	wait(1)
844
	for i = -.5,0,1/5 do
845
		rw.C1 = normposr*cfn(-.2*i,0,-.3*i)*ang(M.D(90*i),0,M.D(-40*i))
846
		lw.C1 = normposl*cfn(.2*i,0,-.3*i)*ang(M.D(90*i),0,M.D(40*i))
847
		wait()
848
	end
849
	for i = 0,1,1/5 do
850
		lw.C1 = normposl*ang(M.D(90*i),0,0)
851
		wait()
852
	end
853
	char.Humanoid.WalkSpeed = 16
854
	wld:Remove()
855
	brick.Anchored = true
856
	msh.MeshId = "rbxassetid://"..meshids['spikeb']
857
	local cha = charge
858
	T.C(function()
859
	for i = 0,70,2 do
860
		msh.Scale = v3n(cha+i/2,cha+i/2,cha+i/2)
861
		brick.Transparency = i/70
862
		wait()
863
	end
864
	brick:Remove()
865
	end)
866
	charge = 0
867
	lock.R(0) lock.L(0)
868
end
869
870
---GUIS---
871
udim = function(a,b) return UDim2.new(a,0,b,0) end
872
873
beans,bar = 3,0
874
pcall(function() ply.PlayerGui.lol:Remove() end)
875
gui = Instance.new("ScreenGui",ply.PlayerGui)
876
gui.Name = 'lol'
877
mainframe = genNew('Frame',gui,{
878
	Size = udim(.1,.1);
879
	Position = udim(0,.5);})
880
sensuframe = genNew('Frame',mainframe,{
881
	Size = udim(.7,1);
882
	Position = udim(0,0);})
883
refillframe = genNew('Frame',mainframe,{
884
	Size = udim(.3,1);
885
	Position = udim(.7,0);})
886
887
function update(a) fr,huh,o = _,_,_
888
if a == 'Beans' then o = 1/3 image = 'http://www.roblox.com/asset/?id=84570235' fr = sensuframe color = 'White' huh = beans tran = 1
889
elseif a == 'Bar' then o = 1/5 image = '' fr = refillframe color = 'New Yeller' huh = bar tran = 0 end
890
	fr:ClearAllChildren()
891
	for i = 1-tran,huh do 
892
	but = genNew('ImageLabel',fr,{
893
		Size = udim(o,1);
894
		Position = udim(o*(-1+i),0);
895
		Image = image;
896
		BackgroundTransparency = tran;
897
		BackgroundColor = BrickColor.new(color);
898
	})
899
end
900
end
901
update('Beans')
902
-----------
903
sitbp = nil
904
function sit()
905
if not sitbp then
906
lock.R(2) lock.L(2)
907
sitbp = T.BP(torso,torso.Position)
908
for i = 0,1,.1 do
909
wait()
910
rhw.C1 = normposr2*ang(M.D(90*i),0,M.D(-30*i))
911
lhw.C1 = normposl2*ang(M.D(90*i),0,M.D(30*i))
912
sitbp.position = torso.Position - v3n(0,.9*i,0)
913
end
914
elseif sitbp then
915
for i = 1,0,-.1 do
916
wait()
917
rhw.C1 = normposr2*ang(M.D(90*i),0,M.D(-30*i))
918
lhw.C1 = normposl2*ang(M.D(90*i),0,M.D(30*i))
919
sitbp.position = torso.Position - v3n(0,.9*i,0)
920
end
921
lock.R(-1) lock.L(-1)
922
sitbp:Remove() sitbp = nil
923
end
924
end
925
926
function Eat()
927
if beans > 0 then
928
lock.R(1)
929
	for i = 0,1,.1 do
930
		rw.C1 = normposr*ang(M.D(120*i),0,M.D(-40*i))
931
		wait()
932
	end
933
	T.S('crunch',1)
934
	beans = beans-1 update('Beans')
935
	hum = FindHumanoid(char,'')
936
	hum.Health = hum.MaxHealth
937
	for i = 1,0,-.1 do
938
		rw.C1 = normposr*ang(M.D(120*i),0,M.D(-40*i))
939
		wait()
940
	end
941
	lock.R(0)
942
else
943
	sit()
944
	speak('Refilling','Green')
945
	while beans < 3 do for i = 1,5 do bar = i update('Bar') wait(1) end beans=beans+1 update('Beans') bar = 0 end
946
	bar = 0 refillframe:ClearAllChildren()
947
	sit()
948
end
949
end
950
951
klist = {
952
	{'r',function() if sword then Release() else Equip() end end};
953
	{'t',function(a) earthdragon(a) end,''};
954
	{'q',function() Punches() end};
955
	{'e',function() Kick() end};
956
	{'f',function() SwordOut() end};
957
	{'c',function() Rasengan() end,''};
958
	{'z',function() Eat() end};
959
	{'g',function() if sword then Grab() else Dance() end end};
960
	{'j',function() Exorcism() end};
961
}
962
963
onButton1Down = function(mouse)
964
	if sword then
965
		Slash()
966
	else
967
		Fly(mouse)
968
	end
969
end
970
971
hop.Deselected:connect(function() lock.R(0) lock.L(0) end)
972
hop.Selected:connect(function(mouse)
973
	mouse.Button1Up:connect(function() holding = false end)
974
	mouse.KeyUp:connect(function(a) for i,v in pairs(klist) do if a == v[1] and v[3] ~= nil then holding = false end end end)
975
	mouse.KeyDown:connect(function(key)
976
		if attacking then return end
977
		for i,v in pairs(klist) do
978
			if key == v[1] then attacking = true v[2](mouse) attacking = false end
979
		end
980
	end)
981
	mouse.Button1Down:connect(function() if attacking then return end attacking = true onButton1Down(mouse) attacking = false end)
982
end)
983
--mediafire