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