Advertisement
Axtem

Crystal Polearm

Oct 12th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.92 KB | None | 0 0
  1.  
  2. ---Made by Your Mum-----------------------------------------------------
  3. print('a')
  4. owner,name = 'HonorableLegitPwnage','Polearm'
  5. PLAYERS = game:GetService('Players')
  6. ply = PLAYERS[owner]
  7. char = ply.Character
  8. terrain = Workspace.Terrain
  9. pcall(function() char:FindFirstChild("legetdg"):Remove() end)
  10. m = Instance.new("Model",char) m.Name = "legetdg"
  11. if script.Parent.className ~= 'HopperBin' then
  12. hop = Instance.new("HopperBin",PLAYERS[owner].Backpack)
  13. hop.Name = name
  14. script.Parent = hop
  15. script.Name = "Function"
  16. end
  17. owner2 = owner
  18. hop = script.Parent
  19.  
  20. debris = game:GetService("Debris")
  21.  
  22. cfn,ang,v3n,ud2n,V2 = CFrame.new,CFrame.Angles,Vector3.new,UDim2.new,Vector2.new
  23. floatforce = 196.25
  24.  
  25. torso,head = char.Torso,char.Head
  26. attacking = false
  27. track = false
  28.  
  29. rs = torso["Right Shoulder"]
  30. ls = torso["Left Shoulder"]
  31. rh = torso["Right Hip"]
  32. lh = torso["Right Hip"]
  33. neck = torso["Neck"]
  34. rw,lw = nil,nil
  35. rhw,lhw = nil,nil
  36. local orgc1 = rs.C1
  37.  
  38. rarm = char["Right Arm"]
  39. larm = char["Left Arm"]
  40. rleg = char["Right Leg"]
  41. lleg = char["Left Leg"]
  42.  
  43. normposr = cfn(1.5,.5,0)
  44. normposl = cfn(-1.5,.5,0)
  45. normposl2 = cfn(.5,-1.5,0)
  46. normposr2 = cfn(-.5,-1.5,0)
  47. normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  48.  
  49. holdpos = normposr*ang(math.pi/2,0,0)
  50. holdpos2 = normposl*ang(math.pi/2,0,0)
  51.  
  52.  
  53. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee)
  54. if typee == 'wedge' then
  55. c = Instance.new("WedgePart",m)
  56. elseif typee == 'seat' then
  57. c = Instance.new("Seat",m)
  58. elseif typee == 'vseat' then
  59. c = Instance.new("VehicleSeat",m)
  60. else
  61. c = Instance.new("Part",m)
  62. end
  63. c.TopSurface,c.BottomSurface = 0,0
  64. c.Locked = true
  65. c.formFactor = "Custom"
  66. c.Size = Vector3.new(x,y,z)
  67. if color ~= "random" then
  68. c.BrickColor = BrickColor.new(color)
  69. else c.BrickColor = BrickColor:random()
  70. end
  71. c.Transparency = transparency
  72. c.CanCollide = cancollide
  73. if anchored ~= nil then c.Anchored = anchored end
  74. if parent ~= nil then c.Parent = parent end
  75. return c
  76. end
  77. ,
  78. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  79. ,
  80. ["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent)
  81. w = Instance.new("Motor",m)
  82. if parent ~= nil then w.Parent = parent end
  83. w.Part0,w.Part1 = part0,part1
  84. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  85. return w
  86. end
  87. ,
  88. ["BG"] = function(parent)
  89. local c = Instance.new("BodyGyro",parent)
  90. c.P = 20e+003
  91. c.cframe = parent.CFrame
  92. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  93. return c
  94. end
  95. ,
  96. ["BP"] = function(parent,position)
  97. local bp = Instance.new("BodyPosition",parent)
  98. bp.maxForce = Vector3.new()*math.huge
  99. bp.position = position
  100. return bp
  101. end
  102. ,
  103. ["F"] = function(parent,size,heat,color,secondcolor,enabled)
  104. f = Instance.new("Fire",parent)
  105. f.Size = size
  106. f.Heat = heat
  107. if enabled ~= nil then f.Enabled = enabled end
  108. if color ~= nil then f.Color = BrickColor.new(color).Color end
  109. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  110. return f
  111. end
  112. ,
  113.  
  114. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  115. if meshid == "cylinder" then
  116. mesh = Instance.new("CylinderMesh",parent)
  117. mesh.Scale = Vector3.new(x,y,z)
  118. return mesh
  119. elseif meshid == 'block' then
  120. mesh = Instance.new("BlockMesh",parent)
  121. mesh.Scale = Vector3.new(x,y,z)
  122. return mesh
  123. end
  124. mesh = Instance.new("SpecialMesh",parent)
  125.  
  126. if meshid == 'wedge' then
  127. mesh.MeshType = 'Wedge'
  128. elseif meshid == 'sphere' then
  129. mesh.MeshType = 3
  130. elseif type(meshid) == "number" then
  131. mesh.MeshId = "rbxassetid://"..meshid
  132. else
  133. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  134. end
  135. mesh.Scale = Vector3.new(x,y,z)
  136. if meshtexture then
  137. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  138. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  139. end
  140. return mesh
  141. end,
  142.  
  143. ["Dec"] = function(parent,face,id,transparency)
  144. c = Instance.new("Decal",parent)
  145. c.Face = face
  146. c.Texture = id
  147. if transparency then c.Transparency = transparency end
  148. return c
  149. end,
  150. ["S"] = function(id,pitch,volume,parent)
  151. cur = nil
  152. found = false
  153. if type(id) == 'string' then
  154. for i,v in pairs(char.Head:children()) do
  155. if v:IsA("Sound") and v.Name == id and not found then
  156. cur = v
  157. if parent then cur = v:Clone() cur.Parent = parent end
  158. cur.Pitch = pitch
  159. if volume then cur.Volume = volume end
  160. cur:Play()
  161. found = true
  162. return cur
  163. end
  164. end
  165. elseif type(id) == 'number' then
  166. local a = char.Head:FindFirstChild('exteo')
  167. a.SoundId = 'rbxassetid://'..id
  168. a.Pitch = pitch
  169. if volume then a.Volume = volume end
  170. a:Play()
  171. return a
  172. end
  173. end
  174. }
  175. ----GUI SHORTENINGS-----
  176. G = {
  177. ["F"] = function(parent,size,position)
  178. c = Instance.new("Frame",parent)
  179. c.Size = UDim2.new(size.x,0,size.y,0)
  180. c.Style = 2
  181. c.Position = UDim2.new(position.x,0,position.y,0)
  182. return c
  183. end,
  184. ["B"] = function(parent,size,position,text,...)
  185. c = Instance.new("TextButton",parent)
  186. c.Size = UDim2.new(size.x,0,size.y,0)
  187. c.Position = UDim2.new(position.x,0,position.y,0)
  188. c.AutoButtonColor = true
  189. c.Text = text
  190. return c
  191. end,
  192. ["L"] = function(parent,size,position,text)
  193. c = Instance.new("TextLabel",parent)
  194. c.Size = UDim2.new(size.x,0,size.y,0)
  195. c.Position = UDim2.new(position.x,0,position.y,0)
  196. if text then c.Text = text end
  197. return c
  198. end
  199. }
  200. ----GUI SHORTENINGS-----
  201. ------MESHIDS---
  202. meshids = {["penguin"] = 15853464, ["ring"] = 3270017,
  203. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  204. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  205. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557,
  206. ["ramen"] = 19380188,["lightning"] = 72583597,["bullet"]=2697549}---some meshids
  207. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153}
  208. soundids = {["bell"] = 20005706,["flintlock"] = 13510352,["falcon"] = 1387390,['sensa'] = 4700455,
  209. ['midas'] = 17385513,['spark'] = 10756118,['boom'] = 10730819,['plank'] = 10548112
  210. }
  211. for i,v in pairs(soundids) do
  212. sound = Instance.new("Sound")
  213. sound.SoundId = "http://www.roblox.com/asset/?id="..v
  214. sound.Name = i
  215. sound.Parent = char.Head
  216. end
  217.  
  218. function l(a,x,y,z,b)
  219. if b == nil then
  220. return a.CFrame*cfn(x,y,z)
  221. else
  222. return a*cfn(x,y,z)
  223. end
  224. end
  225.  
  226.  
  227. lock = {["R"] =
  228. function(a)
  229. if a == 1 then
  230. rabrick = T.P(1,1,1,"White",1,false,false)
  231. rw = T.W(rabrick,torso,1.5,.5,0,0,0,0)
  232. T.W(rarm,rabrick,0,-.5,0,0,0,0)
  233. elseif a == 2 then
  234. rlbrick = T.P(1,1,1,"White",1,false,false)
  235. rhw = T.W(rlbrick,torso,-.5,-1.5,0,0,0,0)
  236. T.W(rleg,rlbrick,0,-.5,0,0,0,0)
  237. elseif a == 0 then
  238. rs.Parent = torso
  239. rw.Parent = nil
  240. rabrick:Destroy() rabrick = nil
  241. elseif a == -1 then
  242. rhw.Parent = nil
  243. rh.Parent = torso
  244. rlbrick:Destroy() rlbrick = nil
  245. end
  246. end
  247. , ["L"] = function(a)
  248. if a == 1 then
  249. labrick = T.P(1,1,1,"White",1,false,false)
  250. lw = T.W(labrick,torso,-1.5,.5,0,0,0,0)
  251. T.W(larm,labrick,0,-.5,0,0,0,0)
  252. elseif a == 2 then
  253. llbrick = T.P(1,1,1,"White",1,false,false)
  254. lhw = T.W(llbrick,torso,.5,-1.5,0,0,0,0)
  255. T.W(lleg,llbrick,0,-.5,0,0,0,0)
  256. elseif a == 0 then
  257. ls.Parent = torso
  258. lw.Parent = nil
  259. labrick:Destroy() labrick = nil
  260. elseif a == -1 then
  261. lhw.Parent = nil
  262. lh.Parent = torso
  263. llbrick:Destroy() llbrick = nil
  264. end
  265. end
  266. }
  267.  
  268. M = {["R"] = function(a,b) return math.random(a,b) end,
  269. ["Cos"] = function(a) return math.cos(a) end,
  270. ["Sin"] = function(a) return math.sin(a) end,
  271. ["D"] = function(a) return math.rad(a) end
  272. }
  273.  
  274. hdl = T.P(.25,4,.25,'Brown',0,false,false)
  275. hw = T.W(hdl,rarm,0,-1,0,-math.pi/2,0,0) normh = hw.C1
  276. --[[
  277. p = T.P(.1,2,.3,'Bright green',0,false,false,m,'wedge')
  278. T.W(p,hdl,0,2.95,0,0,math.pi,0)
  279.  
  280. p2 = T.P(.1,1,1,'Bright green',0,false,false,m,'wedge')
  281. T.W(p2,p,0,.5,.65,math.pi/2,0,0)
  282.  
  283. p3 = T.P(.1,1,.5,'Bright green',0,false,false,m,'wedge')
  284. T.W(p3,p2,0,.25,1,math.pi/2,0,0)
  285. ]]--
  286.  
  287. function zeero(mot,a) local oldvelocity = mot.MaxVelocity mot.MaxVelocity = 1.7E+308
  288. if a == nil then mot.DesiredAngle = 0
  289. else mot.DesiredAngle = a
  290. end
  291. while mot.DesiredAngle ~= mot.CurrentAngle do wait() end
  292. mot.MaxVelocity = oldvelocity
  293. end
  294. function ventta(mot)
  295. while mot.DesiredAngle ~= mot.CurrentAngle do wait() end
  296. end
  297.  
  298. function damage(hit,amount,bool)
  299. for i,v in pairs(hit:children()) do
  300. if v:IsA("Humanoid") and v.Parent ~= char then
  301. if bool then
  302. local found = v:FindFirstChild('lol')
  303. if not found then
  304. bo = Instance.new("StringValue",v)
  305. bo.Name = 'lol'
  306. debris:AddItem(bo,bool)
  307. v.Health = v.Health-amount
  308. end
  309. else
  310. v.Health = v.Health-amount
  311. end
  312. end
  313. end
  314. end
  315.  
  316. T.C(function()
  317. while wait() do
  318. wld.DesiredAngle = math.pi
  319. ventta(wld)
  320. zeero(wld,0)
  321. end
  322. end)
  323.  
  324. function spaas(position,radius,number,number2,color)
  325. mode = Instance.new("Model",m)
  326. for i = 1,number2 do
  327. pos = position+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  328. mag = (position-pos).magnitude
  329.  
  330. col = color or 'Toothpaste'
  331. local laz = T.P(.1,mag,.1,col,0,false,true,mode)
  332.  
  333. T.FM(laz,'cylinder',.3,1,.3)
  334. laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  335.  
  336. cframe = (laz.CFrame*cfn(0,-mag/2,0)).p
  337. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  338. mag2 = (cframe-pos2).magnitude
  339. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  340. T.FM(laz2,'cylinder',.3,1,.3)
  341. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  342.  
  343. previo = laz2
  344. for i = 1,number do
  345. cframe = (previo.CFrame*cfn(0,-mag/2,0)).p
  346. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  347. mag2 = (cframe-pos2).magnitude
  348.  
  349. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  350. T.FM(laz2,'cylinder',.3,1,.3)
  351. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  352.  
  353. previo = laz2
  354. end
  355.  
  356. end
  357. debris:AddItem(mode,.1)
  358. end
  359.  
  360.  
  361. pp = T.P(.1,.1,.1,'Black',0,false,false)
  362. T.FM(pp,'sphere',1,1,1)
  363.  
  364. wld = T.W(pp,hdl,0,2.5,0,-math.pi/2,0,0)
  365. wld.C0 = cfn()*ang(0,0,0,math.pi/2,0,0)
  366. wld.MaxVelocity = .1
  367.  
  368. for _ = 1,1 do --- WEAPON LOOP
  369. decor = Instance.new("Model",m)
  370. for i = -45,45,90 do
  371. wait()
  372. print('a')
  373. p = T.P(.1,.1,.1,'Black',1,false,false,decor)
  374. T.W(p,pp,0,0,0,0,0,M.D(i))
  375. T.FM(p,'sphere',1,1,1)
  376. r = .3
  377. for i = 0,360,30 do
  378. p2 = T.P(.2,.1,.1,'Deep blue',0,false,false,decor)
  379. T.FM(p2,'block',.9,.25,.45)
  380. T.W(p2,p,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r,math.pi/2,0,-math.pi/2+M.D(i))
  381. p3 = T.P(.1,.1,.1,'Deep blue',0,false,false,decor)
  382. T.FM(p3,'block',.25,.5,.45)
  383. T.W(p3,p2,0,-.05,0,0,0,0)
  384. end
  385. r = .2
  386. for i = 0,360,30 do
  387. p2 = T.P(.2,.1,.1,'Deep blue',0,false,false,decor)
  388. T.FM(p2,'block',.6,.25,.45)
  389. T.W(p2,p,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r,math.pi/2,0,-math.pi/2+M.D(i))
  390. end
  391. r = .35
  392. for i = 0,360,120 do
  393. p2 = T.P(2,.1,.1,'Deep blue',0,false,false,decor)
  394. T.FM(p2,'block',.6,.25,.45)
  395. T.W(p2,p,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r,math.pi/2,0,-math.pi/2+M.D(i))
  396. end
  397. for i = 60,360+60,120 do
  398. p2 = T.P(2,.1,.1,'Deep blue',0,false,false,decor)
  399. T.FM(p2,'block',.62,.25,.45)
  400. T.W(p2,p,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r,math.pi/2,0,-math.pi/2+M.D(i))
  401. end
  402. p4 = T.P(.4,.1,.4,'Lime green',.5,false,false,decor)
  403. T.FM(p4,'cylinder',.9,.45,.9)
  404. T.W(p4,p,0,0,0,0,0,0)
  405. end
  406. end
  407.  
  408. center = _
  409. troll_loop = false
  410.  
  411.  
  412. function star(mouse)
  413. ou = 20
  414. th = 1
  415. wi = 3
  416. centers = {}
  417.  
  418. for _ = 1,1 do ----- CENTER LOOP
  419. pos = cfn(mouse.hit.p)+v3n(0,.1,0) oripos = pos
  420. main = T.P(1,1,1,'White',1,true,true)
  421. main.CFrame = pos
  422. center = main
  423.  
  424. r = .3*ou
  425. for i = 0,360,30 do ---- INNER RING
  426. p2 = T.P(.2,.1,.1,'Deep blue',0,false,true,decor)
  427. T.FM(p2,'block',.9*ou,wi,th)
  428. p2.CFrame = l(main,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)*ang(math.pi/2,0,-math.pi/2+M.D(i))
  429.  
  430. p3 = T.P(.1,.1,.1,'Deep blue',0,false,true,decor)
  431. T.FM(p3,'block',wi,.5*ou,th)
  432. p3.CFrame = l(p2,0,-.05*ou,0)
  433. end
  434.  
  435. r = .2*ou
  436. for i = 0,360,30 do ---OUTER RING
  437. p2 = T.P(.2,.1,.1,'Deep blue',0,false,true,decor)
  438. T.FM(p2,'block',.6*ou,wi,th)
  439. p2.CFrame = l(main,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)*ang(math.pi/2,0,-math.pi/2+M.D(i))
  440. end
  441.  
  442. r = .35*ou
  443. for q = 0,60,60 do ----TRIANGLES
  444. for i = q,360+q,120 do
  445. p2 = T.P(2,.1,.1,'Deep blue',0,false,true,decor)
  446. T.FM(p2,'block',.6*ou,wi,th)
  447. p2.CFrame = l(main,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)*ang(math.pi/2,0,-math.pi/2+M.D(i))
  448. end
  449. end
  450. ----------------
  451. p4 = T.P(.4,.1,.4,'Lime green',.5,false,false,decor) --- EYE
  452. T.FM(p4,'cylinder',.9*(ou*1.15),.45,.9*(ou*1.15))
  453. T.W(p4,main,0,0,0,0,0,0)
  454. -----------------------
  455. end
  456.  
  457. ou = 10
  458. wi = 2
  459.  
  460. for i = 90,360+90,60 do --- MAIN LOOP
  461. pos = cfn(mouse.hit.p)+v3n(M.Cos(M.D(i))*18,.1,M.Sin(M.D(i))*18)
  462. main = T.P(1,1,1,'White',1,true,true)
  463. main.CFrame = pos
  464.  
  465. r = .3*ou
  466. for i = 0,360,30 do ---- INNER RING
  467. p2 = T.P(.2,.1,.1,'Deep blue',0,false,true,decor)
  468. T.FM(p2,'block',.9*ou,wi,th)
  469. p2.CFrame = l(main,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)*ang(math.pi/2,0,-math.pi/2+M.D(i))
  470.  
  471. p3 = T.P(.1,.1,.1,'Deep blue',0,false,true,decor)
  472. T.FM(p3,'block',wi,.5*ou,th)
  473. p3.CFrame = l(p2,0,-.05*ou,0)
  474. end
  475.  
  476. r = .2*ou
  477. for i = 0,360,30 do ---OUTER RING
  478. p2 = T.P(.2,.1,.1,'Deep blue',0,false,true,decor)
  479. T.FM(p2,'block',.6*ou,wi,th)
  480. p2.CFrame = l(main,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)*ang(math.pi/2,0,-math.pi/2+M.D(i))
  481. end
  482.  
  483. r = .35*ou
  484. for q = 0,60,60 do ----TRIANGLES
  485. triangle = {}
  486. for i = q+60,360+q,120 do
  487. p2 = T.P(2,.1,.1,'Deep blue',0,false,true,decor)
  488. T.FM(p2,'block',.6*ou,wi,th)
  489. p2.CFrame = l(main,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)*ang(math.pi/2,0,-math.pi/2+M.D(i))
  490. end
  491. end
  492. p4 = T.P(.4,.1,.4,'Lime green',.5,false,true,decor) --- EYE
  493. T.FM(p4,'cylinder',.9*(ou*1.15),.45,.9*(ou*1.15))
  494. p4.CFrame = main.CFrame
  495. table.insert(centers,p4)
  496. end ---- MAIN LOOP END
  497.  
  498. T.C(function() ---- TROLL LOOP
  499. while wait() do
  500. if troll_loop == true then
  501. rand = M.R(0,1)
  502. tex = rand>0 and 'http://www.roblox.com/asset/?id=34697344' or 'http://www.roblox.com/asset/?id=78298767'
  503. local sel = centers[math.random(#centers)]
  504. local pole = T.P(2,1,2,'White',0,true,true)
  505. T.FM(pole,'cylinder',1,1,1)
  506. pole.CFrame = cfn(sel.Position)
  507. local ball = T.P(4,4,4,'Nougat',0,true,true) ball.Shape = 0
  508. local pos = pole.CFrame
  509. for _,v in pairs({'Front','Back','Left','Right'}) do
  510. T.Dec(ball,v,tex)
  511. end
  512. for i = 1,5,5/3 do
  513. pole.Size = v3n(2,i,2)
  514. pole.CFrame = pos+v3n(0,i/2,0)
  515. ball.CFrame = pole.CFrame*cfn(0,i/2+1.95,0)
  516. wait()
  517. end
  518. for i = 5,1,-5/3 do
  519. pole.Size = v3n(2,i,2)
  520. pole.CFrame = pos+v3n(0,i/2,0)
  521. ball.CFrame = pole.CFrame*cfn(0,i/2+1.95,0)
  522. wait()
  523. end
  524. pole:Remove() ball:Remove()
  525. end
  526. end
  527. end)
  528. T.C(function() ---- GIANT TROLL LOOP
  529. while wait(1) do
  530. if troll_loop == true then
  531. pole = T.P(5,1,5,'White',0,true,true)
  532. pole.CFrame = cfn(center.Position)
  533. local ball = T.P(10,10,10,'Nougat',0,true,true) ball.Shape = 0
  534. local pos = pole.CFrame
  535. T.FM(pole,'cylinder',1,1,1)
  536.  
  537. for _,v in pairs({'Front','Back','Left','Right'}) do
  538. T.Dec(ball,v,'http://www.roblox.com/asset/?id=34697344')
  539. end
  540. for i = 1,30 do
  541. pole.Size = v3n(5,i,5)
  542. pole.CFrame = pos+v3n(0,i/2,0)
  543. ball.CFrame = pole.CFrame*cfn(0,i/2+4.95,0)
  544. wait()
  545. end
  546. for i = 30,1,-1 do
  547. pole.Size = v3n(5,i,5)
  548. pole.CFrame = pos+v3n(0,i/2,0)
  549. ball.CFrame = pole.CFrame*cfn(0,i/2+4.95,0)
  550. wait()
  551. end
  552. pole:Remove() ball:Remove()
  553. end
  554.  
  555. end
  556. end)
  557.  
  558. end --- FUNCTION END
  559.  
  560. function spark(mouse)
  561. if cannon then return end
  562. lock.R(1)
  563. for i = 0,1,.1 do
  564. wait()
  565. rw.C1 = normposr*ang(M.D(120*i),0,M.D(20*i))
  566. hw.C1 = normh*ang(0,0,M.D(90*i))
  567. end
  568. holding = true
  569. laz = T.P(.1,.1,.1,'Lime green',.5,false,true)
  570. T.FM(laz,'cylinder',1,1,1)
  571. while holding do
  572. if mouse.Target then
  573. spaas(pp.Position,1,2,1,'New Yeller')
  574. mag = (pp.Position-mouse.hit.p).magnitude
  575. laz.Size = v3n(.1,mag,.1)
  576. laz.CFrame = (cfn(pp.Position,mouse.hit.p)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  577.  
  578. decp = T.P(1,0,1,'White',1,false,true)
  579. pos = mouse.Target.CFrame:pointToObjectSpace(mouse.hit.p)
  580. decp.CFrame = cfn(pos,mouse.hit.p)*ang(-math.pi,0,0)
  581.  
  582. local pos = mouse.hit.p
  583. T.C(function()
  584. rand = M.R(1,3)
  585. local p = T.P(rand,1,rand,'Earth green',0,true,true)
  586. p.CFrame = cfn(pos)
  587. for i = 1,M.R(3,10) do
  588. wait()
  589. p.Size = v3n(p.Size.x,i,p.Size.z)
  590. p.CFrame = cfn(pos)+v3n(0,i/2,0)
  591. spaas(p.Position,10,1,1,'Deep blue')
  592. T.S('spark',1)
  593. end
  594. end)
  595. end
  596. wait()
  597. end
  598. laz:Remove()
  599. for i = 1,0,-.1 do
  600. wait()
  601. rw.C1 = normposr*ang(M.D(120*i),0,M.D(20*i))
  602. hw.C1 = normh*ang(0,0,M.D(90*i))
  603. end
  604. lock.R(0)
  605. end
  606.  
  607. cannon = _
  608. function cannonstaff()
  609. if not cannon then
  610. hw.C1 = normh
  611. cannon = T.P(1,3,1,'White',0,false,false)
  612. msh = T.FM(cannon,81616091,1,1,1,81616111)
  613. T.W(cannon,hdl,0,-1,0,math.pi,0,0)
  614. lock.R(1)
  615. for i = 0,1,.1 do
  616. rw.C1 = normposr*ang(M.D(180*i),0,0)
  617. msh.Scale = v3n(5*i,2.5*i,5*i)
  618. wait()
  619. end
  620. old=rw.C1
  621. for i = 0,1,.1 do
  622. hw.C1 = normh*cfn(0,0,-3*i)*ang(math.pi/2*i,0,0)
  623. rw.C1 = old*ang(M.D(-90*i),0,0)
  624. wait()
  625. end
  626. else
  627. for i = 1,0,-.1 do
  628. hw.C1 = normh*cfn(0,0,-3*i)*ang(math.pi/2*i,0,0)
  629. rw.C1 = normposr*ang(M.D(90*i),0,0)
  630. msh.Scale = v3n(5*i,2.5*i,5*i)
  631. wait()
  632. end
  633. cannon:Remove() cannon = nil
  634. lock.R(0)
  635. end
  636. end
  637.  
  638. plank = false
  639. flying = false
  640.  
  641. plank = nil
  642. function Planko()
  643. if plank then plank:Remove() plank = nil return end
  644. plank = T.P(10,1,10,'White',1,true,true)
  645. plank.CFrame = torso.CFrame*cfn(0,-3.5,0)
  646. plank.Material = 'Wood'
  647. torso.CFrame = torso.CFrame+v3n(0,.2,0)
  648. T.C(function()
  649. while wait() do
  650. plank.Velocity = plank.CFrame.lookVector*30
  651. plank.CFrame = torso.CFrame*cfn(0,-3.5,0)
  652. wait()
  653. end
  654. end)
  655. end
  656.  
  657. function shoot()
  658. local bullet = T.P(1,1,3,'Black',0,true,false)
  659. local box = Instance.new("SelectionBox",bullet)
  660. box.Adornee = bullet
  661. bullet.CFrame = cannon.CFrame*cfn(0,6,0)*ang(math.pi/2,0,0)
  662. T.FM(bullet,'bullet',1,1,1)
  663. T.F(bullet,2,1,'Magenta','Alder')
  664. T.S('flintlock',1,200)
  665. Instance.new("BodyForce",bullet).force = torso.CFrame.lookVector*300+v3n(0,bullet:GetMass()*floatforce,0)
  666. bullet:BreakJoints()
  667. bullet.Touched:connect(function(hit)
  668. if not hit.Parent:IsDescendantOf(char) then
  669. T.S('boom',1,100,bullet)
  670. e = Instance.new("Explosion",Workspace)
  671. e.BlastPressure = 0
  672. e.Position = bullet.Position
  673. e.Hit:connect(function(hit) damage(hit.Parent,30,1) end)
  674. local cf = bullet.CFrame*cfn(0,0,1.5)
  675. bullet:Remove()
  676. local part = T.P(1,1,1,'White',1,true,true)
  677. part.Touched:connect(function(hit) damage(hit.Parent,1) end)
  678. box.Adornee,box.Parent = part,part
  679. for i = 1,30 do
  680. part.Size = v3n(i,i,i)
  681. part.CFrame = cf*ang(M.D(360/30*i),M.D(360/30*i),M.D(360/30*i))
  682. wait()
  683. end
  684. part:Remove()
  685. else
  686. T.S('plank',1,100,bullet)
  687. end
  688. end)
  689. for i = 0,1,.5 do
  690. rw.C1 = holdpos*ang(M.D(30*i),0,0)
  691. wait()
  692. end
  693. for i = 1,0,-.5 do
  694. rw.C1 = holdpos*ang(M.D(30*i),0,0)
  695. wait()
  696. end
  697. end
  698.  
  699. function lightning()
  700. lock.R(1) lock.L(1)
  701.  
  702. for i = 0,1,.1 do
  703. rw.C1 = normposr*ang(M.D(100*i),0,M.D(-30*i))*cfn(0,-.7*i,0)
  704. lw.C1 = normposl*ang(M.D(150*i),0,M.D(15*i))
  705. hw.C1 = normh*ang(0,0,M.D(50*i))
  706. wait()
  707. end
  708. wait(1)
  709. fire = T.F(pp,1,1,'White','Black')
  710. for i = 1,0,-.1 do
  711. rw.C1 = normposr*ang(M.D(100*i),0,M.D(-30*i))*cfn(0,-.7*i,0)
  712. lw.C1 = normposl*ang(M.D(150*i),0,M.D(15*i))
  713. wait()
  714. end
  715. for i = 0,1,.1 do
  716. rw.C1 = normposr*ang(M.D(180*i),0,0)
  717. hw.C1 = normh*cfn(0,0,-2*i)*ang(M.D(-90*i),0,0)
  718. wait()
  719. end
  720. local p = T.P(1,1,1,'White',0,false,true)
  721. pos = torso.CFrame
  722. msh = T.FM(p,'sphere',1,1,1)
  723. fire.Parent = p
  724. for i = 1,30 do
  725. p.CFrame = pos*cfn(0,-3+i,0)
  726. msh.Scale = v3n(i,i,i)
  727. wait()
  728. end
  729. fire:Remove()
  730. msh.MeshId = 'rbxassetid://'..meshids['spikeb']
  731. for i = 10,30 do
  732. msh.Scale = v3n(i,i,i)
  733. p.Transparency = i/30
  734. wait()
  735. end
  736.  
  737. p:Remove()
  738. for i = 1,0,-.1 do
  739. rw.C1 = normposr*ang(M.D(180*i),0,0)
  740. hw.C1 = normh*cfn(0,0,-2*i)*ang(M.D(-90*i),0,0)
  741. wait()
  742. end
  743. lock.R(0) lock.L(0)
  744. end
  745.  
  746. function onButton1Down(a)
  747. if cannon then
  748. shoot(a)
  749. else
  750. star(a)
  751. end
  752. end
  753.  
  754. nlist = {'f','r'}
  755.  
  756. klist = {
  757. {'f',function(a) spark(a) end,''},
  758. {'q',function() cannonstaff() end,''},
  759. {'e',function() Planko() end},
  760. {'r',function() lightning() end},
  761. {'t',function(a) if a.Target then torso.CFrame = cfn(a.hit.p)+v3n(0,2.6,0) end end}
  762. }
  763.  
  764. hop.Deselected:connect(function() lock.R(0) lock.L(0) end)
  765. hop.Selected:connect(function(mouse)
  766. mouse.Button1Up:connect(function() holding = false end)
  767. 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)
  768. mouse.KeyDown:connect(function(key)
  769. for i,v in pairs(nlist) do if key == v and cannon then return end end
  770. if attacking then return end
  771. for i,v in pairs(klist) do
  772. if key == v[1] then attacking = true v[2](mouse) attacking = false end
  773. end
  774. end)
  775. mouse.Button1Down:connect(function() if attacking then return end attacking = true onButton1Down(mouse) attacking = false end)
  776. end)
  777. --mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement