Advertisement
memberhero

Derpz Script FE

Nov 27th, 2020 (edited)
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 123.49 KB | None | 0 0
  1. --FE Template
  2. if (game:GetService('RunService'):IsServer()) then return error('This script cannot be ran server-sided, please use hl/',0); end;
  3.  
  4. local remote = NS ([=[
  5.  
  6. wait(2)
  7.  
  8. wait(1/60)
  9.  
  10. warn([[Autumn 2019 Base
  11.  
  12. Mainly made by Lunnekoo (For all the base and all that), Then also "Made" by LocalPlayer
  13. EzConvert by Drahazar
  14. ]])
  15. --- its obs smooth af do not touch
  16. ---- Sources and functions might be taken from others
  17. plr = owner
  18.  
  19. char = plr.Character
  20. hum = char.Humanoid
  21. local cam = game.Workspace.CurrentCamera
  22. flyingmode = false
  23. Camera = cam
  24. local CamInterrupt = false
  25. local TwoD = false
  26. local TargetInfo = {nil, nil}
  27. cam.CameraType = "Custom"
  28. t = char.Torso
  29. h = char.Head
  30. ra = char["Right Arm"]
  31. la = char["Left Arm"]
  32. rl = char["Right Leg"]
  33. ll = char["Left Leg"]
  34. tors = char.Torso
  35. lleg = char["Left Leg"]
  36. root = char.HumanoidRootPart
  37. hed = char.Head
  38. rleg = char["Right Leg"]
  39. rarm = char["Right Arm"]
  40. larm = char["Left Arm"]
  41. radian = math.rad
  42. random = math.random
  43. Vec3 = Vector3.new
  44. Inst = Instance.new
  45. cFrame = CFrame.new
  46. Euler = CFrame.fromEulerAnglesXYZ
  47. vt = Vector3.new
  48. bc = BrickColor.new
  49. br = BrickColor.random
  50. it = Instance.new
  51. cf = CFrame.new
  52. Face = hed.face
  53. local DerpzMusic = Instance.new("Sound",char.Torso)
  54. DerpzMusic.SoundId = "rbxassetid://3229553339"
  55. DerpzMusic.Name = "DerpzMusic"
  56. DerpzMusic.Volume = 10
  57. DerpzMusic.Pitch = 1
  58. DerpzMusic.Looped = true
  59. DerpzMusic:Play()
  60. --Face changing functions
  61. function Neutral() --okthen
  62. Face.Texture = "rbxassetid://2755423294"
  63. end
  64. function Upset() --cri
  65. Face.Texture = "rbxassetid://2755479427"
  66. end
  67. function Happy() --HHHHHHHHHHHHHHHHHHHHHHHH
  68. Face.Texture = "rbxassetid://2755423620"
  69. end
  70. function Determined() --It'S NOt oVEr uNtIl iT'S OveR
  71. Face.Texture = "rbxassetid://2755480100"
  72. end
  73. function Insane() --hahahhahah
  74. Face.Texture = "rbxassetid://2755481010"
  75. end
  76. function Sleeping() --Yes, I did make a sleeping face.
  77. Face.Texture = "rbxassetid://3009289203"
  78. end
  79. function HappyMemey() --c:
  80. Face.Texture = "rbxassetid://3988001776"
  81. end
  82. --Face changing functions
  83. --Focus
  84. function FocusOnPlayer()
  85. for i,v in pairs(game:GetService("Players"):GetChildren()) do
  86. local var = script.Focus.Focus1:Clone()
  87. var.Parent = v.PlayerGui
  88. var.Disabled = false
  89. end
  90. end
  91. function FocusSideways()
  92. for i,v in pairs(game:GetService("Players"):GetChildren()) do
  93. local var = script.Focus.Focus2:Clone()
  94. var.Parent = v.PlayerGui
  95. var.Disabled = false
  96. end
  97. end
  98. function TestThingy() --WIP, But I don't mind
  99. for i,v in pairs(game:GetService("Players"):GetChildren()) do
  100. local var = script.Focus.asd:Clone()
  101. var.Parent = v.PlayerGui
  102. var.Disabled = false
  103. end
  104. end
  105. function ZoomInOnFace() --ZOOOOOOM
  106. for i,v in pairs(game:GetService("Players"):GetChildren()) do
  107. local var = script.Focus.ZoomIn:Clone()
  108. var.Parent = v.PlayerGui
  109. var.Disabled = false
  110. end
  111. end
  112. --Focus
  113.  
  114. --Shaking
  115. function shakes(power,length)
  116. for i,v in pairs(game:GetService("Players"):GetChildren()) do
  117. local var = script.Shaker:Clone()
  118. var.Parent = v.Character
  119. local pw = var.Shakeval
  120. local lgth = var.MultLength
  121. pw.Value = power/2
  122. lgth.Value = length
  123. var.Disabled = false
  124. game:GetService("Debris"):AddItem(var, length+4)
  125. end
  126. end
  127.  
  128. function localshakes(power,length)
  129. local var = script.Shaker:Clone()
  130. var.Parent = plr.Character
  131. local pw = var.Shakeval
  132. local lgth = var.MultLength
  133. pw.Value = power/2
  134. lgth.Value = length
  135. var.Disabled = false
  136. game:GetService("Debris"):AddItem(var, length+4)
  137. end
  138. function CameraEnshaking(power,length)
  139. for i,v in pairs(game:GetService("Players"):GetChildren()) do
  140. local var = script.Shaker:Clone()
  141. var.Parent = v.Character
  142. local pw = var.Shakeval
  143. local lgth = var.MultLength
  144. pw.Value = power/2
  145. lgth.Value = length
  146. var.Disabled = false
  147. game:GetService("Debris"):AddItem(var, length+4)
  148. end
  149. end
  150. --Shaking
  151.  
  152. local Booleans = {
  153. CamFollow = true,
  154. GyroUse = true
  155. }
  156.  
  157. function lerp(object, newCFrame, alpha)
  158. return object:lerp(newCFrame, alpha)
  159. end
  160.  
  161. local Directer = Inst("BodyGyro", root)
  162. Directer.MaxTorque = Vec3(0, 0, 0)
  163. Directer.P = 600000
  164. local CPart = Inst("Part")
  165. CPart.Anchored = true
  166. CPart.CanCollide = false
  167. CPart.Locked = true
  168. CPart.Transparency = 1
  169.  
  170. local rainbowmode = false
  171. local chaosmode = false
  172. aerrtee = 0
  173.  
  174. local mutedtog = false
  175.  
  176.  
  177. local NewInstance = function(instance,parent,properties)
  178. local inst = Instance.new(instance,parent)
  179. if(properties)then
  180. for i,v in next, properties do
  181. pcall(function() inst[i] = v end)
  182. end
  183. end
  184. return inst;
  185. end
  186. MAINRUINCOLOR = BrickColor.new("Navy blue")
  187. function Create(ty)
  188. return function(data)
  189. local obj = Instance.new(ty)
  190. for k, v in pairs(data) do
  191. if type(k) == 'number' then
  192. v.Parent = obj
  193. else
  194. obj[k] = v
  195. end
  196. end
  197. return obj
  198. end
  199. end
  200.  
  201. CFuncs = {
  202. ["Part"] = {
  203. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  204. local Part = Create("Part"){
  205. Parent = Parent,
  206. Reflectance = Reflectance,
  207. Transparency = Transparency,
  208. CanCollide = false,
  209. Locked = true,
  210. BrickColor = BrickColor.new(tostring(BColor)),
  211. Name = Name,
  212. Size = Size,
  213. Material = Material,
  214. }
  215. RemoveOutlines(Part)
  216. return Part
  217. end;
  218. };
  219.  
  220. ["Mesh"] = {
  221. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  222. local Msh = Create(Mesh){
  223. Parent = Part,
  224. Offset = OffSet,
  225. Scale = Scale,
  226. }
  227. if Mesh == "SpecialMesh" then
  228. Msh.MeshType = MeshType
  229. Msh.MeshId = MeshId
  230. end
  231. return Msh
  232. end;
  233. };
  234.  
  235. ["Mesh"] = {
  236. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  237. local Msh = Create(Mesh){
  238. Parent = Part,
  239. Offset = OffSet,
  240. Scale = Scale,
  241. }
  242. if Mesh == "SpecialMesh" then
  243. Msh.MeshType = MeshType
  244. Msh.MeshId = MeshId
  245. end
  246. return Msh
  247. end;
  248. };
  249.  
  250. ["Weld"] = {
  251. Create = function(Parent, Part0, Part1, C0, C1)
  252. local Weld = Create("Weld"){
  253. Parent = Parent,
  254. Part0 = Part0,
  255. Part1 = Part1,
  256. C0 = C0,
  257. C1 = C1,
  258. }
  259. return Weld
  260. end;
  261. };
  262.  
  263. ["Sound"] = {
  264. Create = function(id, par, vol, pit)
  265. coroutine.resume(coroutine.create(function()
  266. local S = Create("Sound"){
  267. Volume = vol,
  268. Name = "EffectSoundo",
  269. Pitch = pit or 1,
  270. SoundId = id,
  271. Parent = par or workspace,
  272. }
  273. wait()
  274. S:play()
  275. game:GetService("Debris"):AddItem(S, 10)
  276. end))
  277. end;
  278. };
  279.  
  280. ["TimeSound"] = {
  281. Create = function(id, par, vol, pit, timepos)
  282. coroutine.resume(coroutine.create(function()
  283. local S = Create("Sound"){
  284. Volume = vol,
  285. Name = "EffectSoundo",
  286. Pitch = pit or 1,
  287. SoundId = id,
  288. TimePosition = timepos,
  289. Parent = par or workspace,
  290. }
  291. wait()
  292. S:play()
  293. game:GetService("Debris"):AddItem(S, 10)
  294. end))
  295. end;
  296. };
  297. ["EchoSound"] = {
  298. Create = function(id, par, vol, pit, timepos,delays,echodelay,fedb,dryl)
  299. coroutine.resume(coroutine.create(function()
  300. local Sas = Create("Sound"){
  301. Volume = vol,
  302. Name = "EffectSoundo",
  303. Pitch = pit or 1,
  304. SoundId = id,
  305. TimePosition = timepos,
  306. Parent = par or workspace,
  307. }
  308. local E = Create("EchoSoundEffect"){
  309. Delay = echodelay,
  310. Name = "Echo",
  311. Feedback = fedb,
  312. DryLevel = dryl,
  313. Parent = Sas,
  314. }
  315. wait()
  316. Sas:play()
  317. game:GetService("Debris"):AddItem(Sas, delays)
  318. end))
  319. end;
  320. };
  321.  
  322. ["LongSound"] = {
  323. Create = function(id, par, vol, pit)
  324. coroutine.resume(coroutine.create(function()
  325. local S = Create("Sound"){
  326. Volume = vol,
  327. Pitch = pit or 1,
  328. SoundId = id,
  329. Parent = par or workspace,
  330. }
  331. wait()
  332. S:play()
  333. game:GetService("Debris"):AddItem(S, 60)
  334. end))
  335. end;
  336. };
  337.  
  338. ["ParticleEmitter"] = {
  339. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  340. local fp = Create("ParticleEmitter"){
  341. Parent = Parent,
  342. Color = ColorSequence.new(Color1, Color2),
  343. LightEmission = LightEmission,
  344. Size = Size,
  345. Texture = Texture,
  346. Transparency = Transparency,
  347. ZOffset = ZOffset,
  348. Acceleration = Accel,
  349. Drag = Drag,
  350. LockedToPart = LockedToPart,
  351. VelocityInheritance = VelocityInheritance,
  352. EmissionDirection = EmissionDirection,
  353. Enabled = Enabled,
  354. Lifetime = LifeTime,
  355. Rate = Rate,
  356. Rotation = Rotation,
  357. RotSpeed = RotSpeed,
  358. Speed = Speed,
  359. VelocitySpread = VelocitySpread,
  360. }
  361. return fp
  362. end;
  363. };
  364.  
  365. CreateTemplate = {
  366.  
  367. };
  368. }
  369.  
  370.  
  371.  
  372. New = function(Object, Parent, Name, Data)
  373. local Object = Instance.new(Object)
  374. for Index, Value in pairs(Data or {}) do
  375. Object[Index] = Value
  376. end
  377. Object.Parent = Parent
  378. Object.Name = Name
  379. return Object
  380. end
  381.  
  382.  
  383. function CreateParta(parent,transparency,reflectance,material,brickcolor)
  384. local p = Instance.new("Part")
  385. p.TopSurface = 0
  386. p.BottomSurface = 0
  387. p.Parent = parent
  388. p.Size = Vector3.new(0.1,0.1,0.1)
  389. p.Transparency = transparency
  390. p.Reflectance = reflectance
  391. p.CanCollide = false
  392. p.Locked = true
  393. p.BrickColor = brickcolor
  394. p.Material = material
  395. return p
  396. end
  397.  
  398. function CreateMesh(parent,meshtype,x1,y1,z1)
  399. local mesh = Instance.new("SpecialMesh",parent)
  400. mesh.MeshType = meshtype
  401. mesh.Scale = Vector3.new(x1*10,y1*10,z1*10)
  402. return mesh
  403. end
  404.  
  405. function CreateSpecialMesh(parent,meshid,x1,y1,z1)
  406. local mesh = Instance.new("SpecialMesh",parent)
  407. mesh.MeshType = "FileMesh"
  408. mesh.MeshId = meshid
  409. mesh.Scale = Vector3.new(x1,y1,z1)
  410. return mesh
  411. end
  412.  
  413.  
  414. function CreateSpecialGlowMesh(parent,meshid,x1,y1,z1)
  415. local mesh = Instance.new("SpecialMesh",parent)
  416. mesh.MeshType = "FileMesh"
  417. mesh.MeshId = meshid
  418. mesh.TextureId = "http://www.roblox.com/asset/?id=269748808"
  419. mesh.Scale = Vector3.new(x1,y1,z1)
  420. mesh.VertexColor = Vector3.new(parent.BrickColor.r, parent.BrickColor.g, parent.BrickColor.b)
  421. return mesh
  422. end
  423.  
  424. function CreateWeld(parent,part0,part1,C1X,C1Y,C1Z,C1Xa,C1Ya,C1Za,C0X,C0Y,C0Z,C0Xa,C0Ya,C0Za)
  425. local weld = Instance.new("Weld")
  426. weld.Parent = parent
  427. weld.Part0 = part0
  428. weld.Part1 = part1
  429. weld.C1 = CFrame.new(C1X,C1Y,C1Z)*CFrame.Angles(C1Xa,C1Ya,C1Za)
  430. weld.C0 = CFrame.new(C0X,C0Y,C0Z)*CFrame.Angles(C0Xa,C0Ya,C0Za)
  431. return weld
  432. end
  433.  
  434.  
  435. --------------
  436. --------------
  437. local sorb = CreateParta(m,1,1,"SmoothPlastic",BrickColor.random())
  438. CreateWeld(sorb,rarm,sorb,0,1,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0))
  439. local sorb2 = CreateParta(m,1,1,"SmoothPlastic",BrickColor.random())
  440. CreateWeld(sorb2,larm,sorb2,0,1,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0))
  441.  
  442. local handlex = CreateParta(m,1,1,"Neon",BrickColor.Random())
  443. CreateMesh(handlex,"Brick",0,0,0)
  444. local handlexweld = CreateWeld(handlex,rarm,handlex,0,0.5,-1.05,math.rad(-30),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0))
  445. ------
  446.  
  447.  
  448. function RemoveOutlines(part)
  449. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  450. end
  451. function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  452. local Part = Create("Part")({
  453. Parent = Parent,
  454. Reflectance = Reflectance,
  455. Transparency = Transparency,
  456. CanCollide = false,
  457. Locked = true,
  458. BrickColor = BrickColor.new(tostring(BColor)),
  459. Name = Name,
  460. Size = Size,
  461. Material = Material
  462. })
  463. Part.CustomPhysicalProperties = PhysicalProperties.new(0.001, 0.001, 0.001, 0.001, 0.001)
  464. RemoveOutlines(Part)
  465. return Part
  466. end
  467. function CreateMesha(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  468. local Msh = Create(Mesh)({
  469. Parent = Part,
  470. Offset = OffSet,
  471. Scale = Scale
  472. })
  473. if Mesh == "SpecialMesh" then
  474. Msh.MeshType = MeshType
  475. Msh.MeshId = MeshId
  476. end
  477. return Msh
  478. end
  479. function CreateWeld(Parent, Part0, Part1, C0, C1)
  480. local Weld = Create("Weld")({
  481. Parent = Parent,
  482. Part0 = Part0,
  483. Part1 = Part1,
  484. C0 = C0,
  485. C1 = C1
  486. })
  487. return Weld
  488. end
  489. Player = plr
  490. Character=Player.Character
  491. PlayerGui=Player.PlayerGui
  492. Backpack=Player.Backpack
  493. Torso=Character.Torso
  494. Head=Character.Head
  495. Humanoid=Character.Humanoid
  496. m=Instance.new('Model',Character)
  497. LeftArm=Character["Left Arm"]
  498. LeftLeg=Character["Left Leg"]
  499. RightArm=Character["Right Arm"]
  500. RightLeg=Character["Right Leg"]
  501. LS=Torso["Left Shoulder"]
  502. LH=Torso["Left Hip"]
  503. RS=Torso["Right Shoulder"]
  504. RH=Torso["Right Hip"]
  505. Face = Head.face
  506. Neck=Torso.Neck
  507. it=Instance.new
  508. attacktype=1
  509. vt=Vector3.new
  510. cf=CFrame.new
  511. euler=CFrame.fromEulerAnglesXYZ
  512. angles=CFrame.Angles
  513. cloaked=false
  514. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  515. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  516. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  517. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  518. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  519. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  520. RootPart=Character.HumanoidRootPart
  521. RootJoint=RootPart.RootJoint
  522. RootCF=euler(-1.57,0,3.14)
  523. attack = false
  524. attackdebounce = false
  525. deb=false
  526. equipped=true
  527. hand=false
  528. MMouse=nil
  529. combo=0
  530. mana=0
  531. trispeed=.2
  532. attackmode='none'
  533. local idle=0
  534. local Anim="Idle"
  535. local Effects={}
  536. local gun=false
  537. local shoot=false
  538. local sine = 0
  539. local change = 1
  540.  
  541.  
  542. local toggleTag = true
  543. local txt = Instance.new("BillboardGui", Head)
  544. txt.Adornee = nil
  545. txt.Name = "NameDetect"
  546. txt.Size = UDim2.new(4, 0, 1.2, 0)
  547. txt.StudsOffset = Vector3.new(-8, 5.333333333333333, 0)
  548. local text = Instance.new("TextLabel", txt)
  549. text.Size = UDim2.new(5, 0, 3.5, 0)
  550. text.FontSize = "Size8"
  551. text.TextScaled = true
  552. text.TextTransparency = 0
  553. text.BackgroundTransparency = 1
  554. text.TextTransparency = 0
  555. text.TextStrokeTransparency = 0
  556. text.Font = "Arcade"
  557. text.TextStrokeColor3 = Color3.fromRGB(0,0,100)
  558. text.TextColor3 = Color3.fromRGB(0,0,255)
  559. text.Text = "Derpz"
  560. --GUI STUFF
  561. gui = script.Main
  562. gui.Parent = plr.PlayerGui
  563. MainFrame = gui.Main
  564.  
  565.  
  566.  
  567. --save shoulders
  568. RSH, LSH=nil, nil
  569. --welds
  570. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  571. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  572. LH=Torso["Left Hip"]
  573. RH=Torso["Right Hip"]
  574. TorsoColor=Torso.BrickColor
  575. function NoOutline(Part)
  576. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  577. end
  578. ch=Character
  579. RSH=ch.Torso["Right Shoulder"]
  580. LSH=ch.Torso["Left Shoulder"]
  581. --
  582. RSH.Parent=nil
  583. LSH.Parent=nil
  584. --
  585. RW.Name="Right Shoulder"
  586. RW.Part0=ch.Torso
  587. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  588. RW.C1=cf(0, 0.5, 0)
  589. RW.Part1=ch["Right Arm"]
  590. RW.Parent=ch.Torso
  591. --
  592. LW.Name="Left Shoulder"
  593. LW.Part0=ch.Torso
  594. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  595. LW.C1=cf(0, 0.5, 0)
  596. LW.Part1=ch["Left Arm"]
  597. LW.Parent=ch.Torso
  598.  
  599. local Stats=Instance.new("BoolValue")
  600. Stats.Name="Stats"
  601. Stats.Parent=Character
  602. local Atk=Instance.new("NumberValue")
  603. Atk.Name="Damage"
  604. Atk.Parent=Stats
  605. Atk.Value=1
  606. local Def=Instance.new("NumberValue")
  607. Def.Name="Defense"
  608. Def.Parent=Stats
  609. Def.Value=1
  610. local Speed=Instance.new("NumberValue")
  611. Speed.Name="Speed"
  612. Speed.Parent=Stats
  613. Speed.Value=1
  614. local Mvmt=Instance.new("NumberValue")
  615. Mvmt.Name="Movement"
  616. Mvmt.Parent=Stats
  617. Mvmt.Value=1
  618.  
  619. local donum=0
  620.  
  621.  
  622. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  623. local fp=it("Part")
  624. fp.formFactor=formfactor
  625. fp.Parent=parent
  626. fp.Reflectance=reflectance
  627. fp.Transparency=transparency
  628. fp.CanCollide=false
  629. fp.Locked=true
  630. fp.BrickColor=brickcolor
  631. fp.Name=name
  632. fp.Size=size
  633. fp.Position=Torso.Position
  634. NoOutline(fp)
  635. fp.Material="SmoothPlastic"
  636. fp:BreakJoints()
  637. return fp
  638. end
  639.  
  640. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  641. local mesh=it(Mesh)
  642. mesh.Parent=part
  643. if Mesh=="SpecialMesh" then
  644. mesh.MeshType=meshtype
  645. if meshid~="nil" then
  646. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  647. end
  648. end
  649. mesh.Offset=offset
  650. mesh.Scale=scale
  651. return mesh
  652. end
  653.  
  654. function weld(parent,part0,part1,c0)
  655. local weld=it("Weld")
  656. weld.Parent=parent
  657. weld.Part0=part0
  658. weld.Part1=part1
  659. weld.C0=c0
  660. return weld
  661. end
  662.  
  663. local Color1=Torso.BrickColor
  664.  
  665. local bodvel=Instance.new("BodyVelocity")
  666. local bg=Instance.new("BodyGyro")
  667.  
  668. --------- SazEreno's Artificial HB --------------
  669. ArtificialHB = Instance.new("BindableEvent", script)
  670. ArtificialHB.Name = "ArtificialHB"
  671.  
  672. script:WaitForChild("ArtificialHB")
  673. Frame_Speed = 1 / 60
  674. frame = Frame_Speed
  675. tf = 0
  676. allowframeloss = false
  677. tossremainder = false
  678. lastframe = tick()
  679. script.ArtificialHB:Fire()
  680.  
  681. game:GetService("RunService").Heartbeat:connect(function(s, p)
  682. tf = tf + s
  683. if tf >= frame then
  684. if allowframeloss then
  685. script.ArtificialHB:Fire()
  686. lastframe = tick()
  687. else
  688. for i = 1, math.floor(tf / frame) do
  689. script.ArtificialHB:Fire()
  690. end
  691. lastframe = tick()
  692. end
  693. if tossremainder then
  694. tf = 0
  695. else
  696. tf = tf - frame * math.floor(tf / frame)
  697. end
  698. end
  699. end)
  700. wait()
  701.  
  702. --[Head movement core]
  703.  
  704. local Ang = CFrame.Angles
  705. local aSin = math.asin
  706. local aTan = math.atan
  707.  
  708. --[Constants]:
  709.  
  710. local Cam = cam
  711.  
  712. local Plr = plr
  713. local Mouse = mouse
  714. local Body = Plr.Character
  715. local Head = hed
  716. local Hum = hum
  717. local Core = Body:WaitForChild("HumanoidRootPart")
  718. local IsR6 = (Hum.RigType.Value==0)
  719. local Trso = (IsR6 and Body:WaitForChild("Torso")) or Body:WaitForChild("UpperTorso")
  720. local Neck = (IsR6 and Trso:WaitForChild("Neck")) or Head:WaitForChild("Neck")
  721. local Waist = (not IsR6 and Trso:WaitForChild("Waist"))
  722. local MseGuide = true
  723. local TurnCharacterToMouse = false
  724. local HeadHorFactor = 1
  725. local HeadVertFactor = 0.6
  726. local BodyHorFactor = 0.5
  727. local BodyVertFactor = 0.4
  728. local UpdateSpeed = 0.1
  729.  
  730. local NeckOrgnC0 = Neck.C0
  731. local WaistOrgnC0 = (not IsR6 and Waist.C0)
  732.  
  733. --[Setup]:
  734.  
  735. Neck.MaxVelocity = 1/3
  736.  
  737. -- Activation]:
  738. if TurnCharacterToMouse == true then
  739. MseGuide = true
  740. HeadHorFactor = 0
  741. BodyHorFactor = 0
  742. end
  743. remote = Instance.new 'RemoteFunction';
  744. remote.Parent = script;
  745. remote.OnServerInvoke = function (player, request, ...)
  746. if (player ~= owner) then
  747. return error ('You cannot invoke this remote', 0);
  748. end;
  749. if (request == 1) then
  750.  
  751. ob1d()
  752. end
  753. if (request == 2) then
  754. local k = ...;
  755. key(k)
  756.  
  757. end;
  758. if (request == 3) then
  759.  
  760.  
  761. end
  762. if (request == 4) then
  763.  
  764. end;
  765. if (request == 5) then
  766.  
  767. end;
  768. if (request == 6) then
  769. local k = ...;
  770. key2(k)
  771. end;
  772. end
  773. remote.Name = 'ServerRemote';
  774. function getMouseHit()
  775. return remote:InvokeClient (owner, 1);
  776. end;
  777. game:GetService("RunService").Stepped:Connect(function()
  778. local CamCF = Cam.CoordinateFrame
  779. if ((IsR6 and Body["Torso"]) or Body["UpperTorso"])~=nil and Body["Head"]~=nil then
  780. local TrsoLV = Trso.CFrame.lookVector
  781. local HdPos = Head.CFrame.p
  782. if IsR6 and Neck or Neck and Waist then
  783. if UpdateSpeed == 0.1 then
  784. local Dist = nil;
  785. local Diff = nil;
  786. if not MseGuide then
  787. Dist = (Head.CFrame.p-CamCF.p).magnitude
  788. Diff = Head.CFrame.Y-CamCF.Y
  789. if not IsR6 then
  790. Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aSin(Diff/Dist)*HeadVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
  791. Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang((aSin(Diff/Dist)*BodyVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
  792. else
  793. Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aSin(Diff/Dist)*HeadVertFactor), 0, -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor),UpdateSpeed/2)
  794. end
  795. else
  796. local Point = getMouseHit()
  797. Dist = (Head.CFrame.p-Point).magnitude
  798. Diff = Head.CFrame.Y-Point.Y
  799. if not IsR6 then
  800. Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aTan(Diff/Dist)*HeadVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
  801. Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang(-(aTan(Diff/Dist)*BodyVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
  802. else
  803. Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aTan(Diff/Dist)*HeadVertFactor), 0, (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor), UpdateSpeed/2)
  804. end
  805. end
  806. end
  807. end
  808. end
  809. if TurnCharacterToMouse == true then
  810. Hum.AutoRotate = false
  811. Core.CFrame = Core.CFrame:lerp(CFrame.new(Core.Position, Vector3.new(getMouseHit().x, Core.Position.Y, getMouseHit().z)), UpdateSpeed / 2)
  812. else
  813. Hum.AutoRotate = true
  814. end
  815. end)
  816. ------------------
  817. function swait(num)
  818. if num == 0 or num == nil then
  819. ArtificialHB.Event:wait()
  820. else
  821. for i = 1, num do
  822. ArtificialHB.Event:wait()
  823. end
  824. end
  825. end
  826. -------- RAINBOW LEAVE IT TO ME
  827. local r = 255
  828. local g = 0
  829. local b = 0
  830. coroutine.resume(coroutine.create(function()
  831. while wait() do
  832. for i = 0, 254/5 do
  833. swait()
  834. g = g + 5
  835. end
  836. for i = 0, 254/5 do
  837. swait()
  838. r = r - 5
  839. end
  840. for i = 0, 254/5 do
  841. swait()
  842. b = b + 5
  843. end
  844. for i = 0, 254/5 do
  845. swait()
  846. g = g - 5
  847. end
  848. for i = 0, 254/5 do
  849. swait()
  850. r = r + 5
  851. end
  852. for i = 0, 254/5 do
  853. swait()
  854. b = b - 5
  855. end
  856. end
  857. end))
  858.  
  859.  
  860. so = function(id,par,vol,pit)
  861. coroutine.resume(coroutine.create(function()
  862. local sou = Instance.new("Sound",par or workspace)
  863. sou.Volume=vol
  864. sou.Pitch=pit or 1
  865. sou.SoundId=id
  866. swait()
  867. sou:play()
  868. game:GetService("Debris"):AddItem(sou,6)
  869. end))
  870. end
  871.  
  872. function clerp(a,b,t)
  873. local qa = {QuaternionFromCFrame(a)}
  874. local qb = {QuaternionFromCFrame(b)}
  875. local ax, ay, az = a.x, a.y, a.z
  876. local bx, by, bz = b.x, b.y, b.z
  877. local _t = 1-t
  878. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  879. end
  880.  
  881. function QuaternionFromCFrame(cf)
  882. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  883. local trace = m00 + m11 + m22
  884. if trace > 0 then
  885. local s = math.sqrt(1 + trace)
  886. local recip = 0.5/s
  887. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  888. else
  889. local i = 0
  890. if m11 > m00 then
  891. i = 1
  892. end
  893. if m22 > (i == 0 and m00 or m11) then
  894. i = 2
  895. end
  896. if i == 0 then
  897. local s = math.sqrt(m00-m11-m22+1)
  898. local recip = 0.5/s
  899. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  900. elseif i == 1 then
  901. local s = math.sqrt(m11-m22-m00+1)
  902. local recip = 0.5/s
  903. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  904. elseif i == 2 then
  905. local s = math.sqrt(m22-m00-m11+1)
  906. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  907. end
  908. end
  909. end
  910.  
  911. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  912. local xs, ys, zs = x + x, y + y, z + z
  913. local wx, wy, wz = w*xs, w*ys, w*zs
  914. local xx = x*xs
  915. local xy = x*ys
  916. local xz = x*zs
  917. local yy = y*ys
  918. local yz = y*zs
  919. local zz = z*zs
  920. 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))
  921. end
  922.  
  923. function QuaternionSlerp(a, b, t)
  924. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  925. local startInterp, finishInterp;
  926. if cosTheta >= 0.0001 then
  927. if (1 - cosTheta) > 0.0001 then
  928. local theta = math.acos(cosTheta)
  929. local invSinTheta = 1/math.sin(theta)
  930. startInterp = math.sin((1-t)*theta)*invSinTheta
  931. finishInterp = math.sin(t*theta)*invSinTheta
  932. else
  933. startInterp = 1-t
  934. finishInterp = t
  935. end
  936. else
  937. if (1+cosTheta) > 0.0001 then
  938. local theta = math.acos(-cosTheta)
  939. local invSinTheta = 1/math.sin(theta)
  940. startInterp = math.sin((t-1)*theta)*invSinTheta
  941. finishInterp = math.sin(t*theta)*invSinTheta
  942. else
  943. startInterp = t-1
  944. finishInterp = t
  945. end
  946. end
  947. 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
  948. end
  949.  
  950. local function CFrameFromTopBack(at, top, back)
  951. local right = top:Cross(back)
  952. return CFrame.new(at.x, at.y, at.z,
  953. right.x, top.x, back.x,
  954. right.y, top.y, back.y,
  955. right.z, top.z, back.z)
  956. end
  957.  
  958. function Triangle(a, b, c)
  959. local edg1 = (c-a):Dot((b-a).unit)
  960. local edg2 = (a-b):Dot((c-b).unit)
  961. local edg3 = (b-c):Dot((a-c).unit)
  962. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  963. a, b, c = a, b, c
  964. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  965. a, b, c = b, c, a
  966. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  967. a, b, c = c, a, b
  968. else
  969. assert(false, "unreachable")
  970. end
  971.  
  972. local len1 = (c-a):Dot((b-a).unit)
  973. local len2 = (b-a).magnitude - len1
  974. local width = (a + (b-a).unit*len1 - c).magnitude
  975.  
  976. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  977.  
  978. local list = {}
  979.  
  980. if len1 > 0.01 then
  981. local w1 = Instance.new('WedgePart', m)
  982. game:GetService("Debris"):AddItem(w1,5)
  983. w1.Material = "SmoothPlastic"
  984. w1.FormFactor = 'Custom'
  985. w1.BrickColor = BrickColor.new("Really red")
  986. w1.Transparency = 0
  987. w1.Reflectance = 0
  988. w1.Material = "SmoothPlastic"
  989. w1.CanCollide = false
  990. local l1 = Instance.new("PointLight",w1)
  991. l1.Color = Color3.new(170,0,0)
  992. NoOutline(w1)
  993. local sz = Vector3.new(0.2, width, len1)
  994. w1.Size = sz
  995. local sp = Instance.new("SpecialMesh",w1)
  996. sp.MeshType = "Wedge"
  997. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  998. w1:BreakJoints()
  999. w1.Anchored = true
  1000. w1.Parent = workspace
  1001. w1.Transparency = 0.7
  1002. table.insert(Effects,{w1,"Disappear",.01})
  1003. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  1004. table.insert(list,w1)
  1005. end
  1006.  
  1007. if len2 > 0.01 then
  1008. local w2 = Instance.new('WedgePart', m)
  1009. game:GetService("Debris"):AddItem(w2,5)
  1010. w2.Material = "SmoothPlastic"
  1011. w2.FormFactor = 'Custom'
  1012. w2.BrickColor = BrickColor.new("Really red")
  1013. w2.Transparency = 0
  1014. w2.Reflectance = 0
  1015. w2.Material = "SmoothPlastic"
  1016. w2.CanCollide = false
  1017. local l2 = Instance.new("PointLight",w2)
  1018. l2.Color = Color3.new(170,0,0)
  1019. NoOutline(w2)
  1020. local sz = Vector3.new(0.2, width, len2)
  1021. w2.Size = sz
  1022. local sp = Instance.new("SpecialMesh",w2)
  1023. sp.MeshType = "Wedge"
  1024. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  1025. w2:BreakJoints()
  1026. w2.Anchored = true
  1027. w2.Parent = workspace
  1028. w2.Transparency = 0.7
  1029. table.insert(Effects,{w2,"Disappear",.01})
  1030. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  1031. table.insert(list,w2)
  1032. end
  1033. return unpack(list)
  1034. end
  1035.  
  1036.  
  1037. function getAttachment0(character, attachmentName)
  1038. for _,child in next,character:GetChildren() do
  1039. local attachment = child:FindFirstChild(attachmentName)
  1040. if attachment then
  1041. return attachment
  1042. end
  1043. end
  1044. end
  1045.  
  1046. function recurse(root,callback,i)
  1047. i= i or 0
  1048. for _,v in pairs(root:GetChildren()) do
  1049. i = i + 1
  1050. callback(i,v)
  1051.  
  1052. if #v:GetChildren() > 0 then
  1053. i = recurse(v,callback,i)
  1054. end
  1055. end
  1056.  
  1057. return i
  1058. end
  1059. function ArtificialHitbox(Part)
  1060. local HITBOX = CreatePart(3, Part, "Metal", 0, 1, "Really black", "Hitbox", Part.Size/2, false)
  1061. HITBOX.CanCollide = true
  1062. HITBOX.CFrame = Part.CFrame
  1063. weldBetween(Part,HITBOX)
  1064. end
  1065. function ragdollJoint(character, part0, part1, attachmentName, className, properties)
  1066. attachmentName = attachmentName.."RigAttachment"
  1067. local constraint = Instance.new(className.."Constraint")
  1068. constraint.Attachment0 = part0:FindFirstChild(attachmentName)
  1069. constraint.Attachment1 = part1:FindFirstChild(attachmentName)
  1070. constraint.Name = "RagdollConstraint"..part1.Name
  1071.  
  1072. for _,propertyData in next,properties or {} do
  1073. constraint[propertyData[1]] = propertyData[2]
  1074. end
  1075.  
  1076. constraint.Parent = character
  1077. end
  1078. function R15Ragdoll(character,KeepArms)
  1079. character:BreakJoints()
  1080. coroutine.resume(coroutine.create(function()
  1081. recurse(character, function(_,v)
  1082. if v:IsA("Attachment") then
  1083. v.Axis = Vector3.new(0, 1, 0)
  1084. v.SecondaryAxis = Vector3.new(0, 0, 1)
  1085. v.Rotation = Vector3.new(0, 0, 0)
  1086. end
  1087. end)
  1088. for _,child in next,character:GetChildren() do
  1089. if child:IsA("Accoutrement") then
  1090. for _,part in next,child:GetChildren() do
  1091. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  1092. local attachment1 = part:FindFirstChildOfClass("Attachment")
  1093. local attachment0 = getAttachment0(character,attachment1.Name)
  1094. if attachment0 and attachment1 then
  1095. local constraint = Instance.new("HingeConstraint")
  1096. constraint.Attachment0 = attachment0
  1097. constraint.Attachment1 = attachment1
  1098. constraint.LimitsEnabled = true
  1099. constraint.UpperAngle = 0
  1100. constraint.LowerAngle = 0
  1101. constraint.Parent = character
  1102. end
  1103. ArtificialHitbox(part)
  1104. elseif part.Name == "HumanoidRootPart" then
  1105. part:remove()
  1106. end
  1107. end
  1108. end
  1109. end
  1110.  
  1111. ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
  1112. {"LimitsEnabled",true};
  1113. {"UpperAngle",5};
  1114. })
  1115. if character:FindFirstChild("Head") then
  1116. ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
  1117. {"LimitsEnabled",true};
  1118. {"UpperAngle",15};
  1119. })
  1120. end
  1121.  
  1122. local handProperties = {
  1123. {"LimitsEnabled", true};
  1124. {"UpperAngle",0};
  1125. {"LowerAngle",0};
  1126. }
  1127. ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
  1128. ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
  1129.  
  1130. local shinProperties = {
  1131. {"LimitsEnabled", true};
  1132. {"UpperAngle", 0};
  1133. {"LowerAngle", -75};
  1134. }
  1135. ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
  1136. ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
  1137.  
  1138. local footProperties = {
  1139. {"LimitsEnabled", true};
  1140. {"UpperAngle", 15};
  1141. {"LowerAngle", -45};
  1142. }
  1143. ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
  1144. ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
  1145. if KeepArms == true then
  1146. ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
  1147. ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
  1148. ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
  1149. ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
  1150. end
  1151. ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
  1152. ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
  1153. game:GetService("Debris"):AddItem(character,50)
  1154. end))
  1155. end
  1156.  
  1157. function Ragdoll(Character2,CharTorso,KeepArms)
  1158. coroutine.resume(coroutine.create(function()
  1159. Character2:BreakJoints()
  1160. local hum = Character2:findFirstChild("Humanoid")
  1161. hum:remove()
  1162. local function Scan(ch)
  1163. local e
  1164. for e = 1,#ch do
  1165. Scan(ch[e]:GetChildren())
  1166. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  1167. ch[e]:remove()
  1168. end
  1169. end
  1170. end
  1171. local NEWHUM = Instance.new("Humanoid")
  1172. NEWHUM.Name = "Corpse"
  1173. NEWHUM.Health = 0
  1174. NEWHUM.MaxHealth = 0
  1175. NEWHUM.PlatformStand = true
  1176. NEWHUM.Parent = Character2
  1177. NEWHUM.DisplayDistanceType = "None"
  1178.  
  1179. local ch = Character2:GetChildren()
  1180. local i
  1181. for i = 1,#ch do
  1182. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  1183. ch[i]:remove()
  1184. end
  1185. end
  1186.  
  1187. local Torso2 = Character2.Torso
  1188. local movevector = Vector3.new()
  1189.  
  1190. if Torso2 then
  1191. movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
  1192. local Head = Character2:FindFirstChild("Head")
  1193. if Head then
  1194. local Neck = Instance.new("Weld")
  1195. Neck.Name = "Neck"
  1196. Neck.Part0 = Torso2
  1197. Neck.Part1 = Head
  1198. Neck.C0 = CFrame.new(0, 1.5, 0)
  1199. Neck.C1 = CFrame.new()
  1200. Neck.Parent = Torso2
  1201.  
  1202. end
  1203. local Limb = Character2:FindFirstChild("Right Arm")
  1204. if Limb and KeepArms == true then
  1205.  
  1206. Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
  1207. local Joint = Instance.new("Glue")
  1208. Joint.Name = "RightShoulder"
  1209. Joint.Part0 = Torso2
  1210. Joint.Part1 = Limb
  1211. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1212. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1213. Joint.Parent = Torso2
  1214.  
  1215. local B = Instance.new("Part")
  1216. B.TopSurface = 0
  1217. B.BottomSurface = 0
  1218. B.formFactor = "Symmetric"
  1219. B.Size = Vector3.new(1, 1, 1)
  1220. B.Transparency = 1
  1221. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1222. B.Parent = Character2
  1223. local W = Instance.new("Weld")
  1224. W.Part0 = Limb
  1225. W.Part1 = B
  1226. W.C0 = CFrame.new(0, -0.5, 0)
  1227. W.Parent = Limb
  1228.  
  1229. end
  1230. local Limb = Character2:FindFirstChild("Left Arm")
  1231. if Limb and KeepArms == true then
  1232.  
  1233. Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
  1234. local Joint = Instance.new("Glue")
  1235. Joint.Name = "LeftShoulder"
  1236. Joint.Part0 = Torso2
  1237. Joint.Part1 = Limb
  1238. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1239. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1240. Joint.Parent = Torso2
  1241.  
  1242. local B = Instance.new("Part")
  1243. B.TopSurface = 0
  1244. B.BottomSurface = 0
  1245. B.formFactor = "Symmetric"
  1246. B.Size = Vector3.new(1, 1, 1)
  1247. B.Transparency = 1
  1248. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1249. B.Parent = Character2
  1250. local W = Instance.new("Weld")
  1251. W.Part0 = Limb
  1252. W.Part1 = B
  1253. W.C0 = CFrame.new(0, -0.5, 0)
  1254. W.Parent = Limb
  1255.  
  1256. end
  1257. local Limb = Character2:FindFirstChild("Right Leg")
  1258. if Limb then
  1259.  
  1260. Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
  1261. local Joint = Instance.new("Glue")
  1262. Joint.Name = "RightHip"
  1263. Joint.Part0 = Torso2
  1264. Joint.Part1 = Limb
  1265. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1266. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1267. Joint.Parent = Torso2
  1268.  
  1269. local B = Instance.new("Part")
  1270. B.TopSurface = 0
  1271. B.BottomSurface = 0
  1272. B.formFactor = "Symmetric"
  1273. B.Size = Vector3.new(1, 1, 1)
  1274. B.Transparency = 1
  1275. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1276. B.Parent = Character2
  1277. local W = Instance.new("Weld")
  1278. W.Part0 = Limb
  1279. W.Part1 = B
  1280. W.C0 = CFrame.new(0, -0.5, 0)
  1281. W.Parent = Limb
  1282.  
  1283. end
  1284. local Limb = Character2:FindFirstChild("Left Leg")
  1285. if Limb then
  1286.  
  1287. Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
  1288. local Joint = Instance.new("Glue")
  1289. Joint.Name = "LeftHip"
  1290. Joint.Part0 = Torso2
  1291. Joint.Part1 = Limb
  1292. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1293. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1294. Joint.Parent = Torso2
  1295.  
  1296. local B = Instance.new("Part")
  1297. B.TopSurface = 0
  1298. B.BottomSurface = 0
  1299. B.formFactor = "Symmetric"
  1300. B.Size = Vector3.new(1, 1, 1)
  1301. B.Transparency = 1
  1302. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1303. B.Parent = Character2
  1304. local W = Instance.new("Weld")
  1305. W.Part0 = Limb
  1306. W.Part1 = B
  1307. W.C0 = CFrame.new(0, -0.5, 0)
  1308. W.Parent = Limb
  1309.  
  1310. end
  1311. --[
  1312. local Bar = Instance.new("Part")
  1313. Bar.TopSurface = 0
  1314. Bar.BottomSurface = 0
  1315. Bar.formFactor = "Symmetric"
  1316. Bar.Size = Vector3.new(1, 1, 1)
  1317. Bar.Transparency = 1
  1318. Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
  1319. Bar.Parent = Character2
  1320. local Weld = Instance.new("Weld")
  1321. Weld.Part0 = Torso2
  1322. Weld.Part1 = Bar
  1323. Weld.C0 = CFrame.new(0, 0.5, 0)
  1324. Weld.Parent = Torso2
  1325. --]]
  1326. end
  1327. Character2.Parent = workspace
  1328. game:GetService("Debris"):AddItem(Character2,90)
  1329.  
  1330. return Character2,Torso2
  1331. end))
  1332. end
  1333.  
  1334.  
  1335. function Damagefunc(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  1336. if hit.Parent == nil then
  1337. return
  1338. end
  1339. local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  1340. for _, v in pairs(hit.Parent:children()) do
  1341. if v:IsA("Humanoid") then
  1342. h = v
  1343. end
  1344. end
  1345. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Head") ~= nil then
  1346. if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
  1347. return
  1348. end
  1349. c = Instance.new("ObjectValue")
  1350. c.Name = "creator"
  1351. c.Value = Player
  1352. c.Parent = h
  1353.  
  1354. game:GetService("Debris"):AddItem(c, 0.5)
  1355. if HitSound ~= nil and HitPitch ~= nil then
  1356. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  1357. end
  1358. local Damage = math.random(minim, maxim)
  1359. local blocked = false
  1360. local block = hit.Parent:findFirstChild("Block")
  1361. if block ~= nil and block.className == "IntValue" and block.Value > 0 then
  1362. blocked = true
  1363. block.Value = block.Value - 1
  1364. print(block.Value)
  1365. end
  1366. if blocked == false then
  1367. HitHealth = h.Health
  1368. h.MaxHealth = 60
  1369. if char:FindFirstChild("ur screwed now") then
  1370. h.Health = h.Health - Damage*16500
  1371. else
  1372. h.Health = h.Health - Damage
  1373. end
  1374. if HitHealth ~= h.Health and HitHealth ~= 0 and 0 >= h.Health then
  1375. print("gained kill")
  1376. if h.Parent:FindFirstChild("Torso") then
  1377. h.Parent:FindFirstChild("Torso").CFrame = h.Parent:FindFirstChild("Torso").CFrame * angles(math.rad(2), math.rad(0), math.rad(0))
  1378. Ragdoll(h.Parent,Torso,true)
  1379. elseif h.Parent:FindFirstChild("UpperTorso") then
  1380. R15Ragdoll(h.Parent,true)
  1381. end
  1382. end
  1383. ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
  1384. else
  1385. h.Health = h.Health - Damage*16500
  1386. ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
  1387. end
  1388. if Type == "Knockdown" then
  1389. local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  1390. hum.PlatformStand = true
  1391. coroutine.resume(coroutine.create(function(HHumanoid)
  1392. swait(1)
  1393. if hum.Name ~= "Corpse" then
  1394. HHumanoid.PlatformStand = false
  1395. else
  1396. end
  1397. end), hum)
  1398. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  1399. local bodvol = Create("BodyVelocity")({
  1400. velocity = angle * knockback,
  1401. P = 5000,
  1402. maxForce = Vector3.new(8000, 8000, 8000),
  1403. Parent = hit
  1404. })
  1405. local rl = Create("BodyAngularVelocity")({
  1406. P = 3000,
  1407. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  1408. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  1409. Parent = hit
  1410. })
  1411. game:GetService("Debris"):AddItem(bodvol, 0.5)
  1412. game:GetService("Debris"):AddItem(rl, 0.5)
  1413. elseif Type == "Normal" then
  1414. local vp = Create("BodyVelocity")({
  1415. P = 500,
  1416. maxForce = Vector3.new(math.huge, 0, math.huge),
  1417. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  1418. })
  1419. if knockback > 0 then
  1420. vp.Parent = hit.Parent.Head
  1421. end
  1422. game:GetService("Debris"):AddItem(vp, 0.5)
  1423. elseif Type == "Up" then
  1424. local bodyVelocity = Create("BodyVelocity")({
  1425. velocity = Vector3.new(0, 20, 0),
  1426. P = 5000,
  1427. maxForce = Vector3.new(8000, 8000, 8000),
  1428. Parent = hit
  1429. })
  1430. game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
  1431. local bodyVelocity = Create("BodyVelocity")({
  1432. velocity = Vector3.new(0, 20, 0),
  1433. P = 5000,
  1434. maxForce = Vector3.new(8000, 8000, 8000),
  1435. Parent = hit
  1436. })
  1437. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  1438. elseif Type == "Leech" then
  1439. local hum = hit.Parent.Humanoid
  1440. if hum ~= nil then
  1441. for i = 0, 2 do
  1442. -- Effects.Sphere.Create(BrickColor.new("Bright red"), hit.Parent.Torso.CFrame * cn(0, 0, 0) * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 15, 1, 0, 5, 0, 0.02)
  1443. end
  1444. Humanoid.Health = Humanoid.Health + 10
  1445. end
  1446. elseif Type == "UpKnock" then
  1447. local hum = hit.Parent.Humanoid
  1448. hum.PlatformStand = true
  1449. if hum ~= nil then
  1450. hitr = true
  1451. end
  1452. coroutine.resume(coroutine.create(function(HHumanoid)
  1453. swait(5)
  1454. HHumanoid.PlatformStand = false
  1455. hitr = false
  1456. end), hum)
  1457. local bodyVelocity = Create("BodyVelocity")({
  1458. velocity = Vector3.new(0, 20, 0),
  1459. P = 5000,
  1460. maxForce = Vector3.new(8000, 8000, 8000),
  1461. Parent = hit
  1462. })
  1463. game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
  1464. local bodyVelocity = Create("BodyVelocity")({
  1465. velocity = Vector3.new(0, 20, 0),
  1466. P = 5000,
  1467. maxForce = Vector3.new(8000, 8000, 8000),
  1468. Parent = hit
  1469. })
  1470. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  1471. elseif Type == "Snare" then
  1472. local bp = Create("BodyPosition")({
  1473. P = 2000,
  1474. D = 100,
  1475. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  1476. position = hit.Parent.Torso.Position,
  1477. Parent = hit.Parent.Torso
  1478. })
  1479. game:GetService("Debris"):AddItem(bp, 1)
  1480. elseif Type == "Slashnare" then
  1481. -- Effects.Block.Create(BrickColor.new("Pastel Blue"), hit.Parent.Torso.CFrame * cn(0, 0, 0), 15*4, 15*4, 15*4, 3*4, 3*4, 3*4, 0.07)
  1482. for i = 1, math.random(4, 5) do
  1483. -- Effects.Sphere.Create(BrickColor.new("Teal"), hit.Parent.Torso.CFrame * cn(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)) * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 15, 1, 0, 5, 0, 0.02)
  1484. end
  1485. local bp = Create("BodyPosition")({
  1486. P = 2000,
  1487. D = 100,
  1488. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  1489. position = hit.Parent.Torso.Position,
  1490. Parent = hit.Parent.Torso
  1491. })
  1492. game:GetService("Debris"):AddItem(bp, 1)
  1493. elseif Type == "Spike" then
  1494. -- CreateBigIceSword(hit.Parent.Torso.CFrame)
  1495. local bp = Create("BodyPosition")({
  1496. P = 2000,
  1497. D = 100,
  1498. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  1499. position = hit.Parent.Torso.Position,
  1500. Parent = hit.Parent.Torso
  1501. })
  1502. game:GetService("Debris"):AddItem(bp, 1)
  1503. elseif Type == "Freeze" then
  1504. local BodPos = Create("BodyPosition")({
  1505. P = 50000,
  1506. D = 1000,
  1507. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  1508. position = hit.Parent.Torso.Position,
  1509. Parent = hit.Parent.Torso
  1510. })
  1511. local BodGy = Create("BodyGyro")({
  1512. maxTorque = Vector3.new(400000, 400000, 400000) * math.huge,
  1513. P = 20000,
  1514. Parent = hit.Parent.Torso,
  1515. cframe = hit.Parent.Torso.CFrame
  1516. })
  1517. hit.Parent.Torso.Anchored = true
  1518. coroutine.resume(coroutine.create(function(Part)
  1519. swait(1.5)
  1520. Part.Anchored = false
  1521. end), hit.Parent.Torso)
  1522. game:GetService("Debris"):AddItem(BodPos, 3)
  1523. game:GetService("Debris"):AddItem(BodGy, 3)
  1524. end
  1525. local debounce = Create("BoolValue")({
  1526. Name = "DebounceHit",
  1527. Parent = hit.Parent,
  1528. Value = true
  1529. })
  1530. game:GetService("Debris"):AddItem(debounce, Delay)
  1531. c = Instance.new("ObjectValue")
  1532. c.Name = "creator"
  1533. c.Value = Player
  1534. c.Parent = h
  1535. game:GetService("Debris"):AddItem(c, 0.5)
  1536. end
  1537. end
  1538. function RemoveOutlines(part)
  1539. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  1540. end
  1541. function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  1542. local Part = Create("Part")({
  1543. Parent = Parent,
  1544. Reflectance = Reflectance,
  1545. Transparency = Transparency,
  1546. CanCollide = false,
  1547. Locked = true,
  1548. BrickColor = BrickColor.new(tostring(BColor)),
  1549. Name = Name,
  1550. Size = Size,
  1551. Material = Material
  1552. })
  1553. Part.CustomPhysicalProperties = PhysicalProperties.new(0.001, 0.001, 0.001, 0.001, 0.001)
  1554. RemoveOutlines(Part)
  1555. return Part
  1556. end
  1557.  
  1558. function ShowDamage(Pos, Text, Time, Color)
  1559. coroutine.resume(coroutine.create(function()
  1560. local Rate = 0.03333333333333333
  1561. local Pos = Pos or Vector3.new(0, 0, 0)
  1562. local Text = Text or ""
  1563. local Color = Color or Color3.new(1, 0, 1)
  1564. local EffectPart = CreatePart(Character, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  1565. EffectPart.Anchored = true
  1566. EffectPart.CFrame = CFrame.new(Pos)
  1567. local BillboardGui = Create("BillboardGui")({
  1568. Size = UDim2.new(6, 0, 6, 0),
  1569. Adornee = EffectPart,
  1570. Parent = EffectPart,
  1571. AlwaysOnTop=true,
  1572. Active=true
  1573. })
  1574. local TextLabel = Create("TextLabel")({
  1575. BackgroundTransparency = 1,
  1576. AnchorPoint=Vector2.new(.5,.5),
  1577. Position = UDim2.new(.5, 0, .5, 0),
  1578. Size = UDim2.new(1, 0, 1, 0),
  1579. Text = Text,
  1580. TextColor3 = MAINRUINCOLOR.Color,
  1581. TextStrokeColor3 = Color3.new(0,0,0),
  1582. TextStrokeTransparency=0,
  1583. TextScaled = true,
  1584. Font = "Arcade",
  1585. Parent = BillboardGui,
  1586. ZIndex=4,
  1587. })
  1588. local raise=.2
  1589. local rot=math.random(-10,10)/15
  1590. local aaa=math.random(-360,360)
  1591. local bbb=math.random(-360,360)
  1592. for aaa=0,2.7,.01 do
  1593. swait()
  1594. raise=raise-.008
  1595. TextLabel.Rotation = TextLabel.Rotation+rot
  1596. TextLabel.TextTransparency=aaa
  1597. TextLabel.TextStrokeTransparency=aaa
  1598. EffectPart.Position=EffectPart.Position+Vector3.new(0,raise,0)
  1599. end
  1600. wait(3)
  1601. BillboardGui:Remove()
  1602. EffectPart:Remove()
  1603. end))
  1604. end
  1605.  
  1606. function MagniDamage(Part, magni, mindam, maxdam, knock, Type)
  1607. for _, c in pairs(workspace:children()) do
  1608. local hum = c:findFirstChildOfClass("Humanoid")
  1609. if hum ~= nil then
  1610. local head = c:findFirstChild("Head")
  1611. if head ~= nil then
  1612. local targ = head.Position - Part.Position
  1613. local mag = targ.magnitude
  1614. if magni >= mag and c.Name ~= Player.Name then
  1615. Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "rbxassetid://231917784", 1)
  1616. end
  1617. end
  1618. end
  1619. end
  1620. end
  1621.  
  1622. function MagniDamageWithEffect(Part, magni, mindam, maxdam, knock, Type)
  1623. for _, c in pairs(workspace:children()) do
  1624. local hum = c:findFirstChild("Humanoid")
  1625. if hum ~= nil then
  1626. local head = c:findFirstChild("Torso")
  1627. if head ~= nil then
  1628. local targ = head.Position - Part.Position
  1629. local mag = targ.magnitude
  1630. if magni >= mag and c.Name ~= Player.Name then
  1631. --MagicBlock(BrickColor.new("Pastel light blue"),head.CFrame,5,5,5,1,1,1,0.05)
  1632. Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "rbxassetid://231917784", 1)
  1633. end
  1634. end
  1635. end
  1636. end
  1637. end
  1638. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1639. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1640. end
  1641.  
  1642. function SkullEffect(brickcolor,cframe,x1,y1,z1,delay)
  1643. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1644. prt.Anchored=true
  1645. prt.CFrame=cframe
  1646. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1))
  1647. --http://www.roblox.com/asset/?id=4770560
  1648. game:GetService("Debris"):AddItem(prt,2)
  1649. CF=prt.CFrame
  1650. coroutine.resume(coroutine.create(function(Part,Mesh,TehCF)
  1651. for i=0,1,0.2 do
  1652. wait()
  1653. Part.CFrame=CF*cf(0,0,-0.4)
  1654. end
  1655. for i=0,1,delay do
  1656. wait()
  1657. --Part.CFrame=CF*cf((math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5)
  1658. Mesh.Scale=Mesh.Scale
  1659. end
  1660. for i=0,1,0.1 do
  1661. wait()
  1662. Part.Transparency=i
  1663. end
  1664. Part.Parent=nil
  1665. end),prt,msh,CF)
  1666. end
  1667.  
  1668. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1669. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1670. prt.Anchored=true
  1671. prt.Material = "Neon"
  1672. prt.CFrame=cframe
  1673. prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1674. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1675. game:GetService("Debris"):AddItem(prt,5)
  1676. coroutine.resume(coroutine.create(function(Part,Mesh)
  1677. for i=0,1,delay do
  1678. swait()
  1679. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1680. Part.Transparency=i
  1681. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1682. end
  1683. Part.Parent=nil
  1684. end),prt,msh)
  1685. end
  1686.  
  1687. function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
  1688. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1689. prt.Anchored=true
  1690. prt.Material = "Neon"
  1691. prt.CFrame=cframe
  1692. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1693. game:GetService("Debris"):AddItem(prt,5)
  1694. coroutine.resume(coroutine.create(function(Part,Mesh)
  1695. local rtype = rottype
  1696. for i=0,1,delay do
  1697. swait()
  1698. if rtype == 1 then
  1699. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1700. elseif rtype == 2 then
  1701. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1702. end
  1703. Part.Transparency=i
  1704. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1705. end
  1706. Part.Parent=nil
  1707. end),prt,msh)
  1708. end
  1709.  
  1710. function MagicSphere(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1711. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1712. prt.Anchored=true
  1713. prt.CFrame=cframe
  1714. prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1715. msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1716. game:GetService("Debris"):AddItem(prt,5)
  1717. coroutine.resume(coroutine.create(function(Part,Mesh)
  1718. for i=0,1,delay do
  1719. wait()
  1720. Part.Transparency=i
  1721. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1722. end
  1723. Part.Parent=nil
  1724. end),prt,msh)
  1725. end
  1726.  
  1727. function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
  1728. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1729. prt.Anchored=true
  1730. prt.Material = "Neon"
  1731. prt.CFrame=cframe
  1732. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1733. game:GetService("Debris"):AddItem(prt,5)
  1734. coroutine.resume(coroutine.create(function(Part,Mesh)
  1735. local rtype = rottype
  1736. for i=0,1,delay do
  1737. swait()
  1738. if rtype == 1 then
  1739. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1740. elseif rtype == 2 then
  1741. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1742. end
  1743. Part.Transparency=i
  1744. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1745. end
  1746. Part.Parent=nil
  1747. end),prt,msh)
  1748. end
  1749.  
  1750. function MagicShock(brickcolor,cframe,x1,y1,x3,y3,delay,rottype)
  1751. local prt=part(3,char,1,1,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1752. prt.Anchored=true
  1753. prt.Material = "Neon"
  1754. prt.CFrame=cframe
  1755. local dec = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt)
  1756. local dec2 = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt)
  1757. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
  1758. game:GetService("Debris"):AddItem(prt,5)
  1759. coroutine.resume(coroutine.create(function(Part,Mesh)
  1760. local rtype = rottype
  1761. for i=0,1,delay do
  1762. swait()
  1763. if rtype == 1 then
  1764. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1765. elseif rtype == 2 then
  1766. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1767. end
  1768. dec.Transparency=i
  1769. dec2.Transparency=i
  1770. Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
  1771. end
  1772. Part.Parent=nil
  1773. end),prt,msh)
  1774. end
  1775.  
  1776. function MagicShockAlt(brickcolor,cframe,x1,y1,x3,y3,delay,rottype)
  1777. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1778. prt.Anchored=true
  1779. prt.Material = "Neon"
  1780. prt.CFrame=cframe
  1781. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
  1782. game:GetService("Debris"):AddItem(prt,5)
  1783. coroutine.resume(coroutine.create(function(Part,Mesh)
  1784. local rtype = rottype
  1785. for i=0,1,delay do
  1786. swait()
  1787. if rtype == 1 then
  1788. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1789. elseif rtype == 2 then
  1790. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1791. end
  1792. prt.Transparency=i
  1793. Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
  1794. end
  1795. Part.Parent=nil
  1796. end),prt,msh)
  1797. end
  1798.  
  1799. function MagicShockAltCircle(brickcolor,cframe,x1,z1,x3,z3,delay,rottype)
  1800. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1801. prt.Anchored=true
  1802. prt.Material = "Neon"
  1803. prt.CFrame=cframe
  1804. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,1,z1))
  1805. game:GetService("Debris"):AddItem(prt,5)
  1806. coroutine.resume(coroutine.create(function(Part,Mesh)
  1807. local rtype = rottype
  1808. for i=0,1,delay do
  1809. swait()
  1810. if rtype == 1 then
  1811. prt.CFrame = prt.CFrame*CFrame.Angles(0,0.1,0)
  1812. elseif rtype == 2 then
  1813. prt.CFrame = prt.CFrame*CFrame.Angles(0,-0.1,0)
  1814. end
  1815. prt.Transparency=i
  1816. Mesh.Scale=Mesh.Scale+vt(x3,0,z3)
  1817. end
  1818. Part.Parent=nil
  1819. end),prt,msh)
  1820. end
  1821. function MagicShockTrailAlt(brickcolor,cframe,x1,y1,z1,x3,y3,delay,rottype)
  1822. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1823. prt.Anchored=true
  1824. prt.Material = "Neon"
  1825. prt.CFrame=cframe
  1826. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1827. game:GetService("Debris"):AddItem(prt,5)
  1828. coroutine.resume(coroutine.create(function(Part,Mesh)
  1829. local rtype = rottype
  1830. for i=0,1,delay do
  1831. swait()
  1832. if rtype == 1 then
  1833. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1834. elseif rtype == 2 then
  1835. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1836. end
  1837. prt.Transparency=i
  1838. Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
  1839. end
  1840. Part.Parent=nil
  1841. end),prt,msh)
  1842. end
  1843.  
  1844. function MagicShockTrailAlt2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
  1845. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1846. prt.Anchored=true
  1847. prt.Material = "Neon"
  1848. prt.CFrame=cframe
  1849. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1850. game:GetService("Debris"):AddItem(prt,5)
  1851. coroutine.resume(coroutine.create(function(Part,Mesh)
  1852. local rtype = rottype
  1853. for i=0,1,delay do
  1854. swait()
  1855. if rtype == 1 then
  1856. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1857. elseif rtype == 2 then
  1858. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1859. end
  1860. prt.Transparency=i
  1861. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1862. end
  1863. Part.Parent=nil
  1864. end),prt,msh)
  1865. end
  1866.  
  1867. function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
  1868. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1869. prt.Anchored=false
  1870. prt.CFrame=cframe
  1871. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1872. local wld=weld(prt,prt,Parent,cframe)
  1873. game:GetService("Debris"):AddItem(prt,5)
  1874. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  1875. for i=0,1,delay do
  1876. wait()
  1877. Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe
  1878. --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1879. Part.Transparency=i
  1880. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1881. end
  1882. Part.Parent=nil
  1883. end),prt,msh,wld)
  1884. end
  1885.  
  1886. function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
  1887. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1888. prt.Anchored=false
  1889. prt.CFrame=cframe
  1890. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1891. local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0))
  1892. game:GetService("Debris"):AddItem(prt,5)
  1893. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  1894. for i=0,1,delay do
  1895. wait()
  1896. Weld.C0=euler(i*20,0,0)
  1897. --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1898. Part.Transparency=i
  1899. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1900. end
  1901. Part.Parent=nil
  1902. end),prt,msh,wld)
  1903. end
  1904.  
  1905. function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1906. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1907. prt.Anchored=true
  1908. prt.CFrame=cframe
  1909. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1910. game:GetService("Debris"):AddItem(prt,2)
  1911. coroutine.resume(coroutine.create(function(Part,Mesh)
  1912. for i=0,1,delay do
  1913. wait()
  1914. Part.CFrame=Part.CFrame
  1915. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1916. local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1917. prt2.Anchored=true
  1918. prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1919. local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  1920. game:GetService("Debris"):AddItem(prt2,2)
  1921. coroutine.resume(coroutine.create(function(Part,Mesh)
  1922. for i=0,1,0.1 do
  1923. wait()
  1924. Part.CFrame=Part.CFrame*cf(0,0.5,0)
  1925. end
  1926. Part.Parent=nil
  1927. end),prt2,msh2)
  1928. end
  1929. for i=0,1,delay*2 do
  1930. wait()
  1931. Part.CFrame=Part.CFrame
  1932. Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i)
  1933. end
  1934. Part.Parent=nil
  1935. end),prt,msh)
  1936. end
  1937.  
  1938. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1939. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1940. prt.Anchored=true
  1941. prt.CFrame=cframe
  1942. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1943. game:GetService("Debris"):AddItem(prt,2)
  1944. coroutine.resume(coroutine.create(function(Part,Mesh)
  1945. for i=0,1,delay do
  1946. wait()
  1947. Part.CFrame=Part.CFrame
  1948. Part.Transparency=i
  1949. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1950. end
  1951. Part.Parent=nil
  1952. end),prt,msh)
  1953. end
  1954.  
  1955. function BreakEffect(brickcolor,cframe,x1,y1,z1)
  1956. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1957. prt.Anchored=true
  1958. prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1959. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1960. game:GetService("Debris"):AddItem(prt,2)
  1961. coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb)
  1962. CF=Part.CFrame
  1963. Numbb=0
  1964. randnumb=math.random()/10
  1965. rand1=math.random()/10
  1966. for i=0,1,rand1 do
  1967. wait()
  1968. CF=CF*cf(0,math.random()/2,0)
  1969. --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0)
  1970. Part.CFrame=CF*euler(Numbb,0,0)
  1971. Part.Transparency=i
  1972. Numbb=Numbb+randnumb
  1973. end
  1974. Part.Parent=nil
  1975. end),prt,CF,Numbb,randnumb)
  1976. end
  1977.  
  1978. function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1979. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1980. prt.Anchored=true
  1981. prt.CFrame=cframe
  1982. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
  1983. game:GetService("Debris"):AddItem(prt,5)
  1984. coroutine.resume(coroutine.create(function(Part,Mesh)
  1985. for i=0,1,delay do
  1986. wait()
  1987. Part.CFrame=Part.CFrame*euler(0,0.7,0)
  1988. Part.Transparency=i
  1989. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1990. end
  1991. Part.Parent=nil
  1992. end),prt,msh)
  1993. end
  1994.  
  1995. function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1996. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1997. prt.Anchored=true
  1998. prt.CFrame=cframe
  1999. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  2000. game:GetService("Debris"):AddItem(prt,2)
  2001. coroutine.resume(coroutine.create(function(Part,Mesh)
  2002. for i=0,1,delay do
  2003. wait()
  2004. Part.CFrame=Part.CFrame*cf(0,y3/2,0)
  2005. Part.Transparency=i
  2006. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  2007. end
  2008. Part.Parent=nil
  2009. end),prt,msh)
  2010. end
  2011.  
  2012. function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay)
  2013. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  2014. prt.Anchored=true
  2015. prt.CFrame=cframe*cf(x,y,z)
  2016. msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://168892363",vt(0,0,0),vt(x1,y1,z1))
  2017. game:GetService("Debris"):AddItem(prt,5)
  2018. coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee)
  2019. local num=math.random()
  2020. local num2=math.random(-3,2)+math.random()
  2021. local numm=0
  2022. for i=0,1,delay*2 do
  2023. swait()
  2024. Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0)
  2025. Part.Transparency=i
  2026. numm=numm+0.01
  2027. end
  2028. Part.Parent=nil
  2029. Mesh.Parent=nil
  2030. end),prt,msh,x,y,z)
  2031. end
  2032.  
  2033. function dmgstart(dmg,what)
  2034. hitcon = what.Touched:connect(function(hit)
  2035. local hum = hit.Parent:FindFirstChild("Humanoid")
  2036. if hum and not hum:IsDescendantOf(Character) then
  2037. hum:TakeDamage(dmg)
  2038. end
  2039. end)
  2040. end
  2041.  
  2042. function dmgstop()
  2043. hitcon:disconnect()
  2044. end
  2045.  
  2046. function Cloak()
  2047. Face.Parent=nil
  2048. cloaked=true
  2049. for _,v in pairs(Torso.Parent:children()) do
  2050. if v.className=="Part" and v.Name~="HumanoidRootPart" then
  2051. coroutine.resume(coroutine.create(function()
  2052. for i=0,1,0.2 do
  2053. wait()
  2054. v.Transparency=i
  2055. end
  2056. v.Transparency=1
  2057. end))
  2058. end
  2059. if v.className=="Hat" then
  2060. hatp=v.Handle
  2061. coroutine.resume(coroutine.create(function(derp)
  2062. for i=0,1,0.2 do
  2063. wait()
  2064. derp.Transparency=i
  2065. end
  2066. derp.Transparency=1
  2067. end),hatp)
  2068. end
  2069. end
  2070. for _,v in pairs(m:children()) do
  2071. if v.className=="Part" then
  2072. coroutine.resume(coroutine.create(function()
  2073. for i=0,1,0.2 do
  2074. wait()
  2075. v.Transparency=i
  2076. end
  2077. v.Transparency=1
  2078. end))
  2079. end
  2080. end
  2081. end
  2082.  
  2083. function UnCloak()
  2084. so("http://roblox.com/asset/?id=2767090",Torso,1,1.1)
  2085. Face.Parent=Head
  2086. cloaked=false
  2087. for _,v in pairs(Torso.Parent:children()) do
  2088. if v.className=="Part" and v.Name~="HumanoidRootPart" then
  2089. coroutine.resume(coroutine.create(function()
  2090. for i=0,1,0.1 do
  2091. wait()
  2092. v.Transparency=v.Transparency-0.1
  2093. end
  2094. v.Transparency=0
  2095. end))
  2096. end
  2097. if v.className=="Hat" then
  2098. hatp=v.Handle
  2099. coroutine.resume(coroutine.create(function(derp)
  2100. for i=0,1,0.1 do
  2101. wait()
  2102. derp.Transparency=derp.Transparency-0.1
  2103. end
  2104. derp.Transparency=0
  2105. end),hatp)
  2106. end
  2107. end
  2108. for _,v in pairs(m:children()) do
  2109. if v.className=="Part" and v.Name~="hitbox" and v.Name~='tip' then
  2110. coroutine.resume(coroutine.create(function()
  2111. for i=0,1,0.1 do
  2112. wait()
  2113. v.Transparency=v.Transparency-0.1
  2114. end
  2115. v.Transparency=0
  2116. end))
  2117. v.Transparency=0
  2118. end
  2119. end
  2120. end
  2121.  
  2122. local origcolor = BrickColor.new("Pastel light blue")
  2123. ---- This section of explosions.
  2124.  
  2125. ----
  2126.  
  2127.  
  2128. function ring(type,pos,scale,value)
  2129. local type = type
  2130. local rng = Instance.new("Part", char)
  2131. rng.Anchored = true
  2132. rng.BrickColor = origcolor
  2133. rng.CanCollide = false
  2134. rng.FormFactor = 3
  2135. rng.Name = "Ring"
  2136. rng.Size = Vector3.new(1, 1, 1)
  2137. rng.Transparency = 0
  2138. rng.TopSurface = 0
  2139. rng.BottomSurface = 0
  2140. rng.CFrame = pos
  2141. local rngm = Instance.new("SpecialMesh", rng)
  2142. rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  2143. rngm.Scale = scale
  2144. local scaler2 = 1
  2145. if type == "Add" then
  2146. scaler2 = 1*value
  2147. elseif type == "Divide" then
  2148. scaler2 = 1/value
  2149. end
  2150. coroutine.resume(coroutine.create(function()
  2151. for i = 0,10,0.1 do
  2152. swait()
  2153. if type == "Add" then
  2154. scaler2 = scaler2 - 0.01*value
  2155. elseif type == "Divide" then
  2156. scaler2 = scaler2 - 0.01/value
  2157. end
  2158. rng.Transparency = rng.Transparency + 0.01
  2159. rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0)
  2160. end
  2161. rng:Destroy()
  2162. end))
  2163. end
  2164.  
  2165.  
  2166. function wave(type,pos,scale,value)
  2167. local type = type
  2168. local rng = Instance.new("Part", char)
  2169. rng.Anchored = true
  2170. rng.BrickColor = origcolor
  2171. rng.CanCollide = false
  2172. rng.FormFactor = 3
  2173. rng.Name = "Ring"
  2174. rng.Size = Vector3.new(1, 1, 1)
  2175. rng.Transparency = 0
  2176. rng.TopSurface = 0
  2177. rng.BottomSurface = 0
  2178. rng.CFrame = pos
  2179. local rngm = Instance.new("SpecialMesh", rng)
  2180. rngm.MeshId = "http://www.roblox.com/asset/?id=20329976"
  2181. rngm.Scale = scale
  2182. local scaler2 = 1
  2183. if type == "Add" then
  2184. scaler2 = 1*value
  2185. elseif type == "Divide" then
  2186. scaler2 = 1/value
  2187. end
  2188. coroutine.resume(coroutine.create(function()
  2189. for i = 0,10,0.1 do
  2190. swait()
  2191. if type == "Add" then
  2192. scaler2 = scaler2 - 0.01*value
  2193. elseif type == "Divide" then
  2194. scaler2 = scaler2 - 0.01/value
  2195. end
  2196. rng.Transparency = rng.Transparency + 0.01
  2197. rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, scaler2)
  2198. end
  2199. rng:Destroy()
  2200. end))
  2201. end
  2202.  
  2203. function wind(type,pos,scale,value,speed)
  2204. local type = type
  2205. local rng = Instance.new("Part", char)
  2206. rng.Anchored = true
  2207. rng.BrickColor = origcolor
  2208. rng.CanCollide = false
  2209. rng.FormFactor = 3
  2210. rng.Name = "Ring"
  2211. rng.Size = Vector3.new(1, 1, 1)
  2212. rng.Transparency = 0
  2213. rng.TopSurface = 0
  2214. rng.BottomSurface = 0
  2215. rng.CFrame = pos
  2216. local rngm = Instance.new("SpecialMesh", rng)
  2217. rngm.MeshId = "http://www.roblox.com/asset/?id=1051557"
  2218. rngm.Scale = scale
  2219. local scaler2 = 1
  2220. if type == "Add" then
  2221. scaler2 = 1*value
  2222. elseif type == "Divide" then
  2223. scaler2 = 1/value
  2224. end
  2225. coroutine.resume(coroutine.create(function()
  2226. for i = 0,10,0.1 do
  2227. swait()
  2228. if type == "Add" then
  2229. scaler2 = scaler2 - 0.01*value
  2230. elseif type == "Divide" then
  2231. scaler2 = scaler2 - 0.01/value
  2232. end
  2233. rng.CFrame = rng.CFrame*CFrame.Angles(0,0.025*speed,0)
  2234. rng.Transparency = rng.Transparency + 0.01
  2235. rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, scaler2)
  2236. end
  2237. rng:Destroy()
  2238. end))
  2239. end
  2240.  
  2241. function groundwind(type,pos,scale,value,speed)
  2242. local type = type
  2243. local rng = Instance.new("Part", char)
  2244. rng.Anchored = true
  2245. rng.BrickColor = origcolor
  2246. rng.CanCollide = false
  2247. rng.FormFactor = 3
  2248. rng.Name = "Ring"
  2249. rng.Size = Vector3.new(1, 1, 1)
  2250. rng.Transparency = 0
  2251. rng.TopSurface = 0
  2252. rng.BottomSurface = 0
  2253. rng.CFrame = pos
  2254. local rngm = Instance.new("SpecialMesh", rng)
  2255. rngm.MeshId = "http://www.roblox.com/asset/?id=1051557"
  2256. rngm.Scale = scale
  2257. local scaler2 = 1
  2258. if type == "Add" then
  2259. scaler2 = 1*value
  2260. elseif type == "Divide" then
  2261. scaler2 = 1/value
  2262. end
  2263. coroutine.resume(coroutine.create(function()
  2264. for i = 0,10,0.1 do
  2265. swait()
  2266. if type == "Add" then
  2267. scaler2 = scaler2 - 0.01*value
  2268. elseif type == "Divide" then
  2269. scaler2 = scaler2 - 0.01/value
  2270. end
  2271. rng.CFrame = rng.CFrame*CFrame.Angles(0,0.025*speed,0)
  2272. rng.Transparency = rng.Transparency + 0.01
  2273. rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2/5, scaler2)
  2274. end
  2275. rng:Destroy()
  2276. end))
  2277. end
  2278.  
  2279. function CameraManager()
  2280. if TwoD and not CamInterrupt then
  2281. if Humanoid.Health > 0 then
  2282. Camera.CameraSubject = Humanoid
  2283. Camera.CameraType = "Scriptable"
  2284. Humanoid.AutoRotate = false
  2285. if Booleans.GyroUse then
  2286. Directer.MaxTorque = Vec3(0, huge, 0)
  2287. else
  2288. Directer.MaxTorque = Vec3(0, 0, 0)
  2289. end
  2290. if TargetInfo[1] ~= nil and TargetInfo[2] ~= nil then
  2291. if Booleans.CamFollow then
  2292. CPart.CFrame = cFrame(RootPart.Position, Vec3(TargetInfo[1].Position.X, RootPart.Position.Y, TargetInfo[1].Position.Z))
  2293. Directer.CFrame = cFrame((RootPart.CFrame * cFrame(0, 0, 10)).p, TargetInfo[1].Position)
  2294. else
  2295. CPart.Position = RootPart.Position
  2296. end
  2297. else
  2298. local ahead = (RootPart.CFrame * cFrame(0, 0, -3)).p
  2299. CPart.CFrame = cFrame(RootPart.Position, Vec3(ahead.X, RootPart.Position.Y, ahead.Z))
  2300. end
  2301. Camera.CFrame = lerp(Camera.CFrame, CPart.CFrame * cFrame(25, 3, 0) * Euler(0, radian(90), 0), 0.2)
  2302. else
  2303. Camera.CameraSubject = Humanoid
  2304. Camera.CameraType = "Custom"
  2305. end
  2306. end
  2307. end
  2308.  
  2309. function ring(type,pos,scale,value)
  2310. local type = type
  2311. local rng = Instance.new("Part", char)
  2312. rng.Anchored = true
  2313. rng.BrickColor = origcolor
  2314. rng.CanCollide = false
  2315. rng.FormFactor = 3
  2316. rng.Name = "Ring"
  2317. rng.Size = Vector3.new(1, 1, 1)
  2318. rng.Transparency = 0
  2319. rng.TopSurface = 0
  2320. rng.BottomSurface = 0
  2321. rng.CFrame = pos
  2322. local rngm = Instance.new("SpecialMesh", rng)
  2323. rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  2324. rngm.Scale = scale
  2325. local scaler2 = 1
  2326. if type == "Add" then
  2327. scaler2 = 1*value
  2328. elseif type == "Divide" then
  2329. scaler2 = 1/value
  2330. end
  2331. coroutine.resume(coroutine.create(function()
  2332. for i = 0,10,0.1 do
  2333. swait()
  2334. if type == "Add" then
  2335. scaler2 = scaler2 - 0.01*value
  2336. elseif type == "Divide" then
  2337. scaler2 = scaler2 - 0.01/value
  2338. end
  2339. rng.Transparency = rng.Transparency + 0.01
  2340. rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0)
  2341. end
  2342. rng:Destroy()
  2343. end))
  2344. end
  2345.  
  2346.  
  2347. function wave(type,pos,scale,value)
  2348. local type = type
  2349. local rng = Instance.new("Part", char)
  2350. rng.Anchored = true
  2351. rng.BrickColor = origcolor
  2352. rng.CanCollide = false
  2353. rng.FormFactor = 3
  2354. rng.Name = "Ring"
  2355. rng.Size = Vector3.new(1, 1, 1)
  2356. rng.Transparency = 0
  2357. rng.TopSurface = 0
  2358. rng.BottomSurface = 0
  2359. rng.CFrame = pos
  2360. local rngm = Instance.new("SpecialMesh", rng)
  2361. rngm.MeshId = "http://www.roblox.com/asset/?id=20329976"
  2362. rngm.Scale = scale
  2363. local scaler2 = 1
  2364. if type == "Add" then
  2365. scaler2 = 1*value
  2366. elseif type == "Divide" then
  2367. scaler2 = 1/value
  2368. end
  2369. coroutine.resume(coroutine.create(function()
  2370. for i = 0,10,0.1 do
  2371. swait()
  2372. if type == "Add" then
  2373. scaler2 = scaler2 - 0.01*value
  2374. elseif type == "Divide" then
  2375. scaler2 = scaler2 - 0.01/value
  2376. end
  2377. rng.Transparency = rng.Transparency + 0.01
  2378. rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, scaler2)
  2379. end
  2380. rng:Destroy()
  2381. end))
  2382. end
  2383.  
  2384. function sphere(bonuspeed,type,pos,scale,value,color)
  2385. local type = type
  2386. local rng = Instance.new("Part", char)
  2387. rng.Anchored = true
  2388. if ModeOfGlitch ~= 9 then
  2389. rng.BrickColor = color
  2390. elseif ModeOfGlitch == 9 then
  2391. rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
  2392. end
  2393. rng.CanCollide = false
  2394. rng.FormFactor = 3
  2395. rng.Name = "Ring"
  2396. rng.Material = "Neon"
  2397. rng.Size = Vector3.new(1, 1, 1)
  2398. rng.Transparency = 0
  2399. rng.TopSurface = 0
  2400. rng.BottomSurface = 0
  2401. rng.CFrame = pos
  2402. local rngm = Instance.new("SpecialMesh", rng)
  2403. rngm.MeshType = "Sphere"
  2404. rngm.Scale = scale
  2405. if rainbowmode == true then
  2406. rng.Color = Color3.new(r/255,g/255,b/255)
  2407. end
  2408. if ModeOfGlitch == 9 then
  2409. coroutine.resume(coroutine.create(function()
  2410. while true do
  2411. swait()
  2412. if rng.Parent ~= nil then
  2413. rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
  2414. else
  2415. break
  2416. end
  2417. end
  2418. end))
  2419. end
  2420. local scaler2 = 1
  2421. if type == "Add" then
  2422. scaler2 = 1*value
  2423. elseif type == "Divide" then
  2424. scaler2 = 1/value
  2425. end
  2426. coroutine.resume(coroutine.create(function()
  2427. for i = 0,10/bonuspeed,0.1 do
  2428. swait()
  2429. if rainbowmode == true then
  2430. rng.Color = Color3.new(r/255,g/255,b/255)
  2431. end
  2432. if type == "Add" then
  2433. scaler2 = scaler2 - 0.01*value/bonuspeed
  2434. elseif type == "Divide" then
  2435. scaler2 = scaler2 - 0.01/value*bonuspeed
  2436. end
  2437. if chaosmode == true then
  2438. rng.BrickColor = BrickColor.random()
  2439. end
  2440. rng.Transparency = rng.Transparency + 0.01*bonuspeed
  2441. rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
  2442. end
  2443. rng:Destroy()
  2444. end))
  2445. end
  2446.  
  2447. function sphere2(bonuspeed,type,pos,scale,value,value2,value3,color)
  2448. local type = type
  2449. local rng = Instance.new("Part", char)
  2450. rng.Anchored = true
  2451. if ModeOfGlitch ~= 9 then
  2452. rng.BrickColor = color
  2453. elseif ModeOfGlitch == 9 then
  2454. rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
  2455. end
  2456. rng.CanCollide = false
  2457. rng.FormFactor = 3
  2458. rng.Name = "Ring"
  2459. rng.Material = "Neon"
  2460. rng.Size = Vector3.new(1, 1, 1)
  2461. rng.Transparency = 0
  2462. rng.TopSurface = 0
  2463. rng.BottomSurface = 0
  2464. rng.CFrame = pos
  2465. local rngm = Instance.new("SpecialMesh", rng)
  2466. rngm.MeshType = "Sphere"
  2467. rngm.Scale = scale
  2468. local scaler2 = 1
  2469. local scaler2b = 1
  2470. local scaler2c = 1
  2471. if type == "Add" then
  2472. scaler2 = 1*value
  2473. scaler2b = 1*value2
  2474. scaler2c = 1*value3
  2475. elseif type == "Divide" then
  2476. scaler2 = 1/value
  2477. scaler2b = 1/value2
  2478. scaler2c = 1/value3
  2479. end
  2480. if ModeOfGlitch == 9 then
  2481. coroutine.resume(coroutine.create(function()
  2482. while true do
  2483. swait()
  2484. if rng.Parent ~= nil then
  2485. rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
  2486. else
  2487. break
  2488. end
  2489. end
  2490. end))
  2491. end
  2492. coroutine.resume(coroutine.create(function()
  2493. for i = 0,10/bonuspeed,0.1 do
  2494. swait()
  2495. if type == "Add" then
  2496. scaler2 = scaler2 - 0.01*value/bonuspeed
  2497. scaler2b = scaler2b - 0.01*value/bonuspeed
  2498. scaler2c = scaler2c - 0.01*value/bonuspeed
  2499. elseif type == "Divide" then
  2500. scaler2 = scaler2 - 0.01/value*bonuspeed
  2501. scaler2b = scaler2b - 0.01/value*bonuspeed
  2502. scaler2c = scaler2c - 0.01/value*bonuspeed
  2503. end
  2504. rng.Transparency = rng.Transparency + 0.01*bonuspeed
  2505. rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2b*bonuspeed, scaler2c*bonuspeed)
  2506. end
  2507. rng:Destroy()
  2508. end))
  2509. end
  2510.  
  2511. function slash(bonuspeed,rotspeed,rotatingop,typeofshape,type,typeoftrans,pos,scale,value,color)
  2512. local type = type
  2513. local rotenable = rotatingop
  2514. local rng = Instance.new("Part", char)
  2515. rng.Anchored = true
  2516. rng.BrickColor = color
  2517. rng.CanCollide = false
  2518. rng.FormFactor = 3
  2519. rng.Name = "Ring"
  2520. rng.Material = "Neon"
  2521. rng.Size = Vector3.new(1, 1, 1)
  2522. rng.Transparency = 0
  2523. if typeoftrans == "In" then
  2524. rng.Transparency = 1
  2525. end
  2526. rng.TopSurface = 0
  2527. rng.BottomSurface = 0
  2528. rng.CFrame = pos
  2529. local rngm = Instance.new("SpecialMesh", rng)
  2530. rngm.MeshType = "FileMesh"
  2531. if typeofshape == "Normal" then
  2532. rngm.MeshId = "rbxassetid://662586858"
  2533. elseif typeofshape == "Round" then
  2534. rngm.MeshId = "rbxassetid://662585058"
  2535. end
  2536. rngm.Scale = scale
  2537. local scaler2 = 1/10
  2538. if type == "Add" then
  2539. scaler2 = 1*value/10
  2540. elseif type == "Divide" then
  2541. scaler2 = 1/value/10
  2542. end
  2543. local randomrot = math.random(1,2)
  2544. coroutine.resume(coroutine.create(function()
  2545. for i = 0,10/bonuspeed,0.1 do
  2546. swait()
  2547. if type == "Add" then
  2548. scaler2 = scaler2 - 0.01*value/bonuspeed/10
  2549. elseif type == "Divide" then
  2550. scaler2 = scaler2 - 0.01/value*bonuspeed/10
  2551. end
  2552. if rotenable == true then
  2553. if randomrot == 1 then
  2554. rng.CFrame = rng.CFrame*CFrame.Angles(0,math.rad(rotspeed*bonuspeed/2),0)
  2555. elseif randomrot == 2 then
  2556. rng.CFrame = rng.CFrame*CFrame.Angles(0,math.rad(-rotspeed*bonuspeed/2),0)
  2557. end
  2558. end
  2559. if typeoftrans == "Out" then
  2560. rng.Transparency = rng.Transparency + 0.01*bonuspeed
  2561. elseif typeoftrans == "In" then
  2562. rng.Transparency = rng.Transparency - 0.01*bonuspeed
  2563. end
  2564. rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed/10, 0, scaler2*bonuspeed/10)
  2565. end
  2566. rng:Destroy()
  2567. end))
  2568. end
  2569.  
  2570. function PixelBlock(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
  2571. local type = type
  2572. local rng = Instance.new("Part", char)
  2573. rng.Anchored = true
  2574. rng.BrickColor = color
  2575. rng.CanCollide = false
  2576. rng.FormFactor = 3
  2577. rng.Name = "Ring"
  2578. rng.Material = "Neon"
  2579. rng.Size = Vector3.new(1, 1, 1)
  2580. rng.Transparency = 0
  2581. rng.TopSurface = 0
  2582. rng.BottomSurface = 0
  2583. rng.CFrame = pos
  2584. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
  2585. local rngm = Instance.new("SpecialMesh", rng)
  2586. rngm.MeshType = "Brick"
  2587. rngm.Scale = vt(x1,y1,z1)
  2588. if rainbowmode == true then
  2589. rng.Color = Color3.new(r/255,g/255,b/255)
  2590. end
  2591. local scaler2 = 1
  2592. local speeder = FastSpeed/10
  2593. if type == "Add" then
  2594. scaler2 = 1*value
  2595. elseif type == "Divide" then
  2596. scaler2 = 1/value
  2597. end
  2598. coroutine.resume(coroutine.create(function()
  2599. for i = 0,10/bonuspeed,0.1 do
  2600. swait()
  2601. if rainbowmode == true then
  2602. rng.Color = Color3.new(r/255,g/255,b/255)
  2603. end
  2604. if type == "Add" then
  2605. scaler2 = scaler2 - 0.01*value/bonuspeed
  2606. elseif type == "Divide" then
  2607. scaler2 = scaler2 - 0.01/value*bonuspeed
  2608. end
  2609. if chaosmode == true then
  2610. rng.BrickColor = BrickColor.random()
  2611. end
  2612. speeder = speeder - 0.01*FastSpeed*bonuspeed/10
  2613. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
  2614. --rng.Transparency = rng.Transparency + 0.01*bonuspeed
  2615. rngm.Scale = rngm.Scale - Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
  2616. end
  2617. rng:Destroy()
  2618. end))
  2619. end
  2620.  
  2621. function PixelBlockX(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
  2622. local type = type
  2623. local rng = Instance.new("Part", char)
  2624. rng.Anchored = true
  2625. rng.BrickColor = color
  2626. rng.CanCollide = false
  2627. rng.FormFactor = 3
  2628. rng.Name = "Ring"
  2629. rng.Material = "Neon"
  2630. rng.Size = Vector3.new(1, 1, 1)
  2631. rng.Transparency = 0
  2632. rng.TopSurface = 0
  2633. rng.BottomSurface = 0
  2634. rng.CFrame = pos
  2635. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
  2636. local rngm = Instance.new("SpecialMesh", rng)
  2637. rngm.MeshType = "Brick"
  2638. rngm.Scale = vt(x1,y1,z1)
  2639. if rainbowmode == true then
  2640. rng.Color = Color3.new(r/255,g/255,b/255)
  2641. end
  2642. local scaler2 = 1
  2643. local speeder = FastSpeed/10
  2644. if type == "Add" then
  2645. scaler2 = 1*value
  2646. elseif type == "Divide" then
  2647. scaler2 = 1/value
  2648. end
  2649. coroutine.resume(coroutine.create(function()
  2650. for i = 0,10/bonuspeed,0.1 do
  2651. swait()
  2652. if rainbowmode == true then
  2653. rng.Color = Color3.new(r/255,g/255,b/255)
  2654. end
  2655. if type == "Add" then
  2656. scaler2 = scaler2 - 0.01*value/bonuspeed
  2657. elseif type == "Divide" then
  2658. scaler2 = scaler2 - 0.01/value*bonuspeed
  2659. end
  2660. if chaosmode == true then
  2661. rng.BrickColor = BrickColor.random()
  2662. end
  2663. speeder = speeder - 0.01*FastSpeed*bonuspeed/10
  2664. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
  2665. rng.Transparency = rng.Transparency + 0.01*bonuspeed
  2666. rngm.Scale = rngm.Scale - Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
  2667. end
  2668. rng:Destroy()
  2669. end))
  2670. end
  2671.  
  2672. function PixelBlockNeg(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
  2673. local type = type
  2674. local rng = Instance.new("Part", char)
  2675. rng.Anchored = true
  2676. rng.BrickColor = color
  2677. rng.CanCollide = false
  2678. rng.FormFactor = 3
  2679. rng.Name = "Ring"
  2680. rng.Material = "Neon"
  2681. rng.Size = Vector3.new(1, 1, 1)
  2682. rng.Transparency = 0
  2683. rng.TopSurface = 0
  2684. rng.BottomSurface = 0
  2685. rng.CFrame = pos
  2686. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
  2687. local rngm = Instance.new("SpecialMesh", rng)
  2688. rngm.MeshType = "Brick"
  2689. rngm.Scale = vt(x1,y1,z1)
  2690. if rainbowmode == true then
  2691. rng.Color = Color3.new(r/255,g/255,b/255)
  2692. end
  2693. local scaler2 = 0
  2694. local speeder = FastSpeed/10
  2695. if type == "Add" then
  2696. scaler2 = 1*value
  2697. elseif type == "Divide" then
  2698. scaler2 = 1/value
  2699. end
  2700. coroutine.resume(coroutine.create(function()
  2701. for i = 0,10/bonuspeed,0.1 do
  2702. swait()
  2703. if rainbowmode == true then
  2704. rng.Color = Color3.new(r/255,g/255,b/255)
  2705. end
  2706. if type == "Add" then
  2707. scaler2 = scaler2 - 0.01*value/bonuspeed
  2708. elseif type == "Divide" then
  2709. scaler2 = scaler2 - 0.01/value*bonuspeed
  2710. end
  2711. if chaosmode == true then
  2712. rng.BrickColor = BrickColor.random()
  2713. end
  2714. speeder = speeder + 0.01*FastSpeed*bonuspeed/10
  2715. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
  2716. --rng.Transparency = rng.Transparency + 0.01*bonuspeed
  2717. rngm.Scale = rngm.Scale - Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
  2718. end
  2719. rng:Destroy()
  2720. end))
  2721. end
  2722.  
  2723. function block(bonuspeed,type,pos,scale,value,value2,value3,color,color3)
  2724. local type = type
  2725. local rng = Instance.new("Part", char)
  2726. rng.Anchored = true
  2727. rng.BrickColor = color
  2728. rng.Color = color3
  2729. rng.CanCollide = false
  2730. rng.FormFactor = 3
  2731. rng.Name = "Ring"
  2732. rng.Material = "Neon"
  2733. rng.Size = Vector3.new(1, 1, 1)
  2734. rng.Transparency = 0
  2735. rng.TopSurface = 0
  2736. rng.BottomSurface = 0
  2737. rng.CFrame = pos
  2738. local rngm = Instance.new("SpecialMesh", rng)
  2739. rngm.MeshType = "Brick"
  2740. rngm.Scale = scale
  2741. local scaler2 = 1
  2742. local scaler2b = 1
  2743. local scaler2c = 1
  2744. if type == "Add" then
  2745. scaler2 = 1*value
  2746. scaler2b = 1*value2
  2747. scaler2c = 1*value3
  2748. elseif type == "Divide" then
  2749. scaler2 = 1/value
  2750. scaler2b = 1/value2
  2751. scaler2c = 1/value3
  2752. end
  2753. coroutine.resume(coroutine.create(function()
  2754. for i = 0,10/bonuspeed,0.1 do
  2755. swait()
  2756. if type == "Add" then
  2757. scaler2 = scaler2 - 0.01*value/bonuspeed
  2758. scaler2b = scaler2b - 0.01*value/bonuspeed
  2759. scaler2c = scaler2c - 0.01*value/bonuspeed
  2760. elseif type == "Divide" then
  2761. scaler2 = scaler2 - 0.01/value*bonuspeed
  2762. scaler2b = scaler2b - 0.01/value*bonuspeed
  2763. scaler2c = scaler2c - 0.01/value*bonuspeed
  2764. end
  2765. rng.CFrame = rng.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
  2766. rng.Transparency = rng.Transparency + 0.01*bonuspeed
  2767. rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2b*bonuspeed, scaler2c*bonuspeed)
  2768. end
  2769. rng:Destroy()
  2770. end))
  2771. end
  2772.  
  2773. function sphereMK(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
  2774. local type = type
  2775. local rng = Instance.new("Part", char)
  2776. rng.Anchored = true
  2777. if ModeOfGlitch ~= 9 then
  2778. rng.BrickColor = color
  2779. elseif ModeOfGlitch == 9 then
  2780. rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
  2781. end
  2782. rng.CanCollide = false
  2783. rng.FormFactor = 3
  2784. rng.Name = "Ring"
  2785. rng.Material = "Neon"
  2786. rng.Size = Vector3.new(1, 1, 1)
  2787. rng.Transparency = 0
  2788. rng.TopSurface = 0
  2789. rng.BottomSurface = 0
  2790. rng.CFrame = pos
  2791. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
  2792. local rngm = Instance.new("SpecialMesh", rng)
  2793. rngm.MeshType = "Sphere"
  2794. rngm.Scale = vt(x1,y1,z1)
  2795. if rainbowmode == true then
  2796. rng.Color = Color3.new(r/255,g/255,b/255)
  2797. end
  2798. if ModeOfGlitch == 9 then
  2799. coroutine.resume(coroutine.create(function()
  2800. while true do
  2801. swait()
  2802. if rng.Parent ~= nil then
  2803. rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
  2804. else
  2805. break
  2806. end
  2807. end
  2808. end))
  2809. end
  2810. local scaler2 = 1
  2811. local speeder = FastSpeed
  2812. if type == "Add" then
  2813. scaler2 = 1*value
  2814. elseif type == "Divide" then
  2815. scaler2 = 1/value
  2816. end
  2817. coroutine.resume(coroutine.create(function()
  2818. for i = 0,10/bonuspeed,0.1 do
  2819. swait()
  2820. if rainbowmode == true then
  2821. rng.Color = Color3.new(r/255,g/255,b/255)
  2822. end
  2823. if type == "Add" then
  2824. scaler2 = scaler2 - 0.01*value/bonuspeed
  2825. elseif type == "Divide" then
  2826. scaler2 = scaler2 - 0.01/value*bonuspeed
  2827. end
  2828. if chaosmode == true then
  2829. rng.BrickColor = BrickColor.random()
  2830. end
  2831. speeder = speeder - 0.01*FastSpeed*bonuspeed
  2832. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
  2833. rng.Transparency = rng.Transparency + 0.01*bonuspeed
  2834. rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, 0)
  2835. end
  2836. rng:Destroy()
  2837. end))
  2838. end
  2839.  
  2840.  
  2841. function sphereMKCharge(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
  2842. local type = type
  2843. local rng = Instance.new("Part", char)
  2844. rng.Anchored = true
  2845. if ModeOfGlitch ~= 9 then
  2846. rng.BrickColor = color
  2847. elseif ModeOfGlitch == 9 then
  2848. rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
  2849. end
  2850. rng.CanCollide = false
  2851. rng.FormFactor = 3
  2852. rng.Name = "Ring"
  2853. rng.Material = "Neon"
  2854. rng.Size = Vector3.new(1, 1, 1)
  2855. rng.Transparency = 1
  2856. rng.TopSurface = 0
  2857. rng.BottomSurface = 0
  2858. rng.CFrame = pos
  2859. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
  2860. local rngm = Instance.new("SpecialMesh", rng)
  2861. rngm.MeshType = "Sphere"
  2862. rngm.Scale = vt(x1,y1,z1)
  2863. if rainbowmode == true then
  2864. rng.Color = Color3.new(r/255,g/255,b/255)
  2865. end
  2866. if ModeOfGlitch == 9 then
  2867. coroutine.resume(coroutine.create(function()
  2868. while true do
  2869. swait()
  2870. if rng.Parent ~= nil then
  2871. rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
  2872. else
  2873. break
  2874. end
  2875. end
  2876. end))
  2877. end
  2878. local scaler2 = 1
  2879. local speeder = FastSpeed
  2880. if type == "Add" then
  2881. scaler2 = 1*value
  2882. elseif type == "Divide" then
  2883. scaler2 = 1/value
  2884. end
  2885. coroutine.resume(coroutine.create(function()
  2886. for i = 0,10/bonuspeed,0.1 do
  2887. swait()
  2888. if rainbowmode == true then
  2889. rng.Color = Color3.new(r/255,g/255,b/255)
  2890. end
  2891. if type == "Add" then
  2892. scaler2 = scaler2 - 0.01*value/bonuspeed
  2893. elseif type == "Divide" then
  2894. scaler2 = scaler2 - 0.01/value*bonuspeed
  2895. end
  2896. if chaosmode == true then
  2897. rng.BrickColor = BrickColor.random()
  2898. end
  2899. speeder = speeder - 0.01*FastSpeed*bonuspeed
  2900. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
  2901. rng.Transparency = rng.Transparency - 0.01*bonuspeed
  2902. rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, 0)
  2903. end
  2904. rng:Destroy()
  2905. end))
  2906. end
  2907.  
  2908. function dmg(dude)
  2909. if dude.Name ~= Character then
  2910. local keptcolor = BrickColor.new("Really red")
  2911. local bgf = Instance.new("BodyGyro",dude.Head)
  2912. bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(-90),0,0)
  2913. --[[local val = Instance.new("BoolValue",dude)
  2914. val.Name = "IsHit"]]--
  2915. local ds = coroutine.wrap(function()
  2916. dude:WaitForChild("Head"):BreakJoints()
  2917. for i, v in pairs(dude:GetChildren()) do
  2918. if v:IsA("Part") or v:IsA("MeshPart") then
  2919. v.Name = "DEMINISHED"
  2920. end
  2921. end
  2922. wait(0.5)
  2923. targetted = nil
  2924. CFuncs["Sound"].Create("rbxassetid://62339698", char, 0.75, 0.285)
  2925. coroutine.resume(coroutine.create(function()
  2926. for i, v in pairs(dude:GetChildren()) do
  2927. if v:IsA("Accessory") then
  2928. v:Destroy()
  2929. end
  2930. if v:IsA("Humanoid") then
  2931. v:Destroy()
  2932. end
  2933. if v:IsA("CharacterMesh") then
  2934. v:Destroy()
  2935. end
  2936. if v:IsA("Model") then
  2937. v:Destroy()
  2938. end
  2939. if v:IsA("Part") or v:IsA("MeshPart") then
  2940. for x, o in pairs(v:GetChildren()) do
  2941. if o:IsA("Decal") then
  2942. o:Destroy()
  2943. end
  2944. end
  2945. coroutine.resume(coroutine.create(function()
  2946. v.Material = "Neon"
  2947. v.CanCollide = false
  2948. v.Anchored = false
  2949. local bld = Instance.new("ParticleEmitter",v)
  2950. bld.LightEmission = 0.75
  2951. bld.Texture = "rbxassetid://363275192" ---284205403
  2952. bld.Color = ColorSequence.new(keptcolor.Color)
  2953. bld.Rate = 500
  2954. bld.Lifetime = NumberRange.new(1)
  2955. bld.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,2,0),NumberSequenceKeypoint.new(0.8,2.25,0),NumberSequenceKeypoint.new(1,0,0)})
  2956. bld.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.5,0),NumberSequenceKeypoint.new(0.8,0.75,0),NumberSequenceKeypoint.new(1,1,0)})
  2957. bld.Speed = NumberRange.new(2,5)
  2958. bld.VelocitySpread = 50000
  2959. bld.Rotation = NumberRange.new(-500,500)
  2960. bld.RotSpeed = NumberRange.new(-500,500)
  2961. local sbs = Instance.new("BodyPosition", v)
  2962. sbs.P = 3000
  2963. sbs.D = 1000
  2964. sbs.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  2965. sbs.position = v.Position + Vector3.new(math.random(-2,2),10 + math.random(-2,2),math.random(-2,2))
  2966. v.Color = keptcolor.Color
  2967. coroutine.resume(coroutine.create(function()
  2968. for i = 0, 49 do
  2969. swait(1)
  2970. v:BreakJoints()
  2971. v.Transparency = v.Transparency + 0.02
  2972. end
  2973. v:BreakJoints()
  2974. sphere2(1,"Add",v.CFrame,vt(0,0,0),0.1,0.1,0.1,keptcolor)
  2975. CFuncs["Sound"].Create("rbxassetid://1192402877", v, 0.5, 0.75)
  2976. bld.Speed = NumberRange.new(10,25)
  2977. bld.Drag = 5
  2978. bld.Acceleration = vt(0,2,0)
  2979. wait(0.5)
  2980. bld.Enabled = false
  2981. wait(8)
  2982. v:Destroy()
  2983. dude:Destroy()
  2984. end))
  2985. end))
  2986. end
  2987. end
  2988. end))
  2989. end)
  2990. ds()
  2991. end
  2992. end
  2993.  
  2994.  
  2995. function FindNearestHead(Position, Distance, SinglePlayer)
  2996. if SinglePlayer then
  2997. return (SinglePlayer.Torso.CFrame.p - Position).magnitude < Distance
  2998. end
  2999. local List = {}
  3000. for i, v in pairs(workspace:GetChildren()) do
  3001. if v:IsA("Model") then
  3002. if v:findFirstChild("Head") then
  3003. if v ~= Character then
  3004. if (v.Head.Position - Position).magnitude <= Distance then
  3005. table.insert(List, v)
  3006. end
  3007. end
  3008. end
  3009. end
  3010. end
  3011. return List
  3012. end
  3013.  
  3014. function FaceMouse()
  3015. Cam = workspace.CurrentCamera
  3016. return {
  3017. CFrame.new(char.Torso.Position, Vector3.new(getMouseHit().x, char.Torso.Position.y, getMouseHit().z)),
  3018. Vector3.new(getMouseHit().x, getMouseHit().y, getMouseHit().z)
  3019. }
  3020. end
  3021.  
  3022. function FaceMouse2()
  3023. Cam = workspace.CurrentCamera
  3024. return {
  3025. CFrame.new(char.Torso.Position, Vector3.new(getMouseHit().x, getMouseHit().y, getMouseHit().z)),
  3026. Vector3.new(getMouseHit().x, getMouseHit().y, getMouseHit().z)
  3027. }
  3028. end
  3029.  
  3030. local ModeOfGlitch = 1
  3031. -- Functions are ready.
  3032. local storehumanoidWS = 16
  3033.  
  3034. function createBGCircle(size,parent,color)
  3035. local bgui = Instance.new("BillboardGui",parent)
  3036. bgui.Size = UDim2.new(size, 0, size, 0)
  3037. local imgc = Instance.new("ImageLabel",bgui)
  3038. imgc.BackgroundTransparency = 1
  3039. imgc.ImageTransparency = 0
  3040. imgc.Size = UDim2.new(1,0,1,0)
  3041. imgc.Image = "rbxassetid://997291547" --997291547,521073910
  3042. imgc.ImageColor3 = color
  3043. return bgui,imgc
  3044. end
  3045.  
  3046. ----------------------------------- Abilities
  3047. function chatfunc(text)
  3048. coroutine.wrap(function()
  3049. if(Character:FindFirstChild'ChatGUI')then Character.ChatGUI:destroy() end
  3050. local BBG = NewInstance("BillboardGui",Character,{Name='ChatGUI',Size=UDim2.new(0,100,0,40),StudsOffset=Vector3.new(0,2.753,0),Adornee=Head})
  3051. local Txt = NewInstance("TextLabel",BBG,{Text = "",BackgroundTransparency=1,TextColor3=MAINRUINCOLOR.Color,TextStrokeColor3=Color3.new(0,0,0),BorderSizePixel=0,Font=Enum.Font.Arcade,TextSize=28,TextStrokeTransparency=0,Size=UDim2.new(1,0,.5,0)})
  3052. coroutine.resume(coroutine.create(function()
  3053. repeat swait()
  3054. --lol
  3055. until Txt.Transparency > 1
  3056. end))
  3057. for i = 1, #text do
  3058. delay(i/25, function()
  3059. CFuncs.Sound.Create("http://www.roblox.com/asset/?id=418252437", Head, 1, math.random(2,12)/15)
  3060. Txt.Text = text:sub(1,i)
  3061. end)
  3062. end
  3063. delay((#text/25)+2.6, function()
  3064. wait(0.2)
  3065. for i = 1, 15 do
  3066. swait()
  3067. Txt.TextTransparency = Txt.TextTransparency + 1/15
  3068. Txt.TextStrokeTransparency = Txt.TextStrokeTransparency + 1/15
  3069. end
  3070. end)
  3071. delay((#text/25)+3, function()
  3072. BBG:destroy()
  3073. end)
  3074. end)()
  3075. end
  3076.  
  3077. function FillScreen(color,timetowait)
  3078. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  3079. coroutine.resume(coroutine.create(function()
  3080. if v.PlayerGui:FindFirstChild("boiwhat")~= nil then
  3081. v.PlayerGui:FindFirstChild("boiwhat"):destroy()
  3082. end
  3083. local scrg = Instance.new("ScreenGui",v.PlayerGui)
  3084. scrg.Name = "boiwhat"
  3085. local ohno2 = script:WaitForChild("FillScreen").Frame:Clone()
  3086. ohno2.Parent = scrg
  3087. local fvalen = 0.55
  3088. local fval = -0.49
  3089. coroutine.resume(coroutine.create(function()
  3090. while true do
  3091. swait()
  3092. if scrg.Parent ~= nil then
  3093. fvalen = fvalen - 0.0001
  3094. elseif scrg.Parent == nil then
  3095. break
  3096. end
  3097. end
  3098. end))
  3099. local flol = -5
  3100. local flil = 1.6
  3101. coroutine.resume(coroutine.create(function()
  3102. ohno2.BackgroundTransparency = 1
  3103.  
  3104. for i = 0, 40 do
  3105. swait()
  3106. ohno2.BackgroundTransparency = ohno2.BackgroundTransparency - 0.05
  3107. ohno2.BackgroundColor3 = color
  3108. end
  3109. wait(timetowait)
  3110. local valinc = 0
  3111. local vinc2 = 1
  3112. for i = 0, 99 do
  3113. swait()
  3114. vinc2 = vinc2 + 0.25
  3115. valinc = valinc + 0.0001
  3116. flol = flol + valinc
  3117. flil = flil + valinc
  3118. ohno2.BackgroundTransparency = ohno2.BackgroundTransparency + 0.05
  3119.  
  3120. end
  3121. scrg:Destroy()
  3122. end))
  3123. end))
  3124. end
  3125. end
  3126.  
  3127. function BossChatFuncTop(text,represfont,color,color2)
  3128. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  3129. coroutine.resume(coroutine.create(function()
  3130. if v.PlayerGui:FindFirstChild("boi")~= nil then
  3131. v.PlayerGui:FindFirstChild("boi"):destroy()
  3132. end
  3133. local scrg = Instance.new("ScreenGui",v.PlayerGui)
  3134. scrg.Name = "boi"
  3135. local ohno2 = script:WaitForChild("TopBossChat").Frame:Clone()
  3136. ohno2.Parent = scrg
  3137. local ohno = ohno2.TextLabel
  3138. local fvalen = 0.55
  3139. local fval = -0.49
  3140. coroutine.resume(coroutine.create(function()
  3141. while true do
  3142. swait()
  3143. if scrg.Parent ~= nil then
  3144. fvalen = fvalen - 0.0001
  3145. elseif scrg.Parent == nil then
  3146. break
  3147. end
  3148. end
  3149. end))
  3150. local flol = -5
  3151. local flil = 1.6
  3152. coroutine.resume(coroutine.create(function()
  3153. ohno2.BackgroundTransparency = 1
  3154. ohno.TextStrokeTransparency = 1
  3155. ohno.TextTransparency = 1
  3156. for i = 0, 40 do
  3157. swait()
  3158. ohno.Text = ""
  3159. ohno.Font = represfont
  3160. ohno.TextColor3 = color
  3161. ohno.TextStrokeColor3 = color2
  3162. ohno2.BackgroundTransparency = ohno2.BackgroundTransparency - 0.05
  3163. ohno.TextTransparency = ohno.TextTransparency - 0.05
  3164. ohno.TextStrokeTransparency = ohno.TextStrokeTransparency - 0.05
  3165. end
  3166. for i = 1,string.len(text),1 do
  3167. ohno.Text = string.sub(text,1,i)
  3168. wait(0.03)
  3169. end
  3170. wait(1)
  3171. local valinc = 0
  3172. local vinc2 = 1
  3173. for i = 0, 99 do
  3174. swait()
  3175. vinc2 = vinc2 + 0.25
  3176. valinc = valinc + 0.0001
  3177. flol = flol + valinc
  3178. flil = flil + valinc
  3179. ohno2.BackgroundTransparency = ohno2.BackgroundTransparency + 0.05
  3180. ohno.TextTransparency = ohno.TextTransparency + 0.05
  3181. ohno.TextStrokeTransparency = ohno.TextStrokeTransparency + 0.05
  3182.  
  3183. end
  3184. scrg:Destroy()
  3185. end))
  3186. end))
  3187. end
  3188. end
  3189.  
  3190. function Alert(valuetowait)
  3191. CFuncs["Sound"].Create("rbxassetid://963718869", char, 1,1)
  3192. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  3193. if v.PlayerGui:FindFirstChild("Alert")~= nil then
  3194. v.PlayerGui:FindFirstChild("Alert"):destroy()
  3195. end
  3196. local scrg = script.Alert:Clone()
  3197. scrg.Parent = v.PlayerGui
  3198. local MFramee = scrg:FindFirstChildOfClass("Frame")
  3199. local frame1 = MFramee.Frame1
  3200. local frame2 = MFramee.Frame
  3201. local frametxt1 = frame1.TextLabel
  3202. local frametxt2 = frame2.TextLabel
  3203. local DerpzOHDEARLORD = MFramee.Parent.ImageLabel
  3204. coroutine.resume(coroutine.create(function()
  3205. local flol = 1.75
  3206. local flil = 1.6
  3207. for i = 0,50 do
  3208. swait()
  3209. MFramee.BackgroundTransparency = MFramee.BackgroundTransparency - 0.1
  3210. frame1.BackgroundTransparency = frame1.BackgroundTransparency - 0.1
  3211. frame2.BackgroundTransparency = frame2.BackgroundTransparency - 0.1
  3212. frametxt1.TextTransparency = frametxt1.TextTransparency - 0.1
  3213. frametxt2.TextTransparency = frametxt2.TextTransparency - 0.1
  3214. DerpzOHDEARLORD.ImageTransparency = DerpzOHDEARLORD.ImageTransparency - 0.1
  3215. end
  3216. local valinc = 0
  3217. wait(valuetowait)
  3218. for i = 0,50 do
  3219. swait()
  3220. MFramee.BackgroundTransparency = MFramee.BackgroundTransparency + 0.1
  3221. frame1.BackgroundTransparency = frame1.BackgroundTransparency + 0.1
  3222. frame2.BackgroundTransparency = frame2.BackgroundTransparency + 0.1
  3223. frametxt1.TextTransparency = frametxt1.TextTransparency + 0.1
  3224. frametxt2.TextTransparency = frametxt2.TextTransparency + 0.1
  3225. DerpzOHDEARLORD.ImageTransparency = DerpzOHDEARLORD.ImageTransparency + 0.1
  3226. end
  3227.  
  3228. scrg:Destroy()
  3229. end))
  3230. end
  3231. end
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.  
  3249.  
  3250.  
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256.  
  3257.  
  3258.  
  3259. function SayHello()
  3260. chatfunc("Hello! I'm Derpz.")
  3261. attack = true
  3262. hum.WalkSpeed = 0
  3263. for i = 0, 20, 0.1 do
  3264. swait()
  3265. local Alpha = .2
  3266. RootJoint.C0 = RootJoint.C0:lerp(cf(0.1,0 + 0.1 * math.cos(sine/30),0)*angles(math.rad(0),math.rad(-0.1),math.rad(-7.6))*RootCF,Alpha)
  3267. LH.C0 = LH.C0:lerp(cf(-1,-1 - 0.1 * math.cos(sine/30),0.1)*angles(math.rad(0),math.rad(6.9),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3268. RH.C0 = RH.C0:lerp(cf(1,-0.9 - 0.1 * math.cos(sine/30),0.1)*angles(math.rad(2.1),math.rad(-14.8),math.rad(11.4))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3269. LW.C0 = LW.C0:lerp(cf(-1.5,0.9,0)*angles(math.rad(38.8),math.rad(-47.4 + 15 * math.cos(sine/5)),math.rad(-132.5 - 2 * math.cos(sine/5))),Alpha)
  3270. RW.C0 = RW.C0:lerp(cf(1.5,0.5,0.1)*angles(math.rad(-4.8),math.rad(-1),math.rad(11.3)),Alpha)
  3271. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(-0.1,0,0.2)*angles(math.rad(-6.3 + 3 * math.cos(sine/7)),math.rad(0.5),math.rad(-4.9))*necko,Alpha)
  3272. end
  3273. hum.WalkSpeed = storehumanoidWS
  3274. attack = false
  3275. end
  3276. function attackone()
  3277. attack = true
  3278. hum.WalkSpeed = 0
  3279. for i = 0, 2, 0.1 do
  3280. swait()
  3281. local Alpha = .3
  3282. RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,-0.1)*angles(math.rad(-6.5),math.rad(23.5),math.rad(2.3))*RootCF,Alpha)
  3283. LH.C0 = LH.C0:lerp(cf(-0.9,-1,0)*angles(math.rad(-1.8),math.rad(17.6),math.rad(-3.4))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3284. RH.C0 = RH.C0:lerp(cf(1.1,-1,0)*angles(math.rad(-16.6),math.rad(-36.7),math.rad(-12.1))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3285. LW.C0 = LW.C0:lerp(cf(-1.5,-0.3,0.3)*angles(math.rad(128.1),math.rad(-32.1),math.rad(-10.6)),Alpha)
  3286. RW.C0 = RW.C0:lerp(cf(1.3,0.4,0.2)*angles(math.rad(-29.3),math.rad(-35.2),math.rad(-13.6)),Alpha)
  3287. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0)*angles(math.rad(-1),math.rad(-26.1),math.rad(1.9))*necko,Alpha)
  3288. end
  3289. MagniDamage(larm,4,10,25,0.1,"Normal")
  3290. localshakes(0.1,0.1)
  3291. for i = 0, 1, 0.1 do
  3292. swait()
  3293. local Alpha = .3
  3294. RootJoint.C0 = RootJoint.C0:lerp(cf(0.1,0,-0.2)*angles(math.rad(-15),math.rad(-21.9),math.rad(-2.3))*RootCF,Alpha)
  3295. LH.C0 = LH.C0:lerp(cf(-1,-1,-0.2)*angles(math.rad(-16.8),math.rad(17.8),math.rad(1.2))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3296. RH.C0 = RH.C0:lerp(cf(0.9,-1,0.3)*angles(math.rad(5.4),math.rad(-38.4),math.rad(1.3))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3297. LW.C0 = LW.C0:lerp(cf(-1.3,0.4,-0.8)*angles(math.rad(72.8),math.rad(-32.7),math.rad(18.4)),Alpha)
  3298. RW.C0 = RW.C0:lerp(cf(1.4,0.5,0.3)*angles(math.rad(-29.3),math.rad(-35.2),math.rad(7.1)),Alpha)
  3299. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0)*angles(math.rad(-2.4),math.rad(19.4),math.rad(1.8))*necko,Alpha)
  3300. end
  3301. hum.WalkSpeed = storehumanoidWS
  3302. attack = false
  3303. end
  3304. function attacktwo()
  3305. attack = true
  3306. hum.WalkSpeed = 0
  3307. for i = 0, 2, 0.1 do
  3308. swait()
  3309. local Alpha = .3
  3310. RootJoint.C0 = RootJoint.C0:lerp(cf(0.1,0,-0.1)*angles(math.rad(-0.4),math.rad(15.7),math.rad(6.7))*RootCF,Alpha)
  3311. LH.C0 = LH.C0:lerp(cf(-0.9,-1,0.2)*angles(math.rad(10),math.rad(16.5),math.rad(-6.9))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3312. RH.C0 = RH.C0:lerp(cf(0.9,-1,0.3)*angles(math.rad(5.4),math.rad(-38.4),math.rad(1.3))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3313. LW.C0 = LW.C0:lerp(cf(-1.5,0.7,-0.3)*angles(math.rad(-1.4),math.rad(-29),math.rad(-24)),Alpha)
  3314. RW.C0 = RW.C0:lerp(cf(1.5,0.1,0.5)*angles(math.rad(99.5),math.rad(29.3),math.rad(35.1)),Alpha)
  3315. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0)*angles(math.rad(-1.2),math.rad(-20.5),math.rad(1.8))*necko,Alpha)
  3316. end
  3317. MagniDamage(rarm,4,10,25,0.1,"Normal")
  3318. localshakes(0.1,0.1)
  3319. for i = 0, 1, 0.1 do
  3320. swait()
  3321. local Alpha = .3
  3322. RootJoint.C0 = RootJoint.C0:lerp(cf(0.2,0.1,-0.3)*angles(math.rad(-25.9),math.rad(31.7),math.rad(14.2))*RootCF,Alpha)
  3323. LH.C0 = LH.C0:lerp(cf(-0.9,-1,0.1)*angles(math.rad(-2.2),math.rad(33),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3324. RH.C0 = RH.C0:lerp(cf(1.3,-1.1,0)*angles(math.rad(29.3),math.rad(-35.4),math.rad(4.6))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3325. LW.C0 = LW.C0:lerp(cf(-1.6,0.5,-0.2)*angles(math.rad(-33),math.rad(-11.6),math.rad(-35.4)),Alpha)
  3326. RW.C0 = RW.C0:lerp(cf(1.3,0.6,-0.6)*angles(math.rad(99.5),math.rad(29.3),math.rad(-6.7)),Alpha)
  3327. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(-0.1,0,-0.1)*angles(math.rad(-0.5),math.rad(-39.2),math.rad(-4.1))*necko,Alpha)
  3328. end
  3329. hum.WalkSpeed = storehumanoidWS
  3330. attack = false
  3331. end
  3332. function attackthree()
  3333. attack = true
  3334. hum.WalkSpeed = 0
  3335. for i = 0, 2, 0.1 do
  3336. swait()
  3337. local Alpha = .3
  3338. RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0.1)*angles(math.rad(11.1),math.rad(-0.2),math.rad(0))*RootCF,Alpha)
  3339. LH.C0 = LH.C0:lerp(cf(-1,-1,0.1)*angles(math.rad(-11.9),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3340. RH.C0 = RH.C0:lerp(cf(1,0.3,-0.6)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3341. LW.C0 = LW.C0:lerp(cf(-1.6,0.6,0)*angles(math.rad(0),math.rad(0),math.rad(-18.4)),Alpha)
  3342. RW.C0 = RW.C0:lerp(cf(1.6,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(12.8)),Alpha)
  3343. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0.3)*angles(math.rad(-10.2),math.rad(0),math.rad(0))*necko,Alpha)
  3344. end
  3345. MagniDamage(rleg,4,10,25,0.1,"Normal")
  3346. localshakes(0.1,0.1)
  3347. for i = 0, 1, 0.1 do
  3348. swait()
  3349. local Alpha = .3
  3350. RootJoint.C0 = RootJoint.C0:lerp(cf(0,-0.1,0.1)*angles(math.rad(16.8),math.rad(-0.2),math.rad(0))*RootCF,Alpha)
  3351. LH.C0 = LH.C0:lerp(cf(-1,-0.9,0.2)*angles(math.rad(-18.8),math.rad(18.2),math.rad(3.9))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3352. RH.C0 = RH.C0:lerp(cf(1,-1.2,-0.4)*angles(math.rad(96.2),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3353. LW.C0 = LW.C0:lerp(cf(-1.6,0.3,0.1)*angles(math.rad(-17),math.rad(0.2),math.rad(-18.4)),Alpha)
  3354. RW.C0 = RW.C0:lerp(cf(1.6,0.2,0.1)*angles(math.rad(-17),math.rad(0.2),math.rad(12.9)),Alpha)
  3355. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0.3)*angles(math.rad(-10.2),math.rad(0),math.rad(0))*necko,Alpha)
  3356. end
  3357. hum.WalkSpeed = storehumanoidWS
  3358. attack = false
  3359. end
  3360. function jumpup()
  3361. attack = true
  3362. hum.WalkSpeed = 0
  3363. CFuncs["Sound"].Create("rbxassetid://1666361078", tors, 3,1.2)
  3364. for i = 0,5,0.1 do
  3365. swait()
  3366. root.Velocity = vt(0,200,0)
  3367. local Alpha = .1
  3368. RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0.1)*angles(math.rad(8.2),math.rad(-0.1),math.rad(0))*RootCF,Alpha)
  3369. LH.C0 = LH.C0:lerp(cf(-1,-1,0.1)*angles(math.rad(-7),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3370. RH.C0 = RH.C0:lerp(cf(1,0.2,-0.6)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3371. LW.C0 = LW.C0:lerp(cf(-1.2,0.4,0.4)*angles(math.rad(-26.8),math.rad(0),math.rad(21)),Alpha)
  3372. RW.C0 = RW.C0:lerp(cf(1.3,0.3,0.2)*angles(math.rad(-26.8),math.rad(4.2),math.rad(-13.5)),Alpha)
  3373. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,-0.3)*angles(math.rad(18.5),math.rad(0),math.rad(0))*necko,Alpha)
  3374. end
  3375. hum.WalkSpeed = storehumanoidWS
  3376. attack = false
  3377. end
  3378. function walkmode()
  3379. hum.WalkSpeed = 16
  3380. storehumanoidWS = hum.WalkSpeed
  3381. end
  3382. function runmode()
  3383. hum.WalkSpeed = 40
  3384. storehumanoidWS = hum.WalkSpeed
  3385. end
  3386. function runfastmode()
  3387. hum.WalkSpeed = 300
  3388. storehumanoidWS = hum.WalkSpeed
  3389. end
  3390. function flying()
  3391. flyingmode = true
  3392. end
  3393. function standingonground()
  3394. flyingmode = false
  3395. end
  3396. dancing = false
  3397. -------------------------------------
  3398. Humanoid.Animator.Parent = nil
  3399. Happy()
  3400. MainFrame.SongName.Text = "Song: Teminite & MDK - Space Invaders"
  3401. SwimType = 1
  3402. local attacktype = 1
  3403. function ob1d()
  3404. if attack == false and attacktype == 1 then
  3405. attacktype = 2
  3406. attackone()
  3407. elseif attack == false and attacktype == 2 then
  3408. attacktype = 3
  3409. attacktwo()
  3410. elseif attack == false and attacktype == 3 then
  3411. attacktype = 1
  3412. attackthree()
  3413. elseif attack == false and attacktype == 4 then
  3414. attacktype = 1
  3415. --attackfour()
  3416. end
  3417. end
  3418. function key(k)
  3419. if k == "l" and mutedtog == false then
  3420. mutedtog = true
  3421. chatfunc("Muted.")
  3422. DerpzMusic.Volume = 0
  3423. elseif k == "l" and mutedtog == true then
  3424. mutedtog = false
  3425. chatfunc("Unmuted.")
  3426. DerpzMusic.Volume = 1.25
  3427. end
  3428. if k == "t" and attack == false then
  3429. SayHello()
  3430. end
  3431. if k == "k" and attack == false then
  3432. Alert(2)
  3433. end
  3434. if k == "p" and attack == false then
  3435. BossChatFuncTop("Test","Arcade",BrickColor.Blue().Color,BrickColor.Black().Color)
  3436. FillScreen(BrickColor.Black().Color,1)
  3437. end
  3438. if k == "f" and attack == false then
  3439. flying()
  3440. end
  3441. if k == "g" and attack == false then
  3442. standingonground()
  3443. end
  3444. if k == "z" and attack == false then
  3445. jumpup()
  3446. end
  3447. if string.byte(k) == 48 then
  3448. runmode()
  3449. end
  3450. if string.byte(k) == 50 then
  3451. runfastmode()
  3452. end
  3453. if k == "u" then
  3454. dancing = true
  3455. MainFrame.SongName.Text = "Song: Mario Canyon"
  3456. DerpzMusic.SoundId = "rbxassetid://3505029079"
  3457. end
  3458. end
  3459. function key2(k)
  3460. if string.byte(k) == 48 or string.byte(k) == 50 then
  3461. walkmode()
  3462. elseif k == "u" then
  3463. dancing = false
  3464. MainFrame.SongName.Text = "Song: Teminite & MDK - Space Invaders"
  3465. DerpzMusic.SoundId = "rbxassetid://3229553339"
  3466. end
  3467. end
  3468.  
  3469.  
  3470. plr.Chatted:connect(function(message)
  3471. chatfunc(message)
  3472. if message:sub(1,3) == "id/" then
  3473. local OVMID = message:sub(4)
  3474. DerpzMusic.SoundId = "rbxassetid://" ..OVMID
  3475. end
  3476. end)
  3477.  
  3478. Humanoid.Name = "DERPZDENUGGET"
  3479. Instance.new("ForceField",char).Visible = false
  3480.  
  3481.  
  3482. idleanim=.4
  3483. while true do
  3484. Humanoid.MaxHealth = math.huge
  3485. Humanoid.Health = math.huge
  3486. swait()
  3487. sine = sine + change
  3488. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  3489. local velderp=RootPart.Velocity.y
  3490. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  3491. coroutine.resume(coroutine.create(function()
  3492. if hitfloor ~= nil then
  3493. local rval = 0
  3494. --Effects go here.
  3495. end
  3496. end))
  3497. if equipped==true or equipped==false then
  3498. if attack==false then
  3499. idle=idle+1
  3500. else
  3501. idle=0
  3502. end
  3503. if idle>=500 then
  3504. if attack==false then
  3505. --Sheath()
  3506. end
  3507. end
  3508.  
  3509. if hum:GetState() == Enum.HumanoidStateType.Swimming and torvel<1 then
  3510. Anim="SwimIdle"
  3511. if attack == false then
  3512. local Alpha = .3
  3513. if SwimType ~= "ICANTSWIMIMUSEDTOFLYING" then
  3514. hum.WalkSpeed = storehumanoidWS
  3515. RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*RootCF,Alpha)
  3516. LH.C0 = LH.C0:lerp(cf(-1,-1,-0.1)*angles(math.rad(11.2),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3517. RH.C0 = RH.C0:lerp(cf(1,-0.5,-0.6)*angles(math.rad(-24.8),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3518. LW.C0 = LW.C0:lerp(cf(-1.4,0.6,-0.1)*angles(math.rad(70.5),math.rad(-15.8),math.rad(-53.9 + 40 * math.cos(sine/30))),Alpha)
  3519. RW.C0 = RW.C0:lerp(cf(1.7,0.5,-0.1)*angles(math.rad(64.7),math.rad(19),math.rad(43.1 - 40 * math.cos(sine/30))),Alpha)
  3520. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*necko,.1)
  3521. elseif SwimType == "ICANTSWIMIMUSEDTOFLYING" then
  3522. hum.WalkSpeed = 0
  3523. RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*RootCF,Alpha)
  3524. LH.C0 = LH.C0:lerp(cf(-1,-1,-0.1)*angles(math.rad(11.2),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3525. RH.C0 = RH.C0:lerp(cf(1,-0.5,-0.6)*angles(math.rad(-24.8),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3526. LW.C0 = LW.C0:lerp(cf(-1.4,0.6,-0.1)*angles(math.rad(160),math.rad(-15.8),math.rad(-53.9 + 40 * math.cos(sine/9))),Alpha)
  3527. RW.C0 = RW.C0:lerp(cf(1.7,0.5,-0.1)*angles(math.rad(160),math.rad(19),math.rad(43.1 - 40 * math.cos(sine/11))),Alpha)
  3528. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,-0.7)*angles(math.rad(40),math.rad(0),math.rad(0))*necko,.1)
  3529. end
  3530. end
  3531. elseif hum:GetState() == Enum.HumanoidStateType.Swimming and torvel>1 then
  3532. Anim="Swim"
  3533. if attack == false then
  3534. hum.WalkSpeed = 16
  3535. local Alpha = .3
  3536. if SwimType == 1 then
  3537. --Front crawl
  3538. aerrtee = aerrtee + 10
  3539. hum.WalkSpeed = 16
  3540. RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*RootCF,Alpha)
  3541. LH.C0 = LH.C0:lerp(cf(-1,-1.1,0.2)*angles(math.rad(-5 - 20 * math.cos(sine/7)),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3542. RH.C0 = RH.C0:lerp(cf(1,-0.8,-0.1)*angles(math.rad(5 + 20 * math.cos(sine/7)),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3543. LW.C0 = LW.C0:lerp(cf(-1.5,0.5,0)*angles(math.rad(180 + aerrtee),math.rad(0),math.rad(0)),Alpha)
  3544. RW.C0 = RW.C0:lerp(cf(1.5,0.5,0)*angles(math.rad(0 + aerrtee),math.rad(0),math.rad(0)),Alpha)
  3545. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0.1,-0.5)*angles(math.rad(28.4),math.rad(0),math.rad(0))*necko,.1)
  3546. elseif SwimType == 2 then
  3547. --Back stroke
  3548. aerrtee = aerrtee + 10
  3549. hum.WalkSpeed = 16
  3550. RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0)*angles(math.rad(0),math.rad(180),math.rad(0))*RootCF,Alpha)
  3551. LH.C0 = LH.C0:lerp(cf(-1,-1.1,0.2)*angles(math.rad(-5 + 20 * math.cos(sine/7)),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3552. RH.C0 = RH.C0:lerp(cf(1,-0.8,-0.1)*angles(math.rad(5 - 20 * math.cos(sine/7)),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3553. LW.C0 = LW.C0:lerp(cf(-1.5,0.5,0)*angles(math.rad(180 - aerrtee),math.rad(0),math.rad(0)),Alpha)
  3554. RW.C0 = RW.C0:lerp(cf(1.5,0.5,0)*angles(math.rad(0 - aerrtee),math.rad(0),math.rad(0)),Alpha)
  3555. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*necko,.1)
  3556. elseif SwimType == 3 then
  3557. --Butterfly
  3558. aerrtee = aerrtee + 10
  3559. hum.WalkSpeed = 16
  3560. RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0)*angles(math.rad(0 - 5 * math.cos(sine/3.5)),math.rad(0),math.rad(0))*RootCF,Alpha)
  3561. LH.C0 = LH.C0:lerp(cf(-1,-1.1,0.2)*angles(math.rad(-5 + 20 * math.cos(sine/7)),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3562. RH.C0 = RH.C0:lerp(cf(1,-0.8,-0.1)*angles(math.rad(5 + 20 * math.cos(sine/7)),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3563. LW.C0 = LW.C0:lerp(cf(-1.5,0.5,0)*angles(math.rad(180 - aerrtee),math.rad(0),math.rad(0)),Alpha)
  3564. RW.C0 = RW.C0:lerp(cf(1.5,0.5,0)*angles(math.rad(180 - aerrtee),math.rad(0),math.rad(0)),Alpha)
  3565. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0.1,-0.5)*angles(math.rad(28.4),math.rad(0),math.rad(0))*necko,.1)
  3566. end
  3567. end
  3568. elseif hum:GetState() == Enum.HumanoidStateType.Climbing then
  3569. if attack == false then
  3570.  
  3571. end
  3572. elseif RootPart.Velocity.y > 1 and hitfloor == nil and hum:GetState() ~= Enum.HumanoidStateType.Swimming and hum:GetState() ~= Enum.HumanoidStateType.Climbing then
  3573. Anim="Jump"
  3574. if attack==false then
  3575. hum.WalkSpeed = storehumanoidWS
  3576. RH.C0=clerp(RH.C0,cf(1,-0.18 - 0.05 * math.cos(sine / 25),-0.65)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.05)
  3577. LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.05)
  3578. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 25))*angles(math.rad(-10 - 2 * math.cos(sine / 10)),math.rad(0),math.rad(0)),.05)
  3579. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5 - 10 * math.cos(sine / 25)),math.rad(0),math.rad(0)),.05)
  3580. RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(0),math.rad(20 + 10 * math.cos(sine / 25))),.05)
  3581. LW.C0=clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(0),math.rad(-20 - 10 * math.cos(sine / 25))),.05)
  3582. end
  3583. elseif RootPart.Velocity.y < -1 and hitfloor==nil and hum:GetState() ~= Enum.HumanoidStateType.Swimming and hum:GetState() ~= Enum.HumanoidStateType.Climbing then
  3584. Anim="Fall"
  3585. if attack==false then
  3586. hum.WalkSpeed = storehumanoidWS
  3587. RH.C0=clerp(RH.C0,cf(1,-0.35 - 0.05 * math.cos(sine / 25),-0.75)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.05)
  3588. LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.05)
  3589. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 25))*angles(math.rad(10 + 5 * math.cos(sine / 15)),math.rad(0),math.rad(0)),.05)
  3590. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(30 + 10 * math.cos(sine / 25)),math.rad(0),math.rad(0)),.05)
  3591. RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-40),math.rad(0 - 10 * math.cos(sine / 25)),math.rad(90)),.05)
  3592. LW.C0=clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-40),math.rad(0 + 10 * math.cos(sine / 25)),math.rad(-90)),.05)
  3593. end
  3594. elseif torvel < 1 and hitfloor ~= nil and hum:GetState() ~= Enum.HumanoidStateType.Swimming and hum:GetState() ~= Enum.HumanoidStateType.Climbing then
  3595. Anim = "Idle"
  3596. if attack == false then
  3597. hum.WalkSpeed = storehumanoidWS
  3598. if flyingmode == true and dancing == false then
  3599. local Alpha = .1
  3600. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,1.5 + 0.1 * math.cos(sine / 28))*angles(math.rad(0 - 2 * math.cos(sine / 34)),math.rad(0),math.rad(0 - 1 * math.cos(sine /61))),.1)
  3601. LH.C0 = LH.C0:lerp(cf(-0.8,-0.7,0)*angles(math.rad(-29.4 - 5 * math.cos(sine / 13)),math.rad(17.8+ 5 * math.cos(sine / 15)),math.rad(-14.1 - 5 * math.cos(sine / 14)))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3602. RH.C0 = RH.C0:lerp(cf(1,-0.4 + 0.05 * math.cos(sine / 28),-0.8)*angles(math.rad(-29.9 + 5 * math.cos(sine / 13)),math.rad(-12.8 - 5 * math.cos(sine / 15)),math.rad(5.5+ 5 * math.cos(sine / 14)))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3603. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(5 + 4 * math.cos(sine / 48)),math.rad(0),math.rad(15 + 5 * math.cos(sine / 33))),.1)
  3604. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(6 + 3 * math.cos(sine / 52)),math.rad(0),math.rad(-15 - 4 * math.cos(sine / 34))),.1)
  3605. Neck.C0=clerp(Neck.C0,necko*angles(math.rad(20+3*math.cos(sine/36)),math.rad(0),math.rad(0)),.1)
  3606. elseif flyingmode == false and dancing == false then
  3607. local Alpha = .1
  3608. RootJoint.C0 = RootJoint.C0:lerp(cf(0,0 + 0.1 * math.cos(sine/30),-0.1)*angles(math.rad(-6.4),math.rad(-4.8),math.rad(-0.5))*RootCF,Alpha)
  3609. LH.C0 = LH.C0:lerp(cf(-0.9,-1 - 0.1 * math.cos(sine/30),0.1)*angles(math.rad(5.4),math.rad(17),math.rad(-5.6))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3610. RH.C0 = RH.C0:lerp(cf(1,-1 - 0.1 * math.cos(sine/30),0)*angles(math.rad(5.4),math.rad(-5.1),math.rad(1.6))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3611. LW.C0 = LW.C0:lerp(cf(-1.5,0.5,-0.1)*angles(math.rad(-0.8),math.rad(-6.7),math.rad(-7.1)),Alpha)
  3612. RW.C0 = RW.C0:lerp(cf(1.5,0.5,-0.1)*angles(math.rad(-0.8),math.rad(8.9),math.rad(5)),Alpha)
  3613. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0)*angles(math.rad(-2),math.rad(6.1),math.rad(1.7))*necko,.05)
  3614. elseif flyingmode == false and dancing == true then
  3615. for i = 0, 2, 0.1 do
  3616. swait()
  3617. local Alpha = .3
  3618. RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0)*angles(math.rad(0.2),math.rad(13.1),math.rad(-0.2))*RootCF,Alpha)
  3619. LH.C0 = LH.C0:lerp(cf(-0.9,-0.9,0.2)*angles(math.rad(0),math.rad(28.4),math.rad(-15.2))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3620. RH.C0 = RH.C0:lerp(cf(1,-0.9,0.1)*angles(math.rad(0),math.rad(-12.6),math.rad(7.2))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3621. LW.C0 = LW.C0:lerp(cf(-1.6,0.5,-0.4)*angles(math.rad(131),math.rad(-11),math.rad(-12.4)),Alpha)
  3622. RW.C0 = RW.C0:lerp(cf(1.4,0.4,0.2)*angles(math.rad(33),math.rad(-17.3),math.rad(10.9)),Alpha)
  3623. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0.1,0,0)*angles(math.rad(0),math.rad(-20.4),math.rad(5.3))*necko,Alpha)
  3624. end
  3625. for i = 0, 2, 0.1 do
  3626. swait()
  3627. local Alpha = .3
  3628. RootJoint.C0 = RootJoint.C0:lerp(cf(-0.2,0,0.1)*angles(math.rad(-0.4),math.rad(-31.8),math.rad(0.4))*RootCF,Alpha)
  3629. LH.C0 = LH.C0:lerp(cf(-0.9,-0.9,0.2)*angles(math.rad(0),math.rad(28.4),math.rad(-15.2))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  3630. RH.C0 = RH.C0:lerp(cf(1,-0.9,0.1)*angles(math.rad(0),math.rad(-12.6),math.rad(7.2))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  3631. LW.C0 = LW.C0:lerp(cf(-1.5,0.3,-0.2)*angles(math.rad(27.7),math.rad(14.7),math.rad(-7.6)),Alpha)
  3632. RW.C0 = RW.C0:lerp(cf(1.3,0.3,-0.6)*angles(math.rad(113.9),math.rad(-4.9),math.rad(-14.2)),Alpha)
  3633. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(-0.1,0,0.2)*angles(math.rad(-4.2),math.rad(25.6),math.rad(-4))*necko,Alpha)
  3634. end
  3635. end
  3636. end
  3637. elseif torvel > 2 and torvel < 22 and hitfloor ~= nil and hum:GetState() ~= Enum.HumanoidStateType.Swimming and hum:GetState() ~= Enum.HumanoidStateType.Climbing then
  3638. Anim = "Walk"
  3639. if attack == false then
  3640. local Testwalk1 = hum.MoveDirection*Torso.CFrame.LookVector
  3641. local Testwalk2 = hum.MoveDirection*Torso.CFrame.RightVector
  3642. LOOKVEC = Testwalk1.X+Testwalk1.Z
  3643. RIGHTVEC = Testwalk2.X+Testwalk2.Z
  3644. wsv = 8
  3645. wsv2 = 4
  3646. local RIGHTHIPSECOND = cf(LOOKVEC/7 * math.cos(sine / wsv),0,0)*angles(math.sin(RIGHTVEC/2.5) * math.cos(sine / wsv),0,math.sin(-LOOKVEC/2) * math.cos(sine / wsv))
  3647. local LEFTHIPSECOND = cf(-LOOKVEC/7 * math.cos(sine / wsv),0,0)*angles(math.sin(RIGHTVEC/2.5) * math.cos(sine / wsv),0,math.sin(-LOOKVEC/2) * math.cos(sine / wsv))
  3648. RW.C0 = clerp(RW.C0, cf(1.5 + .0 * math.cos(sine / wsv) , 0.5 + RIGHTVEC/50* math.cos(sine / wsv), 0) * angles(math.rad(0 + LOOKVEC*60 * math.cos(sine / wsv)), math.rad(0), math.rad(4 + RIGHTVEC*5 * math.cos(sine / wsv))), .1)
  3649. LW.C0 = clerp(LW.C0, cf(-1.5 + .0 * math.cos(sine / wsv), 0.5 + RIGHTVEC/50 * math.cos(sine / wsv), 0)*angles(math.rad(0 - LOOKVEC*60 * math.cos(sine / wsv)), math.rad(0), math.rad(-4 - RIGHTVEC*5 * math.cos(sine / wsv))), .1)
  3650. RootJoint.C0 = clerp(RootJoint.C0,cf(0, 0, 0) * angles(math.rad(-90), math.rad(0), math.rad(180)) * cf(0, 0 , -0.185 + 0.055 * math.cos(sine / wsv2) + -math.sin(sine / wsv2) / 8) * angles(math.rad((LOOKVEC - LOOKVEC/5 * math.cos(sine / wsv2))*10), math.rad((-RIGHTVEC - -RIGHTVEC/5 * math.cos(sine / 6))*5) , math.rad(0 * math.cos(sine / wsv))), .1)
  3651. RH.C0 = clerp(RH.C0, cf(1, -0.8+ .35 * math.sin(sine / wsv), -.15)* angles(math.rad(0),math.rad(90),math.rad(0))*RIGHTHIPSECOND*angles(math.rad(0),math.rad(0),math.rad(0 - 5 * math.cos(sine / wsv))), .1)
  3652. LH.C0 = clerp(LH.C0, cf(-1, -0.8- .35 * math.sin(sine / wsv), -.15)* angles(math.rad(0),math.rad(-90),math.rad(0))*LEFTHIPSECOND*angles(math.rad(0),math.rad(0),math.rad(0 - 5 * math.cos(sine / wsv))), .1)
  3653.  
  3654. end
  3655. elseif torvel >= 22 and torvel < 200 and hitfloor ~= nil and hum:GetState() ~= Enum.HumanoidStateType.Swimming and hum:GetState() ~= Enum.HumanoidStateType.Climbing then
  3656. Anim = "Run"
  3657. if attack == false then
  3658. if flyingmode == false then
  3659. local Testwalk1 = hum.MoveDirection*Torso.CFrame.LookVector
  3660. local Testwalk2 = hum.MoveDirection*Torso.CFrame.RightVector
  3661. LOOKVEC = Testwalk1.X+Testwalk1.Z
  3662. RIGHTVEC = Testwalk2.X+Testwalk2.Z
  3663. wsv = 5
  3664. wsv2 = 2.5
  3665. local RIGHTHIPSECOND = cf(LOOKVEC/6 * math.cos(sine / wsv),0,0)*angles(math.sin(RIGHTVEC/1.5) * math.cos(sine / wsv),0,math.sin(-LOOKVEC/1.5) * math.cos(sine / wsv))
  3666. local LEFTHIPSECOND = cf(-LOOKVEC/6 * math.cos(sine / wsv),0,0)*angles(math.sin(RIGHTVEC/1.5) * math.cos(sine / wsv),0,math.sin(-LOOKVEC/1.5) * math.cos(sine / wsv))
  3667. RW.C0 = clerp(RW.C0, cf(1.5 + .0 * math.cos(sine / wsv) , 0.5 + RIGHTVEC/30* math.cos(sine / wsv), 0) * angles(math.rad(0 + LOOKVEC*150 * math.cos(sine / wsv)), math.rad(0), math.rad(4 + RIGHTVEC*5 * math.cos(sine / wsv))), .1)
  3668. LW.C0 = clerp(LW.C0, cf(-1.5 + .0 * math.cos(sine / wsv), 0.5 + RIGHTVEC/30 * math.cos(sine / wsv), 0)*angles(math.rad(0 - LOOKVEC*150 * math.cos(sine / wsv)), math.rad(0), math.rad(-4 - RIGHTVEC*5 * math.cos(sine / wsv))), .1)
  3669. RootJoint.C0 = clerp(RootJoint.C0,cf(0, 0, 0) * angles(math.rad(-110), math.rad(0), math.rad(180)) * cf(0, 0 , -0.185 + 0.055 * math.cos(sine / wsv2) + -math.sin(sine / wsv2) / 8) * angles(math.rad((LOOKVEC - LOOKVEC/5 * math.cos(sine / wsv2))*10), math.rad((-RIGHTVEC - -RIGHTVEC/5 * math.cos(sine / 6))*5) , math.rad(0 * math.cos(sine / wsv))), .1)
  3670.  
  3671. RH.C0 = clerp(RH.C0, cf(1, -0.8+ .5 * math.sin(sine / (wsv)), -.15)* angles(math.rad(0),math.rad(90),math.rad(0))*RIGHTHIPSECOND*angles(math.rad(0),math.rad(0),math.rad(0 - LOOKVEC*50 * math.cos(sine / (wsv)))), .1)
  3672. LH.C0 = clerp(LH.C0, cf(-1, -0.8- .5 * math.sin(sine / (wsv)), -.15)* angles(math.rad(0),math.rad(-90),math.rad(0))*LEFTHIPSECOND*angles(math.rad(0),math.rad(0),math.rad(0 - LOOKVEC*50 * math.cos(sine / (wsv)))), .1)
  3673. elseif flyingmode == true then
  3674. local walk1 = hum.MoveDirection*Torso.CFrame.LookVector
  3675. local walk2 = hum.MoveDirection*Torso.CFrame.RightVector
  3676. lookVector = walk1.X+walk1.Z
  3677. rightVector = walk2.X+walk2.Z
  3678. wsv = 4
  3679. wsv2 = 2
  3680. RW.C0 = clerp(RW.C0, cf(1.5 + .0 * math.cos(sine / wsv) , 0.5 + rightVector/89* math.cos(sine / wsv), 0) * angles(math.rad(0 - lookVector*55), math.rad(0), math.rad(8 - rightVector*5)), .1)
  3681. Neck.C0 = clerp(Neck.C0, cf(0, 1, 0) * angles(math.rad(-90), math.rad(0), math.rad(180)) * cf(0, 0, 0 + ((1) - 1)) * angles(math.rad(-2 - lookVector*25), math.rad(0), math.rad(0)), .1)
  3682. LW.C0 = clerp(LW.C0, cf(-1.5 + .0 * math.cos(sine / wsv), 0.5 + rightVector/89 * math.cos(sine / wsv), 0)*angles(math.rad(0 - lookVector*55), math.rad(0), math.rad(-8 - rightVector*5)), .1)
  3683. RootJoint.C0 = clerp(RootJoint.C0,cf(0, 1.2 + 0.5 * math.cos(sine/32), 0) * angles(math.rad(-90), math.rad(0), math.rad(180)) * cf(0, 0 , -0.185) * angles(math.rad((lookVector - lookVector/5)*105), math.rad((-rightVector - -rightVector/5)*5) , math.rad(0)), .1)
  3684. RH.C0 = clerp(RH.C0, cf(1, -0.5, -.5)* angles(math.rad(-15),math.rad(90),math.rad(0))*angles(math.rad(0 + rightVector*20),math.rad(0),math.rad(0)), .1)
  3685. LH.C0 = clerp(LH.C0, cf(-1, -1, .1)* angles(math.rad(-15),math.rad(-90),math.rad(0))*angles(math.rad(0 - rightVector*20),math.rad(0),math.rad(0)), .1)
  3686. end
  3687. end
  3688. elseif torvel > 200 and hitfloor ~= nil and hum:GetState() ~= Enum.HumanoidStateType.Swimming and hum:GetState() ~= Enum.HumanoidStateType.Climbing then
  3689. Anim = "FasterRun"
  3690. if attack == false then
  3691.  
  3692. local Testwalk1 = hum.MoveDirection*Torso.CFrame.LookVector
  3693. local Testwalk2 = hum.MoveDirection*Torso.CFrame.RightVector
  3694. LOOKVEC = Testwalk1.X+Testwalk1.Z
  3695. RIGHTVEC = Testwalk2.X+Testwalk2.Z
  3696. wsv = 3
  3697. wsv2 = 1.5
  3698.  
  3699. local RIGHTHIPSECOND = cf(LOOKVEC/6 * math.cos(sine / wsv),0,0)*angles(math.sin(RIGHTVEC/1.5) * math.cos(sine / wsv),0,math.sin(-LOOKVEC/1.5) * math.cos(sine / wsv))
  3700. local LEFTHIPSECOND = cf(-LOOKVEC/6 * math.cos(sine / wsv),0,0)*angles(math.sin(RIGHTVEC/1.5) * math.cos(sine / wsv),0,math.sin(-LOOKVEC/1.5) * math.cos(sine / wsv))
  3701. RW.C0 = clerp(RW.C0, cf(1.5 + 0 * math.cos(sine / wsv) , 0.5 + RIGHTVEC/30* math.cos(sine / wsv), 0) * angles(math.rad(-70 + RIGHTVEC*10), math.rad(0), math.rad(4 + RIGHTVEC*5 * math.cos(sine / wsv))), .1)
  3702. LW.C0 = clerp(LW.C0, cf(-1.5 - 0 * math.cos(sine / wsv), 0.5 + RIGHTVEC/30 * math.cos(sine / wsv), 0)*angles(math.rad(-70 + RIGHTVEC*10), math.rad(0), math.rad(-4 - RIGHTVEC*5 * math.cos(sine / wsv))), .1)
  3703. RootJoint.C0 = clerp(RootJoint.C0,cf(0, 0, 0) * angles(math.rad(-130), math.rad(0), math.rad(180)) * cf(0, 0 , -0.185 + 0.055 * math.cos(sine / wsv2) + -math.sin(sine / wsv2) / 8) * angles(math.rad((LOOKVEC - LOOKVEC/5 * math.cos(sine / wsv2))*10), math.rad((-RIGHTVEC - -RIGHTVEC/5 * math.cos(sine / 6))*5) , math.rad(0 * math.cos(sine / wsv))), .1)
  3704. RH.C0 = clerp(RH.C0, cf(1, -0.8+ .8 * math.sin(sine / (wsv)), -.15)* angles(math.rad(0),math.rad(90),math.rad(0))*RIGHTHIPSECOND*angles(math.rad(0),math.rad(0),math.rad(0 - LOOKVEC*100 * math.cos(sine / (wsv)))), .1)
  3705. LH.C0 = clerp(LH.C0, cf(-1, -0.8- .8 * math.sin(sine / (wsv)), -.15)* angles(math.rad(0),math.rad(-90),math.rad(0))*LEFTHIPSECOND*angles(math.rad(0),math.rad(0),math.rad(0 - LOOKVEC*100 * math.cos(sine / (wsv)))), .1)
  3706. end
  3707. end
  3708. end
  3709. end
  3710.  
  3711.  
  3712.  
  3713. ]=], owner.Character):WaitForChild 'ServerRemote';
  3714.  
  3715.  
  3716. local mouse = owner:GetMouse()
  3717.  
  3718.  
  3719.  
  3720.  
  3721. mouse.Button1Down:connect(function()
  3722. remote:InvokeServer (1,mouse);
  3723. end)
  3724. mouse.Button1Up:Connect(function()
  3725. remote:InvokeServer (3,mouse);
  3726. end)
  3727. mouse.KeyDown:connect(function(k)
  3728. k = k:lower()
  3729.  
  3730. remote:InvokeServer (2, k);
  3731. end)
  3732. mouse.KeyUp:connect(function(k)
  3733. k = k:lower()
  3734.  
  3735. remote:InvokeServer (6, k);
  3736. end)
  3737.  
  3738. remote.OnClientInvoke = function (request, ...)
  3739. if (request == 1) then
  3740. return mouse.Hit.p;
  3741. end;
  3742. end;
  3743.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement