Dark_EccentricYT

Untitled

Jul 22nd, 2018
1,530
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.59 KB | None | 0 0
  1. ---Made by mugex---------------------------------------------that u have it?--------
  2. script.Parent = nil
  3. name = 'Rainbow Blade'
  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 = "legetdgq"
  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. asset = 'rbxassetid://'
  34. normposr = cfn(1.5,.5,0)
  35. normposl = cfn(-1.5,.5,0)
  36. normposl2 = cfn(.5,-1.5,0)
  37. normposr2 = cfn(-.5,-1.5,0)
  38. normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  39.  
  40. holdpos = normposr*ang(math.pi/2,0,0)
  41. holdpos2 = normposl*ang(math.pi/2,0,0)
  42. for i = 0,1 do --------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("SpecialMesh",parent)
  122. mesh.MeshId = 'rbxassetid://9856898'
  123. mesh.Scale = v3n(x*parent.Size.x,y*parent.Size.y,z*parent.Size.z)*2
  124. if meshtexture then mesh.TextureId = 'rbxassetid://'..textureids[meshtexture] end
  125. return mesh
  126. end
  127. mesh = Instance.new("SpecialMesh",parent)
  128.  
  129. if meshid == 'wedge' then
  130. mesh.MeshType = 'Wedge'
  131. elseif meshid == 'sphere' then
  132. mesh.MeshType = 3
  133. elseif type(meshid) == "number" then
  134. mesh.MeshId = "rbxassetid://"..meshid
  135. else
  136. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  137. end
  138. mesh.Scale = Vector3.new(x,y,z)
  139. if meshtexture then
  140. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  141. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  142. end
  143. return mesh
  144. end,
  145.  
  146. ["Dec"] = function(parent,face,id,transparency)
  147. c = Instance.new("Decal",parent)
  148. c.Face = face
  149. c.Texture = id
  150. if transparency then c.Transparency = transparency end
  151. return c
  152. end,
  153. ["S"] = function(id,pitch,volume,parent)
  154. cur = nil
  155. found = false
  156. if type(id) == 'string' then
  157. for i,v in pairs(char.Head:children()) do
  158. if v:IsA("Sound") and v.Name == id and not found then
  159. cur = v
  160. if parent then cur = v:Clone() cur.Parent = parent end
  161. cur.Pitch = pitch
  162. if volume then cur.Volume = volume end
  163. cur:Play()
  164. found = true
  165. return cur
  166. end
  167. end
  168. elseif type(id) == 'number' then
  169. local a = char.Head:FindFirstChild('exteo')
  170. a.SoundId = 'rbxassetid://'..id
  171. a.Pitch = pitch
  172. if volume then a.Volume = volume end
  173. a:Play()
  174. return a
  175. end
  176. end
  177. }
  178. function FindHumanoid(a,b)
  179. for i,v in pairs(a:children()) do
  180. if v:IsA('Humanoid') then
  181. if not b then
  182. if v.Parent ~= char then return v end
  183. else return v end
  184. end
  185. end
  186. end
  187. function damage(hit,amount,delay) ---- VAHINKO DAMAGE
  188. hum = FindHumanoid(hit)
  189. if hum then
  190. if delay then
  191. local found = CheckTag(hum,'tag')
  192. if not found then
  193. local a = AddTag(hum,'tag')
  194. debris:AddItem(a,delay)
  195. hum.Health = hum.Health - amount
  196. end
  197. else hum.Health = hum.Health - amount
  198. end
  199. return hum
  200. end
  201. end
  202.  
  203. rtorso = torso
  204.  
  205. lock = {["R"] =
  206. function(a)
  207. if a == 1 then
  208. rabrick = T.P(1.1,1.1,1.1,"White",1,false,false)
  209. rw = T.W(rabrick,rtorso,1.5,.5,0,0,0,0)
  210. T.W(rarm,rabrick,0,-.5,0,0,0,0)
  211. elseif a == 2 then
  212. rlbrick = T.P(1,1,1,"White",1,false,false)
  213. rhw = T.W(rlbrick,rtorso,-.5,-1.5,0,0,0,0)
  214. T.W(rleg,rlbrick,0,-.5,0,0,0,0)
  215. elseif a == 0 then
  216. rs.Parent = rtorso
  217. rw.Parent = nil
  218. rabrick:Destroy() rabrick = nil
  219. elseif a == -1 then
  220. rhw.Parent = nil
  221. rh.Parent = rtorso
  222. rlbrick:Destroy() rlbrick = nil
  223. end
  224. end
  225. , ["L"] = function(a)
  226. if a == 1 then
  227. labrick = T.P(1,1,1,"White",1,false,false)
  228. lw = T.W(labrick,rtorso,-1.5,.5,0,0,0,0)
  229. T.W(larm,labrick,0,-.5,0,0,0,0)
  230. elseif a == 2 then
  231. llbrick = T.P(1,1,1,"White",1,false,false)
  232. lhw = T.W(llbrick,rtorso,.5,-1.5,0,0,0,0)
  233. T.W(lleg,llbrick,0,-.5,0,0,0,0)
  234. elseif a == 0 then
  235. ls.Parent = rtorso
  236. lw.Parent = nil
  237. labrick:Destroy() labrick = nil
  238. elseif a == -1 then
  239. lhw.Parent = nil
  240. lh.Parent = rtorso
  241. llbrick:Destroy() llbrick = nil
  242. end
  243. end
  244. }
  245. cfn,ang = CFrame.new,CFrame.Angles
  246. function spaas(position,radius,number,number2,color)
  247. mode = Instance.new("Model",m)
  248.  
  249. for i = 1,number2 do
  250. pos = position+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  251. mag = (position-pos).magnitude
  252.  
  253. col = color or 'Toothpaste'
  254. local laz = T.P(.1,mag,.1,col,0,false,true,mode)
  255.  
  256. T.FM(laz,'cylinder',.3,1,.3)
  257. laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  258.  
  259. cframe = (laz.CFrame*cfn(0,-mag/2,0)).p
  260. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  261. mag2 = (cframe-pos2).magnitude
  262. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  263. T.FM(laz2,'cylinder',.3,1,.3)
  264. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  265.  
  266. previo = laz2
  267. for i = 1,number do
  268. cframe = (previo.CFrame*cfn(0,-mag/2,0)).p
  269. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  270. mag2 = (cframe-pos2).magnitude
  271.  
  272. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  273. T.FM(laz2,'cylinder',.3,1,.3)
  274. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  275.  
  276. previo = laz2
  277. end
  278.  
  279. end
  280. debris:AddItem(mode,.1)
  281. return mode
  282. end
  283.  
  284. function lightning(startpos,endpos,times,offse,livetime,col,dmg)
  285. local curpos = startpos
  286. for i = 1,times do
  287. mag = (startpos-endpos).magnitude offs = {-offse,offse}
  288. offset = v3n(offs[M.R(1,2)],offs[M.R(1,2)],offs[M.R(1,2)])
  289. laz = T.P(.1,.1,mag/times,col,0,false,true,m)
  290. if dmg then laz.Touched:connect(function(hit) damage(hit.Parent,dmg[1],dmg[2]) end) end
  291. apos = (cfn(curpos,endpos)*cfn(0,0,-mag/times)).p+offset
  292. if times == i then
  293. mag2 = (curpos-endpos).magnitude
  294. laz.Size = v3n(.1,.1,mag2)
  295. laz.CFrame = cfn(curpos,endpos)*cfn(0,0,-mag2/2)
  296. else
  297. laz.CFrame = cfn(curpos,apos)*cfn(0,0,-mag/times/2)
  298. end
  299. curpos = laz.CFrame*cfn(0,0,-mag/times/2).p debris:AddItem(laz,livetime)
  300. end
  301. end
  302.  
  303. ------MESHIDS---
  304. meshids = {["penguin"] = 15853464, ["ring"] = 3270017,
  305. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  306. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  307. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557,
  308. ["ramen"] = 19380188,["lightning"] = 72583597,["bullet"]=2697549,['cheese'] = 1090700,["pan"] = 24342877,["ketchup"] = 29690481,
  309. ["duck"] = 9419831,["unicorn"]=84003494,["luatophat"] = 42157240}---some meshids
  310. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153,
  311. ["cheese"] = 1090703}
  312. soundids = {["bell"] = 20005706,["flintlock"] = 13510352,["falcon"] = 1387390,['sensa'] = 4700455,
  313. ['midas'] = 17385513;
  314. ['spark'] = 10756118;
  315. ['boom'] = 10730819;
  316. ['plank'] = 10548112;
  317. ['harmonica1'] = 33069371;
  318. ['harmonica2'] = 33069412;
  319. ['thump'] = 10730819;
  320. ['hit'] = 2801263;
  321. ['crunch'] = 15047813;
  322. ['Piano'] = 11998796;
  323. }
  324.  
  325. function AddTag(object,tagname) local tag = Instance.new("BoolValue",object) tag.Name = tagname return tag end
  326. function CheckTag(object,tagname) local found = object:FindFirstChild(tagname) if found then return found else return _ end end
  327. function RemoveTag(object,tagname) local found = CheckTag(object,tagname) if found then found:Remove() end end
  328. for i,v in pairs(soundids) do ---Remove sounds
  329. for _,q in pairs(char.Head:children()) do
  330. if q.Name == i then q:Remove() end
  331. end
  332. end
  333. for i,v in pairs(soundids) do ----Add sounds
  334. sound = Instance.new("Sound")
  335. sound.SoundId = "http://www.roblox.com/asset/?id="..v
  336. sound.Name = i
  337. sound.Parent = char.Head
  338. end
  339. genNew('Sound',char.Head,{
  340. Name = 'slash';
  341. SoundId = 'rbxasset://sounds//swordslash.wav'
  342. })
  343.  
  344. waitbp = function(a,r) while (a.Parent.Position-a.position).magnitude > r do wait() end end
  345.  
  346. M = {["R"] = function(a,b) return math.random(a,b) end,
  347. ["Cos"] = function(a) return math.cos(a) end,
  348. ["Sin"] = function(a) return math.sin(a) end,
  349. ["D"] = function(a) return math.rad(a) end
  350. }
  351.  
  352. function findground(position,radius,ignore)
  353. if ignore then
  354. ig = ignore table.insert(ig,m)
  355. else ig = {m}
  356. end
  357. local ray = Ray.new(position.p,position.p+(position.p-v3n(0,200,0)).unit*radius)
  358. local obj,pos2 = Workspace:FindPartOnRayWithIgnoreList(ray,ig)
  359. if obj and pos2 then return obj,pos2 else return nil end
  360. end
  361.  
  362. rweld = _
  363. faketorso = _
  364. function faketor()
  365. if rtorso == torso then
  366. torso.Transparency = 1
  367. faketorso = T.P(2,2,1,torso.BrickColor.Name,0,false,false,char)
  368. rweld = T.W(faketorso,torso,0,0,0,0,0,0)
  369. rtorso = faketorso
  370. for i,v in pairs({lh,ls,rh,rs}) do v.Part0 = rtorso end
  371. elseif rtorso ~= torso then
  372. rtorso = torso
  373. for i,v in pairs({lh,ls,rh,rs}) do v.Part0 = rtorso end
  374. faketorso:Remove()
  375. rweld:Remove()
  376. torso.Transparency = 0
  377. end
  378. dec.Parent = rtorso
  379. end
  380.  
  381. function calcp(a,b) --- Direction CFrame
  382. return cfn(a,v3n(b.x,a.y,b.z))
  383. end
  384.  
  385. --------ANIMATING FUNCTION--------
  386. tw = function(Weld, Stop, Step,a)
  387. local func = function()
  388. local Start = Weld.C0
  389. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  390. local Stop = Stop
  391. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  392.  
  393. for i = 0, 1, Step or .1 do
  394. Weld.C0 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
  395. (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
  396. (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
  397. (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
  398. (Z1 * (1 - i)) + (Z2 * i) )
  399. wait()
  400. end
  401.  
  402. Weld.C0 = Stop
  403. end
  404. if a then T.C(function() func() end) else func() end
  405. end
  406. ------------------------------------
  407.  
  408. function weldall(q)
  409. if q == 1 then a,b = 1,2 else a,b = -1,0 end
  410. for i = a,b do lock.R(i) lock.L(i) end
  411. end
  412. function FindPlayers(a,b,c) --- Finds Players near a part
  413. list = {}
  414. for i,v in pairs(Workspace:children()) do
  415. if v:IsA("Model") then
  416. for _,q in pairs(v:children()) do
  417. if q:IsA("Humanoid") then
  418. if c and q.Parent ~= char then
  419. if (q.Torso.Position-a).magnitude < b then
  420. table.insert(list,v)
  421. end
  422. elseif not c then
  423. if (q.Torso.Position-a).magnitude < b then
  424. table.insert(list,v)
  425. end
  426. end
  427. end
  428. end
  429. end
  430. end
  431. return list
  432. end
  433. end
  434. sword = Instance.new("Model",m)
  435. hdl = T.P(.3,1,.3,'Brown',0,false,false,sword)
  436.  
  437. blade = T.P(0,4,1,'White',0,false,false,sword)
  438. T.W(blade,hdl,0,2.5,0,0,0,0) T.FM(blade,'block',.2,1,1,'rainbow')
  439. cougar = T.P(.4,.1,1.1,'New Yeller',0,false,false,sword)
  440. T.W(cougar,hdl,0,.5,0,0,0,0)
  441. sheath = T.P(.1,1,.5,'Brown',0,false,false)
  442. T.W(sheath,torso,1.1,-1,0,M.D(-60),0,M.D(10))
  443. hw = T.W(hdl,sheath,0,1,0,math.pi,0,0) sheathposition = hw.C1
  444. handposition = cfn(0,-1,0)*ang(math.pi/2,0,0)
  445. tip = T.P(0,1,1,'White',0,false,false,sword)
  446. T.FM(tip,'wedge',.2,1,1)
  447. T.W(tip,blade,0,2.5,0,0,0,0)
  448. for i,v in pairs({'Top','Bottom','Back','Front','Left','Right'}) do
  449. T.Dec(tip,v,asset..textureids['rainbow'])
  450. end
  451.  
  452. function trace() decs = {}
  453. for i,v in pairs(sword:children()) do
  454. local cl = v:Clone()
  455. cl.Parent = m
  456. cl.Anchored = true
  457. for i,v in pairs(cl:children()) do if v:IsA("Decal") then table.insert(decs,v) end end
  458. cl.Transparency = .5
  459. for _,v in pairs(decs) do v.Transparency = .5 end
  460. T.C(function() for i = .5,1,.05 do
  461. cl.Transparency = i wait()
  462. for _,v in pairs(decs) do v.Transparency = i end
  463. end cl:Remove() end)
  464. end
  465. end
  466.  
  467. np = cfn()*ang(M.D(-40),M.D(10),0)
  468. r = .5
  469. function Connect(func)
  470. con1 = blade.Touched:connect(function(hit) func(hit) end)
  471. con2 = tip.Touched:connect(function(hit) func(hit) end)
  472. return con1,con2
  473. end
  474. function Stab() local pw = hw.C1
  475. T.C(function() for i = 0,1,.2 do wait() hw.C1 = pw*ang(M.D(-90*i),0,0) end
  476. for i = 1,0,-.2 do wait() hw.C1 = pw*ang(M.D(-90*i),0,0) end end)
  477. c1,c2 = Connect(function(hit) local hum = damage(hit.Parent,9000,9999) if hum then spaas(hum.Torso.Position,3,3,3,'random') end end)
  478. tw(rw,cfn()*ang(M.D(-90),0,0),.2)
  479. tw(rw,np,.2)
  480. c1:disconnect() c2:disconnect()
  481. end
  482.  
  483. function Portal() pw = hw.C1 len = 0
  484. T.C(function() for i = 0,1,.1 do hw.C1 = pw*ang(-math.pi/2*i,0,0) wait() end end)
  485. --hw.C1 = pw*ang(-math.pi/2,0,0)
  486. tw(rw,cfn()*ang(M.D(-110),M.D(-30),0),.2) local stpos = (torso.CFrame*cfn(-2,2,-4)).p
  487. p = T.P(.1,1,.1,'Black',.5,false,true) T.FM(p,'sphere',1,1,1) local p3 = p
  488. T.C(function() for i = 0,1.1,.2 do
  489. local stcf = (torso.CFrame*cfn(-2,2,-4)) stpos = stcf.p
  490. ep = (torso.CFrame*cfn(4*i,-4*i,-4)).p
  491. mag = (stpos-ep).magnitude
  492. p.Size = v3n(0,mag,.5*i)
  493. p.CFrame = cfn(stpos,ep)*cfn(0,0,-mag/2)*ang(math.pi/2,0,0)
  494. wait()
  495. end end)
  496. tw(rw,cfn()*ang(M.D(-70),M.D(30),0))
  497. cf = p.CFrame
  498. local p = T.P(.7,1,.7,'Black',.5,false,true) T.FM(p,'cylinder',1,1,1)
  499. local p2 = T.P(1,1,1,'Black',.5,false,true)
  500. T.FM(p2,37241605,3,3,3)
  501. ray = Ray.new(cf.p,cf.p+(cf.p-(cf.p+torso.CFrame.lookVector*-1)).unit*50)
  502. local obj,pos = Workspace:FindPartOnRayWithIgnoreList(ray,{m,sword,char})
  503. if obj and pos then len = (cf.p-pos).magnitude else len = 50 end
  504. for i = 0,1,.1 do p.Size = v3n(.7,len*i,.7)
  505. p.CFrame = cf*cfn(-len/2*i,0,0)*ang(0,0,math.pi/2)
  506. p2.CFrame = p.CFrame*cfn(0,p.Size.y/2+1,1)*ang(math.pi/2,0,0)
  507. wait()
  508. end
  509. ef = T.P(1,1,1,'Black',0,false,true)
  510. ef.CFrame = p2.CFrame
  511. msh = T.FM(ef,'sphere',1,1,1)
  512. for i,v in pairs(FindPlayers(ef.Position,15)) do damage(v,9000,9999) end
  513. for i = 0,50,2.5 do
  514. msh.Scale = v3n(i,i,i)
  515. ef.Transparency = i/50
  516. wait()
  517. end ef:Remove()
  518. hw.C1 = pw
  519. tw(rw,np)
  520. T.C(function() for i = .5,1,.05 do p.Transparency,p2.Transparency,p3.Transparency = i,i,i wait() end p:Remove() p2:Remove() p3:Remove() end)
  521. end
  522. function part(mouse)
  523. t= T.P(30,30,30,'White',0,true,true,Workspace)
  524. t.CFrame = cfn(mouse.hit.p+v3n(0,15,0))
  525. T.FM(t,'block',1,1,1,'rainbow')
  526. end
  527.  
  528. function Whirlwind()
  529. bg = T.BG(head) pw = hw.C1
  530. tw(rw,cfn()*ang(M.D(-90),M.D(90),0))
  531. hw.C1 = pw*ang(-math.pi/2,-math.pi/2,0)
  532. for i = 1,360*5,60 do
  533. bg.cframe = bg.cframe*ang(0,M.D(60),0)
  534. wait()
  535. pcall(function()
  536. for i,v in pairs(FindPlayers(torso.Position,20)) do local hum = damage(v,9000,9999)
  537. if hum then
  538. if not CheckTag(hum.Torso,'muforce') then
  539. bf = Instance.new("BodyVelocity",hum.Torso)
  540. bf.Name = 'muforce'
  541. bf.maxForce = v3n()*math.huge
  542. bf.velocity = calcp(torso.Position,hum.Torso.Position).lookVector*100
  543. debris:AddItem(bf,1)
  544. end
  545. end
  546. end end)
  547. end
  548. bg:Remove()
  549. hw.C1 = pw
  550. tw(rw,np)
  551. end
  552.  
  553. function Slash()
  554. con = blade.Touched:connect(function(hit) damage(hit.Parent,9000,9999) end)
  555. tw(rw,cfn()*ang(M.D(-100),M.D(-10),M.D(-70)),1/3)
  556. T.C(function()for i = 0,3 do trace() wait() end end)
  557. tw(rw,cfn()*ang(M.D(60),M.D(-10),M.D(-70)),1/3)
  558. tw(rw,np,.1)
  559. con:disconnect()
  560. end
  561. function Equip() if attacking then return end
  562. attacking = true
  563. tw(rw,cfn()*ang(M.D(-40),M.D(10),0),.1,'')
  564. hw.Part1 = rarm
  565. T.C(function() for i = 0,1,.1 do
  566. hw.C1 = handposition*ang(M.D(180*i),0,0) wait() end
  567. end)
  568. attacking = false
  569. end
  570. function Unequip() if attacking then return end
  571. attacking = true
  572. tw(rw,cfn()*ang(M.D(-130),M.D(-20),M.D(10)),.1) pw = hw.C1
  573. for i = 0,1,.1 do
  574. hw.C1 = pw*ang(M.D(-195*i),0,M.D(8))
  575. wait()
  576. end
  577. tw(rw,cfn()*ang(M.D(-40),M.D(-20),M.D(5)),.1) pw = hw.C1
  578. hw.Part1 = sheath hw.C1 = sheathposition
  579. tw(rw,cfn(),.1)
  580. attacking = false
  581. end
  582.  
  583. -----------ZOMBIE MAKER FUNCTION------------
  584. function Exorcism()
  585. pos = torso.Position+torso.CFrame.lookVector*3+v3n(0,-3,0)
  586.  
  587. person = Instance.new("Model",Workspace)
  588. person.Name = 'Zombie'
  589.  
  590. ----PARTS-------
  591. local hed = T.P(1,1,1,'White',0,true,false,person) hed.Name = 'Head'
  592. Instance.new("SpecialMesh",hed).Scale = v3n(1.25,1.25,1.25)
  593. local tor = T.P(2,2,1,'White',0,true,false,person) tor.Name = 'Torso'
  594. local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Left Arm'
  595. q = T.W(ar,tor,-.5,0.5,0,0,math.pi/2,0,tor)
  596. q.C0 = cfn(1,0.5,0)*ang(0,math.pi/2,0)
  597. local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Right Arm'
  598. q2 = T.W(ar,tor,.5,0.5,0,0,math.pi/2,0,tor)
  599. q2.C0 = cfn(-1,0.5,0)*ang(0,math.pi/2,0)
  600.  
  601. local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Right Leg'
  602. T.W(ar,tor,-.5,-2,0,0,0,0,tor)
  603. local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Left Leg'
  604. T.W(ar,tor,.5,-2,0,0,0,0,tor)
  605.  
  606. T.W(hed,tor,0,1.5,0,0,0,0,tor)
  607.  
  608. ----PARTS-------
  609.  
  610. q.MaxVelocity = .1
  611. q.DesiredAngle = math.pi/2
  612. q2.MaxVelocity = .1
  613. q2.DesiredAngle = math.pi/2
  614.  
  615. local hum = Instance.new("Humanoid",person)
  616. Instance.new("Skin",person).SkinColor = BrickColor.new('Earth green')
  617. tor.CFrame = calcp(torso.Position+torso.CFrame.lookVector*5,torso.Position)
  618.  
  619. shirt = Instance.new('Shirt',person)
  620. shirt.ShirtTemplate = 'http://www.roblox.com/asset/?id=79001892'
  621.  
  622. pants = Instance.new('Pants',person)
  623. pants.PantsTemplate = 'http://www.roblox.com/asset/?id=79001892'
  624. crown = T.P(1,1,1,'White',0,false,false)
  625. T.FM(crown,1031410,1,1,1,1031417)
  626. T.W(crown,hed,-.2,.85,0,0,0,M.D(20),person)
  627. face = T.Dec(hed,'Front','http://www.roblox.com/asset/?id=65180938')
  628.  
  629. ---DYING---
  630. hum.Died:connect(function() wait(2) hum.Parent:Remove() end)
  631. ---DYING---
  632. end
  633. -----------ZOMBIE MAKER FUNCTION------------
  634. function Logg()
  635. lock.L(1)
  636. logeh = Instance.new("Model",m)
  637. tw(lw,cfn()*ang(M.D(-90),M.D(-70),0))
  638. plank = T.P(1,2,1,'Brown',0,true,false,logeh)
  639. T.FM(plank,'cylinder',1,1,1)
  640. plank2 = T.P(.9,2.01,.9,'Nougat',0,true,false,logeh)
  641. T.FM(plank2,'cylinder',1,1,1)
  642. T.W(plank2,plank,0,0,0,0,0,0)
  643. wld = T.W(plank,larm,0,-1.5,0,math.pi/2,0,0) holding = true
  644. while holding do wait() end
  645. plank.Touched:connect(function(hit) local hum = damage(hit.Parent,9000,9999)
  646. if hum then hum.PlatformStand = true end end)
  647. tw(lw,cfn(0,.5,0)*ang(M.D(-90),M.D(40),0),1/3) wait(.1)
  648. wld:Remove()
  649. debris:AddItem(logeh,2)
  650. tw(lw,cfn())
  651. end
  652. klist = {
  653. {'f',function() Stab() end};
  654. {'e',function() Portal() end};
  655. {'q',function(a) part(a) end};
  656. {'r',function() Whirlwind() end};
  657. {'c',function() Logg() end,''};
  658. {'t',function() Exorcism() end};
  659. }
  660.  
  661. hop.Deselected:connect(function() Unequip() lock.R(0) end)
  662. hop.Selected:connect(function(mouse)
  663. lock.R(1) Equip()
  664. mouse.Button1Up:connect(function() holding = false end)
  665. 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)
  666. mouse.KeyDown:connect(function(key)
  667. if attacking then return end
  668. for i,v in pairs(klist) do
  669. if key == v[1] then attacking = true v[2](mouse) attacking = false end
  670. end
  671. end)
  672. mouse.Button1Down:connect(function() if attacking then return end attacking = true Slash(mouse) attacking = false end)
  673. end)
  674. --mediafire
Add Comment
Please, Sign In to add comment