Advertisement
marioisdabomb

adas

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