UltimateGate

BLACK MAGIC - Christmas Eve [OLD]

May 8th, 2018
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.19 KB | None | 0 0
  1. Ply = game.Players.LocalPlayer
  2. --FIXED WITH TRIGECTORY's CheatSheet--
  3. cheatsheetplr = game.Players.LocalPlayer
  4. i = Instance.new("NumberValue", cheatsheetplr )
  5. i.Name = "FPSCH"
  6. Bin = Instance.new("HopperBin", cheatsheetplr .Backpack)
  7. script.Parent = Bin
  8. local cf = CFrame.new
  9. local RbxUtility = LoadLibrary("RbxUtility")
  10. local Create = RbxUtility.Create
  11. RW = Create("Weld")({Name = "Right Shoulder", Part0 = Tor, C0 = CFrame.new(1.5, 0.5, 0), C1 = CFrame.new(0, 0.5,
  12.  
  13. 0), Part1 = RA, Parent = Tor})
  14. LW = Create("Weld")({Name = "Left Shoulder", Part0 = Tor, C0 = CFrame.new(-1.5, 0.5, 0), C1 = CFrame.new(0, 0.5,
  15.  
  16. 0), Part1 = LA, Parent = Tor})
  17. --[[
  18. Santa's Elf Class Made by Fenrier.
  19. ]]
  20. Player=game:GetService("Players").LocalPlayer
  21. Character=Player.Character
  22. PlayerGui=Player.PlayerGui
  23. Backpack=Player.Backpack
  24. Torso=Character.Torso
  25. Head=Character.Head
  26. Humanoid=Character.Humanoid
  27. LeftArm=Character["Left Arm"]
  28. LeftLeg=Character["Left Leg"]
  29. RightArm=Character["Right Arm"]
  30. RightLeg=Character["Right Leg"]
  31. LS=Torso["Left Shoulder"]
  32. LH=Torso["Left Hip"]
  33. RS=Torso["Right Shoulder"]
  34. RH=Torso["Right Hip"]
  35. Neck=Torso.Neck
  36. it=Instance.new
  37. vt=Vector3.new
  38. cf=CFrame.new
  39. euler=CFrame.fromEulerAnglesXYZ
  40. angles=CFrame.Angles
  41. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  42. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  43. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  44. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  45. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  46. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  47. RootPart=Character.HumanoidRootPart
  48. RootJoint=RootPart.RootJoint
  49. RootCF=euler(-1.57,0,3.14)
  50. attack = false
  51. attackdebounce = false
  52. MMouse=nil
  53. combo=0
  54. mana=0
  55. local idle=0
  56. local Anim="Idle"
  57. local cansleigh=true
  58. --player
  59. player=nil
  60. --save shoulders
  61. RSH, LSH=nil, nil
  62. --welds
  63. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  64. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  65. LH=Torso["Left Hip"]
  66. RH=Torso["Right Hip"]
  67. local Effects={}
  68. local GiftbagGifts={}
  69. ArtificialHB = Instance.new("BindableEvent", script)
  70. ArtificialHB.Name = "Heartbeat"
  71.  
  72. script:WaitForChild("Heartbeat")
  73.  
  74. frame = 1 / 30
  75. if game.Players.LocalPlayer.FPSCH.Value==true then
  76. frame = 1/60
  77. else
  78. frame=1/30
  79. end
  80. tf = 0
  81. allowframeloss = false
  82. tossremainder = false
  83. lastframe = tick()
  84. script.Heartbeat:Fire()
  85.  
  86. game:GetService("RunService").Heartbeat:connect(function(s, p)
  87. tf = tf + s
  88. if tf >= frame then
  89. if allowframeloss then
  90. script.Heartbeat:Fire()
  91. lastframe = tick()
  92. else
  93. for i = 1, math.floor(tf / frame) do
  94. script.Heartbeat:Fire()
  95. end
  96. lastframe = tick()
  97. end
  98. if tossremainder then
  99. tf = 0
  100. else
  101. tf = tf - frame * math.floor(tf / frame)
  102. end
  103. end
  104. end)
  105.  
  106. function swait(num)
  107. if num == 0 or num == nil then
  108. ArtificialHB.Event:wait()
  109. else
  110. for i = 0, num do
  111. ArtificialHB.Event:wait()
  112. end
  113. end
  114. end
  115. function pwait(num)
  116. if num==0 or num==nil then
  117. game:service'RunService'.Heartbeat:wait()
  118. else
  119. for i=0,num do
  120. game:service'RunService'.Heartbeat:wait()
  121. end
  122. end
  123. end
  124.  
  125. if Character:findFirstChild("Elf",true) ~= nil then
  126. Character:findFirstChild("Elf",true).Parent = nil
  127. end
  128. if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then
  129. Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil
  130. end
  131.  
  132.  
  133. function NoOutline(Part)
  134. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  135. end
  136.  
  137. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  138. local fp=it("Part")
  139. fp.formFactor=formfactor
  140. fp.Parent=parent
  141. fp.Reflectance=reflectance
  142. fp.Transparency=transparency
  143. fp.CanCollide=false
  144. fp.Locked=true
  145. fp.BrickColor=brickcolor
  146. fp.Name=name
  147. fp.Size=size
  148. fp.Position=Torso.Position
  149. NoOutline(fp)
  150. fp.Material="SmoothPlastic"
  151. fp:BreakJoints()
  152. return fp
  153. end
  154.  
  155. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  156. local mesh=it(Mesh)
  157. mesh.Parent=part
  158. if Mesh=="SpecialMesh" then
  159. mesh.MeshType=meshtype
  160. mesh.MeshId=meshid
  161. end
  162. mesh.Offset=offset
  163. mesh.Scale=scale
  164. return mesh
  165. end
  166.  
  167. function weld(parent,part0,part1,c0)
  168. local weld=it("Weld")
  169. weld.Parent=parent
  170. weld.Part0=part0
  171. weld.Part1=part1
  172. weld.C0=c0
  173. return weld
  174. end
  175.  
  176. GiftTextures1={
  177. "http://www.roblox.com/asset/?id=67108526",
  178. "http://www.roblox.com/asset/?id=66892127",
  179. "http://www.roblox.com/asset/?id=67156256",
  180. "http://www.roblox.com/asset/?id=22731874",
  181. "http://www.roblox.com/asset/?id=66888912",
  182. "http://www.roblox.com/asset/?id=138053709",
  183. "http://www.roblox.com/asset/?id=137677423",
  184. "http://www.roblox.com/asset/?id=137441786",
  185. "http://www.roblox.com/asset/?id=67156688",
  186. "http://www.roblox.com/asset/?id=67156487",
  187. "http://www.roblox.com/asset/?id=67108654",
  188. "http://www.roblox.com/asset/?id=67108786",
  189. "http://www.roblox.com/asset/?id=99262324",
  190. "http://www.roblox.com/asset/?id=99262600",
  191. "http://www.roblox.com/asset/?id=189783253",
  192. "http://www.roblox.com/asset/?id=137441880",
  193. "http://www.roblox.com/asset/?id=67099135",
  194. "http://www.roblox.com/asset/?id=137729610",
  195. "http://www.roblox.com/asset/?id=138219638",
  196. "http://www.roblox.com/asset/?id=162200169",
  197. "http://www.roblox.com/asset/?id=66888967",
  198. "http://www.roblox.com/asset/?id=66895727",
  199. "http://www.roblox.com/asset/?id=66895855",
  200. "http://www.roblox.com/asset/?id=67108896",
  201. "http://www.roblox.com/asset/?id=99262911",
  202. "http://www.roblox.com/asset/?id=100205893",
  203. "http://www.roblox.com/asset/?id=100372723",
  204. "http://www.roblox.com/asset/?id=189748284",
  205. "http://www.roblox.com/asset/?id=137676972",
  206. "http://www.roblox.com/asset/?id=137441880",
  207. "http://www.roblox.com/asset/?id=138376505",
  208. "http://www.roblox.com/asset/?id=138219638",
  209. "http://www.roblox.com/asset/?id=138135295",
  210. "http://www.roblox.com/asset/?id=137611947",
  211. "http://www.roblox.com/asset/?id=137677423",
  212. "http://www.roblox.com/asset/?id=137729610",
  213. "http://www.roblox.com/asset/?id=137384483",
  214. "http://www.roblox.com/asset/?id=137441786",
  215. "http://www.roblox.com/asset/?id=138293850",
  216. "http://www.roblox.com/asset/?id=138053709",
  217. "http://www.roblox.com/asset/?id=136798527",
  218. "http://www.roblox.com/asset/?id=99902032",
  219. }
  220. GiftTextures2={
  221. "http://www.roblox.com/asset/?id=41510057",
  222. "http://www.roblox.com/asset/?id=1238797",
  223. "http://www.roblox.com/asset/?id=10090366",
  224. "http://www.roblox.com/asset/?id=1237427",
  225. "http://www.roblox.com/asset/?id=1247867",
  226. "http://www.roblox.com/asset/?id=18986139",
  227. "http://www.roblox.com/asset/?id=19906004",
  228. "http://www.roblox.com/asset/?id=40867788",
  229. "http://www.roblox.com/asset/?id=1247871",
  230. "http://www.roblox.com/asset/?id=1239423",
  231. "http://www.roblox.com/asset/?id=11596767",
  232. "http://www.roblox.com/asset/?id=1247866",
  233. "http://www.roblox.com/asset/?id=1246569",
  234. "http://www.roblox.com/asset/?id=1239715",
  235. "http://www.roblox.com/asset/?id=6125462",
  236. "http://www.roblox.com/asset/?id=6202189",
  237. "http://www.roblox.com/asset/?id=34115626",
  238. "http://www.roblox.com/asset/?id=6313630",
  239. "http://www.roblox.com/asset/?id=6024329",
  240. "http://www.roblox.com/asset/?id=6020478",
  241. "http://www.roblox.com/asset/?id=6144194",
  242. "http://www.roblox.com/asset/?id=1459021",
  243. "http://www.roblox.com/asset/?id=18824013",
  244. }
  245.  
  246. function Giftify(Part,x,y,z)
  247. if Part.className=="Part" then
  248. if math.random(1,2)==1 then
  249. Texture=math.random(1,#GiftTextures1) --FileMesh of gift 1 is weird :V
  250. local giftmsh=mesh("SpecialMesh",Part,"FileMesh","http://www.roblox.com/asset/?id=66887781",vt(0,0,0),vt(x,y,z))
  251. giftmsh.TextureId=GiftTextures1[Texture]
  252. else
  253. Texture=math.random(1,#GiftTextures2)
  254. local giftmsh=mesh("SpecialMesh",Part,"FileMesh","http://www.roblox.com/asset/?id=1237207",vt(0,0,0),vt(x,y,z))
  255. giftmsh.TextureId=GiftTextures2[Texture]
  256. end
  257. end
  258. end
  259.  
  260. local modelzorz=Instance.new("Model")
  261. modelzorz.Parent=Character
  262. modelzorz.Name="Elf"
  263.  
  264. local prt1=part(3,modelzorz,0,0,BrickColor.new("Black"),"Hat",vt())
  265. local prt2=part(3,modelzorz,0,0,BrickColor.new("Black"),"Bag",vt())
  266. local prt3=part(3,modelzorz,0,0,BrickColor.new("Black"),"Gift1",vt())
  267. local prt4=part(3,modelzorz,0,0,BrickColor.new("Black"),"Gift2",vt())
  268. local prt5=part(3,modelzorz,0,0,BrickColor.new("Black"),"Gift3",vt())
  269. local prt6=part(3,modelzorz,0,0,BrickColor.new("Black"),"Gift4",vt())
  270. table.insert(GiftbagGifts,prt3)
  271. table.insert(GiftbagGifts,prt4)
  272. table.insert(GiftbagGifts,prt5)
  273. table.insert(GiftbagGifts,prt6)
  274.  
  275. local msh1=mesh("SpecialMesh",prt1,"FileMesh","http://www.roblox.com/asset/?id=1090610",vt(0,0,0),vt(1,1,1))
  276. msh1.TextureId="http://www.roblox.com/asset/?id=42037120"
  277. local msh2=mesh("SpecialMesh",prt2,"FileMesh","http://www.roblox.com/asset/?id=19646118",vt(0,0,0),vt(1.5,1.5,1.5))
  278. msh2.TextureId="http://www.roblox.com/asset/?id=19646165"
  279. Giftify(prt3,1.3,1.3,1.3)
  280. Giftify(prt4,1.3,1.3,1.3)
  281. Giftify(prt5,1.3,1.3,1.3)
  282. Giftify(prt6,1.3,1.3,1.3)
  283.  
  284. local wld1=weld(prt1,prt1,Head,euler(0,0,0)*cf(0,-.5,0))
  285. local wld2=weld(prt2,prt2,Torso,euler(0,1.57,0)*cf(0,.5,-1.5))
  286. local wld3=weld(prt3,prt3,prt2,euler(.5,.1,0)*cf(-.2,-1.6,0.3))
  287. local wld4=weld(prt4,prt4,prt2,euler(0,.1,.5)*cf(-.2,-1.4,0))
  288. local wld5=weld(prt5,prt5,prt2,euler(0,.1,-.3)*cf(.3,-1.6,-.1))
  289. local wld6=weld(prt6,prt6,prt2,euler(-.4,-.2,0)*cf(0,-1.7,-.4))
  290.  
  291. local hitbox=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  292. hitbox.Anchored=false
  293.  
  294. if (script.Parent.className~="HopperBin") then
  295. Tool=Instance.new("HopperBin")
  296. Tool.Parent=Backpack
  297. Tool.Name="Christmas Spirit"
  298. script.Parent=Tool
  299. end
  300. Bin=script.Parent
  301.  
  302. local bodvel=Instance.new("BodyVelocity")
  303. local bg=Instance.new("BodyGyro")
  304.  
  305. so = function(id,par,vol,pit)
  306. coroutine.resume(coroutine.create(function()
  307. local sou = Instance.new("Sound",par or workspace)
  308. sou.Volume=vol
  309. sou.Pitch=pit or 1
  310. sou.SoundId=id
  311. swait()
  312. sou:play()
  313. game:GetService("Debris"):AddItem(sou,6)
  314. end))
  315. end
  316.  
  317. function clerp(a,b,t)
  318. local qa = {QuaternionFromCFrame(a)}
  319. local qb = {QuaternionFromCFrame(b)}
  320. local ax, ay, az = a.x, a.y, a.z
  321. local bx, by, bz = b.x, b.y, b.z
  322. local _t = 1-t
  323. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  324. end
  325.  
  326. function QuaternionFromCFrame(cf)
  327. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  328. local trace = m00 + m11 + m22
  329. if trace > 0 then
  330. local s = math.sqrt(1 + trace)
  331. local recip = 0.5/s
  332. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  333. else
  334. local i = 0
  335. if m11 > m00 then
  336. i = 1
  337. end
  338. if m22 > (i == 0 and m00 or m11) then
  339. i = 2
  340. end
  341. if i == 0 then
  342. local s = math.sqrt(m00-m11-m22+1)
  343. local recip = 0.5/s
  344. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  345. elseif i == 1 then
  346. local s = math.sqrt(m11-m22-m00+1)
  347. local recip = 0.5/s
  348. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  349. elseif i == 2 then
  350. local s = math.sqrt(m22-m00-m11+1)
  351. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  352. end
  353. end
  354. end
  355.  
  356. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  357. local xs, ys, zs = x + x, y + y, z + z
  358. local wx, wy, wz = w*xs, w*ys, w*zs
  359. local xx = x*xs
  360. local xy = x*ys
  361. local xz = x*zs
  362. local yy = y*ys
  363. local yz = y*zs
  364. local zz = z*zs
  365. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  366. end
  367.  
  368. function QuaternionSlerp(a, b, t)
  369. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  370. local startInterp, finishInterp;
  371. if cosTheta >= 0.0001 then
  372. if (1 - cosTheta) > 0.0001 then
  373. local theta = math.acos(cosTheta)
  374. local invSinTheta = 1/math.sin(theta)
  375. startInterp = math.sin((1-t)*theta)*invSinTheta
  376. finishInterp = math.sin(t*theta)*invSinTheta
  377. else
  378. startInterp = 1-t
  379. finishInterp = t
  380. end
  381. else
  382. if (1+cosTheta) > 0.0001 then
  383. local theta = math.acos(-cosTheta)
  384. local invSinTheta = 1/math.sin(theta)
  385. startInterp = math.sin((t-1)*theta)*invSinTheta
  386. finishInterp = math.sin(t*theta)*invSinTheta
  387. else
  388. startInterp = t-1
  389. finishInterp = t
  390. end
  391. end
  392. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  393. end
  394.  
  395. function hideanim()
  396. equipped=false
  397. for i=0,1,0.1 do
  398. swait()
  399. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
  400. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.4)
  401. Torso.Neck.C1=clerp(Torso.Neck.C1,necko2*euler(0,0,0),.4)
  402. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.4)
  403. RW.C1=clerp(RW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  404. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.4)
  405. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  406. RH.C0=clerp(RH.C0,RHC0,.2)
  407. RH.C1=clerp(RH.C1,RHC1,.2)
  408. LH.C0=clerp(LH.C0,LHC0,.2)
  409. LH.C1=clerp(LH.C1,LHC1,.2)
  410. end
  411. end
  412.  
  413. function equipanim()
  414. equipped=true
  415. for i=0,1,0.1 do
  416. swait()
  417. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  418. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  419. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0.1),.3)
  420. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  421. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.1),.3)
  422. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  423. end
  424. end
  425.  
  426. function attackone()
  427. attack=true
  428. for i=0,1,0.1 do
  429. swait()
  430. Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,-.4),.3)
  431. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.3)
  432. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3.8,0,-0.4),.3)
  433. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  434. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.3),.3)
  435. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  436. end
  437. num=math.random(1,#GiftbagGifts)
  438. GiftbagGifts[num].Mesh.Parent=nil
  439. Giftify(GiftbagGifts[num],1.3,1.3,1.3)
  440. local giftprt=part(3,modelzorz,0,0,BrickColor.new("Black"),"Gift",vt(1.3,1.3,1.3))
  441. Giftify(giftprt,1.3,1.3,1.3)
  442. local gwld=weld(giftprt,giftprt,RightArm,euler(1.57,0,0)*cf(0,1.3,0))
  443. for i=0,1,0.15 do
  444. swait()
  445. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.5),.3)
  446. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.5),.3)
  447. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,0.5),.3)
  448. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  449. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.4,0,-0.3),.3)
  450. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  451. end
  452. so("http://roblox.com/asset/?id=169445092",RightArm,1,math.random(80,120)/100)
  453. gwld.Parent=nil
  454. giftprt.Parent=workspace
  455. giftprt.CanCollide=true
  456. local TheHit=MMouse.Hit.p
  457. local MouseLook=cf((RootPart.Position+TheHit)/2,TheHit)
  458. --giftprt.Velocity=RootPart.CFrame.lookVector*100
  459. giftprt.Velocity=MouseLook.lookVector*160
  460. game:GetService("Debris"):AddItem(giftprt,5)
  461. Boom(giftprt,100,2,5,10,true)
  462. for i=0,1,0.1 do
  463. swait()
  464. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.7),.3)
  465. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.7),.3)
  466. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,-.2),.3)
  467. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  468. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.4,0,-0.3),.3)
  469. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  470. end
  471. attack=false
  472. end
  473.  
  474. function attacktwo()
  475. attack=true
  476. for i=0,1,0.1 do
  477. swait()
  478. Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,.4),.3)
  479. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.5),.3)
  480. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0.3),.3)
  481. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  482. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3.8,0,0.4),.3)
  483. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  484. end
  485. num=math.random(1,#GiftbagGifts)
  486. GiftbagGifts[num].Mesh.Parent=nil
  487. Giftify(GiftbagGifts[num],1.3,1.3,1.3)
  488. local giftprt=part(3,modelzorz,0,0,BrickColor.new("Black"),"Gift",vt(1.3,1.3,1.3))
  489. Giftify(giftprt,1.3,1.3,1.3)
  490. local gwld=weld(giftprt,giftprt,LeftArm,euler(1.57,0,0)*cf(0,1.3,0))
  491. for i=0,1,0.15 do
  492. swait()
  493. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5),.3)
  494. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.3)
  495. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,0.3),.3)
  496. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  497. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-0.5),.3)
  498. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  499. end
  500. so("http://roblox.com/asset/?id=169445092",LeftArm,1,math.random(80,120)/100)
  501. gwld.Parent=nil
  502. giftprt.Parent=workspace
  503. giftprt.CanCollide=true
  504. local TheHit=MMouse.Hit.p
  505. local MouseLook=cf((RootPart.Position+TheHit)/2,TheHit)
  506. --giftprt.Velocity=RootPart.CFrame.lookVector*100
  507. giftprt.Velocity=MouseLook.lookVector*160
  508. game:GetService("Debris"):AddItem(giftprt,5)
  509. Boom(giftprt,100,2,5,10,true)
  510. for i=0,1,0.1 do
  511. swait()
  512. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.7),.3)
  513. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.7),.3)
  514. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,0.3),.3)
  515. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  516. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1,0,-0.2),.3)
  517. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  518. end
  519. attack=false
  520. end
  521.  
  522. function attackthree()
  523. attack=true
  524. for i=0,1,0.1 do
  525. swait()
  526. Neck.C0=clerp(Neck.C0,necko*euler(-.5,0,0),.3)
  527. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  528. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3.8,0,-0.4),.3)
  529. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  530. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3.8,0,0.4),.3)
  531. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  532. end
  533. num=math.random(1,#GiftbagGifts)
  534. GiftbagGifts[num].Mesh.Parent=nil
  535. Giftify(GiftbagGifts[num],1.3,1.3,1.3)
  536. local giftprt=part(3,modelzorz,0,0,BrickColor.new("Black"),"Gift",vt(2,2,2))
  537. Giftify(giftprt,2,2,2)
  538. local gwld=weld(giftprt,giftprt,LeftArm,euler(1.57,0,0)*cf(-.8,1.8,0))
  539. for i=0,1,0.15 do
  540. swait()
  541. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  542. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  543. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,-0.4),.3)
  544. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  545. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,0.4),.3)
  546. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  547. end
  548. so("http://roblox.com/asset/?id=169445092",LeftArm,1,math.random(60,90)/100)
  549. gwld.Parent=nil
  550. giftprt.Parent=workspace
  551. giftprt.CanCollide=true
  552. local TheHit=MMouse.Hit.p
  553. local MouseLook=cf((RootPart.Position+TheHit)/2,TheHit)
  554. --giftprt.Velocity=RootPart.CFrame.lookVector*100
  555. giftprt.Velocity=MouseLook.lookVector*120
  556. game:GetService("Debris"):AddItem(giftprt,5)
  557. Boom(giftprt,150,4,7,12,true)
  558. for i=0,1,0.1 do
  559. swait()
  560. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0),.3)
  561. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  562. RW.C0=clerp(RW.C0,cf(1.2,0.5,-.3)*euler(1,0,-0.4),.3)
  563. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  564. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.3)*euler(1,0,0.4),.3)
  565. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  566. end
  567. attack=false
  568. end
  569.  
  570. function Surprise()
  571. attack=true
  572. for i=0,1,0.1 do
  573. swait()
  574. Neck.C0=clerp(Neck.C0,necko*euler(-.5,0,0),.3)
  575. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  576. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3.8,0,-0.4),.3)
  577. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  578. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3.8,0,0.4),.3)
  579. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  580. end
  581. num=math.random(1,#GiftbagGifts)
  582. GiftbagGifts[num].Mesh.Parent=nil
  583. Giftify(GiftbagGifts[num],1.3,1.3,1.3)
  584. Humanoid.WalkSpeed=0
  585. so("http://roblox.com/asset/?id=169445092",RightArm,1,math.random(50,80)/100)
  586. local giftprt=part(3,modelzorz,0,0,BrickColor.new("Black"),"Gift",vt(6,6,6))
  587. Giftify(giftprt,6,6,6)
  588. local gwld=weld(giftprt,giftprt,LeftArm,euler(1.57,0,.4)*cf(-.2,2.5,0))
  589. for i=0,1,0.1 do
  590. swait()
  591. Neck.C0=clerp(Neck.C0,necko*euler(0.2,0,0),.3)
  592. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.5)*euler(0,0,0),.3)
  593. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,-0.4),.3)
  594. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  595. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,0.4),.3)
  596. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  597. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.3)
  598. LH.C0=clerp(LH.C0,cf(-1.1,0.4,-0.8)*euler(-0.05,-1.57,0),.3)
  599. end
  600. Humanoid.WalkSpeed=16
  601. gwld.Parent=nil
  602. giftprt.Parent=workspace
  603. giftprt.CanCollide=true
  604. game:GetService("Debris"):AddItem(giftprt,10)
  605. Boom(giftprt,300,6,10,20,false)
  606. attack=false
  607. end
  608.  
  609. function PartyCannon()
  610. attack=true
  611. for i=0,1,0.1 do
  612. swait()
  613. Neck.C0=clerp(Neck.C0,necko*euler(-.5,0,0),.3)
  614. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  615. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3.8,0,-0.4),.3)
  616. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  617. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3.8,0,0.4),.3)
  618. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  619. end
  620. Humanoid.WalkSpeed=0
  621. local cannon=part(3,modelzorz,0,0,BrickColor.new("Bright stone grey"),"Cannon",vt())
  622. local cmsh=mesh("SpecialMesh",cannon,"FileMesh","http://www.roblox.com/asset/?id=110153429",vt(0,0,0),vt(1.5,1.5,1.5))
  623. local cwld=weld(cannon,cannon,LeftArm,euler(1.57,0,.4)*cf(-0.6,2,-0.5))
  624. for i=0,1,0.1 do
  625. swait()
  626. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3)
  627. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.5)*euler(0,0,0),.3)
  628. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,-0.4),.3)
  629. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  630. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,0.4),.3)
  631. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  632. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.3)
  633. LH.C0=clerp(LH.C0,cf(-1.1,0.4,-0.8)*euler(-0.05,-1.57,0),.3)
  634. end
  635. swait(5)
  636. so("http://roblox.com/asset/?id=146767803",cannon,1,1)
  637. swait(5)
  638. MagicBlock(BrickColor.new("Bright red"),cannon.CFrame,1,1,1,3,3,3,.05,1)
  639. Torso.Velocity=RootPart.CFrame.lookVector*-130
  640. for i=1,30 do
  641. local confetti=part(3,workspace,0,0,BrickColor.Random(),"Confetti",vt())
  642. local cmsh=mesh("BlockMesh",confetti,"","",vt(0,0,0),vt(3,1,3))
  643. confetti.CFrame=cannon.CFrame*cf(math.random(-300,300)/100,math.random(-300,300)/100,math.random(-300,300)/100)
  644. confetti.Velocity=(RootPart.CFrame.lookVector*math.random(40,60))+(vt(math.random(-100,100)/100,1,math.random(-100,100)/100)*math.random(60,80))
  645. game:GetService("Debris"):AddItem(confetti,5)
  646. end
  647. for i=1,10 do
  648. num=math.random(100,400)/100
  649. local giftprt=part(3,workspace,0,0,BrickColor.new("Black"),"Gift",vt(num,num,num))
  650. Giftify(giftprt,num,num,num)
  651. giftprt.CFrame=cannon.CFrame*cf(math.random(-300,300)/100,math.random(-300,300)/100,math.random(-300,-100)/100)
  652. giftprt.CanCollide=true
  653. giftprt.Velocity=(RootPart.CFrame.lookVector*math.random(40,60))+(vt(0,1,0)*math.random(60,80))
  654. game:GetService("Debris"):AddItem(giftprt,10)
  655. Boom(giftprt,math.random(200,600),num,10,20,false)
  656. end
  657. --[[for i=1,100 do
  658. num=math.random(100,400)/100
  659. local giftprt=part(3,workspace,0,0,BrickColor.new("Black"),"Gift",vt(num,num,num))
  660. Giftify(giftprt,num,num,num)
  661. giftprt.CFrame=cannon.CFrame*cf(math.random(-300,300)/100,math.random(-300,300)/100,math.random(-300,-100)/100)
  662. giftprt.CanCollide=true
  663. giftprt.Velocity=(RootPart.CFrame.lookVector*math.random(30,80))+(vt(0,1,0)*math.random(60,80))
  664. game:GetService("Debris"):AddItem(giftprt,10)
  665. Boom(giftprt,math.random(200,600),num,10,20,false)
  666. end]]
  667. swait(100)
  668. cannon.Parent=nil
  669. Humanoid.WalkSpeed=16
  670. attack=false
  671. end
  672.  
  673. function SnowDay()
  674. attack=true
  675. Humanoid.WalkSpeed=0
  676. local gairo=Instance.new("BodyGyro")
  677. gairo.Parent=RootPart
  678. gairo.maxTorque=Vector3.new(4e+005,4e+005,4e+005)*math.huge
  679. gairo.P=20e+003
  680. gairo.cframe=RootPart.CFrame
  681. s=Instance.new("Sound")
  682. s.Parent=Torso
  683. s.Pitch=1
  684. s.Volume=1
  685. s.SoundId="http://www.roblox.com/asset/?id=19358641"
  686. s.Looped=true
  687. s:Play()
  688. num=0
  689. num2=0
  690. num3=0
  691. CF=RootPart.CFrame
  692. local snowfield=part(3,modelzorz,0,1,BrickColor.new("White"),"SnowField",vt())
  693. local cmsh=mesh("CylinderMesh",snowfield,"","",vt(0,0,0),vt(300,1,300))
  694. snowfield.Anchored=true
  695. snowfield.CFrame=cf(RootPart.Position)*cf(0,-3,0)
  696. while holdc==true do
  697. swait()
  698. hitfloor2,posfloor2=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,999,Character)
  699. if hitfloor2~=nil then
  700. snowfield.CFrame=cf(posfloor2)
  701. end
  702. if snowfield.Transparency>=.85 then
  703. snowfield.Transparency=snowfield.Transparency-0.0001
  704. end
  705. Neck.C0=clerp(Neck.C0,necko*euler(-.6,0,0),.3)
  706. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  707. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3,0,.8),.3)
  708. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  709. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3,0,-.8),.3)
  710. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  711. MagicBlock(BrickColor.new("White"),LeftArm.CFrame*cf(0,-1,0),1,1,1,1,1,1,.1,1)
  712. MagicBlock(BrickColor.new("White"),RightArm.CFrame*cf(0,-1,0),1,1,1,1,1,1,.1,1)
  713. gairo.cframe=CF*euler(0,num,0)
  714. num=num+0.1
  715. num2=num2+1
  716. if num2%100==0 then
  717. if Character.Humanoid == nil then
  718. MagniDamage(RootPart,0,0,0,math.random(0,0),"Knockdown")
  719. else
  720. MagniDamage(RootPart,30,0,10,math.random(1,5),"Knockdown")
  721. end
  722. end
  723. if num2%20==0 then
  724. local cloud=part(3,workspace,0,0,BrickColor.new("White"),"Cloud",vt())
  725. local cmsh=mesh("SpecialMesh",cloud,"FileMesh","http://www.roblox.com/asset/?id=1095708",vt(0,0,0),vt(8,8,8))
  726. cloud.Anchored=true
  727. cloud.CFrame=cf(RootPart.Position)*cf(math.random(-2000,2000)/100,30,math.random(-2000,2000)/100)*euler(0,1.57,0)
  728. game:GetService("Debris"):AddItem(cloud,5)
  729. table.insert(Effects,{cloud,"Snow",40,0})
  730. end
  731. end
  732. snowfield.Parent=nil
  733. gairo.Parent=nil
  734. s:Stop()
  735. s.Parent=nil
  736. Humanoid.WalkSpeed=16
  737. attack=false
  738. end
  739.  
  740. function SantaSleigh()
  741. attack=true
  742. Humanoid.WalkSpeed=0
  743. for i=0,1,0.1 do
  744. swait()
  745. Neck.C0=clerp(Neck.C0,necko*euler(-.5,0,0),.3)
  746. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  747. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3.8,0,-0.4),.3)
  748. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  749. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3.8,0,0.4),.3)
  750. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  751. end
  752. local sleigh=part(3,modelzorz,0,0,BrickColor.new("White"),"Sleigh",vt())
  753. local smsh=mesh("SpecialMesh",sleigh,"FileMesh","http://www.roblox.com/asset/?id=67730602 ",vt(0,0,0),vt(1.5,1.5,1.5))
  754. smsh.TextureId="http://www.roblox.com/asset/?id=67730764"
  755. local swld=weld(sleigh,sleigh,LeftArm,euler(3.14,0,.4+1.57)*cf(-0.6,2,-1))
  756. for i=0,1,0.1 do
  757. swait()
  758. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3)
  759. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.5)*euler(0,0,0),.3)
  760. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,-0.4),.3)
  761. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  762. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,0.4),.3)
  763. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  764. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.3)
  765. LH.C0=clerp(LH.C0,cf(-1.1,0.4,-0.8)*euler(-0.05,-1.57,0),.3)
  766. end
  767. swld.Part1=Torso
  768. swld.C0=euler(1.57,-1.57,0)*cf(0,1.2,0)
  769. wld2.C0=euler(0,1.57,0)*cf(0,-.8,-1.8)
  770. for i=0,1,0.1 do
  771. swait()
  772. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  773. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*euler(0,0,0),.3)
  774. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0.4),.3)
  775. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  776. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.4),.3)
  777. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  778. RH.C0=clerp(RH.C0,cf(1,-1,-0)*euler(1.3,1.57,0)*euler(-0.2,0,0),.3)
  779. LH.C0=clerp(LH.C0,cf(-1,-1,-0)*euler(1.3,-1.57,0)*euler(-0.2,0,0),.3)
  780. end
  781. s=Instance.new("Sound")
  782. s.Parent=Torso
  783. s.Pitch=1
  784. s.Volume=1
  785. s.SoundId="http://www.roblox.com/asset/?id=19358641"
  786. s.Looped=true
  787. s:Play()
  788. bodvel=Instance.new("BodyVelocity")
  789. bodvel.Parent=RootPart
  790. bodvel.velocity=MMouse.Hit.lookVector*30
  791. bodvel.P=5000
  792. bodvel.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  793. local gairo=Instance.new("BodyGyro")
  794. gairo.Parent=RootPart
  795. gairo.maxTorque=Vector3.new(4e+005,4e+005,4e+005)
  796. gairo.P=3000
  797. gairo.cframe=RootPart.CFrame
  798. gift=0
  799. for i=1,1000 do
  800. swait()
  801. bodvel.velocity=MMouse.Hit.lookVector*80
  802. gairo.cframe=CFrame.new(RootPart.Position,MMouse.Hit.p)
  803. if gift>=20 then
  804. gift=0
  805. for i=1,5 do
  806. local confetti=part(3,workspace,0,0,BrickColor.Random(),"Confetti",vt())
  807. local cmsh=mesh("BlockMesh",confetti,"","",vt(0,0,0),vt(3,1,3))
  808. confetti.CFrame=RootPart.CFrame*cf(math.random(-300,300)/100,math.random(-300,300)/100,math.random(-300,300)/100)
  809. confetti.Velocity=(RootPart.CFrame.lookVector*math.random(40,60))+(vt(math.random(-100,100)/100,-1,math.random(-100,100)/100)*math.random(60,80))
  810. game:GetService("Debris"):AddItem(confetti,5)
  811. end
  812. for i=1,math.random(1,3) do
  813. num=math.random(100,300)/100
  814. local giftprt=part(3,workspace,0,0,BrickColor.new("Black"),"Gift",vt(num,num,num))
  815. Giftify(giftprt,num,num,num)
  816. giftprt.CFrame=RootPart.CFrame*cf(math.random(-300,300)/100,math.random(-500,-300)/100,math.random(-300,300)/100)
  817. giftprt.CanCollide=true
  818. giftprt.Velocity=(RootPart.CFrame.lookVector*math.random(20,40))+(vt(math.random(-1,1),-1,math.random(-1,1))*math.random(20,60))
  819. game:GetService("Debris"):AddItem(giftprt,10)
  820. Boom(giftprt,math.random(200,400),num,10,20,false)
  821. end
  822. end
  823. gift=gift+1
  824. end
  825. s:Stop()
  826. s.Parent=nil
  827. bodvel.Parent=nil
  828. gairo.Parent=nil
  829. wld2.C0=euler(0,1.57,0)*cf(0,.5,-1.5)
  830. Humanoid.WalkSpeed=16
  831. sleigh.Parent=nil
  832. attack=false
  833. end
  834.  
  835. function MagniDamage(Part,magni,mindam,maxdam,knock,Type)
  836. for _,c in pairs(workspace:children()) do
  837. local hum=c:findFirstChild("Humanoid")
  838. if hum~=nil then
  839. local head=c:findFirstChild("Torso")
  840. if head~=nil then
  841. local targ=head.Position-Part.Position
  842. local mag=targ.magnitude
  843. if mag<=magni and c.Name~=Player.Name then
  844. Damagefunc(head,mindam,maxdam,knock,Type,RootPart,.2,1,3,1)
  845. end
  846. end
  847. end
  848. end
  849. end
  850.  
  851. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  852. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  853. end
  854.  
  855. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type,parent)
  856. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  857. prt.Anchored=true
  858. prt.CFrame=cframe
  859. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  860. game:GetService("Debris"):AddItem(prt,5)
  861. if Type==1 or Type==nil then
  862. table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
  863. elseif Type==2 then
  864. table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
  865. end
  866. end
  867.  
  868. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  869. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  870. prt.Anchored=true
  871. prt.CFrame=cframe
  872. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  873. game:GetService("Debris"):AddItem(prt,2)
  874. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  875. end
  876.  
  877. function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  878. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  879. prt.Anchored=true
  880. prt.CFrame=cframe
  881. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  882. game:GetService("Debris"):AddItem(prt,5)
  883. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  884. end
  885.  
  886. function Boom(Part,numb,magnitude,mindam,maxdam,cantouch)
  887. if cantouch==true then
  888. con1=Part.Touched:connect(function(hit)
  889. if hit.Parent==nil then
  890. return
  891. end
  892. h=hit.Parent:FindFirstChild("Humanoid")
  893. for _,v in pairs(hit.Parent:children()) do
  894. if v:IsA("Humanoid") then
  895. h=v
  896. end
  897. end
  898. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  899. Part.Parent=nil
  900. end
  901. end)
  902. end
  903. table.insert(Effects,{Part,"Explode",numb,magnitude,mindam,maxdam})
  904. end
  905.  
  906. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  907. if hit.Parent==nil then
  908. return
  909. end
  910. h=hit.Parent:FindFirstChild("Humanoid")
  911. for _,v in pairs(hit.Parent:children()) do
  912. if v:IsA("Humanoid") then
  913. h=v
  914. end
  915. end
  916. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  917. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  918. end
  919. if hit.Parent.className=="Hat" then
  920. hit=hit.Parent.Parent:findFirstChild("Head")
  921. end
  922. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  923. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  924. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  925. return
  926. end]]
  927. -- hs(hit,1.2)
  928. c=Instance.new("ObjectValue")
  929. c.Name="creator"
  930. c.Value=game:service("Players").LocalPlayer
  931. c.Parent=h
  932. game:GetService("Debris"):AddItem(c,.5)
  933. Damage=math.random(minim,maxim)
  934. -- h:TakeDamage(Damage)
  935. blocked=false
  936. block=hit.Parent:findFirstChild("Block")
  937. if block~=nil then
  938. print(block.className)
  939. if block.className=="NumberValue" then
  940. if block.Value>0 then
  941. blocked=true
  942. if decreaseblock~=nil then
  943. block.Value=block.Value-decreaseblock
  944. end
  945. end
  946. end
  947. if block.className=="IntValue" then
  948. if block.Value>0 then
  949. blocked=true
  950. if decreaseblock~=nil then
  951. block.Value=block.Value-decreaseblock
  952. end
  953. end
  954. end
  955. end
  956. if blocked==false then
  957. -- h:TakeDamage(Damage)
  958.  
  959. HitHealth=h.Health
  960. h.Health=h.Health-Damage
  961. if HitHealth~=h.Health and HitHealth~=0 and h.Health<=0 and h.Parent.Name~="Hologram" then
  962. print("gained spree")
  963. Player:FindFirstChild("leaderstats").Spree.Value=Player.leaderstats.Spree.Value+1
  964. end
  965. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  966. else
  967. h.Health=h.Health-Damage/2
  968. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  969. end
  970. if Type=="Knockdown" then
  971. hum=hit.Parent.Humanoid
  972. hum.PlatformStand=true
  973. coroutine.resume(coroutine.create(function(HHumanoid)
  974. swait(1)
  975. HHumanoid.PlatformStand=false
  976. end),hum)
  977. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  978. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  979. local bodvol=Instance.new("BodyVelocity")
  980. bodvol.velocity=angle*knockback
  981. bodvol.P=5000
  982. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  983. bodvol.Parent=hit
  984. rl=Instance.new("BodyAngularVelocity")
  985. rl.P=3000
  986. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  987. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  988. rl.Parent=hit
  989. game:GetService("Debris"):AddItem(bodvol,.5)
  990. game:GetService("Debris"):AddItem(rl,.5)
  991. elseif Type=="Normal" then
  992. vp=Instance.new("BodyVelocity")
  993. vp.P=500
  994. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  995. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  996. if KnockbackType==1 then
  997. vp.velocity=Property.CFrame.lookVector*knockback
  998. elseif KnockbackType==2 then
  999. vp.velocity=Property.CFrame.lookVector*knockback
  1000. end
  1001. if knockback>0 then
  1002. vp.Parent=hit.Parent.Torso
  1003. end
  1004. game:GetService("Debris"):AddItem(vp,.5)
  1005. elseif Type=="Up" then
  1006. local bodyVelocity=Instance.new("BodyVelocity")
  1007. bodyVelocity.velocity=vt(0,30,0)
  1008. bodyVelocity.P=5000
  1009. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1010. bodyVelocity.Parent=hit
  1011. game:GetService("Debris"):AddItem(bodyVelocity,1)
  1012. rl=Instance.new("BodyAngularVelocity")
  1013. rl.P=3000
  1014. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1015. rl.angularvelocity=Vector3.new(math.random(-2,2),math.random(-2,2),math.random(-2,2))
  1016. rl.Parent=hit
  1017. game:GetService("Debris"):AddItem(rl,.5)
  1018. elseif Type=="Snare" then
  1019. bp=Instance.new("BodyPosition")
  1020. bp.P=2000
  1021. bp.D=100
  1022. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1023. bp.position=hit.Parent.Torso.Position
  1024. bp.Parent=hit.Parent.Torso
  1025. game:GetService("Debris"):AddItem(bp,1)
  1026. end
  1027. debounce=Instance.new("BoolValue")
  1028. debounce.Name="DebounceHit"
  1029. debounce.Parent=hit.Parent
  1030. debounce.Value=true
  1031. game:GetService("Debris"):AddItem(debounce,Delay)
  1032. c=Instance.new("ObjectValue")
  1033. c.Name="creator"
  1034. c.Value=Player
  1035. c.Parent=h
  1036. game:GetService("Debris"):AddItem(c,.5)
  1037. CRIT=false
  1038. end
  1039. end
  1040.  
  1041. showDamage=function(Char,Dealt,du,Color)
  1042. m=Instance.new("Model")
  1043. m.Name=tostring(math.floor(Dealt))
  1044. h=Instance.new("Humanoid")
  1045. h.Health=0
  1046. h.MaxHealth=0
  1047. h.Parent=m
  1048. c=Instance.new("Part")
  1049. c.Transparency=0
  1050. c.BrickColor=Color
  1051. c.Name="Head"
  1052. c.TopSurface=0
  1053. c.BottomSurface=0
  1054. c.formFactor="Plate"
  1055. c.Size=Vector3.new(1,.4,1)
  1056. ms=Instance.new("CylinderMesh")
  1057. ms.Scale=Vector3.new(.8,.8,.8)
  1058. if CRIT==true then
  1059. ms.Scale=Vector3.new(1,1.25,1)
  1060. end
  1061. ms.Parent=c
  1062. c.Reflectance=0
  1063. Instance.new("BodyGyro").Parent=c
  1064. c.Parent=m
  1065. if Char:findFirstChild("Head")~=nil then
  1066. c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1067. elseif Char.Parent:findFirstChild("Head")~=nil then
  1068. c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1069. end
  1070. f=Instance.new("BodyPosition")
  1071. f.P=2000
  1072. f.D=100
  1073. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1074. f.position=c.Position+Vector3.new(0,3,0)
  1075. f.Parent=c
  1076. game:GetService("Debris"):AddItem(m,.5+du)
  1077. c.CanCollide=false
  1078. m.Parent=workspace
  1079. c.CanCollide=false
  1080. end
  1081.  
  1082. combo=0
  1083. function ob1d(mouse)
  1084. if attack==true or equipped==false then return end
  1085. hold=true
  1086.  
  1087. if combo==0 then
  1088. combo=1
  1089. attackone()
  1090. elseif combo==1 then
  1091. combo=2
  1092. attacktwo()
  1093. elseif combo==2 then
  1094. combo=0
  1095. attackthree()
  1096. end
  1097. coroutine.resume(coroutine.create(function()
  1098. for i=1,50 do
  1099. if attack==false then
  1100. swait()
  1101. end
  1102. end
  1103. if attack==false then
  1104. combo=0
  1105. end
  1106. end))
  1107. end
  1108.  
  1109. function ob1u(mouse)
  1110. hold = false
  1111. end
  1112.  
  1113. buttonhold = false
  1114.  
  1115. eul=0
  1116. holdg=false
  1117. holdc=false
  1118. cansurprise=true
  1119. equipped=false
  1120. function key(key)
  1121. if key=="g" then
  1122. holdg=true
  1123. end
  1124. if key=="c" then
  1125. holdc=true
  1126. end
  1127. if attack==true then return end
  1128. if key=="f" then
  1129. attack=true
  1130. if equipped==false then
  1131. equipped=true
  1132. RSH=ch.Torso["Right Shoulder"]
  1133. LSH=ch.Torso["Left Shoulder"]
  1134. --
  1135. RSH.Parent=nil
  1136. LSH.Parent=nil
  1137. --
  1138. RW.Name="Right Shoulder"
  1139. RW.Part0=ch.Torso
  1140. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1141. RW.C1=cf(0, 0.5, 0)
  1142. RW.Part1=ch["Right Arm"]
  1143. RW.Parent=ch.Torso
  1144. --
  1145. LW.Name="Left Shoulder"
  1146. LW.Part0=ch.Torso
  1147. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1148. LW.C1=cf(0, 0.5, 0)
  1149. LW.Part1=ch["Left Arm"]
  1150. LW.Parent=ch.Torso
  1151. --
  1152. equipanim()
  1153. else
  1154. equipped=false
  1155. hideanim()
  1156. swait(0)
  1157. RW.Parent=nil
  1158. LW.Parent=nil
  1159. RSH.Parent=player.Character.Torso
  1160. LSH.Parent=player.Character.Torso
  1161. end
  1162. attack=false
  1163. end
  1164. if equipped==false then return end
  1165. if key=="z" and cansurprise==true then
  1166. Surprise()
  1167. cansurprise=false
  1168. coroutine.resume(coroutine.create(function()
  1169. wait(5)
  1170. cansurprise=true
  1171. end))
  1172. end
  1173. if key=="x" then
  1174. PartyCannon()
  1175. end
  1176. if key=="c" then
  1177. SnowDay()
  1178. end
  1179. if key=="v" and cansleigh==true and game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, 99564420) then
  1180. cansleigh=false
  1181. SantaSleigh()
  1182. end
  1183. --[[if key=="g" then
  1184. while holdg==true do
  1185. swait()
  1186. attack=true
  1187. Neck.C0=clerp(Neck.C0,necko*euler(-.6,0,0),.3)
  1188. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1189. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3,0,.8),.3)
  1190. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1191. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3,0,-.8),.3)
  1192. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1193. size=math.random(100,500)/100
  1194. local giftprt=part(3,modelzorz,0,0,BrickColor.new("Black"),"Gift",vt(size*2,size*2,size*2))
  1195. Giftify(giftprt,size*2,size*2,size*2)
  1196. giftprt.Parent=workspace
  1197. giftprt.CanCollide=true
  1198. giftprt.CFrame=Torso.CFrame*cf(math.random(-50,50),math.random(80,100),math.random(-50,50))
  1199. game:GetService("Debris"):AddItem(giftprt,5)
  1200. Boom(giftprt,size*100,size*2,5,10,false)
  1201. end
  1202. attack=false
  1203. end]]
  1204. end
  1205.  
  1206. function key2(key)
  1207. if key=="g" then
  1208. holdg=false
  1209. end
  1210. if key=="c" then
  1211. holdc=false
  1212. end
  1213. end
  1214.  
  1215. function s(mouse)
  1216. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1217. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1218. mouse.KeyDown:connect(key)
  1219. mouse.KeyUp:connect(key2)
  1220.  
  1221. player=Player
  1222. ch=Character
  1223. MMouse=mouse
  1224. end
  1225.  
  1226. function ds(mouse)
  1227. end
  1228.  
  1229. Bin.Selected:connect(s)
  1230. Bin.Deselected:connect(ds)
  1231. print("Santa's Elf loaded.")
  1232.  
  1233.  
  1234. local donum=0
  1235. while true do
  1236. pwait()
  1237. if donum>=.5 then
  1238. handidle=true
  1239. elseif donum<=0 then
  1240. handidle=false
  1241. end
  1242. if handidle==false then
  1243. donum=donum+0.003
  1244. else
  1245. donum=donum-0.003
  1246. end
  1247. --between prt16 and prt17
  1248. --local wld27=weld(prt27,prt27,prt26,euler(0,0,0)*cf(0,-1.2,0))
  1249. --[[local top=prt16r.CFrame
  1250. local bottom=prt17r.CFrame
  1251. oristrpos=CFrame.new((top.p+bottom.p)/2)
  1252. local mg1=(top.p-oristrpos.p).magnitude
  1253. local mg2=(bottom.p-oristrpos.p).magnitude
  1254. cff=CFrame.new(top*angles(1.57,0,0).p,prt17r.Position)*angles(math.rad(90),0,0)*cf(0,-mg1/2,0)
  1255. hit2=prt27
  1256. hit=prt17r
  1257. wld27.Parent=prt27
  1258. wld27.Part0=hit2
  1259. wld27.Part1=hit
  1260. HitPos=cff.p
  1261. local CJ = CFrame.new(HitPos)
  1262. local C0=cff:inverse() *CJ
  1263. local C1=hit.CFrame:inverse() * CJ
  1264. wld27.C0=clerp(wld27.C0,C0,.1)
  1265. wld27.C1=clerp(wld27.C1,C1,.1)]]
  1266. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1267. local velderp=RootPart.Velocity.y
  1268. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1269. if equipped==true then
  1270. if attack==false then
  1271. idle=idle+1
  1272. else
  1273. idle=0
  1274. end
  1275. if idle>=500 then
  1276. if attack==false then
  1277. --Sheath()
  1278. end
  1279. end
  1280. if RootPart.Velocity.y > 1 and hitfloor==nil then
  1281. Anim="Jump"
  1282. if attack==false then
  1283. Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3)
  1284. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  1285. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1286. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5),.3)
  1287. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1288. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.3)
  1289. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1290. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  1291. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  1292. end
  1293. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1294. Anim="Fall"
  1295. if attack==false then
  1296. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3)
  1297. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  1298. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1299. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0.3,0,0.2),.3)
  1300. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1301. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.3)
  1302. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1303. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  1304. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  1305. end
  1306. elseif torvel<1 and hitfloor~=nil then
  1307. Anim="Idle"
  1308. if attack==false then
  1309. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  1310. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  1311. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1312. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0.1-(donum/5)),.3)
  1313. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1314. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.1+(donum/5)),.3)
  1315. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1316. RH.C0=clerp(RH.C0,RHC0,.3)
  1317. RH.C1=clerp(RH.C1,RHC1,.3)
  1318. LH.C0=clerp(LH.C0,LHC0,.3)
  1319. LH.C1=clerp(LH.C1,LHC1,.3)
  1320. end
  1321. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  1322. Anim="Walk"
  1323. if attack==false then
  1324. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  1325. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  1326. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,0),.3)
  1327. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-0.2,0,0.3),.3)
  1328. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1329. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.2,0,-0.3),.3)
  1330. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1331. RH.C0=clerp(RH.C0,RHC0,.3)
  1332. LH.C0=clerp(LH.C0,LHC0,.3)
  1333. end
  1334. elseif torvel>=22 and hitfloor~=nil then
  1335. Anim="Run"
  1336. if attack==false then
  1337. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  1338. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  1339. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.3,0,0),.3)
  1340. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-0.5,0,0.5),.3)
  1341. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1342. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.5,0,-0.5),.3)
  1343. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1344. end
  1345. end
  1346. end
  1347. if #Effects>0 then
  1348. --table.insert(Effects,{prt,"Block1",delay})
  1349. for e=1,#Effects do
  1350. if Effects[e]~=nil then
  1351. --for j=1,#Effects[e] do
  1352. local Thing=Effects[e]
  1353. if Thing~=nil then
  1354. local Part=Thing[1]
  1355. local Mode=Thing[2]
  1356. local Delay=Thing[3]
  1357. local IncX=Thing[4]
  1358. local IncY=Thing[5]
  1359. local IncZ=Thing[6]
  1360. if Thing[2]=="Snow" then
  1361. if Thing[1].Parent~=nil then
  1362. if Thing[4]==Thing[3] then
  1363. local snow=part(3,workspace,0,0,BrickColor.new("White"),"Effect",vt())
  1364. snow.CFrame=Thing[1].CFrame*cf(math.random(-300,300)/100,0,math.random(-300,300)/100)
  1365. local smsh=mesh("SpecialMesh",snow,"Sphere","",vt(0,0,0),vt(1,1,1))
  1366. bodvol=Instance.new("BodyVelocity")
  1367. bodvol.Parent=snow
  1368. bodvol.velocity=vt(0,-1,0)*10
  1369. bodvol.P=5000
  1370. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1371. game:GetService("Debris"):AddItem(snow,5)
  1372. Thing[4]=0
  1373. else
  1374. Thing[4]=Thing[4]+1
  1375. end
  1376. end
  1377. end
  1378. if Thing[2]=="Explode" then
  1379. if Thing[3]<=0 or Thing[1].Parent==nil then
  1380. Thing[1].Parent=nil
  1381. size=Thing[4]
  1382. MagicBlock(BrickColor.new("Bright red"),Thing[1].CFrame,1,1,1,size,size,size,.05,1)
  1383. MagicCircle(BrickColor.new("Bright yellow"),Thing[1].CFrame,1,1,1,size*5,size*5,size*5,.1)
  1384. local prtt=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  1385. prtt.Anchored=true
  1386. prtt.CFrame=Thing[1].CFrame
  1387. MagniDamage(prtt,size*5,Thing[5],Thing[6],math.random(size*2,size*3),"Normal")
  1388. game:GetService("Debris"):AddItem(prtt,1)
  1389. so("http://roblox.com/asset/?id=2101148",prtt,1,1)
  1390. table.remove(Effects,e)
  1391. end
  1392. Thing[3]=Thing[3]-1
  1393. end
  1394. if Thing[1].Transparency<=1 then
  1395. if Thing[2]=="Block1" then
  1396. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1397. Mesh=Thing[7]
  1398. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1399. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1400. elseif Thing[2]=="Block2" then
  1401. Thing[1].CFrame=Thing[1].CFrame
  1402. Mesh=Thing[7]
  1403. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1404. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1405. elseif Thing[2]=="Cylinder" then
  1406. Mesh=Thing[7]
  1407. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1408. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1409. elseif Thing[2]=="Blood" then
  1410. Mesh=Thing[7]
  1411. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  1412. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1413. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1414. elseif Thing[2]=="Elec" then
  1415. Mesh=Thing[1].Mesh
  1416. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  1417. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1418. elseif Thing[2]=="Disappear" then
  1419. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1420. end
  1421. else
  1422. Part.Parent=nil
  1423. table.remove(Effects,e)
  1424. end
  1425. end
  1426. --end
  1427. end
  1428. end
  1429. end
  1430. end
  1431.  
  1432. --[[
  1433. Copyrighted (C) Fenrier 2014
  1434. ]]
Add Comment
Please, Sign In to add comment