Advertisement
TheMemeUserLol

Untitled

Dec 24th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.86 KB | None | 0 0
  1. //{Controls:
  2. // F - Toggle Memes
  3. ==================================]}
  4. --]]
  5.  
  6. Player=game:GetService("Players").ItachiUchihna
  7. Character=Player.Character
  8. PlayerGui=Player.PlayerGui
  9. Backpack=Player.Backpack
  10. Torso=Character.Torso
  11. Head=Character.Head
  12. Humanoid=Character.Humanoid
  13. m=Instance.new('Model',Character)
  14. LeftArm=Character["Left Arm"]
  15. LeftLeg=Character["Left Leg"]
  16. RightArm=Character["Right Arm"]
  17. RightLeg=Character["Right Leg"]
  18. LS=Torso["Left Shoulder"]
  19. LH=Torso["Left Hip"]
  20. RS=Torso["Right Shoulder"]
  21. RH=Torso["Right Hip"]
  22. Neck=Torso.Neck
  23. it=Instance.new
  24. attacktype=1
  25. vt=Vector3.new
  26. cf=CFrame.new
  27. euler=CFrame.fromEulerAnglesXYZ
  28. angles=CFrame.Angles
  29. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  30. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  31. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  32. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  33. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  34. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  35. RootPart=Character.HumanoidRootPart
  36. RootJoint=RootPart.RootJoint
  37. RootCF=euler(-1.57,0,3.14)
  38. attack = false
  39. attackdebounce = false
  40. deb=false
  41. equipped=true
  42. hand=false
  43. MMouse=nil
  44. combo=0
  45. mana=0
  46. cam=workspace.CurrentCamera
  47. RocketTarget=nil
  48. Targetting=false
  49. trispeed=.2
  50. attackmode='none'
  51. local idle=0
  52. local Anim="Idle"
  53. local Effects={}
  54. local gun=false
  55. local shoot=false
  56. local issprinting=false
  57. local memeing=false
  58. player=nil
  59. mouse=Player:GetMouse()
  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. TorsoColor=Torso.BrickColor
  68. function NoOutline(Part)
  69. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  70. end
  71. player=Player
  72. ch=Character
  73. RSH=ch.Torso["Right Shoulder"]
  74. LSH=ch.Torso["Left Shoulder"]
  75. --
  76. RSH.Parent=nil
  77. LSH.Parent=nil
  78. --
  79. RW.Name="Right Shoulder"
  80. RW.Part0=ch.Torso
  81. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  82. RW.C1=cf(0, 0.5, 0)
  83. RW.Part1=ch["Right Arm"]
  84. RW.Parent=ch.Torso
  85. --
  86. LW.Name="Left Shoulder"
  87. LW.Part0=ch.Torso
  88. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  89. LW.C1=cf(0, 0.5, 0)
  90. LW.Part1=ch["Left Arm"]
  91. LW.Parent=ch.Torso
  92.  
  93. if Humanoid:findFirstChild("Animate") then
  94. Humanoid:findFirstChild("Animate"):Destroy()
  95. elseif Character:findFirstChild("Animate") then
  96. Character:findFirstChild("Animate"):Destroy()
  97. end
  98.  
  99.  
  100. local WEEB = Instance.new("Sound",Torso)
  101. WEEB.Volume=0
  102. WEEB.Pitch=0
  103. WEEB.SoundId="http://www.roblox.com/asset/?id=239632147"
  104. WEEB.Looped=true
  105. wait()
  106. WEEB:play()
  107.  
  108.  
  109. local Stats=Instance.new("BoolValue")
  110. Stats.Name="Stats"
  111. Stats.Parent=Character
  112. local Atk=Instance.new("NumberValue")
  113. Atk.Name="Damage"
  114. Atk.Parent=Stats
  115. Atk.Value=1
  116. local Def=Instance.new("NumberValue")
  117. Def.Name="Defense"
  118. Def.Parent=Stats
  119. Def.Value=1
  120. local Speed=Instance.new("NumberValue")
  121. Speed.Name="Speed"
  122. Speed.Parent=Stats
  123. Speed.Value=1
  124. local Mvmt=Instance.new("NumberValue")
  125. Mvmt.Name="Movement"
  126. Mvmt.Parent=Stats
  127. Mvmt.Value=1
  128.  
  129.  
  130. local donum=0
  131.  
  132. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  133. local fp=it("Part")
  134. fp.formFactor=formfactor
  135. fp.Parent=parent
  136. fp.Reflectance=reflectance
  137. fp.Transparency=transparency
  138. fp.CanCollide=false
  139. fp.Locked=true
  140. fp.BrickColor=brickcolor
  141. fp.Name=name
  142. fp.Size=size
  143. fp.Position=Torso.Position
  144. NoOutline(fp)
  145. fp.Material="SmoothPlastic"
  146. fp:BreakJoints()
  147. return fp
  148. end
  149.  
  150. function part2(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
  151. local fp = Instance.new("Part")
  152. fp.formFactor = formfactor
  153. fp.Parent = parent
  154. fp.Reflectance = reflectance
  155. fp.Transparency = transparency
  156. fp.CanCollide = false
  157. fp.Locked = true
  158. fp.BrickColor = BrickColor.new(tostring(brickcolor))
  159. fp.Name = name
  160. fp.Size = size
  161. fp.Position = Character.Torso.Position
  162. fp.Material = material
  163.  
  164. NoOutline(fp)
  165. return fp
  166. end
  167.  
  168. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  169. local mesh=it(Mesh)
  170. mesh.Parent=part
  171. if Mesh=="SpecialMesh" then
  172. mesh.MeshType=meshtype
  173. mesh.MeshId=meshid
  174. end
  175. mesh.Offset=offset
  176. mesh.Scale=scale
  177. return mesh
  178. end
  179.  
  180. function weld(parent,part0,part1,c0)
  181. local weld=it("Weld")
  182. weld.Parent=parent
  183. weld.Part0=part0
  184. weld.Part1=part1
  185. weld.C0=c0
  186. return weld
  187. end
  188.  
  189. function weld2(parent, part0, part1, c0, c1)
  190. local Weld = Instance.new("Weld")
  191. Weld.Parent = parent
  192. Weld.Part0 = part0
  193. Weld.Part1 = part1
  194. Weld.C0 = c0
  195. Weld.C1 = c1
  196.  
  197. return Weld
  198. end
  199.  
  200. local Color1=Torso.BrickColor
  201.  
  202. local bodvel=Instance.new("BodyVelocity")
  203. local bg=Instance.new("BodyGyro")
  204.  
  205. ArtificialHB = Instance.new("BindableEvent", script)
  206. ArtificialHB.Name = "Heartbeat"
  207.  
  208. script:WaitForChild("Heartbeat")
  209.  
  210. frame = 1 / 60
  211. tf = 0
  212. allowframeloss = true
  213. tossremainder = false
  214. lastframe = tick()
  215. script.Heartbeat:Fire()
  216.  
  217. game:GetService("RunService").Heartbeat:connect(function(s, p)
  218. tf = tf + s
  219. if tf >= frame then
  220. if allowframeloss then
  221. script.Heartbeat:Fire()
  222. lastframe = tick()
  223. else
  224. for i = 1, math.floor(tf / frame) do
  225. script.Heartbeat:Fire()
  226. end
  227. lastframe = tick()
  228. end
  229. if tossremainder then
  230. tf = 0
  231. else
  232. tf = tf - frame * math.floor(tf / frame)
  233. end
  234. end
  235. end)
  236.  
  237. function swait(num)
  238. if num == 0 or num == nil then
  239. ArtificialHB.Event:wait()
  240. else
  241. for i = 0, num do
  242. ArtificialHB.Event:wait()
  243. end
  244. end
  245. end
  246.  
  247.  
  248. so = function(id,par,vol,pit)
  249. coroutine.resume(coroutine.create(function()
  250. local sou = Instance.new("Sound",par or workspace)
  251. sou.Volume=vol
  252. sou.Pitch=pit or 1
  253. sou.SoundId=id
  254. swait()
  255. sou:play()
  256. game:GetService("Debris"):AddItem(sou,6)
  257. end))
  258. end
  259.  
  260. function clerp(a,b,t)
  261. local qa = {QuaternionFromCFrame(a)}
  262. local qb = {QuaternionFromCFrame(b)}
  263. local ax, ay, az = a.x, a.y, a.z
  264. local bx, by, bz = b.x, b.y, b.z
  265. local _t = 1-t
  266. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  267. end
  268.  
  269. function QuaternionFromCFrame(cf)
  270. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  271. local trace = m00 + m11 + m22
  272. if trace > 0 then
  273. local s = math.sqrt(1 + trace)
  274. local recip = 0.5/s
  275. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  276. else
  277. local i = 0
  278. if m11 > m00 then
  279. i = 1
  280. end
  281. if m22 > (i == 0 and m00 or m11) then
  282. i = 2
  283. end
  284. if i == 0 then
  285. local s = math.sqrt(m00-m11-m22+1)
  286. local recip = 0.5/s
  287. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  288. elseif i == 1 then
  289. local s = math.sqrt(m11-m22-m00+1)
  290. local recip = 0.5/s
  291. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  292. elseif i == 2 then
  293. local s = math.sqrt(m22-m00-m11+1)
  294. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  295. end
  296. end
  297. end
  298.  
  299. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  300. local xs, ys, zs = x + x, y + y, z + z
  301. local wx, wy, wz = w*xs, w*ys, w*zs
  302. local xx = x*xs
  303. local xy = x*ys
  304. local xz = x*zs
  305. local yy = y*ys
  306. local yz = y*zs
  307. local zz = z*zs
  308. 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))
  309. end
  310.  
  311. function QuaternionSlerp(a, b, t)
  312. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  313. local startInterp, finishInterp;
  314. if cosTheta >= 0.0001 then
  315. if (1 - cosTheta) > 0.0001 then
  316. local theta = math.acos(cosTheta)
  317. local invSinTheta = 1/math.sin(theta)
  318. startInterp = math.sin((1-t)*theta)*invSinTheta
  319. finishInterp = math.sin(t*theta)*invSinTheta
  320. else
  321. startInterp = 1-t
  322. finishInterp = t
  323. end
  324. else
  325. if (1+cosTheta) > 0.0001 then
  326. local theta = math.acos(-cosTheta)
  327. local invSinTheta = 1/math.sin(theta)
  328. startInterp = math.sin((t-1)*theta)*invSinTheta
  329. finishInterp = math.sin(t*theta)*invSinTheta
  330. else
  331. startInterp = t-1
  332. finishInterp = t
  333. end
  334. end
  335. 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
  336. end
  337.  
  338. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  339. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  340. end
  341.  
  342. Damagefunc = function(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) --bm1
  343. if hit.Parent == nil then
  344. return
  345. end
  346. local h = hit.Parent:FindFirstChild("Humanoid")
  347. for _, v in pairs(hit.Parent:children()) do
  348. if v:IsA("Humanoid") then
  349. h = v
  350. end
  351. end
  352. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  353. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  354. if hit.Parent.DebounceHit.Value == true then
  355. return
  356. end
  357. end
  358. if h.MaxHealth >= math.huge then
  359. hit:BreakJoints()
  360. end
  361. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  362. return
  363. end]]
  364. -- hs(hit,1.2)
  365. local c = Instance.new("ObjectValue")
  366. c.Name = "creator"
  367. c.Value = game:service("Players").LocalPlayer
  368. c.Parent = h
  369.  
  370. game:GetService("Debris"):AddItem(c, .5)
  371. if HitSound ~= nil and HitPitch ~= nil then
  372. so(HitSound, hit, 1, HitPitch)
  373. end
  374. local Damage = math.random(minim, maxim)
  375. -- h:TakeDamage(Damage)
  376. local blocked = false
  377. local block = hit.Parent:findFirstChild("Block")
  378. if block ~= nil then
  379. if block.className == "IntValue" then
  380. if block.Value > 0 then
  381. blocked = true
  382. block.Value = block.Value - 1
  383. print(block.Value)
  384. end
  385. end
  386. end
  387. if blocked == false then
  388. -- h:TakeDamage(Damage)
  389. h.Health = h.Health - Damage
  390. if Damage ~= 0 then
  391. ShowDamage2((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Institutional white").Color)
  392. end
  393. else
  394. h.Health = h.Health - (Damage / 2)
  395. if Damage ~=0 then
  396. ShowDamage2((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Institutional white").Color)
  397. end
  398. end
  399. if Type == "Knockdown" then
  400. local hum = hit.Parent.Humanoid
  401. hum.PlatformStand = true
  402. coroutine.resume(coroutine.create(function(HHumanoid)
  403. swait(1)
  404. HHumanoid.PlatformStand = false
  405. end), hum)
  406. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  407. local bodvol = Instance.new("BodyVelocity")
  408. bodvol.velocity = angle * knockback
  409. bodvol.P = 5000
  410. bodvol.maxForce = Vector3.new(8e+003, 8e+003, 8e+003)
  411. bodvol.Parent = hit
  412.  
  413. local rl = Instance.new("BodyAngularVelocity")
  414. rl.P = 3000
  415. rl.maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000
  416. rl.angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  417. rl.Parent = hit
  418.  
  419. game:GetService("Debris"):AddItem(bodvol, .5)
  420. game:GetService("Debris"):AddItem(rl, .5)
  421. elseif Type == "Plat" then
  422. local hum = hit.Parent.Humanoid
  423. hum.PlatformStand = true
  424. coroutine.resume(coroutine.create(function(HHumanoid)
  425. swait(2)
  426. HHumanoid.PlatformStand = false
  427. end), hum)
  428.  
  429. local rl = Instance.new("BodyAngularVelocity")
  430. rl.P = 3000
  431. rl.maxTorque = Vector3.new(100, 100, 100) * 500
  432. rl.angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  433. rl.Parent = hit
  434.  
  435. game:GetService("Debris"):AddItem(rl, .5)
  436. elseif Type == "Normal" then
  437. local vp = Instance.new("BodyVelocity")
  438. vp.P = 500
  439. vp.maxForce = Vector3.new(math.huge, 0, math.huge)
  440. vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  441.  
  442. if knockback > 0 then
  443. vp.Parent = hit.Parent.Torso
  444. end
  445. game:GetService("Debris"):AddItem(vp, .5)
  446. elseif Type == "Up" then
  447. local bodyVelocity = Instance.new("BodyVelocity")
  448. bodyVelocity.velocity = vt(0, 20, 0)
  449. bodyVelocity.P = 5000
  450. bodyVelocity.maxForce = Vector3.new(8e+003, 8e+003, 8e+003)
  451. bodyVelocity.Parent = hit
  452.  
  453. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  454. elseif Type == "Snare" then
  455. local bp = Instance.new("BodyPosition")
  456. bp.P = 2000
  457. bp.D = 100
  458. bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  459. bp.position = hit.Parent.Torso.Position
  460. bp.Parent = hit.Parent.Torso
  461. game:GetService("Debris"):AddItem(bp, 1)
  462.  
  463. elseif Type == "Freeze" then
  464. local BodPos = Instance.new("BodyPosition")
  465. BodPos.P = 50000
  466. BodPos.D = 1000
  467. BodPos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  468. BodPos.position = hit.Parent.Torso.Position
  469. BodPos.Parent = hit.Parent.Torso
  470.  
  471. local BodGy = Instance.new("BodyGyro")
  472. BodGy.maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge
  473. BodGy.P = 20e+003
  474. BodGy.Parent = hit.Parent.Torso
  475. BodGy.cframe = hit.Parent.Torso.CFrame
  476.  
  477. hit.Parent.Torso.Anchored = true
  478. coroutine.resume(coroutine.create(function(Part)
  479. swait(1.5)
  480. Part.Anchored = false
  481. end), hit.Parent.Torso)
  482. game:GetService("Debris"):AddItem(BodPos, 3)
  483. game:GetService("Debris"):AddItem(BodGy, 3)
  484.  
  485.  
  486. elseif Type=="Target" then
  487. if Targetting==false then
  488. ZTarget=hit.Parent.Torso
  489. coroutine.resume(coroutine.create(function(Part)
  490. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  491. swait(5)
  492. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  493. end),ZTarget)
  494. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  495. targetgui=Instance.new("BillboardGui")
  496. targetgui.Parent=ZTarget
  497. targetgui.Size=UDim2.new(10,100,10,100)
  498. targ=Instance.new("ImageLabel")
  499. targ.Parent=targetgui
  500. targ.BackgroundTransparency=1
  501. targ.Image="rbxassetid://4834067"
  502. targ.Size=UDim2.new(1,0,1,0)
  503. cam.CameraType="Scriptable"
  504. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  505. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  506. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  507. Targetting=true
  508. RocketTarget=ZTarget
  509. for i=1,Property do
  510. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  511. swait()
  512. end
  513. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  514. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  515. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  516. end
  517. Targetting=false
  518. RocketTarget=nil
  519. targetgui.Parent=nil
  520. cam.CameraType="Custom"
  521. end
  522. end
  523.  
  524. local debounce = Instance.new("BoolValue")
  525. debounce.Name = "DebounceHit"
  526. debounce.Parent = hit.Parent
  527. debounce.Value = true
  528. game:GetService("Debris"):AddItem(debounce, Delay)
  529. c = Instance.new("ObjectValue")
  530. c.Name = "creator"
  531. c.Value = Player
  532. c.Parent = h
  533. game:GetService("Debris"):AddItem(c, .5)
  534. end
  535. end
  536.  
  537. function ShowDamage2(Pos, Text, Time, Color)
  538. local Rate = (1 / 30)
  539. local Pos = (Pos or Vector3.new(0, 0, 0))
  540. local Text = (Text or "")
  541. local Time = (Time or 2)
  542. local Color = (Color or Color3.new(1, 0, 0))
  543. local EffectPart = part2("Custom", workspace, "Neon", 0, 1, BrickColor.new(Color), "Effect", vt(0, 0, 0))
  544. EffectPart.Anchored = true
  545. local BillboardGui = Instance.new("BillboardGui")
  546. BillboardGui.Size = UDim2.new(3, 0, 3, 0)
  547. BillboardGui.Adornee = EffectPart
  548. BillboardGui.Parent = EffectPart
  549.  
  550. local TextLabel = Instance.new("TextLabel")
  551. TextLabel.BackgroundTransparency = 1
  552. TextLabel.Size = UDim2.new(1, 0, 1, 0)
  553. TextLabel.Text = Text
  554. TextLabel.TextColor3 = Color
  555. TextLabel.TextScaled = true
  556. TextLabel.Font = Enum.Font.ArialBold
  557. TextLabel.Parent = BillboardGui
  558.  
  559. game.Debris:AddItem(EffectPart, (Time + 0.1))
  560. EffectPart.Parent = game:GetService("Workspace")
  561. delay(0, function()
  562. local Frames = (Time / Rate)
  563. for Frame = 1, Frames do
  564. wait(Rate)
  565. local Percent = (Frame / Frames)
  566. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  567. TextLabel.TextTransparency = Percent
  568. end
  569. if EffectPart and EffectPart.Parent then
  570. EffectPart:Destroy()
  571. end
  572. end)
  573. end
  574.  
  575. function BlastEffect(brickcolor, cframe, x1, y1, z1, x2, y2, z2)
  576. local prt = part2(3, workspace, "Neon", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  577. prt.Anchored = true
  578. prt.CFrame = cframe
  579. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1))
  580. coroutine.resume(coroutine.create(function()
  581. for i = 0, 1, 0.05 do
  582. wait()
  583. prt.Transparency = i
  584. msh.Scale = msh.Scale + vt(x2, y2, z2)
  585. end
  586. prt.Parent = nil
  587. end))
  588. end
  589.  
  590. function weld(parent, part0, part1, c0, c1)
  591. local Weld = Instance.new("Weld")
  592. Weld.Parent = parent
  593. Weld.Part0 = part0
  594. Weld.Part1 = part1
  595. Weld.C0 = c0
  596. Weld.C1 = c1
  597.  
  598. return Weld
  599. end
  600.  
  601. function MagniDamage(Hit, Part, magni, mindam, maxdam, knock, Type)
  602. for _, c in pairs(workspace:children()) do
  603. local hum = c:findFirstChild("Humanoid")
  604. if hum ~= nil then
  605. local head = c:findFirstChild("Torso")
  606. if head ~= nil then
  607. local targ = head.Position - Part.Position
  608. local mag = targ.magnitude
  609. if mag <= magni and c.Name ~= Player.Name then
  610. Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, .2, 1, 3)
  611. end
  612. end
  613. end
  614. end
  615. end
  616.  
  617. function MagicCircle(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  618. local prt = part2(3, workspace, "Neon", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  619. prt.Anchored = true
  620. prt.CFrame = cframe
  621. local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
  622. game:GetService("Debris"):AddItem(prt, 2)
  623. coroutine.resume(coroutine.create(function(Part, Mesh)
  624. for i = 0, 1, delay do
  625. swait()
  626. Part.CFrame = Part.CFrame
  627. Part.Transparency = i
  628. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  629. end
  630. Part.Parent = nil
  631. end), prt, msh)
  632. end
  633.  
  634. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  635. local prt=part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt())
  636. prt.Anchored=true
  637. prt.CFrame=cframe
  638. local msh = mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  639. game:GetService("Debris"):AddItem(prt,2)
  640. coroutine.resume(coroutine.create(function(Part,Mesh)
  641. for i=0,1,delay do
  642. swait()
  643. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  644. Part.Transparency=i
  645. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  646. end
  647. Part.Parent=nil
  648. end),prt,msh)
  649. end
  650.  
  651.  
  652. user=game:service'Players'.localPlayer
  653. char=user.Character
  654. mouse=user:GetMouse()
  655.  
  656.  
  657. local function weldBetween(a, b, name)
  658. local weld = Instance.new("ManualWeld")
  659. weld.Part0 = a
  660. weld.Part1 = b
  661. weld.C0 = CFrame.new()
  662. weld.C1 = b.CFrame:inverse() * a.CFrame
  663. weld.Parent = a
  664. weld.Name=name or 'weldb1'
  665. weld.Parent=m
  666. return weld;
  667. end
  668.  
  669.  
  670. player=game.Players.localPlayer
  671. char=player.Character
  672. Effects={}
  673. vt=Vector3.new
  674. cf=CFrame.new
  675. euler=CFrame.fromEulerAnglesXYZ
  676. m=Instance.new("Model",char)
  677.  
  678. mouse.Button1Down:connect(function()
  679. print("NEIN")
  680. end)
  681.  
  682. local mdel = false
  683.  
  684. mouse.KeyDown:connect(function(k)
  685. k=k:lower()
  686. if k=='f' then
  687. if attack==false then
  688. ToggleMemes()
  689. end
  690. end
  691. end)
  692.  
  693. function ToggleMemes()
  694. if memeing == true and mdel == false then
  695. memeing = false
  696. issprinting=false
  697. Humanoid.WalkSpeed = 16
  698. mdel = true
  699. for i = 1,0,-0.1 do
  700. wait(0.05)
  701. WEEB.Volume = i
  702. end
  703. WEEB.Pitch = 0
  704. mdel = false
  705. elseif memeing == false and mdel == false then
  706. memeing = true
  707. issprinting=true
  708. Humanoid.WalkSpeed=35
  709. WEEB.Pitch = 1
  710. mdel = true
  711. for i = 0,1,.1 do
  712. wait(0.05)
  713. WEEB.Volume = i
  714. end
  715. mdel = false
  716. end
  717. end
  718.  
  719. local function CFrameFromTopBack(at, top, back)
  720. local right = top:Cross(back)
  721. return CFrame.new(at.x, at.y, at.z,
  722. right.x, top.x, back.x,
  723. right.y, top.y, back.y,
  724. right.z, top.z, back.z)
  725. end
  726.  
  727. function Triangle(a, b, c)
  728. local edg1 = (c-a):Dot((b-a).unit)
  729. local edg2 = (a-b):Dot((c-b).unit)
  730. local edg3 = (b-c):Dot((a-c).unit)
  731. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  732. a, b, c = a, b, c
  733. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  734. a, b, c = b, c, a
  735. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  736. a, b, c = c, a, b
  737. else
  738. assert(false, "unreachable")
  739. end
  740.  
  741. local len1 = (c-a):Dot((b-a).unit)
  742. local len2 = (b-a).magnitude - len1
  743. local width = (a + (b-a).unit*len1 - c).magnitude
  744.  
  745. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  746.  
  747. local list = {}
  748.  
  749. if len1 > 0.01 then
  750. local w1 = Instance.new('WedgePart', m)
  751. game:GetService("Debris"):AddItem(w1,5)
  752. w1.Material = "SmoothPlastic"
  753. w1.FormFactor = 'Custom'
  754. w1.BrickColor = TorsoColor
  755. w1.Transparency = 0
  756. w1.Reflectance = 0
  757. w1.Material = "SmoothPlastic"
  758. w1.CanCollide = false
  759. NoOutline(w1)
  760. local sz = Vector3.new(0.2, width, len1)
  761. w1.Size = sz
  762. local sp = Instance.new("SpecialMesh",w1)
  763. sp.MeshType = "Wedge"
  764. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  765. w1:BreakJoints()
  766. w1.Anchored = true
  767. w1.Parent = workspace
  768. w1.Transparency = 0.7
  769. table.insert(Effects,{w1,"Disappear",.01})
  770. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  771. table.insert(list,w1)
  772. end
  773.  
  774. if len2 > 0.01 then
  775. local w2 = Instance.new('WedgePart', m)
  776. game:GetService("Debris"):AddItem(w2,5)
  777. w2.Material = "SmoothPlastic"
  778. w2.FormFactor = 'Custom'
  779. w2.BrickColor = TorsoColor
  780. w2.Transparency = 0
  781. w2.Reflectance = 0
  782. w2.Material = "SmoothPlastic"
  783. w2.CanCollide = false
  784. NoOutline(w2)
  785. local sz = Vector3.new(0.2, width, len2)
  786. w2.Size = sz
  787. local sp = Instance.new("SpecialMesh",w2)
  788. sp.MeshType = "Wedge"
  789. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  790. w2:BreakJoints()
  791. w2.Anchored = true
  792. w2.Parent = workspace
  793. w2.Transparency = 0.7
  794. table.insert(Effects,{w2,"Disappear",.01})
  795. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  796. table.insert(list,w2)
  797. end
  798. return unpack(list)
  799. end
  800.  
  801. function NoOutline(Part)
  802. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  803. end
  804.  
  805. local sine = 0
  806. local change = 1
  807. local val = 0
  808.  
  809. if #Effects>0 then
  810. --table.insert(Effects,{prt,"Block1",delay})
  811. for e=1,#Effects do
  812. if Effects[e]~=nil then
  813. --for j=1,#Effects[e] do
  814. local Thing=Effects[e]
  815. if Thing~=nil then
  816. local Part=Thing[1]
  817. local Mode=Thing[2]
  818. local Delay=Thing[3]
  819. local IncX=Thing[4]
  820. local IncY=Thing[5]
  821. local IncZ=Thing[6]
  822. if Thing[1].Transparency<=1 then
  823. if Thing[2]=="Block1" then
  824. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  825. Mesh=Thing[1].Mesh
  826. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  827. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  828. elseif Thing[2]=="Cylinder" then
  829. Mesh=Thing[1].Mesh
  830. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  831. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  832. elseif Thing[2]=="Blood" then
  833. Mesh=Thing[1].Mesh
  834. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  835. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  836. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  837. elseif Thing[2]=="Elec" then
  838. Mesh=Thing[1].Mesh
  839. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  840. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  841. elseif Thing[2]=="Disappear" then
  842. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  843. end
  844. else
  845. Part.Parent=nil
  846. table.remove(Effects,e)
  847. end
  848. end
  849. --end
  850. end
  851. end
  852. end
  853.  
  854. cn = CFrame.new
  855. local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  856. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  857. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  858. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  859.  
  860. local mananum=0
  861. while true do
  862. swait()
  863. sine = sine + change
  864. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  865. local velderp=RootPart.Velocity.y
  866. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  867. if equipped==true or equipped==false then
  868. if attack==false then
  869. idle=idle+1
  870. else
  871. idle=0
  872. end
  873. if idle>=500 then
  874. if attack==false then
  875. --Sheath()
  876. end
  877. end
  878. if RootPart.Velocity.y > 1 and hitfloor==nil then
  879. Anim="Jump"
  880. if attack==false then
  881. Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3)
  882. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  883. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  884. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5),.3)
  885. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  886. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.3)
  887. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  888. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.3)
  889. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.3)
  890. end
  891. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  892. Anim="Fall"
  893. if attack==false then
  894. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3)
  895. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  896. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  897. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0.3,0,0.2),.3)
  898. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  899. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.3)
  900. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  901. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.3)
  902. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.3)
  903. end
  904. elseif torvel<1 and hitfloor~=nil then
  905. Anim="Idle"
  906. if attack==false then
  907. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .3)
  908. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .3)
  909. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(5 + 3 * math.cos(sine / 25))), 0.3)
  910. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.3)
  911. RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 2 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .3)
  912. LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 2 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .3)
  913. end
  914. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  915. Anim="Walk"
  916. if attack==false then
  917. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 5)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 10))), .2)
  918. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(-5 * math.cos(sine / 10)) + RootPart.RotVelocity.Y / 15), .2)
  919. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10 * math.cos(sine / 13)), math.rad(0), math.rad(4 * math.cos(sine / 13))), .2)
  920. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10 * math.cos(sine / 13)), math.rad(0), math.rad(4 * math.cos(sine / 13))), .2)
  921. RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 7))), .3)
  922. LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 7))), .3)
  923. end
  924. elseif torvel>=22 and issprinting==true and hitfloor~=nil then
  925. Anim="Run"
  926. if attack==false then
  927. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0.5, -0.05 + .1 * 2.5 * math.cos(sine / 2)) * angles(math.rad(50), math.rad(2) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 2))), .2)
  928. Torso.Neck.C0 = clerp(Torso.Neck.C0, cn(0, 1.1, -0.2, -1, -0, -0, 0, 0, 1, 0, 1, 0) * angles(math.rad(-50), math.rad(0), math.rad(-5 * math.cos(sine / 10)) + RootPart.RotVelocity.Y / 15), .2)
  929. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.4) * angles(math.rad(75 * math.cos(6 / 2)), math.rad(-5), math.rad(25 * math.cos(sine / 3))), .2)
  930. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0.4) * angles(math.rad(75 * math.cos(6 / 2)), math.rad(5), math.rad(25 * math.cos(sine / 3))), .2)
  931. RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(55 * math.cos(sine / 3))), .3)
  932. LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(55 * math.cos(sine / 3))), .3)
  933. end
  934. end
  935. end
  936. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement