Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Sans?
  2.  
  3. numLerp = function(start, goal, alpha)
  4. return(((goal - start) * alpha) + start)
  5. end
  6.  
  7. CFrameZero = function()
  8. return CFrame.new(Vector3.new())
  9. end
  10.  
  11. rad = function(value)
  12. return math.rad(value)
  13. end
  14.  
  15. CFAngles = function(Vector)
  16. return CFrame.Angles(rad(Vector.x),rad(Vector.y),rad(Vector.z))
  17. end
  18.  
  19.  
  20.  
  21. AnimStat = {
  22. lerpSpeed = .2;
  23. lerpSpeed2 = .35;
  24. lerpTween = 0;
  25. }
  26.  
  27. Joints = {
  28. c.HumanoidRootPart.RootJoint;
  29. c.Torso.Neck;
  30. c.Torso['Left Shoulder'];
  31. c.Torso['Right Shoulder'];
  32. c.Torso['Left Hip'];
  33. c.Torso['Right Hip'];
  34. }
  35.  
  36. JointTargets = {
  37. CFrameZero();
  38. CFrameZero();
  39. CFrameZero();
  40. CFrameZero();
  41. CFrameZero();
  42. CFrameZero();
  43. }
  44.  
  45.  
  46. Player = game:GetService("Players").LocalPlayer
  47. pls = game:GetService'Players'
  48. rs = game:GetService'RunService'
  49. uinps = game:GetService'UserInputService'
  50. lp = pls.LocalPlayer
  51. c = lp.Character
  52. human = c.Humanoid
  53. PlayerGui = Player.PlayerGui
  54. Cam = workspace.CurrentCamera
  55. Backpack = Player.Backpack
  56. Character = Player.Character
  57. Humanoid = Character.Humanoid
  58. Mouse = Player:GetMouse()
  59. RootPart = Character["HumanoidRootPart"]
  60. Torso = Character["Torso"]
  61. Head = Character["Head"]
  62. RightArm = Character["Right Arm"]
  63. LeftArm = Character["Left Arm"]
  64. RightLeg = Character["Right Leg"]
  65. LeftLeg = Character["Left Leg"]
  66. RootJoint = RootPart["RootJoint"]
  67. Neck = Torso["Neck"]
  68. RightShoulder = Torso["Right Shoulder"]
  69. LeftShoulder = Torso["Left Shoulder"]
  70. RightHip = Torso["Right Hip"]
  71. LeftHip = Torso["Left Hip"]
  72. local sick = Instance.new("Sound",Character)
  73. sick.SoundId = "rbxassetid://531711813"
  74. sick.Looped = true
  75. sick.Pitch = 1
  76. sick.Volume = 1
  77. Head:ClearAllChildren()
  78.  
  79. local tor = Instance.new("CharacterMesh")
  80. tor.Parent = Character
  81. tor.Name = "Bones"
  82. tor.BodyPart = "Torso"
  83. tor.MeshId = "36780113"
  84. tor.OverlayTextureId = "36780292"
  85.  
  86. local tor = Instance.new("CharacterMesh")
  87. tor.Parent = Character
  88. tor.Name = "Bones"
  89. tor.BodyPart = "LeftLeg"
  90. tor.MeshId = "36780079"
  91. tor.OverlayTextureId = "36780292"
  92.  
  93. local tor = Instance.new("CharacterMesh")
  94. tor.Parent = Character
  95. tor.Name = "Bones"
  96. tor.BodyPart = "RightLeg"
  97. tor.MeshId = "36780195"
  98. tor.OverlayTextureId = "36780292"
  99.  
  100. local tor = Instance.new("CharacterMesh")
  101. tor.Parent = Character
  102. tor.Name = "Bones"
  103. tor.BodyPart = "RightArm"
  104. tor.MeshId = "36780156"
  105. tor.OverlayTextureId = "36780292"
  106.  
  107. local tor = Instance.new("CharacterMesh")
  108. tor.Parent = Character
  109. tor.Name = "Bones"
  110. tor.BodyPart = "LeftArm"
  111. tor.MeshId = "36780032"
  112. tor.OverlayTextureId = "36780292"
  113.  
  114. local tor = Instance.new("SpecialMesh")
  115. tor.Scale = Vector3.new(1,1,1)
  116. tor.MeshType = "FileMesh"
  117. tor.MeshId = "http://www.roblox.com/asset/?id=36869983"
  118. tor.TextureId = "rbxassetid://36869975"
  119. tor.Parent = Head
  120.  
  121. prepareCharacter = function()
  122. local transPoints = {
  123. NumberSequenceKeypoint.new(0,.819,.0375),
  124. NumberSequenceKeypoint.new(.207,.594,.0187),
  125. NumberSequenceKeypoint.new(.4,.55,.031),
  126. NumberSequenceKeypoint.new(.57,.619,.05),
  127. NumberSequenceKeypoint.new(.76,.8,.0375),
  128. NumberSequenceKeypoint.new(1,1,0),
  129. }
  130. local sizePoints = {
  131. NumberSequenceKeypoint.new(0,.687,0),
  132. NumberSequenceKeypoint.new(.111,.875,0),
  133. NumberSequenceKeypoint.new(.327,1.19,0),
  134. NumberSequenceKeypoint.new(.646,1.56,0),
  135. NumberSequenceKeypoint.new(.805,1.37,0),
  136. NumberSequenceKeypoint.new(.905,1.06,0),
  137. NumberSequenceKeypoint.new(.968,.938,0),
  138. NumberSequenceKeypoint.new(.984,1.13,0),
  139. NumberSequenceKeypoint.new(1,1.62,0),
  140. }
  141. local Size = NumberSequence.new(sizePoints)
  142. local Transparency = NumberSequence.new(transPoints)
  143. rayModel = Instance.new("Model",c)
  144. efxBlock = Instance.new("Part",c)
  145. efxBlock.BrickColor = BrickColor.new("Cyan")
  146. efxBlock.Material = "Neon"
  147. efxBlock.FormFactor = "Custom"
  148. efxBlock.Transparency = .3
  149. efxBlock.Size = Vector3.new(.3,.3,.3)
  150. local mesh = Instance.new("SpecialMesh",efxBlock)
  151. mesh.MeshType = Enum.MeshType.Sphere
  152. mesh.Scale = Vector3.new(1,1,1)
  153. light = Instance.new("PointLight",c.Head)
  154. light.Range = 10
  155. light.Color = Color3.new(0,200/255,1)
  156. light.Shadows = false
  157. local particles = Instance.new("ParticleEmitter",efxBlock)
  158. particles.Color = ColorSequence.new(Color3.new(0,0,225/255),Color3.new(20/255,190/255,205/255))
  159. particles.LightEmission = .95
  160. particles.Size = Size
  161. particles.Name = "Fire"
  162. particles.Transparency = Transparency
  163. particles.LockedToPart = true
  164. particles.VelocityInheritance = .5
  165. particles.LockedToPart = true
  166. particles.Rate = 70
  167. particles.Texture = "rbxassetid://56561915"
  168. particles.Lifetime = NumberRange.new(2,2)
  169. particles.RotSpeed = NumberRange.new(100,100)
  170. particles.Speed = NumberRange.new(7,7)
  171. script.Parent = efxBlock
  172. fire = particles
  173. local offset = Vector3.new(-0.11, .23, -0.5)
  174. local weld = Instance.new("Weld",c.Head)
  175. weld.Part0 = c.Head
  176. weld.Part1 = efxBlock
  177. weld.C0 = CFrame.new(offset) * CFrame.Angles(math.rad(-40),math.rad(10),math.rad(40))
  178. efxBlock.Parent = c
  179. local music = Instance.new("Sound",c)
  180. music.SoundId = "rbxassetid://316012176"
  181. music.Looped = true
  182. music.Volume = 0
  183. fight = music
  184. local music2 = Instance.new("Sound",c)
  185. music2.SoundId = "rbxassetid://316014309"
  186. music2.Looped = true
  187. music2.Volume = 0
  188. sans = music2
  189. pointGyro = Instance.new("BodyGyro",c.HumanoidRootPart)
  190. pointGyro.P = 1e7
  191. pointGyro.D = 1e3
  192. pointGyro.MaxTorque = Vector3.new(0,1e7,0)
  193. animator = c.Humanoid:FindFirstChild("Animator")
  194. if animator then
  195. animator:Destroy()
  196. end
  197. c.Torso.roblox:Destroy()
  198. for i,v in pairs (c.Head:children()) do
  199. if v.ClassName == "Sound" then
  200. v:Destroy()
  201. end
  202. end
  203. for i = 1,#Joints do
  204. Joints[i].C1 = CFrame.new(Vector3.new())
  205. end
  206. human.WalkSpeed = 0
  207. human.JumpPower = 0
  208. end
  209.  
  210. uinps.InputBegan:connect(function(InputObject)
  211. if InputObject.KeyCode == Enum.KeyCode.K and Debounces.isTyping == false then
  212. Debounces.isPassive = not Debounces.isPassive
  213. end
  214. end)
  215.  
  216. setJointCFrames = function(table)
  217. for i = 1,#table do
  218. JointTargets[i] = table[i]
  219. end
  220. AnimationCycles = 0
  221. end
  222.  
  223. setLerp = function(speed)
  224. AnimStat.lerpSpeed = speed
  225. end
  226.  
  227. setTween = function(tween)
  228. AnimStat.lerpTween = tween
  229. end
  230.  
  231. takeDamage = function(position,damage,distance,platformStand)
  232. for i,v in pairs (pls:children()) do
  233. if v.ClassName == "Player" and v:FindFirstChild("Character") then
  234. local torso = v.Character:FindFirstChild("Torso")
  235. if torso and (torso.Position - position).magnitude < distance then
  236. v.Character.Humanoid:TakeDamage(damage)
  237. if platformStand == true then
  238. v.Character.PlatformStand = platformStand
  239. end
  240. end
  241. end
  242. end
  243. end
  244.  
  245.  
  246. prepareCharacter()
  247.  
  248. local IDs = {133830212,235845120}
  249. local p=game:service("Players").LocalPlayer
  250. Instance.new("ForceField", game.Players.LocalPlayer.Character). Visible = false
  251. local Player = game:service'Players'.localPlayer
  252. Character = Player.Character
  253. Head = Character["Head"]
  254. local char=p.Character
  255. Humanoid = Character.Humanoid
  256. local hum=char.Humanoid
  257. local chara = Player.Character
  258. hum.MaxHealth= math.huge
  259. hum.Health=hum.MaxHealth
  260. function swait(num)
  261. if num==0 or num==nil then
  262. game:service'RunService'.Stepped:wait(0)
  263. else
  264. for i=0,num do
  265. game:service'RunService'.Stepped:wait(0)
  266. end
  267. end
  268. end
  269. do
  270. local filteredMessages = { ['____'] = '___' };
  271. local onPropertyChanged = function (obj)
  272. if (obj:isDescendantOf (workspace)) then
  273. local objText = obj.Text;
  274.  
  275. if (objText ~= '___' and objText:find '(%S)') then
  276. if (filteredMessages [objText] and filteredMessages [objText] ~= objText) then
  277. obj.Text = filteredMessages [objText];
  278. elseif (not filteredMessages [objText]) then
  279. obj.Text = '___';
  280.  
  281. local filtered = game:service 'Chat':FilterStringForBroadcast (objText, game:service 'Players'.localPlayer);
  282.  
  283. filteredMessages [objText] = filtered;
  284. filteredMessages [filtered] = filtered;
  285.  
  286. obj.Text = filtered;
  287. end;
  288. end;
  289. end;
  290. end;
  291.  
  292. local newInstance = Instance.new;
  293. Instance = {
  294. new = function (class, parent)
  295. local obj = newInstance (class, parent);
  296.  
  297. if (pcall (function()return obj.Text;end)) then
  298. obj:getPropertyChangedSignal ('Parent'):connect (function () onPropertyChanged (obj) end);
  299. obj:getPropertyChangedSignal ('Text'):connect (function() onPropertyChanged (obj) end);
  300. end;
  301.  
  302. return obj;
  303. end;
  304. };
  305. end;
  306. plr = game.Players.LocalPlayer
  307. mouse = plr:GetMouse()
  308. part = nil
  309. bp = nil
  310. particles = nil
  311. base = Instance.new("ScreenGui",plr.PlayerGui)
  312. bbg = Instance.new("BillboardGui",plr.Character.Head)
  313. bbg.Size = UDim2.new(0,200,0,50)
  314. bbg.StudsOffset = Vector3.new(0,1.5,3)
  315. bbgTl = Instance.new("TextLabel",bbg)
  316. bbgTl.BackgroundTransparency = 1
  317. bbgTl.Size = UDim2.new(10,0,1,0)
  318. bbgTl.Position = UDim2.new(-4.5,0,0,0)
  319. bbgTl.Font = "Cartoon"
  320. bbgTl.Text = " "
  321. bbgTl.TextSize = 42
  322. bbgTl.TextStrokeColor3 = Color3.new(0,0,0)
  323. bbgTl.TextStrokeTransparency = 0
  324. bbgTl.TextWrapped = true
  325. plr.Chatted:connect(function(msg)
  326. bbgTl.Text = msg
  327. wait(5)
  328. if bbgTl.Text == msg then
  329. bbgTl.Text = " "
  330. while true do
  331. bbgTl.TextColor3 = Color3.new (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
  332. wait(.1)
  333. end
  334. end
  335. end)
  336. function thread(f)
  337. coroutine.resume(coroutine.create(f))
  338. end
  339. function clerp(a, b, t)
  340. local qa = {
  341. QuaternionFromCFrame(a)
  342. }
  343. local qb = {
  344. QuaternionFromCFrame(b)
  345. }
  346. local ax, ay, az = a.x, a.y, a.z
  347. local bx, by, bz = b.x, b.y, b.z
  348. local _t = 1 - t
  349. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  350. end
  351. function QuaternionFromCFrame(cf)
  352. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  353. local trace = m00 + m11 + m22
  354. if trace > 0 then
  355. local s = math.sqrt(1 + trace)
  356. local recip = 0.5 / s
  357. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  358. else
  359. local i = 0
  360. if m00 < m11 then
  361. i = 1
  362. end
  363. if m22 > (i == 0 and m00 or m11) then
  364. i = 2
  365. end
  366. if i == 0 then
  367. local s = math.sqrt(m00 - m11 - m22 + 1)
  368. local recip = 0.5 / s
  369. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  370. elseif i == 1 then
  371. local s = math.sqrt(m11 - m22 - m00 + 1)
  372. local recip = 0.5 / s
  373. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  374. elseif i == 2 then
  375. local s = math.sqrt(m22 - m00 - m11 + 1)
  376. local recip = 0.5 / s
  377. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  378. end
  379. end
  380. end
  381. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  382. local xs, ys, zs = x + x, y + y, z + z
  383. local wx, wy, wz = w * xs, w * ys, w * zs
  384. local xx = x * xs
  385. local xy = x * ys
  386. local xz = x * zs
  387. local yy = y * ys
  388. local yz = y * zs
  389. local zz = z * zs
  390. 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))
  391. end
  392. function QuaternionSlerp(a, b, t)
  393. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  394. local startInterp, finishInterp
  395. if cosTheta >= 1.0E-4 then
  396. if 1 - cosTheta > 1.0E-4 then
  397. local theta = math.acos(cosTheta)
  398. local invSinTheta = 1 / math.sin(theta)
  399. startInterp = math.sin((1 - t) * theta) * invSinTheta
  400. finishInterp = math.sin(t * theta) * invSinTheta
  401. else
  402. startInterp = 1 - t
  403. finishInterp = t
  404. end
  405. elseif 1 + cosTheta > 1.0E-4 then
  406. local theta = math.acos(-cosTheta)
  407. local invSinTheta = 1 / math.sin(theta)
  408. startInterp = math.sin((t - 1) * theta) * invSinTheta
  409. finishInterp = math.sin(t * theta) * invSinTheta
  410. else
  411. startInterp = t - 1
  412. finishInterp = t
  413. end
  414. 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
  415. end
  416. function rayCast(Position, Direction, Range, Ignore)
  417. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  418. end
  419.  
  420. wait()
  421. local plr = game:service'Players'.LocalPlayer
  422. local char = plr.Character
  423. local hum = char.Humanoid
  424. local ra = char["Right Arm"]
  425. local la= char["Left Arm"]
  426. local rl= char["Right Leg"]
  427. local ll = char["Left Leg"]
  428. local hed = char.Head
  429. local root = char.HumanoidRootPart
  430. local rootj = root.RootJoint
  431. local tors = char.Torso
  432. local mouse = plr:GetMouse()
  433. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  434. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  435. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  436. local maincolor = BrickColor.new("Magenta")
  437. cf = CFrame.new
  438. angles = CFrame.Angles
  439. attack = false
  440. euler=CFrame.fromEulerAnglesXYZ
  441. equipped = false
  442. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  443. RSH, LSH = nil, nil
  444. RW = Instance.new("Weld")
  445. LW = Instance.new("Weld")
  446. RH = tors["Right Hip"]
  447. LH = tors["Left Hip"]
  448. RSH = tors["Right Shoulder"]
  449. LSH = tors["Left Shoulder"]
  450. RSH.Parent = nil
  451. LSH.Parent = nil
  452. RW.Name = "RW"
  453. RW.Part0 = tors
  454. RW.C0 = CFrame.new(1.5, 0.5, 0)
  455. RW.C1 = CFrame.new(0, 0.5, 0)
  456. RW.Part1 = ra
  457. RW.Parent = tors
  458. LW.Name = "LW"
  459. LW.Part0 = tors
  460. LW.C0 = CFrame.new(-1.5, 0.5, 0)
  461. LW.C1 = CFrame.new(0, 0.5, 0)
  462. LW.Part1 = la
  463. LW.Parent = tors
  464. print('User is '..plr.Name)
  465. Effects = {}
  466.  
  467.  
  468. ArtificialHB = Instance.new("BindableEvent", script)
  469. ArtificialHB.Name = "Heartbeat"
  470.  
  471. script:WaitForChild("Heartbeat")
  472.  
  473. frame = 1 / 60
  474. tf = 0
  475. allowframeloss = false
  476. tossremainder = false
  477. lastframe = tick()
  478. script.Heartbeat:Fire()
  479.  
  480. game:GetService("RunService").Heartbeat:connect(function(s, p)
  481. tf = tf + s
  482. if tf >= frame then
  483. if allowframeloss then
  484. script.Heartbeat:Fire()
  485. lastframe = tick()
  486. else
  487. for i = 1, math.floor(tf / frame) do
  488. script.Heartbeat:Fire()
  489. end
  490. lastframe = tick()
  491. end
  492. if tossremainder then
  493. tf = 0
  494. else
  495. tf = tf - frame * math.floor(tf / frame)
  496. end
  497. end
  498. end)
  499. local RbxUtility = LoadLibrary("RbxUtility")
  500. local Create = RbxUtility.Create
  501.  
  502. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  503. if hit.Parent == nil then
  504. return
  505. end
  506. local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  507. for _, v in pairs(hit.Parent:children()) do
  508. if v:IsA("Humanoid") then
  509. h = v
  510. end
  511. end
  512. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  513. warn'No R15 allowed'
  514. hit.Parent:FindFirstChild("Head"):BreakJoints()
  515. end
  516.  
  517. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  518. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  519. if hit.Parent.DebounceHit.Value == true then
  520. return
  521. end
  522. end
  523. if insta == true then
  524. hit.Parent:FindFirstChild("Head"):BreakJoints()
  525. end
  526. local c = Create("ObjectValue"){
  527. Name = "creator",
  528. Value = game:service("Players").LocalPlayer,
  529. Parent = h,
  530. }
  531. game:GetService("Debris"):AddItem(c, .5)
  532. if HitSound ~= nil and HitPitch ~= nil then
  533. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  534. end
  535. local Damage = math.random(minim, maxim)
  536. local blocked = false
  537. local block = hit.Parent:findFirstChild("Block")
  538. if block ~= nil then
  539. if block.className == "IntValue" then
  540. if block.Value > 0 then
  541. blocked = true
  542. block.Value = block.Value - 1
  543. print(block.Value)
  544. end
  545. end
  546. end
  547. if blocked == false then
  548. h.Health = h.Health - Damage
  549. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  550. else
  551. h.Health = h.Health - (Damage / 2)
  552. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  553. end
  554. if Type == "Knockdown" then
  555. local hum = hit.Parent.Humanoid
  556. hum.PlatformStand = true
  557. coroutine.resume(coroutine.create(function(HHumanoid)
  558. swait(1)
  559. HHumanoid.PlatformStand = false
  560. end), hum)
  561. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  562. local bodvol = Create("BodyVelocity"){
  563. velocity = angle * knockback,
  564. P = 5000,
  565. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  566. Parent = hit,
  567. }
  568. local rl = Create("BodyAngularVelocity"){
  569. P = 3000,
  570. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  571. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  572. Parent = hit,
  573. }
  574. game:GetService("Debris"):AddItem(bodvol, .5)
  575. game:GetService("Debris"):AddItem(rl, .5)
  576. elseif Type == "Normal" then
  577. local vp = Create("BodyVelocity"){
  578. P = 500,
  579. maxForce = Vector3.new(math.huge, 0, math.huge),
  580. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  581. }
  582. if knockback > 0 then
  583. vp.Parent = hit.Parent.Torso
  584. end
  585. game:GetService("Debris"):AddItem(vp, .5)
  586. elseif Type == "Up" then
  587. local bodyVelocity = Create("BodyVelocity"){
  588. velocity = Vector3.new(0, 20, 0),
  589. P = 5000,
  590. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  591. Parent = hit,
  592. }
  593. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  594. elseif Type == "DarkUp" then
  595. coroutine.resume(coroutine.create(function()
  596. for i = 0, 1, 0.1 do
  597. swait()
  598. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  599. end
  600. end))
  601. local bodyVelocity = Create("BodyVelocity"){
  602. velocity = Vector3.new(0, 20, 0),
  603. P = 5000,
  604. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  605. Parent = hit,
  606. }
  607. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  608. elseif Type == "Snare" then
  609. local bp = Create("BodyPosition"){
  610. P = 2000,
  611. D = 100,
  612. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  613. position = hit.Parent.Torso.Position,
  614. Parent = hit.Parent.Torso,
  615. }
  616. game:GetService("Debris"):AddItem(bp, 1)
  617. elseif Type == "Freeze" then
  618. local BodPos = Create("BodyPosition"){
  619. P = 50000,
  620. D = 1000,
  621. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  622. position = hit.Parent.Torso.Position,
  623. Parent = hit.Parent.Torso,
  624. }
  625. local BodGy = Create("BodyGyro") {
  626. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  627. P = 20e+003,
  628. Parent = hit.Parent.Torso,
  629. cframe = hit.Parent.Torso.CFrame,
  630. }
  631. hit.Parent.Torso.Anchored = true
  632. coroutine.resume(coroutine.create(function(Part)
  633. swait(1.5)
  634. Part.Anchored = false
  635. end), hit.Parent.Torso)
  636. game:GetService("Debris"):AddItem(BodPos, 3)
  637. game:GetService("Debris"):AddItem(BodGy, 3)
  638. end
  639. local debounce = Create("BoolValue"){
  640. Name = "DebounceHit",
  641. Parent = hit.Parent,
  642. Value = true,
  643. }
  644. game:GetService("Debris"):AddItem(debounce, Delay)
  645. c = Create("ObjectValue"){
  646. Name = "creator",
  647. Value = Player,
  648. Parent = h,
  649. }
  650. game:GetService("Debris"):AddItem(c, .5)
  651. end
  652. end
  653.  
  654. function ShowDamage(Pos, Text, Time, Color)
  655. local Rate = (1 / 30)
  656. local Pos = (Pos or Vector3.new(0, 0, 0))
  657. local Text = (Text or "")
  658. local Time = (Time or 2)
  659. local Color = (Color or Color3.new(1, 0, 1))
  660. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  661. EffectPart.Anchored = true
  662. local BillboardGui = Create("BillboardGui"){
  663. Size = UDim2.new(3, 0, 3, 0),
  664. Adornee = EffectPart,
  665. Parent = EffectPart,
  666. }
  667. local TextLabel = Create("TextLabel"){
  668. BackgroundTransparency = 1,
  669. Size = UDim2.new(1, 0, 1, 0),
  670. Text = Text,
  671. Font = "Highway",
  672. TextColor3 = Color,
  673. TextScaled = true,
  674. Parent = BillboardGui,
  675. }
  676. game.Debris:AddItem(EffectPart, (Time))
  677. EffectPart.Parent = game:GetService("Workspace")
  678. delay(0, function()
  679. local Frames = (Time / Rate)
  680. for Frame = 1, Frames do
  681. wait(Rate)
  682. local Percent = (Frame / Frames)
  683. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  684. TextLabel.TextTransparency = Percent
  685. end
  686. if EffectPart and EffectPart.Parent then
  687. EffectPart:Destroy()
  688. end
  689. end)
  690. end
  691. function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
  692. for _, c in pairs(workspace:children()) do
  693. local hum = c:findFirstChild("Humanoid")
  694. if hum ~= nil then
  695. local head = c:findFirstChild("Torso") or c:findFirstChild("UpperTorso") or c:FindFirstChild('LowerTorso')
  696. if head ~= nil then
  697. local targ = head.Position - Part.Position
  698. local mag = targ.magnitude
  699. if mag <= Magnitude and c.Name ~= plr.Name then
  700. Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, root, .1, "rbxassetid://" .. HitSound, HitPitch)
  701. end
  702. end
  703. end
  704. end
  705. end
  706. CFuncs = {
  707. Part = {
  708. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  709. local Part = Create("Part")({
  710. Parent = Parent,
  711. Reflectance = Reflectance,
  712. Transparency = Transparency,
  713. CanCollide = false,
  714. Locked = true,
  715. BrickColor = BrickColor.new(tostring(BColor)),
  716. Name = Name,
  717. Size = Size,
  718. Material = Material
  719. })
  720. RemoveOutlines(Part)
  721. return Part
  722. end
  723. },
  724. Mesh = {
  725. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  726. local Msh = Create(Mesh)({
  727. Parent = Part,
  728. Offset = OffSet,
  729. Scale = Scale
  730. })
  731. if Mesh == "SpecialMesh" then
  732. Msh.MeshType = MeshType
  733. Msh.MeshId = MeshId
  734. end
  735. return Msh
  736. end
  737. },
  738. Mesh = {
  739. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  740. local Msh = Create(Mesh)({
  741. Parent = Part,
  742. Offset = OffSet,
  743. Scale = Scale
  744. })
  745. if Mesh == "SpecialMesh" then
  746. Msh.MeshType = MeshType
  747. Msh.MeshId = MeshId
  748. end
  749. return Msh
  750. end
  751. },
  752. Weld = {
  753. Create = function(Parent, Part0, Part1, C0, C1)
  754. local Weld = Create("Weld")({
  755. Parent = Parent,
  756. Part0 = Part0,
  757. Part1 = Part1,
  758. C0 = C0,
  759. C1 = C1
  760. })
  761. return Weld
  762. end
  763. },
  764. Sound = {
  765. Create = function(id, par, vol, pit)
  766. coroutine.resume(coroutine.create(function()
  767. local S = Create("Sound")({
  768. Volume = vol,
  769. Pitch = pit or 1,
  770. SoundId = id,
  771. Parent = par or workspace
  772. })
  773. wait()
  774. S:play()
  775. game:GetService("Debris"):AddItem(S, 6)
  776. end))
  777. end
  778. },
  779. ParticleEmitter = {
  780. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  781. local fp = Create("ParticleEmitter")({
  782. Parent = Parent,
  783. Color = ColorSequence.new(Color1, Color2),
  784. LightEmission = LightEmission,
  785. Size = Size,
  786. Texture = Texture,
  787. Transparency = Transparency,
  788. ZOffset = ZOffset,
  789. Acceleration = Accel,
  790. Drag = Drag,
  791. LockedToPart = LockedToPart,
  792. VelocityInheritance = VelocityInheritance,
  793. EmissionDirection = EmissionDirection,
  794. Enabled = Enabled,
  795. Lifetime = LifeTime,
  796. Rate = Rate,
  797. Rotation = Rotation,
  798. RotSpeed = RotSpeed,
  799. Speed = Speed,
  800. VelocitySpread = VelocitySpread
  801. })
  802. return fp
  803. end
  804. }
  805. }
  806. function RemoveOutlines(part)
  807. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  808. end
  809. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  810. local Part = Create("Part")({
  811. formFactor = FormFactor,
  812. Parent = Parent,
  813. Reflectance = Reflectance,
  814. Transparency = Transparency,
  815. CanCollide = false,
  816. Locked = true,
  817. BrickColor = BrickColor.new(tostring(BColor)),
  818. Name = Name,
  819. Size = Size,
  820. Material = Material
  821. })
  822. RemoveOutlines(Part)
  823. return Part
  824. end
  825. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  826. local Msh = Create(Mesh)({
  827. Parent = Part,
  828. Offset = OffSet,
  829. Scale = Scale
  830. })
  831. if Mesh == "SpecialMesh" then
  832. Msh.MeshType = MeshType
  833. Msh.MeshId = MeshId
  834. end
  835. return Msh
  836. end
  837. function CreateWeld(Parent, Part0, Part1, C0, C1)
  838. local Weld = Create("Weld")({
  839. Parent = Parent,
  840. Part0 = Part0,
  841. Part1 = Part1,
  842. C0 = C0,
  843. C1 = C1
  844. })
  845. return Weld
  846. end
  847. EffectModel = Instance.new("Model", char)
  848. Effects = {
  849. Block = {
  850. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  851. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  852. prt.Anchored = true
  853. prt.CFrame = cframe
  854. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  855. game:GetService("Debris"):AddItem(prt, 10)
  856. if Type == 1 or Type == nil then
  857. table.insert(Effects, {
  858. prt,
  859. "Block1",
  860. delay,
  861. x3,
  862. y3,
  863. z3,
  864. msh
  865. })
  866. elseif Type == 2 then
  867. table.insert(Effects, {
  868. prt,
  869. "Block2",
  870. delay,
  871. x3,
  872. y3,
  873. z3,
  874. msh
  875. })
  876. else
  877. table.insert(Effects, {
  878. prt,
  879. "Block3",
  880. delay,
  881. x3,
  882. y3,
  883. z3,
  884. msh
  885. })
  886. end
  887. end
  888. },
  889. Sphere = {
  890. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  891. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  892. prt.Anchored = true
  893. prt.CFrame = cframe
  894. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  895. game:GetService("Debris"):AddItem(prt, 10)
  896. table.insert(Effects, {
  897. prt,
  898. "Cylinder",
  899. delay,
  900. x3,
  901. y3,
  902. z3,
  903. msh
  904. })
  905. end
  906. },
  907. Cylinder = {
  908. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  909. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  910. prt.Anchored = true
  911. prt.CFrame = cframe
  912. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  913. game:GetService("Debris"):AddItem(prt, 10)
  914. table.insert(Effects, {
  915. prt,
  916. "Cylinder",
  917. delay,
  918. x3,
  919. y3,
  920. z3,
  921. msh
  922. })
  923. end
  924. },
  925. Wave = {
  926. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  927. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  928. prt.Anchored = true
  929. prt.CFrame = cframe
  930. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://431164262", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
  931. game:GetService("Debris"):AddItem(prt, 10)
  932. table.insert(Effects, {
  933. prt,
  934. "Cylinder",
  935. delay,
  936. x3 / 60,
  937. y3 / 60,
  938. z3 / 60,
  939. msh
  940. })
  941. end
  942. },
  943. Ring = {
  944. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  945. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  946. prt.Anchored = true
  947. prt.CFrame = cframe
  948. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  949. game:GetService("Debris"):AddItem(prt, 10)
  950. table.insert(Effects, {
  951. prt,
  952. "Cylinder",
  953. delay,
  954. x3,
  955. y3,
  956. z3,
  957. msh
  958. })
  959. end
  960. },
  961. Break = {
  962. Create = function(brickcolor, cframe, x1, y1, z1)
  963. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  964. prt.Anchored = true
  965. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  966. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  967. local num = math.random(10, 50) / 1000
  968. game:GetService("Debris"):AddItem(prt, 10)
  969. table.insert(Effects, {
  970. prt,
  971. "Shatter",
  972. num,
  973. prt.CFrame,
  974. math.random() - math.random(),
  975. 0,
  976. math.random(50, 100) / 100
  977. })
  978. end
  979. }
  980. }
  981. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  982. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  983. prt.Anchored = true
  984. prt.CFrame = cframe
  985. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  986. game:GetService("Debris"):AddItem(prt, 10)
  987. if Type == 1 or Type == nil then
  988. table.insert(Effects, {
  989. prt,
  990. "Block1",
  991. delay,
  992. x3,
  993. y3,
  994. z3,
  995. msh
  996. })
  997. elseif Type == 2 then
  998. table.insert(Effects, {
  999. prt,
  1000. "Block2",
  1001. delay,
  1002. x3,
  1003. y3,
  1004. z3,
  1005. msh
  1006. })
  1007. elseif Type == 3 then
  1008. table.insert(Effects, {
  1009. prt,
  1010. "Block3",
  1011. delay,
  1012. x3,
  1013. y3,
  1014. z3,
  1015. msh
  1016. })
  1017. end
  1018. end
  1019. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1020. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1021. prt.Anchored = true
  1022. prt.CFrame = cframe
  1023. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1024. game:GetService("Debris"):AddItem(prt, 10)
  1025. table.insert(Effects, {
  1026. prt,
  1027. "Cylinder",
  1028. delay,
  1029. x3,
  1030. y3,
  1031. z3,
  1032. msh
  1033. })
  1034. end
  1035. function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1036. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  1037. prt.Anchored = true
  1038. prt.CFrame = cframe * CFrame.new(x1, y1, z1)
  1039. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1040. game:GetService("Debris"):AddItem(prt, 10)
  1041. table.insert(Effects, {
  1042. prt,
  1043. "Cylinder",
  1044. delay,
  1045. x3,
  1046. y3,
  1047. z3,
  1048. msh
  1049. })
  1050. end
  1051. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1052. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1053. prt.Anchored = true
  1054. prt.CFrame = cframe
  1055. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1056. game:GetService("Debris"):AddItem(prt, 10)
  1057. table.insert(Effects, {
  1058. prt,
  1059. "Cylinder",
  1060. delay,
  1061. x3,
  1062. y3,
  1063. z3,
  1064. msh
  1065. })
  1066. end
  1067. function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1068. local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1069. prt.Anchored = true
  1070. prt.CFrame = cframe
  1071. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1072. game:GetService("Debris"):AddItem(prt, 10)
  1073. table.insert(Effects, {
  1074. prt,
  1075. "Cylinder",
  1076. delay,
  1077. x3,
  1078. y3,
  1079. z3,
  1080. msh
  1081. })
  1082. end
  1083. function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1084. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1085. prt.Anchored = true
  1086. prt.CFrame = cframe
  1087. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1088. game:GetService("Debris"):AddItem(prt, 10)
  1089. table.insert(Effects, {
  1090. prt,
  1091. "Cylinder",
  1092. delay,
  1093. x3,
  1094. y3,
  1095. z3,
  1096. msh
  1097. })
  1098. end
  1099. function BreakEffect(brickcolor, cframe, x1, y1, z1)
  1100. local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  1101. prt.Anchored = true
  1102. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1103. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1104. local num = math.random(10, 50) / 1000
  1105. game:GetService("Debris"):AddItem(prt, 10)
  1106. table.insert(Effects, {
  1107. prt,
  1108. "Shatter",
  1109. num,
  1110. prt.CFrame,
  1111. math.random() - math.random(),
  1112. 0,
  1113. math.random(50, 100) / 100
  1114. })
  1115. end
  1116. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  1117. local fp=Instance.new("Part")
  1118. fp.formFactor=formfactor
  1119. fp.Parent=parent
  1120. fp.Reflectance=reflectance
  1121. fp.Transparency=transparency
  1122. fp.CanCollide=false
  1123. fp.Locked=true
  1124. fp.BrickColor=brickcolor
  1125. fp.Name=name
  1126. fp.Size=size
  1127. fp.Position=tors.Position
  1128. RemoveOutlines(fp)
  1129. fp.Material="SmoothPlastic"
  1130. fp:BreakJoints()
  1131. return fp
  1132. end
  1133.  
  1134. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  1135. local mesh=Instance.new(Mesh)
  1136. mesh.Parent=part
  1137. if Mesh=="SpecialMesh" then
  1138. mesh.MeshType=meshtype
  1139. if meshid~="nil" then
  1140. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  1141. end
  1142. end
  1143. mesh.Offset=offset
  1144. mesh.Scale=scale
  1145. return mesh
  1146. end
  1147. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1148. local prt=part(3,char,0,0,brickcolor,"Effect",Vector3.new(0.5,0.5,0.5))
  1149. prt.Anchored=true
  1150. prt.Material = "Neon"
  1151. prt.CFrame=cframe
  1152. prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1153. msh=mesh("BlockMesh",prt,"","",Vector3.new(0,0,0),Vector3.new(x1,y1,z1))
  1154. game:GetService("Debris"):AddItem(prt,5)
  1155. coroutine.resume(coroutine.create(function(Part,Mesh)
  1156. for i=0,1,delay do
  1157. swait()
  1158. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1159. Part.Transparency=i
  1160. Mesh.Scale=Mesh.Scale+Vector3.new(x3,y3,z3)
  1161. end
  1162. Part.Parent=nil
  1163. end),prt,msh)
  1164. end
  1165. function MagicShockTrailAlt2(origcolor2,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
  1166. local prt=part(3,char,0,0,origcolor2,"Effect",Vector3.new(0.5,0.5,0.5))
  1167. prt.Anchored=true
  1168. prt.Material = "Neon"
  1169. prt.CFrame=cframe
  1170. msh=mesh("BlockMesh",prt,"","",Vector3.new(0,0,0),Vector3.new(x1,y1,z1))
  1171. game:GetService("Debris"):AddItem(prt,5)
  1172. coroutine.resume(coroutine.create(function(Part,Mesh)
  1173. local rtype = rottype
  1174. for i=0,1,delay do
  1175. swait()
  1176. if rtype == 1 then
  1177. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1178. elseif rtype == 2 then
  1179. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1180. end
  1181. prt.Transparency=i
  1182. Mesh.Scale=Mesh.Scale+Vector3.new(x3,y3,z3)
  1183. end
  1184. Part.Parent=nil
  1185. end),prt,msh)
  1186. end
  1187.  
  1188.  
  1189.  
  1190. New = function(Object, Parent, Name, Data)
  1191. local Object = Instance.new(Object)
  1192. for Index, Value in pairs(Data or {}) do
  1193. Object[Index] = Value
  1194. end
  1195. Object.Parent = Parent
  1196. Object.Name = Name
  1197. return Object
  1198. end
  1199.  
  1200. RubiksCube = New("Model",char,"RubiksCube",{})
  1201.  
  1202. local NewInstance = function(instance,parent,properties)
  1203. local inst = Instance.new(instance,parent)
  1204. if(properties)then
  1205. for i,v in next, properties do
  1206. pcall(function() inst[i] = v end)
  1207. end
  1208. end
  1209. return inst;
  1210. end
  1211. local HW = NewInstance('Weld',char,{Part0=tors,Part1=Handle,C0 = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-65),0,math.rad(-90))})
  1212.  
  1213. function intro()
  1214. attack = true
  1215. for i = 0,2,0.1 do
  1216. swait()
  1217. rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(55)),.3)
  1218. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-65)),.3)
  1219. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(76)), 0.3)
  1220. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
  1221. end
  1222. end
  1223.  
  1224. local mouse = game.Players.LocalPlayer:GetMouse()
  1225. local running = false
  1226.  
  1227. function getTool()
  1228. for _, kid in ipairs(script.Parent:GetChildren()) do
  1229. if kid.className == "Tool" then return kid end
  1230. end
  1231. return nil
  1232. end
  1233.  
  1234.  
  1235. mouse.KeyDown:connect(function (key) -- Run function
  1236. key = string.lower(key)
  1237. if string.byte(key) == 48 then
  1238. running = true
  1239. local keyConnection = mouse.KeyUp:connect(function (key)
  1240. if string.byte(key) == 48 then
  1241. running = false
  1242. end
  1243. end)
  1244. for i = 1,5 do
  1245. game.Workspace.CurrentCamera.FieldOfView = (100+(i*2))
  1246. wait()
  1247. end
  1248. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 35
  1249. repeat wait () until running == false
  1250. keyConnection:disconnect()
  1251. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  1252. for i = 1,5 do
  1253. game.Workspace.CurrentCamera.FieldOfView = (110-(i*2))
  1254. wait()
  1255. end
  1256. end
  1257. end)
  1258. local idle=0
  1259. local sine = 0
  1260. local change = 1
  1261. local val = 0
  1262. toim = 0
  1263. hum.Animator.Parent = nil
  1264. idleanim=.4
  1265. while true do
  1266. swait()
  1267. sine = sine + change
  1268. local torvel=(root.Velocity*Vector3.new(1,0,1)).magnitude
  1269. local velderp=root.Velocity.y
  1270. hitfloor,posfloor=rayCast(root.Position,(CFrame.new(root.Position,root.Position - Vector3.new(0,1,0))).lookVector,4,char)
  1271. if equipped==true or equipped==false then
  1272. if attack==false then
  1273. idle=idle+1
  1274. else
  1275. idle=0
  1276. end
  1277. if root.Velocity.y > 1 and hitfloor==nil then
  1278. Anim="Jump"
  1279. if attack==false then
  1280. rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1281. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1282. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(20)), 0.3)
  1283. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
  1284. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
  1285. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3)
  1286. end
  1287. elseif root.Velocity.y < -1 and hitfloor==nil then
  1288. Anim="Fall"
  1289. if attack==false then
  1290. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
  1291. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3)
  1292. rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1293. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(40),math.rad(0),math.rad(0)),.3)
  1294. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(20)), 0.3)
  1295. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
  1296. end
  1297. elseif torvel<1 and hitfloor~=nil then
  1298. Anim="Idle"
  1299. change = 2
  1300.  
  1301. if attack==false then
  1302. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.1+0.1*math.cos(sine/20))*angles(math.rad(0),math.rad(0),math.rad(0)),0.15)
  1303. tors.Neck.C0=clerp(tors.Neck.C0,necko*angles(math.rad(25),math.rad(0),math.rad(0)),.3)
  1304. RH.C0=clerp(RH.C0,cf(1,-0.9-0.1*math.cos(sine/20),0)*angles(math.rad(-2.5),math.rad(90),math.rad(-0))*angles(math.rad(-7.5),math.rad(0),math.rad(0)),0.15)
  1305. LH.C0=clerp(LH.C0,cf(-1,-0.9-0.1*math.cos(sine/20),0)*angles(math.rad(-2.5),math.rad(-90),math.rad(-0))*angles(math.rad(-7.5),math.rad(0),math.rad(0)),0.15)
  1306. RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5+0.04*math.sin(sine/25), -0.35) * angles(math.rad(65 - 1), math.rad(-7), math.rad(-35)), 0.3)
  1307. LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5+0.04*math.sin(sine/25), -0.35) * angles(math.rad(90 - 1), math.rad(-7), math.rad(55)), 0.1)
  1308. HW.C0=euler(0,2.57*math.cos(sine/60)/1,0)*cf(0,2.1+1.7,0)* angles(math.rad(55 - 1), math.rad(-7), math.rad(55), 0.1)
  1309. end
  1310.  
  1311. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  1312. Anim="Walk"
  1313. change = 1
  1314. if attack==false then
  1315. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.175+0.025*math.cos(sine/3.5)+ -math.sin(sine/3.5)/7)*angles(math.rad(5-2.5*math.cos(sine/3.5)),math.rad(0),math.rad(10*math.cos(sine/7))),0.15)
  1316. tors.Neck.C0 = clerp(tors.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1317. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(40) * math.cos(sine / 7), math.rad(0), math.rad(5)), 0.3)
  1318. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40) * math.cos(sine / 7), math.rad(0), math.rad(-5)), 0.3)
  1319. RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/2)*angles(math.rad(-5-15*math.cos(sine/7))+ -math.sin(sine/7)/1.5,math.rad(90-10*math.cos(sine/7)),math.rad(0)),0.15)
  1320. LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/2)*angles(math.rad(-5+15*math.cos(sine/7))+ math.sin(sine/7)/1.5,math.rad(-90-10*math.cos(sine/7)),math.rad(0)),0.15)
  1321. HW.C0=euler(0,2.57*math.cos(sine/60)/1,0)*cf(0,2.1+1.7,0)* angles(math.rad(55 - 1), math.rad(-7), math.rad(55*math.cos(sine/60)), 0.1)
  1322. end
  1323. elseif torvel>=22 and hitfloor~=nil then
  1324. Anim="Run"
  1325. change = 2
  1326. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.175+0.025*math.cos(sine/3.5)+ -math.sin(sine/3.5)/7)*angles(math.rad(25),math.rad(0),math.rad(10*math.cos(sine/7))),0.15)
  1327. tors.Neck.C0 = clerp(tors.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1328. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(55), math.rad(-55), math.rad(90)), 0.3)
  1329. LW.C0=clerp(LW.C0,cf(-0.85,0.5 + 0.1 * math.cos(sine / 60),-0.65)*angles(math.rad(40),math.rad(0),math.rad(90 + 2.5)),.3)
  1330. RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/1)*angles(math.rad(-5-15*math.cos(sine/7))+ -math.sin(sine/7)/1,math.rad(90-10*math.cos(sine/7)),math.rad(0)),0.15)
  1331. LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/1)*angles(math.rad(-5+15*math.cos(sine/7))+ math.sin(sine/7)/1,math.rad(-90-10*math.cos(sine/7)),math.rad(0)),0.15)
  1332. HW.C0=clerp(HW.C0,cf(0,-1,0)*angles(math.rad(-65),math.rad(0),math.rad(-90)),0.15)
  1333.  
  1334. end
  1335. end
  1336. if 0 < #Effects then
  1337. for e = 1, #Effects do
  1338. if Effects[e] ~= nil then
  1339. local Thing = Effects[e]
  1340. if Thing ~= nil then
  1341. local Part = Thing[1]
  1342. local Mode = Thing[2]
  1343. local Delay = Thing[3]
  1344. local IncX = Thing[4]
  1345. local IncY = Thing[5]
  1346. local IncZ = Thing[6]
  1347. if 1 >= Thing[1].Transparency then
  1348. if Thing[2] == "Block1" then
  1349. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1350. local Mesh = Thing[1].Mesh
  1351. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1352. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1353. elseif Thing[2] == "Block2" then
  1354. Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0)
  1355. local Mesh = Thing[7]
  1356. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1357. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1358. elseif Thing[2] == "Block3" then
  1359. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0)
  1360. local Mesh = Thing[7]
  1361. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1362. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1363. elseif Thing[2] == "Cylinder" then
  1364. local Mesh = Thing[1].Mesh
  1365. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1366. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1367. elseif Thing[2] == "Blood" then
  1368. local Mesh = Thing[7]
  1369. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  1370. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1371. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1372. elseif Thing[2] == "Elec" then
  1373. local Mesh = Thing[1].Mesh
  1374. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1375. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1376. elseif Thing[2] == "Disappear" then
  1377. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1378. elseif Thing[2] == "Shatter" then
  1379. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1380. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1381. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1382. Thing[6] = Thing[6] + Thing[5]
  1383. end
  1384.  
  1385. end
  1386. end
  1387. end
  1388. end
  1389. end
  1390. end
  1391.  
  1392. --Mkay. Bye!
  1393. --Wazzup...
  1394. --Nop. Not the end.
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409. --JUST FREACKING GO DOWN. YEET.
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452. ParticleSettings = {
  1453. Lifetime = 1,
  1454. Texture = 'rbxassetid://1209757190',
  1455. --Color1 is for UpperBody and Accessories, Color2 is for Lower Body
  1456. Color1 = ColorSequence.new(BrickColor.new('Pastel yellow').Color,BrickColor.new('Institutional white').Color),
  1457. Color2 = ColorSequence.new(BrickColor.new('Institutional white').Color,BrickColor.new('New Yeller').Color),
  1458. AllBody = true,
  1459. UpperBodyOnly = false,
  1460. LowerBodyOnly = false,
  1461. Accessories = true,
  1462. Extras = true,
  1463. }
  1464. m = game:service'Players'.LocalPlayer:GetMouse()
  1465. local p=game:service("Players").LocalPlayer
  1466. Instance.new("ForceField", game.Players.LocalPlayer.Character). Visible = false
  1467. local char=p.Character
  1468. script.Parent=char
  1469. local tor=char.Torso
  1470. local hed=char.Head
  1471. local larm=char:FindFirstChild("Left Arm")
  1472. local rarm=char:FindFirstChild("Right Arm")
  1473. local lleg=char:FindFirstChild("Left Leg")
  1474. local rleg=char:FindFirstChild("Right Leg")
  1475. local hum=char.Humanoid
  1476. local cam=workspace.CurrentCamera
  1477. local root=char.HumanoidRootPart
  1478. local mouse=p:GetMouse()
  1479. local hb=game:service("RunService").Heartbeat
  1480. local rs=game:service("RunService").Stepped
  1481. hum.MaxHealth= math.huge
  1482. hum.Health=hum.MaxHealth
  1483. local hair4 = Instance.new("Part",char)
  1484. hair4.Material="Neon"
  1485. hair4.CanCollide=false
  1486. hair4.Size=Vector3.new(.5,2,0)
  1487. hair4.BrickColor=BrickColor.Red()
  1488. hair4.Transparency=1
  1489.  
  1490.  
  1491.  
  1492. local w = Instance.new("Weld",hair4)
  1493. w.Part1=hair4
  1494. w.Part0=tor
  1495. w.C0=CFrame.new(-0.7,0,0.15)
  1496.  
  1497. local hair3 = Instance.new("Part",char)
  1498. hair3.Material="Neon"
  1499. hair3.CanCollide=false
  1500. hair3.Size=Vector3.new(.5,2,0)
  1501. hair3.BrickColor=BrickColor.Red()
  1502. hair3.Transparency=1
  1503.  
  1504.  
  1505.  
  1506. local w = Instance.new("Weld",hair3)
  1507. w.Part1=hair3
  1508. w.Part0=tor
  1509. w.C0=CFrame.new(0.7,0,0.15)
  1510.  
  1511. local bladee = Instance.new("ParticleEmitter",hair4)
  1512. bladee.Texture = "http://www.roblox.com/asset/?id=298984512"
  1513. bladee.LightEmission = 0.625
  1514. bladee.EmissionDirection = "Left"
  1515. bladee.LockedToPart = true
  1516. bladee.Color = ParticleSettings.Color2
  1517. bladee.Rate = 100000
  1518. bladee.Lifetime = NumberRange.new(.5)
  1519. bladee.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,2,0),NumberSequenceKeypoint.new(1,0,0)})
  1520. bladee.Speed = NumberRange.new(5)
  1521. bladee.Acceleration = Vector3.new(-30,40,0)
  1522.  
  1523. local bladee3 = Instance.new("ParticleEmitter",hair3)
  1524. bladee3.Texture = "http://www.roblox.com/asset/?id=298984512"
  1525. bladee3.LightEmission = 0.625
  1526. bladee3.EmissionDirection = "Right"
  1527. bladee3.LockedToPart = true
  1528. bladee3.Color = ParticleSettings.Color2
  1529. bladee3.Rate = 100000
  1530. bladee3.Lifetime = NumberRange.new(.5)
  1531. bladee3.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,2,0),NumberSequenceKeypoint.new(1,0,0)})
  1532. bladee3.Speed = NumberRange.new(5)
  1533. bladee3.Acceleration = Vector3.new(30,40,0)
  1534. m.KeyDown:connect(function(k)
  1535. if k == "e" then
  1536. if (hum ~= nil) then
  1537. hum.Sit = true
  1538. end
  1539. end
  1540. end)
  1541.  
  1542. --Okay... It iz teh end.
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615. --OH FU**! WHY ISN'T IT THE END YET? >:(
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646. --end ;~;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement