robthesnowman

Untitled

Aug 10th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.12 KB | None | 0 0
  1. local ply = game.Players.LocalPlayer
  2. char = ply.Character
  3. torso = char.Torso
  4. head = char.Head
  5. holding = false
  6. RS = game:service'RunService'
  7. larm,rarm = char['Left Arm'],char['Right Arm']
  8. Debris = game:service'Debris'
  9. floatforce = 196.25
  10. attacking = false
  11. lh,rh = torso['Left Hip'],torso['Right Hip']
  12. curcam = Workspace.CurrentCamera
  13. mouse = ply:GetMouse()
  14. FFS = function(A,B) return A:FindFirstChild(B) end ---- FindFirstChild Shortcut
  15. function genNew(ClassName, Parent, Properties)
  16. local nObj = Instance.new(ClassName, Parent)
  17. if Properties["FormFactor"] then
  18. nObj["FormFactor"] = Properties["FormFactor"]
  19. end
  20. for Prop, Value in pairs(Properties) do
  21. nObj[Prop] = Value
  22. end
  23. return nObj
  24. end
  25. pcall(function() char.Sole:Destroy() end) --- Destroys Physical Tool
  26. Weapon = Instance.new("Model",char) Weapon.Name = 'Sole'
  27. cfn,ang,md,mr = CFrame.new,CFrame.Angles,math.rad,math.random --- Some Shortcuts
  28. udim = function(a,b)
  29. if type(a) ~= 'string' then
  30. return UDim2.new(a,0,b,0)
  31. else
  32. local x,y = a:match('(%.*%d+)%,(%.*%d+)')
  33. return UDim2.new(x,0,y,0)
  34. end
  35. end
  36. for i,v in pairs(head:children()) do
  37. if v.Name == 'MugSound' then v:Destroy() end
  38. end
  39. Name = 'Seokinji'
  40. pcall(function() ply.Backpack[Name]:Destroy() end) --- Destroys Tool
  41. hop = Instance.new('HopperBin',ply.Backpack)
  42. hop.Name = Name
  43. rw,lw = _,_
  44. Col3 = function(r,g,b) return Color3.new(r/255,g/255,b/255) end
  45. udim = function(x,y) return UDim2.new(x,0,y,0) end
  46. bcol = BrickColor.new
  47. ---TOOLS---
  48. Add ={ --- Array for handy functions
  49. BG = function(parent)
  50. local bg = Instance.new("BodyGyro",parent)
  51. bg.P = 20e+003
  52. bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  53. return bg
  54. end;
  55. BP = function(parent,position)
  56. local bp = Instance.new("BodyPosition",parent)
  57. bp.maxForce = Vector3.new()*math.huge
  58. bp.position = position or parent.Position
  59. return bp
  60. end;
  61. BV = function(parent,force)
  62. local bv = Instance.new("BodyVelocity",parent)
  63. bv.maxForce = Vector3.new()*math.huge
  64. bv.velocity = force or Vector3.new(0,0,0)
  65. return bv
  66. end;
  67. Sound = function(id,pitch,parent)
  68. local tab = {}
  69. local snd = Instance.new("Sound",char.Head)
  70. snd.Name = 'MugSound'
  71. snd.SoundId = id
  72. snd.Pitch = pitch or 1
  73. tab.Sound = snd
  74. function tab:Play()
  75. self.Sound:Play()
  76. end
  77. function tab:Stop()
  78. self.Sound:Stop()
  79. end
  80. function tab:Pitch(a)
  81. self.Sound.Pitch = a
  82. end
  83. setmetatable(tab,{
  84. __call = function(t,param) local cl = t.Sound:Clone() cl.Parent = param return cl end;
  85. })
  86. return tab
  87. end;
  88. Fire = function(parent,size,heat,color,color2)
  89. local f = Instance.new("Fire",parent)
  90. f.Size = size
  91. f.Heat = heat
  92. f.Color = BrickColor.new(color).Color
  93. if color2 then
  94. f.SecondaryColor = BrickColor.new(color2).Color
  95. end
  96. return f
  97. end;
  98. }
  99. function l(a,x,y,z,xx,yy,zz)
  100. if string.find(tostring(a),',') == _ then
  101. return (a.CFrame * cfn(x,y,z))*ang(xx or 0,yy or 0,zz or 0)
  102. else
  103. return (a * cfn(x,y,z))*ang(xx or 0,yy or 0,zz or 0)
  104. end
  105. end
  106. Cur_Parent = _
  107. Part = function(x,y,z,color,tr,cc,an,parent)
  108. local p = Instance.new('Part',parent or Cur_Parent or Weapon)
  109. p.formFactor = 'Custom'
  110. p.Locked = true
  111. p.Size = Vector3.new(x,y,z)
  112. p.BrickColor = BrickColor.new(color or 'White')
  113. p.CanCollide = cc or false
  114. p.Anchored = an or false
  115. p.Transparency = tr or 0
  116. p.TopSurface,p.BottomSurface = 0,0
  117. return p
  118. end
  119. Wedge = function(x,y,z,color,tr,cc,an,parent)
  120. local p = Instance.new('WedgePart',parent or Weapon)
  121. p.formFactor = 'Custom'
  122. p.Size = Vector3.new(x,y,z)
  123. p.BrickColor = BrickColor.new(color or 'White')
  124. p.CanCollide = cc or false
  125. p.Anchored = an or false
  126. p.Transparency = tr or 0
  127. p.TopSurface,p.BottomSurface = 0,0
  128. return p
  129. end
  130. Meshes = {Diamond = 'rbxassetid://9756362'; Spikeball = 'rbxassetid://9982590'; Table = 'rbxassetid://111868131'; --- MeshIds
  131. Egg = 'rbxassetid://1527559'; Ring = 'rbxassetid://3270017'; Bullet = 'rbxassetid://2697549'; Grass = 'rbxassetid://1080954';
  132. Shark = 'rbxassetid://82821384';Sword = 'rbxassetid://12221720'}
  133. Mesh = function(par,num,x,y,z,tex)
  134. local msh = _
  135. if num == 1 then msh = Instance.new("CylinderMesh",par)
  136. elseif num == 2 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 3
  137. elseif num == 3 then msh = Instance.new("BlockMesh",par)
  138. elseif type(num) == 'string' then msh = Instance.new("SpecialMesh",par)
  139. msh.MeshId = string.find(num,'://') == _ and Meshes[num] or num
  140. msh.TextureId = tex and tex or ''
  141. end
  142. msh.Scale = Vector3.new(x or 1,y or 1,z or 1)
  143. return msh
  144. end
  145. Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
  146. p0.Position = p1.Position
  147. local w = Instance.new('Motor',par or p0)
  148. w.Part0 = p1
  149. w.Part1 = p0
  150. w.C0 = CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(rx or 0,ry or 0,rz or 0)
  151. w.MaxVelocity = .1
  152. return w
  153. end
  154. GetGround = function(position,radius) local result = _ --- Check's height from nearest object
  155. local r = Ray.new(position,Vector3.FromNormalId(Enum.NormalId.Bottom)*radius)
  156. local o,p = Workspace:FindPartOnRay(r,char)
  157. if o and p then result = {}
  158. result.obj = o
  159. result.pos = p
  160. result.mag = (position-p).magnitude
  161. end
  162. return result
  163. end
  164. gTorso = char.Torso
  165. ftorso = _
  166. function genNew(ClassName, Parent, Properties)
  167. local nObj = Instance.new(ClassName, Parent)
  168. if Properties["FormFactor"] then
  169. nObj["FormFactor"] = Properties["FormFactor"]
  170. end
  171. for Prop, Value in pairs(Properties) do
  172. nObj[Prop] = Value
  173. end
  174. return nObj
  175. end
  176. --Anim
  177. Lock = function(which) --- For using Animation
  178. local torso = ftorso or gTorso
  179. local result = {rw=false,lw=false}
  180. if which == 'R' then
  181. if not rw then
  182. rabr = Part(1,1,1,'White',0) rabr.Transparency = 1
  183. rabr.Position = torso.Position
  184. rw = Weld(rabr,torso,1.5,.5,0,0,0,0) rw.Parent = Weapon rw.Name = 'rw'
  185. w = Instance.new("Weld",Weapon)
  186. w.Part0,w.Part1 = char['Right Arm'],rabr
  187. w.C1 = CFrame.new(0,-.5,0)
  188. else
  189. rabr:Destroy()
  190. rw = _
  191. end
  192. elseif which == 'L' then
  193. if not lw then
  194. labr = Part(1,1,1,'White',0) labr.Transparency = 1
  195. labr.Position = torso.Position
  196. lw = Weld(labr,torso,-1.5,.5,0,0,0,0) lw.Parent = Weapon rw.Name = 'lw'
  197. w = Instance.new("Weld",Weapon)
  198. w.Part0,w.Part1 = char['Left Arm'],labr
  199. w.C1 = CFrame.new(0,-.5,0)
  200. else
  201. labr:Destroy()
  202. lw = _
  203. end
  204. elseif which == _ then
  205. if b then
  206. local rw,lw = FFS(b,'rw') FFS(b,'lw')
  207. return rw,lw
  208. else
  209. return rw,lw
  210. end
  211. end
  212. end
  213. Lock2 = function(which) --- For using Animation
  214. local torso = ftorso or gTorso
  215. local result = {rw2=false,lw2=false}
  216. if which == 'R' then
  217. if not rw2 then
  218. rlbr = Part(1,1,1,'White',0) rlbr.Transparency = 1
  219. rlbr.Position = torso.Position
  220. rw2 = Weld(rlbr,torso,.5,-1.5,0,0,0,0) rw2.Parent = Weapon rw2.Name = 'rw2'
  221. w = Instance.new("Weld",Weapon)
  222. w.Part0,w.Part1 = char['Right Leg'],rlbr
  223. w.C1 = CFrame.new(0,-.5,0)
  224. else
  225. rlbr:Destroy()
  226. rw2 = _
  227. end
  228. elseif which == 'L' then
  229. if not lw2 then
  230. llbr = Part(1,1,1,'White',0) llbr.Transparency = 1
  231. llbr.Position = torso.Position
  232. lw2 = Weld(llbr,torso,-.5,-1.5,0,0,0,0) lw2.Parent = Weapon lw2.Name = 'lw2'
  233. w = Instance.new("Weld",Weapon)
  234. w.Part0,w.Part1 = char['Left Leg'],llbr
  235. w.C1 = CFrame.new(0,-.5,0)
  236. else
  237. llbr:Destroy()
  238. lw2 = _
  239. end
  240. elseif which == _ then
  241. if b then
  242. local rw2,lw2 = FFS(b,'rw2') FFS(b,'lw2')
  243. return rw2,lw2
  244. else
  245. return rw2,lw2
  246. end
  247. end
  248. end
  249. tw = function(Weld, Stop, Step,a) --- TweenWeld function
  250. local func = function()
  251. local Start = Weld.C1
  252. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  253. local Stop = Stop
  254. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  255.  
  256. for i = 0, 1, Step or .1 do
  257. Weld.C1 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
  258. (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
  259. (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
  260. (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
  261. (Z1 * (1 - i)) + (Z2 * i) )
  262. wait()
  263. end
  264.  
  265. Weld.C1 = Stop
  266. end
  267. if a then coroutine.wrap(function() func() end)() else func() end
  268. end
  269. tw2 = function(Weld, Stop, Step,a) --- TweenWeld function
  270. local func = function()
  271. local Start = Weld.C0
  272. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  273. local Stop = Stop
  274. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  275.  
  276. for i = 0, 1, Step or .1 do
  277. Weld.C0 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
  278. (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
  279. (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
  280. (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
  281. (Z1 * (1 - i)) + (Z2 * i) )
  282. wait()
  283. end
  284.  
  285. Weld.C0 = Stop
  286. end
  287. if a then coroutine.wrap(function() func() end)() else func() end
  288. end
  289. tc = function(Part, Stop, Step,a) --- TweenCFrame function
  290. local func = function()
  291. local Start = Part.CFrame
  292. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  293. local Stop = Stop
  294. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  295.  
  296. for i = 0, 1, Step or .1 do
  297. Part.CFrame = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
  298. (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
  299. (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
  300. (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
  301. (Z1 * (1 - i)) + (Z2 * i) )
  302. wait()
  303. end
  304.  
  305. Part.CFrame = Stop
  306. end
  307. if a then coroutine.wrap(function() func() end)() else func() end
  308. end
  309. --/Anim
  310. --SFX
  311. Sparks = function(part,position,radius,number,number2)
  312. local part = part
  313. part.Parent = _
  314. mode = Instance.new("Model",Weapon)
  315. for i = 1,number2 do
  316. local pos = position+Vector3.new(mr(-radius,radius),mr(-radius,radius),mr(-radius,radius))
  317. local mag = (position-pos).magnitude
  318. local laz = part:Clone() laz.Parent = mode laz.Anchored = true
  319. laz.Size = Vector3.new(laz.Size.x,mag,laz.Size.z)
  320. --Mesh(laz,1,1,1,1)
  321. laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  322. cframe = (laz.CFrame*cfn(0,-mag/2,0)).p
  323. pos2 = cframe+Vector3.new(mr(-radius,radius),mr(-radius,radius),mr(-radius,radius))
  324. mag2 = (cframe-pos2).magnitude
  325. local laz2 = part:Clone() laz2.Parent = mode
  326. laz2.Size = Vector3.new(laz.Size.x,mag2,laz.Size.z) laz2.Anchored = true
  327. --Mesh(laz2,1,1,1,1)
  328. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  329. previo = laz2
  330. for i = 1,number do
  331. cframe = (previo.CFrame*cfn(0,-mag/2,0)).p
  332. pos2 = cframe+Vector3.new(mr(-radius,radius),mr(-radius,radius),mr(-radius,radius))
  333. mag2 = (cframe-pos2).magnitude
  334. laz2 = part:Clone() laz2.Parent = mode
  335. laz2.Size = Vector3.new(laz.Size.x,mag2,laz.Size.z) laz2.Anchored = true
  336. --Mesh(laz2,1,1,1,1)
  337. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  338. previo = laz2
  339. end
  340. end
  341. Debris:AddItem(mode,.1)
  342. return mode
  343. end
  344. function trace(obj,cf,color,delay,t,thick) -- offset,color,delay,transparency,thickness
  345. if type(thick) == 'table' then
  346. x,y = thick[1],thick[2]
  347. else
  348. x,y = thick,thick
  349. end
  350. local name
  351. for i,v in pairs(getfenv()) do
  352. if v == obj then name = i end
  353. end
  354. getfenv()[name..'tr'] = true
  355. local prev = obj.CFrame
  356. coroutine.wrap(function()
  357. while getfenv()[name..'tr'] do
  358. local cf = obj.CFrame*cf
  359. local mag = (prev.p-cf.p).magnitude
  360. local p = Part(x or .1,mag,y or .1,color or 'White',t or .5) p.Anchored = true
  361. if type(thick) ~= 'table' then Mesh(p,1) end
  362. p.CFrame = (cfn(prev.p,cf.p)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  363. Debris:AddItem(p,delay or 1)
  364. prev = cf
  365. wait()
  366. end end)()
  367. end
  368. Lightning = function(p0,p1,tym,ofs,col,th,tra) -- start end times offset color thickness
  369. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  370. for i=1,tym do
  371. li = Part(th,th,magz/tym,col,tra or .4) li.Anchored = true
  372. local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  373. local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
  374. if tym == i then
  375. local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
  376. li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
  377. else
  378. li.CFrame = cfn(curpos,trolpos)*cfn(0,0,magz/tym/2)
  379. end
  380. curpos = li.CFrame*cfn(0,0,magz/tym/2).p Debris:AddItem(li,0.25)
  381. end
  382. end
  383. --/SFX
  384. --Weapon
  385. hdl = Part(.25,4,.25,'Light stone grey')
  386. hw = Weld(hdl,rarm,0,-1,0,-math.pi/2)
  387. Mesh(hdl,1)
  388. ydin = Part(.5,.5,.5,'Lime green')
  389. Weld(ydin,hdl,0,2.25,0)
  390. Mesh(ydin,2)
  391. tip = Part(1,2,1,'Lime green',.5)
  392. tipw = Weld(tip,ydin,0,.6,0)
  393. Mesh(tip,2,1,1,1)
  394. plate = Part(2,.1,2,'Black') Mesh(plate,1,.5,.5,.5)
  395. Weld(plate,hdl,0,2,0)
  396. r = .5
  397. for i = 1,360,30 do
  398. p = Part(.11,.1,.1,'Black') Mesh(p,3,1,1,.5)
  399. Weld(p,plate,math.cos(md(i))*r,0,math.sin(md(i))*r,math.pi/2,0,math.pi/2+md(i))
  400. p2 = Part(.35,.1,.1,'Black') Mesh(p2,3,1,.5,.5)
  401. Weld(p2,p,0,r*2.25,0)
  402. end
  403. r = .1
  404. for i = 0,1,.05 do
  405. if i%5 == 0 then wait() end
  406. p = Part(.1,.1,.1,'Black') Mesh(p,2)
  407. Weld(p,hdl,math.cos(md(i*360*3))*r,-2+i*4,math.sin(md(i*360*3))*r)
  408. end
  409. p = Part(1,1,1,'Lime green')
  410. Weld(p,hdl,0,-2,0,math.pi/2)
  411. Mesh(p,'Diamond',.5,.5,.5)
  412. --/Weapon
  413. ftorso = _
  414. ftw = _
  415. function FindHum(a) result = _
  416. for i,v in pairs(a:children()) do
  417. if v:IsA'Humanoid' then result = v end
  418. end
  419. return result
  420. end
  421. function Equip()
  422. Lock'R' --Lock'L'
  423. PutBack'F'
  424. tw(rw,cfn()*ang(0,0,md(-5)),.1)
  425. --tw(lw,cfn()*ang(0,0,md(15)))
  426. equip = rw.C1 --equip2 = lw.C1
  427. end
  428. function Unequip() PutBack'T'
  429. Lock'R' --Lock'L'
  430. end
  431. BackPos = cfn(0,0,.6)*ang(0,0,md(45))
  432. HoldPos = cfn(0,-1,0)*ang(-math.pi/2,0,0)
  433. function PutBack(a)
  434. if a == 'T' then
  435. hw.Part0 = torso
  436. hw.C0 = BackPos
  437. elseif a == 'F' then
  438. hw.Part0 = rarm
  439. hw.C0 = HoldPos
  440. end
  441. end
  442. PutBack'T'
  443. --funcs
  444. local function check(k) local downed = false
  445. if not Keys[k] then downed = true else downed = false end
  446. return downed
  447. end
  448. local function WK(key)
  449. return (Keys[key] and downed)
  450. end
  451. local function CreateLoop(tim,keys) local count = 0
  452. while count < tim do
  453. for i,v in pairs(keys) do
  454. if WK(i) then v(mouse) return end
  455. end
  456. count = count+1
  457. wait()
  458. end
  459. end
  460. --/funcs
  461. function lerp(a,b,c)
  462. return a+(b-a)*c
  463. end
  464. --Attacks
  465. nsize = tip.Size
  466. Mons = Add.Sound("http://www.roblox.com/Asset/?id=2676305",2)
  467. function slash()
  468. hurt = false
  469. local con = tip.Touched:connect(function(hit)
  470. local hum = FindHum(hit.Parent)
  471. if hum and hurt and hum.Health > 0 then
  472. hum.Health = hum.Health -(3)
  473. elseif hum and hum.Health <= 0 and not FFS(hum,'Dead') then hum.Health = -1
  474. Mons:Play() Instance.new('BoolValue',hum).Name = 'Dead'
  475. for i,v in pairs(hum.Parent:children()) do
  476. if v:IsA('Part') then
  477. Instance.new('BodyForce',v).force = Vector3.new(0,v:GetMass()*floatforce,0)
  478. end end
  479. end
  480. end)
  481. function stab() Lock'L'
  482. bp = Add.BP(torso,l(torso,0,5,-5).p)
  483. tw(rw,cfn(0,.7,0)*ang(md(-140),md(-45),md(20)),.1,'') --up
  484. tw(lw,cfn(0,.7,0)*ang(md(-140),md(45),md(20))) wait(3)
  485. end
  486. local function second()
  487. tw(rw,cfn(-.2,.3,.2)*ang(md(-130),md(-45),md(-10)),.1,'') --Rise
  488. for i = 0,1,.1 do wait() --Morph
  489. lerp(nsize,Vector3.new(.5,4,.5),i)
  490. tipw.Parent = ydin
  491. tipw.Part1 = tip tipw.Part0 = ydin
  492. tipw.C0 = cfn(0,.6+i*1.5,0)
  493. end
  494. Synth:Pitch(2) Synth:Play()
  495. tw(rw,cfn()*ang(md(40),md(0),md(-50)),.3) --Down
  496. hurt = true
  497. end
  498. tw(rw,cfn(-.2,.3,.2)*ang(md(-130),md(-45),md(-50)),.1,'') --Rise
  499. for i = 0,1,.1 do wait() --Morph
  500. tip.Size = lerp(nsize,Vector3.new(.5,4,.5),i)
  501. tipw.Parent = ydin
  502. tipw.Part1 = tip tipw.Part0 = ydin
  503. tipw.C0 = cfn(0,.6+i*1.5,0)
  504. end Synth:Play()
  505. downed = check('f') hurt = true
  506. tw(rw,cfn()*ang(md(40),md(0),md(-10)),.3) --Down
  507. CreateLoop(1,{f=second;q=stab})
  508. hurt = false
  509. tw(rw,equip,.1,'') --Back
  510. for i = 1,0,-.3 do wait() --Morph back
  511. tip.Size = lerp(nsize,Vector3.new(.5,4,.5),i)
  512. tipw.Parent = ydin
  513. tipw.Part1 = tip tipw.Part0 = ydin
  514. tipw.C0 = cfn(0,.6+i*1.5,0)
  515. end
  516. Synth:Pitch(1) con:disconnect()
  517. end
  518. Whoosh = Add.Sound("http://www.roblox.com/Asset/?id=18426149",1)
  519. function trip()
  520. Lock2'R'
  521. local con = char['Right Leg'].Touched:connect(function(hit)
  522. local hum = FindHum(hit.Parent)
  523. hum.Health = hum.Health - 5
  524. if hum then hum.Sit = true end
  525. end)
  526. tw(rw2,cfn(0,-.2,-.3)*ang(md(30),0,0)) Whoosh:Play()
  527. tw(rw2,cfn(0,.5,.3)*ang(md(-70),0,0),.3)
  528. tw(rw2,cfn(),.3)
  529. Lock2'R'
  530. con:disconnect()
  531. end
  532. function sit()
  533. if sitbp == nil then
  534. Lock2'R' Lock2'L' Lock'L'
  535. sitbp = Add.BP(torso,torso.Position)
  536. sitbg = Add.BG(torso)
  537. --rw2.C1 = cfn()*ang(md(i),0,md(i/(90/-30)))
  538. --lw2.C1 = cfn()*ang(md(i),0,md(i/(90/30)))
  539. tw(rw2,cfn(.15,.4,.3)*ang(md(-60),md(30),0),.1,'') --right leg
  540. tw(lw2,cfn(-.15,.4,.3)*ang(md(-60),md(-30),0),.1,'') --left leg
  541. tw(rw,cfn()*ang(md(25),0,md(-20)),.1,'') --rarm down
  542. tw(lw,cfn()*ang(md(25),0,md(20)),.1,'') --larm down
  543. cf = torso.CFrame
  544. for i = 0,1,.1 do wait()
  545. sitbp.position = torso.Position - Vector3.new(0,i*1.25,0)
  546. sitbg.cframe = cf*ang(md(i*20),0,0)
  547. end
  548. elseif sitbp ~= nil then
  549. --rw2.C1 = cfn()*ang(md(i),0,md(i/(90/-30)))
  550. --lw2.C1 = cfn()*ang(md(i),0,md(i/(90/30)))
  551. tw(rw2,cfn(),.1,'')
  552. tw(lw2,cfn(),.1,'') tw(rw,equip,.1,'')
  553. for i = 0,1,.1 do wait()
  554. sitbp.position = torso.Position + Vector3.new(0,i,0)
  555. sitbg.cframe = cf*cfn(-i,-i,-i)
  556. end
  557. Lock2'R' Lock2'L' Lock'L'
  558. sitbp:Remove() sitbg:Destroy() sitbp = nil sitbg = _
  559. end
  560. end
  561. Crack = Add.Sound("http://www.roblox.com/Asset/?id=15933756",1)
  562. Crack.Sound.Volume = 300
  563. function blast() local list = {}
  564. tw(rw,cfn()*ang(md(-120),0,0),.1,'')
  565. tw(hw,cfn()*ang(md(45),0,0))
  566. met = Part(1,1,1,'White',0,1,1)
  567. holding = true
  568. mag = 1 maxmag = 15
  569. while holding do mag = mag < maxmag and mag+.5 or maxmag
  570. met.Size = Vector3.new(1,mag*7,1)
  571. met.CFrame = l(l(torso,0,0,-7),0,0,-mag*7/2,math.pi/2)
  572. wait()
  573. end
  574. met:Destroy()
  575. tcf = torso.CFrame
  576. for y = 0,mag do
  577. local ground = GetGround(l(tcf,0,0,-7-y*7).p,300)
  578. if ground.pos then
  579. cf = cfn(ground.pos)
  580. end
  581. for i = 1,15 do local tab = {}
  582. p = Part(1,1,1,i%2 == 0 and 'White' or 'Lime green',0,1,1)
  583. p.CFrame = l(cf,mr(-5,5),0,mr(-5,5))
  584. tab.obj = p
  585. tab.cf = p.CFrame
  586. tab.size = mr(5,10)
  587. table.insert(list,tab)
  588. end
  589. end Crack:Play()
  590. for i = 0,1,.2 do wait()
  591. for _,v in pairs(list) do
  592. v.obj.Size = Vector3.new(1,v.size*i,1)
  593. v.obj.CFrame = v.cf*cfn(0,v.size*i/2,0)
  594. end
  595. end
  596. Delay(4,function()
  597. for i = 1,0,-.2 do wait()
  598. for _,v in pairs(list) do
  599. v.obj.Size = Vector3.new(1,v.size*i,1)
  600. v.obj.CFrame = v.cf*cfn(0,v.size*i/2,0)
  601. end
  602. end
  603. for _,v in pairs(list) do
  604. v.obj:Destroy()
  605. end end)
  606. tw(rw,equip,.1,'') tw(hw,cfn())
  607. end
  608. Cages = {}
  609. function shoudon(mouse) a = 0
  610. Mod = Instance.new('Model',Weapon)
  611. Cur_Parent = Mod
  612. p = Part(1,1,1,'Black',1) p.Anchored = true
  613. holding = true
  614. genNew('SelectionBox',p,{
  615. Adornee = p;
  616. Color = bcol'Lime green';
  617. })
  618. cf = mouse.hit
  619. while holding do wait() a = a+1
  620. if Keys.e then for i,v in pairs(Cages) do v:Destroy() end p:Destroy() Cages = {}
  621. return end
  622. p.Size = Vector3.new(a,a,a)
  623. p.CFrame = cfn(cf.p)*cfn(0,a/2,0)
  624. end
  625.  
  626. for i = 1,0,-.1 do
  627. wait()
  628. p.Transparency = i
  629. end
  630. for _,y in pairs({-a/2+.5,a/2+.5}) do
  631. for _,pos in pairs({ {x=a/2,z=0};{x=-a/2,z=0};{z=a/2,x=0,r=1};{z=-a/2,x=0,r=1} }) do
  632. w = Part(1,1,a+1,'Black',0,1,1)
  633. w.CFrame = l(p,pos.x,y,pos.z,0,pos.r and math.pi/2 or 0)
  634. w = Part(1,a-1,a-1,'Lime green',.5,1,1)
  635. w.CFrame = l(p,pos.x,.5,pos.z,0,pos.r and math.pi/2 or 0)
  636. end
  637. end
  638. w = Part(1,a-1,a-1,'Lime green',.5,1,1)
  639. w.CFrame = l(p,0,a/2,0,0,0,math.pi/2)
  640. w = Part(1,a-1,a-1,'Lime green',.5,1,1)
  641. w.CFrame = l(p,0,-a/2,0,0,0,math.pi/2)
  642. for i,pos in pairs({ {x=a/2,z=a/2};{x=-a/2,z=-a/2};{z=a/2,x=-a/2};{z=-a/2,x= a/2} }) do
  643. w = Part(1,a,1,'Black',0,1,1)
  644. w.CFrame = l(p,pos.x,0,pos.z,0)
  645. end
  646. table.insert(Cages,Mod) Cur_Parent = _
  647. for i = 0,1,.1 do
  648. wait()
  649. p.Transparency = i
  650. end
  651. p:Destroy()
  652. end
  653. for i,v in pairs(torso:children()) do if v:IsA'BodyGyro' or v:IsA'BodyPosition' or v:IsA'BodyVelocity' then v:Destroy() end end
  654. function teleport(mouse) char.archivable = true
  655. coroutine.wrap(function() loopi = true a = 0
  656. repeat a = a+1
  657. local p = Part(5,5,5,a%2 == 0 and 'White' or 'Lime green',.5)
  658. p.CFrame = l(torso,0,0,0,mr(-10,10),mr(-10,10),mr(-10,10))
  659. Debris:AddItem(p,.1) wait()
  660. until not loopi
  661. end)()
  662. tc(torso,cfn(mouse.hit.p)*cfn(0,5,0),.1)
  663. loopi = false
  664. end
  665. function loud()
  666. tw(rw,cfn()*ang(md(40),md(-25),0),.1,'')
  667. for i = 0,1,.1 do wait()
  668. tip.Size = Vector3.new(1+i*1,2-i*1.5,1+i*1)
  669. tipw.Parent = ydin
  670. tipw.Part1 = tip
  671. end
  672. e = Instance.new("Explosion",Workspace)
  673. e.BlastPressure = 0
  674. e.Position = tip.Position
  675. e.Hit:connect(function(hit)
  676. local hum = FindHum(hit.Parent)
  677. if hum and hum.Parent ~= char then
  678. hum.Health = hum.Health -(3)
  679. hum.Sit = true
  680. hum.Torso.Velocity = cfn(e.Position,Vector3.new(hum.Torso.Position.x,torso.Position.y,hum.Torso.Position.z)).lookVector*100
  681. end
  682. end)
  683. coroutine.wrap(function()
  684. local p = Part(1,1,1,'Lime green',.5,1,0)
  685. p.CFrame = cfn(tip.CFrame.p)*ang(math.pi/2,0,0)
  686. msh = Mesh(p,'Ring')
  687. for i = 1,30 do wait()
  688. msh.Scale = Vector3.new(i,i,1)
  689. p.Transparency = i/30
  690. end
  691. p:Destroy()
  692. end)()
  693. q = Add.BV(torso,cfn(l(torso).p,l(torso,0,2,5).p).lookVector*100)
  694. Debris:AddItem(q,.5)
  695. tw(rw,equip,.1,'')
  696. for i = 1,0,-.1 do wait()
  697. tip.Size = Vector3.new(1+i*1,2-i*1.5,1+i*1)
  698. tipw.Parent = ydin
  699. tipw.Part1 = tip
  700. end
  701. end
  702. --/Attacks
  703. --Sounds
  704. Synth = Add.Sound("http://www.roblox.com/Asset/?id=46153268",1)
  705. --/Sounds
  706. --http://www.roblox.com/asset/?id=107431751
  707. --http://www.roblox.com/asset/?id=107431876
  708. klist = { --- Key Bindings
  709. f = slash;
  710. x = sit;
  711. eq = blast;
  712. qq = shoudon;
  713. t = teleport;
  714. c = loud;
  715. v = trip;
  716. }
  717. Keys = {}
  718. function CheckKeys(key)
  719. if Keys[key] then Keys[key] = _
  720. elseif not Keys[key] then Keys[key] = true
  721. end
  722. end
  723. hop.Selected:connect(function(mouse) Equip()
  724. mouse.Button1Up:connect(function() holding = false end)
  725. mouse.KeyUp:connect(function(key) CheckKeys(key) for i,v in pairs(klist) do if key == i:sub(1,1) and i:sub(2,2) == 'q' then holding = false end end end)
  726. mouse.KeyDown:connect(function(key)
  727. CheckKeys(key)
  728. if attacking then return end
  729. for i,v in pairs(klist) do
  730. if key == i:sub(1,1) then attacking = true v(mouse) attacking = false
  731. end
  732. end
  733. end)
  734. end)
Add Comment
Please, Sign In to add comment