Advertisement
JerryTheUnicorn1

might not work

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