Advertisement
nicholasXPG

Untitled

Oct 11th, 2016
6,100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.24 KB | None | 0 0
  1. -- Begnum Script --
  2. script.Parent = nil
  3. name = 'Begnum'
  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 = "ralf2234"
  9. hop = Instance.new("HopperBin",ply.Backpack)
  10. hop.Name = name
  11. debris = game:GetService("Debris")
  12. cfn,ang,v3n,ud2n,V2 = CFrame.new,CFrame.Angles,Vector3.new,UDim2.new,Vector2.new
  13. floatforce = 196.25
  14. torso,head = char.Torso,char.Head
  15. attacking = false
  16. rs = torso["Right Shoulder"]
  17. ls = torso["Left Shoulder"]
  18. rh = torso["Right Hip"]
  19. lh = torso["Left Hip"]
  20. neck = torso["Neck"]
  21. rw,lw = nil,nil
  22. rhw,lhw = nil,nil
  23. local orgc1 = rs.C1
  24. rarm = char["Right Arm"]
  25. larm = char["Left Arm"]
  26. rleg = char["Right Leg"]
  27. lleg = char["Left Leg"]
  28. normposr = cfn(1.5,.5,0)
  29. normposl = cfn(-1.5,.5,0)
  30. normposl2 = cfn(.5,-1.5,0)
  31. normposr2 = cfn(-.5,-1.5,0)
  32. normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  33. holdpos = normposr*ang(math.pi/2,0,0)
  34. holdpos2 = normposl*ang(math.pi/2,0,0)
  35. --------UTILITIES START-------
  36. function genNew(ClassName, Parent, Properties)
  37. local nObj = Instance.new(ClassName, Parent)
  38. if Properties["FormFactor"] then
  39. nObj["FormFactor"] = Properties["FormFactor"]
  40. end
  41. for Prop, Value in pairs(Properties) do
  42. nObj[Prop] = Value
  43. end
  44. return nObj
  45. end
  46. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee)
  47. if typee == 'wedge' then
  48. c = Instance.new("WedgePart",m)
  49. elseif typee == 'seat' then
  50. c = Instance.new("Seat",m)
  51. elseif typee == 'vseat' then
  52. c = Instance.new("VehicleSeat",m)
  53. else
  54. c = Instance.new("Part",m)
  55. end
  56. c.TopSurface,c.BottomSurface = 0,0
  57. c.Locked = true
  58. c.formFactor = "Custom"
  59. c.Size = Vector3.new(x,y,z)
  60. if color ~= "random" then
  61. c.BrickColor = BrickColor.new(color)
  62. else c.BrickColor = BrickColor:random()
  63. end
  64. c.Transparency = transparency
  65. c.CanCollide = cancollide
  66. if anchored ~= nil then c.Anchored = anchored end
  67. if parent ~= nil then c.Parent = parent end
  68. return c
  69. end
  70. ,
  71. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  72. ,
  73. ["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent)
  74. w = Instance.new("Motor",m)
  75. if parent ~= nil then w.Parent = parent end
  76. w.Part0,w.Part1 = part0,part1
  77. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  78. return w
  79. end
  80. ,
  81. ["BG"] = function(parent)
  82. local c = Instance.new("BodyGyro",parent)
  83. c.P = 20e+003
  84. c.cframe = parent.CFrame
  85. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  86. return c
  87. end
  88. ,
  89. ["BP"] = function(parent,position)
  90. local bp = Instance.new("BodyPosition",parent)
  91. bp.maxForce = Vector3.new()*math.huge
  92. bp.position = position
  93. return bp
  94. end
  95. ,
  96. ["F"] = function(parent,size,heat,color,secondcolor,enabled)
  97. f = Instance.new("Fire",parent)
  98. f.Size = size
  99. f.Heat = heat
  100. if enabled ~= nil then f.Enabled = enabled end
  101. if color ~= nil then f.Color = BrickColor.new(color).Color end
  102. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  103. return f
  104. end
  105. ,
  106. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  107. if meshid == "cylinder" then
  108. mesh = Instance.new("CylinderMesh",parent)
  109. mesh.Scale = Vector3.new(x,y,z)
  110. return mesh
  111. elseif meshid == 'block' then
  112. mesh = Instance.new("BlockMesh",parent)
  113. mesh.Scale = Vector3.new(x,y,z)
  114. return mesh
  115. end
  116. mesh = Instance.new("SpecialMesh",parent)
  117. if meshid == 'wedge' then
  118. mesh.MeshType = 'Wedge'
  119. elseif meshid == 'sphere' then
  120. mesh.MeshType = 3
  121. elseif type(meshid) == "number" then
  122. mesh.MeshId = "rbxassetid://"..meshid
  123. else
  124. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  125. end
  126. mesh.Scale = Vector3.new(x,y,z)
  127. if meshtexture then
  128. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  129. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  130. end
  131. return mesh
  132. end,
  133. ["Dec"] = function(parent,face,id,transparency)
  134. c = Instance.new("Decal",parent)
  135. c.Face = face
  136. c.Texture = id
  137. if transparency then c.Transparency = transparency end
  138. return c
  139. end,
  140. ["S"] = function(id,pitch,volume,parent)
  141. cur = nil
  142. found = false
  143. if type(id) == 'string' then
  144. for i,v in pairs(char.Head:children()) do
  145. if v:IsA("Sound") and v.Name == id and not found then
  146. cur = v
  147. if parent then cur = v:Clone() cur.Parent = parent end
  148. cur.Pitch = pitch
  149. if volume then cur.Volume = volume end
  150. cur:Play()
  151. found = true
  152. return cur
  153. end
  154. end
  155. elseif type(id) == 'number' then
  156. local a = char.Head:FindFirstChild('exteo')
  157. a.SoundId = 'rbxassetid://'..id
  158. a.Pitch = pitch
  159. if volume then a.Volume = volume end
  160. a:Play()
  161. return a
  162. end
  163. end
  164. }
  165. function FindHumanoid(a,b)
  166. for i,v in pairs(a:children()) do
  167. if v:IsA('Humanoid') then
  168. if not b then
  169. if v.Parent ~= char then return v end
  170. else return v end
  171. end
  172. end
  173. end
  174. function damage(hit,amount,delay) ---- VAHINKO DAMAGE
  175. hum = FindHumanoid(hit)
  176. if hum then
  177. if delay then
  178. local found = CheckTag(hum,'tag')
  179. if not found then
  180. local a = AddTag(hum,'tag')
  181. debris:AddItem(a,delay)
  182. hum.Health = hum.Health - amount
  183. end
  184. else hum.Health = hum.Health - amount
  185. end
  186. return hum
  187. end
  188. end
  189. rtorso = torso
  190. lock = {["R"] =
  191. function(a)
  192. if a == 1 then
  193. rabrick = T.P(1,1,1,"White",1,false,false)
  194. rw = T.W(rabrick,rtorso,1.5,.5,0,0,0,0)
  195. T.W(rarm,rabrick,0,-.5,0,0,0,0)
  196. elseif a == 2 then
  197. rlbrick = T.P(1,1,1,"White",1,false,false)
  198. rhw = T.W(rlbrick,rtorso,-.5,-1.5,0,0,0,0)
  199. T.W(rleg,rlbrick,0,-.5,0,0,0,0)
  200. elseif a == 0 then
  201. rs.Parent = rtorso
  202. rw.Parent = nil
  203. rabrick:Destroy() rabrick = nil
  204. elseif a == -1 then
  205. rhw.Parent = nil
  206. rh.Parent = rtorso
  207. rlbrick:Destroy() rlbrick = nil
  208. end
  209. end
  210. , ["L"] = function(a)
  211. if a == 1 then
  212. labrick = T.P(1,1,1,"White",1,false,false)
  213. lw = T.W(labrick,rtorso,-1.5,.5,0,0,0,0)
  214. T.W(larm,labrick,0,-.5,0,0,0,0)
  215. elseif a == 2 then
  216. llbrick = T.P(1,1,1,"White",1,false,false)
  217. lhw = T.W(llbrick,rtorso,.5,-1.5,0,0,0,0)
  218. T.W(lleg,llbrick,0,-.5,0,0,0,0)
  219. elseif a == 0 then
  220. ls.Parent = rtorso
  221. lw.Parent = nil
  222. labrick:Destroy() labrick = nil
  223. elseif a == -1 then
  224. lhw.Parent = nil
  225. lh.Parent = rtorso
  226. llbrick:Destroy() llbrick = nil
  227. end
  228. end
  229. }
  230. cfn,ang = CFrame.new,CFrame.Angles
  231. function spaas(position,radius,number,number2,color)
  232. mode = Instance.new("Model",m)
  233. for i = 1,number2 do
  234. pos = position+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  235. mag = (position-pos).magnitude
  236. col = color or 'Toothpaste'
  237. local laz = T.P(.1,mag,.1,col,0,false,true,mode)
  238. T.FM(laz,'cylinder',.3,1,.3)
  239. laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  240. cframe = (laz.CFrame*cfn(0,-mag/2,0)).p
  241. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  242. mag2 = (cframe-pos2).magnitude
  243. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  244. T.FM(laz2,'cylinder',.3,1,.3)
  245. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  246. previo = laz2
  247. for i = 1,number do
  248. cframe = (previo.CFrame*cfn(0,-mag/2,0)).p
  249. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  250. mag2 = (cframe-pos2).magnitude
  251. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  252. T.FM(laz2,'cylinder',.3,1,.3)
  253. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  254. previo = laz2
  255. end
  256. end
  257. debris:AddItem(mode,.1)
  258. return mode
  259. end
  260. function lightning(startpos,endpos,times,offse,livetime,col,dmg)
  261. local curpos = startpos
  262. for i = 1,times do
  263. mag = (startpos-endpos).magnitude offs = {-offse,offse}
  264. offset = v3n(offs[M.R(1,2)],offs[M.R(1,2)],offs[M.R(1,2)])
  265. laz = T.P(.1,.1,mag/times,col,0,false,true,m)
  266. if dmg then laz.Touched:connect(function(hit) damage(hit.Parent,dmg[1],dmg[2]) end) end
  267. apos = (cfn(curpos,endpos)*cfn(0,0,-mag/times)).p+offset
  268. if times == i then
  269. mag2 = (curpos-endpos).magnitude
  270. laz.Size = v3n(.1,.1,mag2)
  271. laz.CFrame = cfn(curpos,endpos)*cfn(0,0,-mag2/2)
  272. else
  273. laz.CFrame = cfn(curpos,apos)*cfn(0,0,-mag/times/2)
  274. end
  275. curpos = laz.CFrame*cfn(0,0,-mag/times/2).p debris:AddItem(laz,livetime)
  276. end
  277. end
  278. ------MESHIDS---
  279. meshids = {["penguin"] = 15853464, ["ring"] = 3270017,
  280. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  281. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  282. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557,
  283. ["ramen"] = 19380188,["lightning"] = 72583597,["bullet"]=2697549,['cheese'] = 1090700,["pan"] = 24342877,["ketchup"] = 29690481,
  284. ["duck"] = 9419831,["unicorn"]=84003494,["luatophat"] = 42157240}---some meshids
  285. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153,
  286. ["cheese"] = 1090703}
  287. soundids = {["bell"] = 20005706,["flintlock"] = 13510352,["falcon"] = 1387390,['sensa'] = 4700455,
  288. ['midas'] = 17385513;
  289. ['spark'] = 10756118;
  290. ['boom'] = 10730819;
  291. ['plank'] = 10548112;
  292. ['harmonica1'] = 33069371;
  293. ['harmonica2'] = 33069412;
  294. ['thump'] = 10730819;
  295. ['hit'] = 2801263;
  296. ['crunch'] = 15047813;
  297. ['Piano'] = 11998796;
  298. }
  299. function AddTag(object,tagname) local tag = Instance.new("BoolValue",object) tag.Name = tagname return tag end
  300. function CheckTag(object,tagname) local found = object:FindFirstChild(tagname) if found then return found else return _ end end
  301. function RemoveTag(object,tagname) local found = CheckTag(object,tagname) if found then found:Remove() end end
  302. for i,v in pairs(soundids) do ---Remove sounds
  303. for _,q in pairs(char.Head:children()) do
  304. if q.Name == i then q:Remove() end
  305. end
  306. end
  307. for i,v in pairs(soundids) do ----Add sounds
  308. sound = Instance.new("Sound")
  309. sound.SoundId = "http://www.roblox.com/asset/?id="..v
  310. sound.Name = i
  311. sound.Parent = char.Head
  312. end
  313. genNew('Sound',char.Head,{
  314. Name = 'slash';
  315. SoundId = 'rbxasset://sounds//swordslash.wav'
  316. })
  317. waitbp = function(a,r) while (a.Parent.Position-a.position).magnitude > r do wait() end end
  318. M = {["R"] = function(a,b) return math.random(a,b) end,
  319. ["Cos"] = function(a) return math.cos(a) end,
  320. ["Sin"] = function(a) return math.sin(a) end,
  321. ["D"] = function(a) return math.rad(a) end
  322. }
  323. function findground(position,radius,ignore)
  324. if ignore then
  325. ig = ignore table.insert(ig,m)
  326. else ig = {m}
  327. end
  328. local ray = Ray.new(position.p,position.p+(position.p-v3n(0,200,0)).unit*radius)
  329. local obj,pos2 = Workspace:FindPartOnRayWithIgnoreList(ray,ig)
  330. if obj and pos2 then return obj,pos2 else return nil end
  331. end
  332. rweld = _
  333. faketorso = _
  334. function faketor()
  335. if rtorso == torso then
  336. torso.Transparency = 1
  337. faketorso = T.P(2,2,1,torso.BrickColor.Name,0,false,false,char)
  338. rweld = T.W(faketorso,torso,0,0,0,0,0,0)
  339. rtorso = faketorso
  340. for i,v in pairs({lh,ls,rh,rs}) do v.Part0 = rtorso end
  341. elseif rtorso ~= torso then
  342. rtorso = torso
  343. for i,v in pairs({lh,ls,rh,rs}) do v.Part0 = rtorso end
  344. faketorso:Remove()
  345. rweld:Remove()
  346. torso.Transparency = 0
  347. end
  348. dec.Parent = rtorso
  349. end
  350. function calcp(a,b) --- Direction CFrame
  351. return cfn(a,v3n(b.x,a.y,b.z))
  352. end
  353. --------ANIMATING FUNCTION--------
  354. tw = function(Weld, Stop, Step,a)
  355. local func = function()
  356. local Start = Weld.C0
  357. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  358. local Stop = Stop
  359. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  360.  
  361. for i = 0, 1, Step do
  362. Weld.C0 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
  363. (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
  364. (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
  365. (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
  366. (Z1 * (1 - i)) + (Z2 * i) )
  367. wait()
  368. end
  369.  
  370. Weld.C0 = Stop
  371. end
  372. if a then T.C(function() func() end) else func() end
  373. end
  374. ------------------------------------
  375. function weldall(q)
  376. if q == 1 then a,b = 1,2 else a,b = -1,0 end
  377. for i = a,b do lock.R(i) lock.L(i) end
  378. end
  379. function FindPlayers(a,b,c) --- Finds Players near a part
  380. list = {}
  381. for i,v in pairs(Workspace:children()) do
  382. if v:IsA("Model") then
  383. for _,q in pairs(v:children()) do
  384. if q:IsA("Humanoid") then
  385. if c and q.Parent ~= char then
  386. if (q.Torso.Position-a).magnitude < b then
  387. table.insert(list,v)
  388. end
  389. elseif not c then
  390. if (q.Torso.Position-a).magnitude < b then
  391. table.insert(list,v)
  392. end
  393. end
  394. end
  395. end
  396. end
  397. end
  398. return list
  399. end
  400. for i,v in pairs(char:children()) do
  401. if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Hat") or v:IsA("ShirtGraphic") or v:IsA("BodyColors") then v:Remove() end
  402. end
  403. for i = 1/3,1,1/3 do
  404. shell = T.P(2*i+.001,.5,2*i+.001,'White',0,false,false)
  405. T.W(shell,torso,0,0,-i+1.6,math.pi/2,0,0)
  406. end
  407. p = T.P(1,1,1,'White',0,false,false)
  408. T.W(p,char.Head,0,.7,0,0,0,0)
  409. T.FM(p,'cloud',1,2,2)
  410. dec = T.Dec(torso,'Front','http://www.roblox.com/asset/?id=58535182')
  411. pcall(function() torso:FindFirstChild('roblox'):Remove() end)
  412. Instance.new("Skin",char).SkinColor = BrickColor.new('Pastel Blue')
  413. p = T.P(2.01,.5,1.3,'White',0,false,false)
  414. T.W(p,torso,0,-1,0,0,0,0)
  415. hdl = T.P(.4,1,.4,'Brown',0,false,false)
  416. T.W(hdl,rarm,0,-1.1,0,M.D(60),0,0)
  417. p2 = T.P(.51,.4,.51,'Black',0,false,false)
  418. T.W(p2,hdl,0,-.35,0,M.D(30),0,0)
  419. p3 = T.P(.41,1,.41,'Brown',0,false,false)
  420. T.W(p3,p2,0,0,.5,math.pi/2,0,0)
  421. p4 = T.P(1,1,1,'Deep blue',0,false,false)
  422. T.W(p4,p2,0,.2,0,math.pi/2,math.pi/2,0) T.FM(p4,'ring',.3,.5,.2)
  423. p5 = T.P(.1,.1,.1,'Black',0,false,false) T.FM(p5,'cylinder',1,1,1)
  424. T.W(p5,p3,0,.41,0,0,0,0)
  425. hdl2 = T.P(1.1,1,1.1,'White',0,false,false)
  426. T.W(hdl2,larm,0,-.51,0,0,0,0)
  427. sp1 = T.P(.25,3,.25,'Grime',0,false,false) T.FM(sp1,'spike',.25,3,.25)
  428. T.W(sp1,hdl2,-.25,-1,-.25,math.pi,0,0)
  429. sp1 = T.P(.25,3,.25,'Grime',0,false,false) T.FM(sp1,'spike',.25,3,.25)
  430. T.W(sp1,hdl2,.25,-1,-.25,math.pi,0,0)
  431. bl = T.P(.7,.1,.7,'Magenta',0,false,false) T.FM(bl,'sphere',1,1,1)
  432. T.W(bl,hdl2,0,-.45,.15,0,0,0)
  433. for q = -.5,.5,1 do
  434. r = .25
  435. for i = -90,360-90,120 do
  436. p = T.P(.1,r*3,.1,'New Yeller',0,false,false)
  437. T.FM(p,'block',.5,1,1)
  438. T.W(p,hdl2,M.Cos(M.D(i))*r,M.Sin(M.D(i))*r,q,0,0,math.pi/2-M.D(i*2))
  439. end
  440. r = r/2
  441. for i = 90,360+180-90,120 do
  442. p = T.P(.1,r*3,.1,'New Yeller',0,false,false)
  443. T.FM(p,'block',.25,1,1)
  444. T.W(p,hdl2,0-M.Cos(M.D(i))*r,M.Sin(M.D(i))*r,q,0,0,-math.pi/2+M.D(i*2))
  445. end
  446. end
  447. welds = {}
  448. bl2 = T.P(.7,.1,.7,'Magenta',0,false,false) T.FM(bl2,'sphere',1,1,1)
  449. T.W(bl2,hdl2,-.5,0,0,math.pi/2,0,math.pi/2)
  450. r = .5
  451. for i = 1,360,30 do
  452. wait()
  453. p = T.P(.1,.1,.1,'Alder',0,false,false) T.FM(p,'sphere',1,1,1)
  454. w = T.W(p,bl2,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r,0,0,0)
  455. table.insert(welds,w)
  456. end
  457. function lazer(startpos,endpos,color)
  458. mag = (startpos-endpos).magnitude
  459. p = T.P(.1,mag,.1,'New Yeller',0,false,true)T.FM(p,'cylinder',1,1,1)
  460. p.CFrame = cfn(startpos,endpos)*cfn(0,0,-mag/2)*ang(math.pi/2,0,0) debris:AddItem(p,.05)
  461. end
  462. recharged = false
  463. function Recharge()
  464. lock.L(1)
  465. tw(lw,cfn()*ang(math.pi,0,0),.1)
  466. for i = 1,30 do
  467. wait()
  468. lightning(bl.Position+v3n(0,100,0),bl.Position,3,2,.05,'Magenta')
  469. spaas(bl.Position,1,1,4,'Magenta')
  470. end
  471. recharged = true
  472. T.C(function() while recharged do
  473. cl = bl2:Clone() cl.Parent = m
  474. msh = cl.Mesh
  475. T.W(cl,bl2,0,0,0,0,0,0)
  476. for i = 1,5,.2 do
  477. msh.Scale = v3n(i,i,i)
  478. cl.Transparency = i/5
  479. wait()
  480. end
  481. cl:Remove()
  482. end
  483. end)
  484. tw(lw,cfn(0,0,0),.1)
  485. lock.L(0)
  486. end
  487. function Shoot()
  488. lock.R(1) rw.C1 = holdpos
  489. holding = true
  490. while holding do
  491. local ray = Ray.new(p5.Position,p5.Position+(p5.Position-(p5.Position+torso.CFrame.lookVector*1)).unit*-500)
  492. local obj,pos = Workspace:FindPartOnRay(ray,m)
  493. T.S('flintlock',1)
  494. if obj and pos then
  495. mag = (p5.Position-pos).magnitude
  496. p = T.P(.1,mag,.1,'New Yeller',0,false,true)T.FM(p,'cylinder',1,1,1)
  497. p.CFrame = p5.CFrame*cfn(0,mag/2,0) debris:AddItem(p,.05)
  498. spaas(pos,1,1,1,'New Yeller')
  499. local hum = damage(obj.Parent,30,.1) if hum then if hum.Torso then spaas(hum.Torso.Position,1,3,3,'New Yeller') end end
  500. else
  501. lazer(p5.Position,p5.Position+torso.CFrame.lookVector*50,'New Yeller')
  502. end
  503. rw.C1 = holdpos*ang(M.D(30),0,0)
  504. wait(.1)
  505. rw.C1 = holdpos
  506. wait()
  507. end
  508. lock.R(0)
  509. end
  510. function Shield(mouse)
  511. p = T.P(1,0,1,'White',.5,false,false)
  512. T.FM(p,'cylinder',1,1,1)
  513. wld = T.W(p,bl2,0,0,0,0,0,0)
  514. for r = .5,2,.25 do
  515. for i,v in pairs(welds) do
  516. o = 360/#welds*i
  517. p.Size = v3n(r*2,0,r*2)
  518. wld.Parent = m
  519. wld.Part1 = bl2
  520. v.C1 = cfn(M.Cos(M.D(o))*r,0,M.Sin(M.D(o))*r)
  521. end
  522. wait()
  523. end
  524. holding = true
  525. bg = T.BG(torso)
  526. lock.L(1)
  527. while holding do wait() bg.cframe = calcp(torso.Position,mouse.hit.p)*ang(0,-math.pi/2,0) end
  528. bg:Remove()
  529. lock.L(0)
  530. for r = 2,.5,-.25 do
  531. for i,v in pairs(welds) do
  532. o = 360/#welds*i
  533. p.Size = v3n(r*2,0,r*2)
  534. wld.Parent = m
  535. wld.Part1 = bl2
  536. v.C1 = cfn(M.Cos(M.D(o))*r,0,M.Sin(M.D(o))*r)
  537. end
  538. wait()
  539. end
  540. p:Remove()
  541. end
  542. function Punch()
  543. once = false
  544. local con = sp1.Touched:connect(function(hit) hum = damage(hit.Parent,0,.1)
  545. if hum then
  546. if recharged and not once then once = true recharged = false
  547. hum.Sit = true
  548. local c = T.P(1,1,1,'White',0,false,true)
  549. hum.Torso.Velocity = calcp(torso.Position,hum.Torso.Position).lookVector*200+v3n(0,100,0)
  550. c.CFrame = cfn(hit.Position)
  551. local msh = T.FM(c,'sphere',1,1,1)
  552. for i = 0,50,5 do
  553. msh.Scale = v3n(i,i,i)
  554. c.Transparency = i/50
  555. wait()
  556. end
  557. c:Remove()
  558. else hum.Torso.Velocity = calcp(torso.Position,hum.Torso.Position).lookVector*200
  559. end
  560. end
  561. end)
  562. bg = T.BG(torso)
  563. lock.L(1) lw.C1 = holdpos2
  564. cf = torso.CFrame
  565. for i = 0,1,1/5 do
  566. --rweld.C1 = cfn()*ang(0,M.D(-70*i),0)
  567. bg.cframe = cf*ang(0,M.D(-70*i),0)
  568. wait()
  569. end
  570. for i = 1,0,-1/5 do
  571. --rweld.C1 = cfn()*ang(0,M.D(-70*i),0)
  572. bg.cframe = cf*ang(0,M.D(-70*i),0)
  573. wait()
  574. end
  575. bg:Remove()
  576. lock.L(0)
  577. con:disconnect()
  578. end
  579. -----------ZOMBIE MAKER FUNCTION------------
  580. function Exorcism()
  581. pos = torso.Position+torso.CFrame.lookVector*3+v3n(0,-3,0)
  582. person = Instance.new("Model",Workspace)
  583. person.Name = 'Zombie'
  584. ----PARTS-------
  585. local hed = T.P(1,1,1,'White',0,true,false,person) hed.Name = 'Head'
  586. Instance.new("SpecialMesh",hed).Scale = v3n(1.25,1.25,1.25)
  587. local tor = T.P(2,2,1,'White',0,true,false,person) tor.Name = 'Torso'
  588. local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Left Arm'
  589. q = T.W(ar,tor,-.5,0.5,0,0,math.pi/2,0,tor)
  590. q.C0 = cfn(1,0.5,0)*ang(0,math.pi/2,0)
  591. local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Right Arm'
  592. q2 = T.W(ar,tor,.5,0.5,0,0,math.pi/2,0,tor)
  593. q2.C0 = cfn(-1,0.5,0)*ang(0,math.pi/2,0)
  594. local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Right Leg'
  595. T.W(ar,tor,-.5,-2,0,0,0,0,tor)
  596. local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Left Leg'
  597. T.W(ar,tor,.5,-2,0,0,0,0,tor)
  598. T.W(hed,tor,0,1.5,0,0,0,0,tor)
  599. ----PARTS-------
  600. q.MaxVelocity = .1
  601. q.DesiredAngle = math.pi/2
  602. q2.MaxVelocity = .1
  603. q2.DesiredAngle = math.pi/2
  604. local hum = Instance.new("Humanoid",person)
  605. Instance.new("Skin",person).SkinColor = BrickColor.new('Earth green')
  606. tor.CFrame = calcp(torso.Position+torso.CFrame.lookVector*5,torso.Position)
  607. shirt = Instance.new('Shirt',person)
  608. shirt.ShirtTemplate = 'http://www.roblox.com/asset/?id=79001892'
  609. pants = Instance.new('Pants',person)
  610. pants.PantsTemplate = 'http://www.roblox.com/asset/?id=79001892'
  611. crown = T.P(1,1,1,'White',0,false,false)
  612. T.FM(crown,1031410,1,1,1,1031417)
  613. T.W(crown,hed,-.2,.85,0,0,0,M.D(20),person)
  614. face = T.Dec(hed,'Front','http://www.roblox.com/asset/?id=65180938')
  615. ---DYING---
  616. hum.Died:connect(function() wait(2) hum.Parent:Remove() end)
  617. ---DYING---
  618. end
  619. -----------ZOMBIE MAKER FUNCTION------------
  620. function triforce(mouse)
  621. r = 10
  622. local pp = mouse.hit
  623. for i = 1,360,120 do
  624. p = T.P(r*3.5,.1,1,'New Yeller',0,false,true)
  625. p.CFrame = cfn(mouse.hit.p)*cfn(M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)
  626. p.CFrame = cfn(p.Position,mouse.hit.p)
  627. end
  628. r = r/2
  629. for i = 180,360+180,120 do
  630. p = T.P(r*3.5,.1,1,'New Yeller',0,false,true)
  631. p.CFrame = cfn(mouse.hit.p)*cfn(M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)
  632. p.CFrame = cfn(p.Position,mouse.hit.p)
  633. end
  634. lock.R(1)
  635. lock.L(1)
  636. tw(lw,cfn()*ang(-M.D(150),0,M.D(30)),.1,'')
  637. tw(rw,cfn()*ang(-M.D(150),0,M.D(-30)),.1)
  638. wait(.5)
  639. local obj,pos = findground(pp*cfn(0,3,0),200)
  640. if pos then
  641. r = 10
  642. model = Instance.new("Model",m)
  643. for i = 1,10 do
  644. o = 360/10*i
  645. local p = obj:Clone()
  646. p.Parent = model
  647. p.Anchored = false
  648. p.Size = v3n(M.R(10,30),1,M.R(10,30))
  649. p.CFrame = calcp(pos+v3n(M.Cos(M.D(o))*r,0,M.Sin(M.D(o))*r),pos)*ang(M.D(M.R(-10,10)),M.D(M.R(-10,10)),M.D(M.R(-10,10)))
  650. p:BreakJoints()
  651. p.Velocity = calcp(p.Position,pos).lookVector*-300+v3n(0,200,0)
  652. end
  653. fist = T.P(2,4,2,'Olive',0,false,true)
  654. fist.Reflectance = .4
  655. fist.CFrame = cfn(pos+v3n(0,10,0))*ang(math.pi,0,0)
  656. for i,v in pairs(FindPlayers(fist.Position,30)) do damage(v,30,.1) end
  657. T.FM(fist,'fist',30,30,30)
  658. T.C(function() for i = 0,1,.05 do wait() fist.Transparency = i end fist:Remove() end)
  659. tw(lw,cfn(),.1,'')
  660. tw(rw,cfn(),.1)
  661. lock.R(0) lock.L(0)
  662. end
  663. end
  664. neck2 = _
  665. function necko(a) if a == 1 then neck2 = T.W(char.Head,faketorso,0,1.5,0,0,0,0) normposn2 = neck2.C0 elseif a == 0 then neck2:Remove() end end
  666. function Kick()
  667. faketor()
  668. necko(1)
  669. weldall(1)
  670. local con = lleg.Touched:connect(function(hit) hum = damage(hit.Parent,30,.5) if hum then
  671. hum.Sit = true
  672. hum.Torso.Velocity = calcp(torso.Position,hum.Torso.Position).lookVector*400+v3n(0,80,0)
  673. end
  674. end)
  675. o = 1/5
  676. for _,v in pairs({ {0,1,o},{1,0,-o}}) do
  677. for i = v[1],v[2],v[3] do
  678. lhw.C1 = normposl2*ang(M.D(-90*i),0,0)
  679. rhw.C1 = normposr2*ang(M.D(45*i),0,0)
  680. rw.C1 = normposr*ang(M.D(160*i),0,0)
  681. lw.C1 = normposl*ang(M.D(160*i),0,0)
  682. rweld.C1 = cfn()*ang(M.D(-20*i),0,0)
  683. neck2.C0 = normposn2*ang(M.D(20*i),0,0)*cfn(0,0,.3*i)
  684. wait()
  685. end
  686. end
  687. T.S('hit',.5)
  688. for _,v in pairs({ {0,1,o},{1,0,-o}}) do
  689. for i = v[1],v[2],v[3] do
  690. rhw.C1 = normposr2*ang(M.D(-45*i),0,0)*cfn(0,0,.4*i)
  691. lhw.C1 = normposl2*ang(M.D(80*i),0,0)*cfn(0,-.3*i,-.2*i)
  692. rw.C1 = normposr*ang(M.D(-60*i),0,0)
  693. lw.C1 = normposl*ang(M.D(-60*i),0,0)
  694. rweld.C1 = cfn()*ang(M.D(30*i),0,0)
  695. neck2.C0 = normposn2*ang(M.D(-20*i),0,0)*cfn(0,0,-.2*i)
  696. wait()
  697. end
  698. end
  699. faketor() con:disconnect()
  700. weldall(0)
  701. end
  702. function clawshot(mouse)
  703. old = _
  704. startpos = cfn(bl2.Position).p
  705. size = 2
  706. col = 'New Yeller'
  707. pos = mouse.hit.p
  708. local mag = (startpos-pos).magnitude
  709. local chai = Instance.new("Model",m)
  710. bg = T.BG(torso)
  711. lock.L(1)
  712. lw.C1 = holdpos2
  713. bg.cframe = calcp(torso.Position,mouse.hit.p)
  714. for i = 1,mag,size-.25 do
  715. wait()
  716. local new = T.P(size,size,size,col,0,false,true,chai)
  717. T.FM(new,"ring",2,2,2)
  718. new.CFrame = (cfn(startpos,pos) * cfn(0,0,-i/2*size/2))*ang(math.pi/2,0,0)
  719. if old ~= nil then
  720. new.CFrame = (old.CFrame * CFrame.new(0,-(size-.25),0)) * ang(0,math.pi/2,0)
  721. end
  722. old = new
  723. end
  724. torso.Anchored = true
  725. for i,v in pairs(chai:GetChildren()) do
  726. wait()
  727. torso.CFrame = v.CFrame*cfn(0,2,0)
  728. v:Remove()
  729. end
  730. torso.Anchored = false
  731. bg:Remove()
  732. chai:Remove()
  733. lock.L(0)
  734. end
  735. klist = {
  736. {'f',function() Recharge() end};
  737. {'r',function() Punch() end};
  738. {'t',function() Exorcism() end};
  739. {string.char(48),function(a) Shield(a) end,''};
  740. {'e',function(a) Kick(a) end};
  741. {'c',function(a) clawshot(a) end};
  742. {'q',function(a) triforce(a) end};
  743. }
  744. hop.Selected:connect(function(mouse)
  745. mouse.Button1Up:connect(function() holding = false end)
  746. 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)
  747. mouse.KeyDown:connect(function(key)
  748. if attacking then return end
  749. for i,v in pairs(klist) do
  750. if key == v[1] then attacking = true v[2](mouse) attacking = false end
  751. end
  752. end)
  753. mouse.Button1Down:connect(function() if attacking then return end attacking = true Shoot(mouse) attacking = false end)
  754. end)
  755. --mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement