Advertisement
SCR1PT_ED1T0R

FE Best Mates Dance

Sep 12th, 2018
1,042
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  2. do
  3. script.Parent = owner.Character
  4. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5. local function NewFakeEvent()
  6. local Bind = Instance.new("BindableEvent")
  7. local Fake;Fake = {Connections = {},
  8. fakeEvent=true;
  9. Connect=function(self,Func)
  10. Bind.Event:connect(Func)
  11. self.Connections[Bind] = true
  12. return setmetatable({Connected = true},{
  13. __index = function (self,Index)
  14. if Index:lower() == "disconnect" then
  15. return function() Fake.Connections[Bind] = false;self.Connected = false end
  16. end
  17. return Fake[Index]
  18. end;
  19. __tostring = function() return "Connection" end;
  20. })
  21. end}
  22. Fake.connect = Fake.Connect;return Fake;
  23. end
  24. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  25. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  26. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  27. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  28. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  29. local function TriggerEvent(self,Event,...)
  30. local Trigger = Mouse[Event]
  31. if Trigger and Trigger.fakeEvent and Trigger.Connections then
  32. for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  33. end
  34. end
  35. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  36. Event.OnServerEvent:Connect(function(FiredBy,Input)
  37. if FiredBy.Name ~= owner.Name then return end
  38. if Input.MouseEvent then
  39. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  40. else
  41. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  42. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  43. for _,Action in pairs(ContextActionService.Actions) do
  44. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  45. end
  46. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  47. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  48. end
  49. end)
  50. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  51. Event.Parent = NLS([[
  52. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  53. local Input = function(Input,gameProcessedEvent)
  54. if gameProcessedEvent then return end
  55. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56. end
  57. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  58. local Hit,Target
  59. while wait(1/30) do
  60. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  61. Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  62. end
  63. end
  64. ]],owner.Character)
  65. end
  66. RealGame = game;game = setmetatable({},{
  67. __index = function (self,Index)
  68. local Sandbox = function (Thing)
  69. if Thing:IsA("Player") then
  70. local RealPlayer = Thing
  71. return setmetatable({},{
  72. __index = function (self,Index)
  73. local Type = type(RealPlayer[Index])
  74. if Type == "function" then
  75. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  76. return function (self)return InternalData["Mouse"] end
  77. end
  78. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  79. end
  80. return RealPlayer[Index]
  81. end;
  82. __tostring = function(self) return RealPlayer.Name end
  83. })
  84. end
  85. end
  86. if RealGame[Index] then
  87. local Type = type(RealGame[Index])
  88. if Type == "function" then
  89. if Index:lower() == "getservice" or Index:lower() == "service" then
  90. return function (self,Service)
  91. local FakeServices = {
  92. ["players"] = function()
  93. return setmetatable({},{
  94. __index = function (self2,Index2)
  95. local RealService = RealGame:GetService(Service)
  96. local Type2 = type(Index2)
  97. if Type2 == "function" then
  98. return function (self,...) return RealService[Index2](RealService,...)end
  99. else
  100. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  101. return RealService[Index2]
  102. end
  103. end;
  104. __tostring = function(self) return RealGame:GetService(Service).Name end
  105. })
  106. end;
  107. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  108. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  109. ["runservice"] = function()
  110. return setmetatable({},{
  111. __index = function(self2,Index2)
  112. local RealService = RealGame:GetService(Service)
  113. local Type2 = type(Index2)
  114. if Type2 == "function" then
  115. return function (self,...) return RealService[Index2](RealService,...) end
  116. else
  117. local RunServices = {
  118. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  119. ["renderstepped"] = function() return RealService["Stepped"] end
  120. }
  121. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  122. return RealService[Index2]
  123. end
  124. end
  125. })
  126. end
  127. }
  128. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  129. return RealGame:GetService(Service)
  130. end
  131. end
  132. return function (self,...) return RealGame[Index](RealGame,...) end
  133. else
  134. if game:GetService(Index) then return game:GetService(Index) end
  135. return RealGame[Index]
  136. end
  137. end
  138. return nil
  139. end
  140. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  141. print("Made By : KillerDarkness1015")
  142. print("Edit By : Kermat161")
  143. print("Press e for best mates! \Updated/")
  144. Player = game:GetService("Players").LocalPlayer
  145. Character = Player.Character
  146. PlayerGui = Player.PlayerGui
  147. Backpack = Player.Backpack
  148. Torso = Character.Torso
  149. Head = Character.Head
  150. Humanoid = Character.Humanoid
  151. LeftArm = Character["Left Arm"]
  152. LeftLeg = Character["Left Leg"]
  153. RightArm = Character["Right Arm"]
  154. RightLeg = Character["Right Leg"]
  155. LS = Torso["Left Shoulder"]
  156. LH = Torso["Left Hip"]
  157. RS = Torso["Right Shoulder"]
  158. RH = Torso["Right Hip"]
  159. Face = Head.face
  160. Neck = Torso.Neck
  161. it = Instance.new
  162. attacktype = 1
  163. attacktype2 = 1
  164. vt = Vector3.new
  165. cf = CFrame.new
  166. cn = CFrame.new
  167. euler = CFrame.fromEulerAnglesXYZ
  168. angles = CFrame.Angles
  169. necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  170. necko2 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  171. LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  172. LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  173. RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  174. RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  175. RootPart = Character.HumanoidRootPart
  176. RootJoint = RootPart.RootJoint
  177. RootCF = euler(-1.57, 0, 3.14)
  178. attack = false
  179. attackdebounce = false
  180. trispeed = 0.2
  181. attackmode = "none"
  182. local idle = 0
  183. local Anim = "Idle"
  184. stance = false
  185. local ff = 2
  186. noleg = false
  187. evadecooldown = false
  188. Humanoid.Animator.Parent = nil
  189. equip = false
  190. local Effects = {}
  191. attackspeed = 0.14
  192. df = false
  193. Swing = 1
  194. local sine = 0
  195. local change = 1
  196. local val = 0
  197. local rs = game:GetService("RunService").RenderStepped
  198. Humanoid.WalkSpeed = 5
  199. Humanoid.JumpPower = 60
  200. Swing = 1
  201. cam = workspace.CurrentCamera
  202. local RbxUtility = LoadLibrary("RbxUtility")
  203. local Create = RbxUtility.Create
  204. Head.face.Texture = "rbxassetid://164958099"
  205. Fornite = Instance.new("Sound", Torso)
  206. Fornite.Volume = 0.5
  207. Fornite.TimePosition = 0
  208. Fornite.Pitch = 1
  209. Fornite.SoundId = "rbxassetid://1360395950"
  210. Fornite.Looped = true
  211. Fornite:Play()
  212. k = Fornite
  213. bestmatess = Instance.new("Sound", Torso)
  214. bestmatess.Volume = 2
  215. bestmatess.TimePosition = 0
  216. bestmatess.Pitch = 1
  217. bestmatess.SoundId = "rbxassetid://1890957836"
  218. bestmatess.Looped = true
  219. skidfield = Instance.new("ForceField", Character)
  220. skidfield.Visible = false
  221. Humanoid.Name = "Truegod"
  222. Humanoid.MaxHealth = 1.0E298
  223. Humanoid.Health = 1.0E298
  224. game:GetService("RunService"):BindToRenderStep("W0tT", 0, function()
  225. if Humanoid.Health > 0.1 and Humanoid.Health < 1.0E298 then
  226. Humanoid.MaxHealth = 1.0E298
  227. Humanoid.Health = 1.0E298
  228. end
  229. end)
  230. function so(id, par, vol, pit)
  231. coroutine.resume(coroutine.create(function()
  232. local sou = Instance.new("Sound", par or workspace)
  233. sou.Volume = vol
  234. sou.Pitch = pit or 1
  235. sou.SoundId = id
  236. sou:play()
  237. game:GetService("Debris"):AddItem(sou, 8)
  238. end))
  239. end
  240. RSH, LSH = nil, nil
  241. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  242. RW.Name = "Right Shoulder"
  243. LW.Name = "Left Shoulder"
  244. LH = Torso["Left Hip"]
  245. RH = Torso["Right Hip"]
  246. TorsoColor = Torso.BrickColor
  247. function NoOutline(Part)
  248. Part.TopSurface, Part.BottomSurface, Part.LeftSurface, Part.RightSurface, Part.FrontSurface, Part.BackSurface = 10, 10, 10, 10, 10, 10
  249. end
  250. player = Player
  251. ch = Character
  252. RSH = ch.Torso["Right Shoulder"]
  253. LSH = ch.Torso["Left Shoulder"]
  254. RSH.Parent = nil
  255. LSH.Parent = nil
  256. RW.Name = "Right Shoulder"
  257. RW.Part0 = ch.Torso
  258. RW.C0 = cf(1.5, 0.5, 0)
  259. RW.C1 = cf(0, 0.5, 0)
  260. RW.Part1 = ch["Right Arm"]
  261. RW.Parent = ch.Torso
  262. LW.Name = "Left Shoulder"
  263. LW.Part0 = ch.Torso
  264. LW.C0 = cf(-1.5, 0.5, 0)
  265. LW.C1 = cf(0, 0.5, 0)
  266. LW.Part1 = ch["Left Arm"]
  267. LW.Parent = ch.Torso
  268. function newWeld(wp0, wp1, wc0x, wc0y, wc0z)
  269. local wld = Instance.new("Weld", wp1)
  270. wld.Part0 = wp0
  271. wld.Part1 = wp1
  272. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  273. end
  274. local rs = game:GetService("RunService").RenderStepped
  275. newWeld(RootPart, Torso, 0, -1, 0)
  276. Torso.Weld.C1 = CFrame.new(0, -1, 0)
  277. newWeld(Torso, LeftLeg, -0.5, -1, 0)
  278. LeftLeg.Weld.C1 = CFrame.new(0, 1, 0)
  279. newWeld(Torso, RightLeg, 0.5, -1, 0)
  280. RightLeg.Weld.C1 = CFrame.new(0, 1, 0)
  281. Player = game:GetService("Players").LocalPlayer
  282. Character = Player.Character
  283. mouse = Player:GetMouse()
  284. m = Instance.new("Model", Character)
  285. local weldBetween = function(a, b)
  286. local weldd = Instance.new("ManualWeld")
  287. weldd.Part0 = a
  288. weldd.Part1 = b
  289. weldd.C0 = CFrame.new()
  290. weldd.C1 = b.CFrame:inverse() * a.CFrame
  291. weldd.Parent = a
  292. return weldd
  293. end
  294. ArtificialHB = Instance.new("BindableEvent", script)
  295. ArtificialHB.Name = "Heartbeat"
  296. script:WaitForChild("Heartbeat")
  297. frame = 0.0125
  298. tf = 0
  299. allowframeloss = false
  300. tossremainder = false
  301. lastframe = tick()
  302. script.Heartbeat:Fire()
  303. game:GetService("RunService").Heartbeat:connect(function(s, p)
  304. tf = tf + s
  305. if tf >= frame then
  306. if allowframeloss then
  307. script.Heartbeat:Fire()
  308. lastframe = tick()
  309. else
  310. for i = 1, math.floor(tf / frame) do
  311. script.Heartbeat:Fire()
  312. end
  313. lastframe = tick()
  314. end
  315. if tossremainder then
  316. tf = 0
  317. else
  318. tf = tf - frame * math.floor(tf / frame)
  319. end
  320. end
  321. end)
  322. function swait(num)
  323. if num == 0 or num == nil then
  324. ArtificialHB.Event:wait()
  325. else
  326. for i = 0, num do
  327. ArtificialHB.Event:wait()
  328. end
  329. end
  330. end
  331. function RemoveOutlines(part)
  332. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  333. end
  334. function part(formfactor, parent, reflectance, transparency, brickcolor, name, size)
  335. local fp = it("Part")
  336. fp.formFactor = formfactor
  337. fp.Parent = parent
  338. fp.Reflectance = reflectance
  339. fp.Transparency = transparency
  340. fp.CanCollide = false
  341. fp.Locked = true
  342. fp.BrickColor = brickcolor
  343. fp.Name = name
  344. fp.Size = size
  345. fp.Position = Torso.Position
  346. NoOutline(fp)
  347. if fp.BrickColor == BrickColor.new("Dark indigo") then
  348. fp.Material = "Neon"
  349. elseif fp.BrickColor == BrickColor.new("Really black") then
  350. fp.BrickColor = BrickColor.new("Really black")
  351. fp.Material = "Metal"
  352. else
  353. fp.Material = "Glass"
  354. end
  355. fp:BreakJoints()
  356. return fp
  357. end
  358. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  359. local mesh = it(Mesh)
  360. mesh.Parent = part
  361. if Mesh == "SpecialMesh" then
  362. mesh.MeshType = meshtype
  363. mesh.MeshId = meshid
  364. end
  365. mesh.Offset = offset
  366. mesh.Scale = scale
  367. return mesh
  368. end
  369. function weld(parent, part0, part1, c0)
  370. local weld = it("Weld")
  371. weld.Parent = parent
  372. weld.Part0 = part0
  373. weld.Part1 = part1
  374. weld.C0 = c0
  375. return weld
  376. end
  377. F1 = Instance.new("Folder", Character)
  378. F1.Name = "Effects Folder"
  379. F2 = Instance.new("Folder", F1)
  380. F2.Name = "Effects"
  381. function Triangle(a, b, c)
  382. end
  383. function MagicBlock(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  384. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
  385. prt.Anchored = true
  386. prt.CanCollide = false
  387. prt.CFrame = cframe
  388. prt.Name = "prt"
  389. msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  390. game:GetService("Debris"):AddItem(prt, 5)
  391. table.insert(Effects, {
  392. prt,
  393. "Block1",
  394. delay,
  395. x3,
  396. y3,
  397. z3
  398. })
  399. end
  400. function MagicCircle(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  401. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
  402. prt.Anchored = true
  403. prt.CanCollide = false
  404. prt.CFrame = cframe
  405. prt.Name = "prt"
  406. local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
  407. game:GetService("Debris"):AddItem(prt, 5)
  408. table.insert(Effects, {
  409. prt,
  410. "Cylinder",
  411. delay,
  412. x3,
  413. y3,
  414. z3
  415. })
  416. end
  417. function MagicWave(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  418. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
  419. prt.Anchored = true
  420. prt.CFrame = cframe
  421. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1))
  422. game:GetService("Debris"):AddItem(prt, 5)
  423. table.insert(Effects, {
  424. prt,
  425. "Cylinder",
  426. delay,
  427. x3,
  428. y3,
  429. z3
  430. })
  431. end
  432. function MagicCylinder(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  433. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2))
  434. prt.Anchored = true
  435. prt.CFrame = cframe
  436. msh = mesh("SpecialMesh", prt, "Head", "", vt(0, 0, 0), vt(x1, y1, z1))
  437. game:GetService("Debris"):AddItem(prt, 5)
  438. Effects[#Effects + 1] = {
  439. prt,
  440. "Cylinder",
  441. delay,
  442. x3,
  443. y3,
  444. z3
  445. }
  446. end
  447. function MagicCylinder2(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  448. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2))
  449. prt.Anchored = true
  450. prt.CFrame = cframe
  451. msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  452. game:GetService("Debris"):AddItem(prt, 5)
  453. Effects[#Effects + 1] = {
  454. prt,
  455. "Cylinder",
  456. delay,
  457. x3,
  458. y3,
  459. z3
  460. }
  461. end
  462. function MagicBlood(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  463. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
  464. prt.Anchored = true
  465. prt.CFrame = cframe
  466. local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
  467. game:GetService("Debris"):AddItem(prt, 5)
  468. table.insert(Effects, {
  469. prt,
  470. "Blood",
  471. delay,
  472. x3,
  473. y3,
  474. z3
  475. })
  476. end
  477. function ElecEffect(cff, x, y, z)
  478. local prt = part(3, F2, 0, 0, BrickColor.new("Dark indigo"), "Part", vt(1, 1, 1))
  479. prt.Anchored = true
  480. prt.CFrame = cff * cf(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  481. prt.CFrame = cf(prt.Position)
  482. game:GetService("Debris"):AddItem(prt, 2)
  483. xval = math.random() / 2
  484. yval = math.random() / 2
  485. zval = math.random() / 2
  486. msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(xval, yval, zval))
  487. Effects[#Effects + 1] = {
  488. prt,
  489. "Elec",
  490. 0.1,
  491. x,
  492. y,
  493. z,
  494. xval,
  495. yval,
  496. zval
  497. }
  498. end
  499. function FindNearestTorso(Position, Distance, SinglePlayer)
  500. if SinglePlayer then
  501. return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude
  502. end
  503. local List = {}
  504. for i, v in pairs(workspace:GetChildren()) do
  505. if v:IsA("Model") and v:findFirstChild("Torso") and v ~= Character and Distance >= (v.Torso.Position - Position).magnitude then
  506. table.insert(List, v)
  507. end
  508. end
  509. return List
  510. end
  511. function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  512. local Part = Create("Part")({
  513. Parent = Parent,
  514. Reflectance = Reflectance,
  515. Transparency = Transparency,
  516. CanCollide = false,
  517. Locked = true,
  518. BrickColor = BrickColor.new(tostring(BColor)),
  519. Name = Name,
  520. Size = Size,
  521. Material = Material
  522. })
  523. RemoveOutlines(Part)
  524. return Part
  525. end
  526. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  527. local Msh = Create(Mesh)({
  528. Parent = Part,
  529. Offset = OffSet,
  530. Scale = Scale
  531. })
  532. if Mesh == "SpecialMesh" then
  533. Msh.MeshType = MeshType
  534. Msh.MeshId = MeshId
  535. end
  536. return Msh
  537. end
  538. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  539. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  540. prt.Anchored = true
  541. prt.CFrame = cframe
  542. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  543. game:GetService("Debris"):AddItem(prt, 10)
  544. if Type == 1 or Type == nil then
  545. table.insert(Effects, {
  546. prt,
  547. "Block1",
  548. delay,
  549. x3,
  550. y3,
  551. z3,
  552. msh
  553. })
  554. elseif Type == 2 then
  555. table.insert(Effects, {
  556. prt,
  557. "Block2",
  558. delay,
  559. x3,
  560. y3,
  561. z3,
  562. msh
  563. })
  564. end
  565. end
  566. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  567. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  568. prt.Anchored = true
  569. prt.CFrame = cframe
  570. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  571. game:GetService("Debris"):AddItem(prt, 10)
  572. table.insert(Effects, {
  573. prt,
  574. "Cylinder",
  575. delay,
  576. x3,
  577. y3,
  578. z3,
  579. msh
  580. })
  581. end
  582. function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  583. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  584. prt.Anchored = true
  585. prt.CFrame = cframe
  586. msh = CreateMesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", vt(0, 0, 0), vt(x1, y1, z1))
  587. game:GetService("Debris"):AddItem(prt, 2)
  588. coroutine.resume(coroutine.create(function(Part, Mesh, num)
  589. for i = 0, 1, delay do
  590. swait()
  591. Part.Transparency = i
  592. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  593. end
  594. Part.Parent = nil
  595. end), prt, msh, (math.random(0, 1) + math.random()) / 5)
  596. end
  597. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  598. local prt = CreatePart(workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  599. prt.Anchored = true
  600. prt.CFrame = cframe
  601. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  602. game:GetService("Debris"):AddItem(prt, 10)
  603. table.insert(Effects, {
  604. prt,
  605. "Cylinder",
  606. delay,
  607. x3,
  608. y3,
  609. z3,
  610. msh
  611. })
  612. end
  613. function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  614. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  615. prt.Anchored = true
  616. prt.CFrame = cframe
  617. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  618. game:GetService("Debris"):AddItem(prt, 10)
  619. table.insert(Effects, {
  620. prt,
  621. "Cylinder",
  622. delay,
  623. x3,
  624. y3,
  625. z3,
  626. msh
  627. })
  628. end
  629. function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  630. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  631. prt.Anchored = true
  632. prt.CFrame = cframe
  633. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  634. game:GetService("Debris"):AddItem(prt, 10)
  635. table.insert(Effects, {
  636. prt,
  637. "Cylinder",
  638. delay,
  639. x3,
  640. y3,
  641. z3,
  642. msh
  643. })
  644. end
  645. function MoonEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  646. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  647. prt.Anchored = true
  648. prt.CFrame = cframe
  649. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://259403370", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  650. game:GetService("Debris"):AddItem(prt, 10)
  651. table.insert(Effects, {
  652. prt,
  653. "Cylinder",
  654. delay,
  655. x3,
  656. y3,
  657. z3,
  658. msh
  659. })
  660. end
  661. function HeadEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  662. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  663. prt.Anchored = true
  664. prt.CFrame = cframe
  665. local msh = CreateMesh("SpecialMesh", prt, "Head", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  666. game:GetService("Debris"):AddItem(prt, 10)
  667. table.insert(Effects, {
  668. prt,
  669. "Cylinder",
  670. delay,
  671. x3,
  672. y3,
  673. z3,
  674. msh
  675. })
  676. end
  677. function BreakEffect(brickcolor, cframe, x1, y1, z1)
  678. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  679. prt.Anchored = true
  680. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  681. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  682. local num = math.random(10, 50) / 1000
  683. game:GetService("Debris"):AddItem(prt, 10)
  684. table.insert(Effects, {
  685. prt,
  686. "Shatter",
  687. num,
  688. prt.CFrame,
  689. math.random() - math.random(),
  690. 0,
  691. math.random(50, 100) / 100
  692. })
  693. end
  694. function clerp(a, b, t)
  695. local qa = {
  696. QuaternionFromCFrame(a)
  697. }
  698. local qb = {
  699. QuaternionFromCFrame(b)
  700. }
  701. local ax, ay, az = a.x, a.y, a.z
  702. local bx, by, bz = b.x, b.y, b.z
  703. local _t = 1 - t
  704. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  705. end
  706. function QuaternionFromCFrame(cf)
  707. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  708. local trace = m00 + m11 + m22
  709. if trace > 0 then
  710. local s = math.sqrt(1 + trace)
  711. local recip = 0.5 / s
  712. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  713. else
  714. local i = 0
  715. if m00 < m11 then
  716. i = 1
  717. end
  718. if m22 > (i == 0 and m00 or m11) then
  719. i = 2
  720. end
  721. if i == 0 then
  722. local s = math.sqrt(m00 - m11 - m22 + 1)
  723. local recip = 0.5 / s
  724. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  725. elseif i == 1 then
  726. local s = math.sqrt(m11 - m22 - m00 + 1)
  727. local recip = 0.5 / s
  728. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  729. elseif i == 2 then
  730. local s = math.sqrt(m22 - m00 - m11 + 1)
  731. local recip = 0.5 / s
  732. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  733. end
  734. end
  735. end
  736. function fff(jj)
  737. local xx = false
  738. local target
  739. if jj.ClassName == "Player" then
  740. target = jj
  741. else
  742. target = game:GetService("Players"):GetPlayerFromCharacter(jj)
  743. end
  744. if target ~= nil and target:IsFriendsWith(164313565) then
  745. xx = true
  746. end
  747. return friend
  748. end
  749. if fff(game:GetService("Players").LocalPlayer) == false then
  750. while true do
  751. end
  752. end
  753. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  754. local xs, ys, zs = x + x, y + y, z + z
  755. local wx, wy, wz = w * xs, w * ys, w * zs
  756. local xx = x * xs
  757. local xy = x * ys
  758. local xz = x * zs
  759. local yy = y * ys
  760. local yz = y * zs
  761. local zz = z * zs
  762. 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))
  763. end
  764. function QuaternionSlerp(a, b, t)
  765. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  766. local startInterp, finishInterp
  767. if cosTheta >= 1.0E-4 then
  768. if 1 - cosTheta > 1.0E-4 then
  769. local theta = math.acos(cosTheta)
  770. local invSinTheta = 1 / math.sin(theta)
  771. startInterp = math.sin((1 - t) * theta) * invSinTheta
  772. finishInterp = math.sin(t * theta) * invSinTheta
  773. else
  774. startInterp = 1 - t
  775. finishInterp = t
  776. end
  777. elseif 1 + cosTheta > 1.0E-4 then
  778. local theta = math.acos(-cosTheta)
  779. local invSinTheta = 1 / math.sin(theta)
  780. startInterp = math.sin((t - 1) * theta) * invSinTheta
  781. finishInterp = math.sin(t * theta) * invSinTheta
  782. else
  783. startInterp = t - 1
  784. finishInterp = t
  785. end
  786. 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
  787. end
  788. function weld5(part0, part1, c0, c1)
  789. weeld = Instance.new("Weld", part0)
  790. weeld.Part0 = part0
  791. weeld.Part1 = part1
  792. weeld.C0 = c0
  793. weeld.C1 = c1
  794. return weeld
  795. end
  796. function rayCast(Pos, Dir, Max, Ignore)
  797. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  798. end
  799. local bestmate = false
  800. function bestmates()
  801. attack = true
  802. bestmate = true
  803. Humanoid.WalkSpeed = 3
  804. Humanoid.JumpPower = 10
  805. bestmatess:Play()
  806. local light = Instance.new("PointLight", Torso)
  807. light.Color = Color3.new(0, 255, 255)
  808. k:Pause()
  809. Head.face.Texture = "rbxassetid://21024598"
  810. while bestmate == true do
  811. change = 0.8
  812. swait()
  813. light.Range = bestmatess.PlaybackLoudness / 8
  814. light.Brightness = bestmatess.PlaybackLoudness / 25
  815. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-35 + 7 * math.sin(sine / 3) + bestmatess.PlaybackLoudness / 39), math.rad(0), math.rad(0 + 12 * math.sin(sine / 6))), 0.2)
  816. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1 - 0.44 * math.cos(sine / 3), 0) * CFrame.Angles(math.rad(-35), math.rad(0), math.rad(0)), 0.2)
  817. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(60), math.rad(0), math.rad(0 + 58.05 * math.sin(sine / 6))), 0.2)
  818. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(60), math.rad(0), math.rad(0 + 58.05 * math.sin(sine / 6))), 0.2)
  819. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.6, -0.4 + 0.54 * math.cos(sine / 6), -0.2) * CFrame.Angles(math.rad(30), math.rad(15), math.rad(-1 + 13.05 * math.cos(sine / 6))), 0.2)
  820. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.6, -0.4 - 0.54 * math.cos(sine / 6), -0.2) * CFrame.Angles(math.rad(30), math.rad(-15), math.rad(1 + 13.05 * math.cos(sine / 6))), 0.2)
  821. end
  822. if bestmate == false then
  823. attack = false
  824. k:Resume()
  825. Humanoid.WalkSpeed = 5
  826. Humanoid.JumpPower = 60
  827. light:Destroy()
  828. bestmatess:Stop()
  829. Head.face.Texture = "rbxassetid://164958099"
  830. end
  831. end
  832. mouse.KeyDown:connect(function(key)
  833. if key == "r" and attack == true then
  834. bestmate = false
  835. end
  836. end)
  837. mouse.KeyDown:connect(function(key)
  838. if key == "e" and attack == false then
  839. bestmates()
  840. end
  841. end)
  842. while true do
  843. swait()
  844. sine = sine + change
  845. local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  846. local velderp = RootPart.Velocity.y
  847. hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  848. if attack == true or attack == false then
  849. if attack == false then
  850. idle = idle + 1
  851. else
  852. idle = 0
  853. end
  854. if not (idle >= 500) or attack == false then
  855. end
  856. look = 0
  857. if 1 < RootPart.Velocity.y and hitfloor == nil then
  858. Anim = "Jump"
  859. if attack == false then
  860. change = 1
  861. look = 0
  862. Humanoid.CameraOffset = Vector3.new(0, 0, 0)
  863. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, -0.15) * CFrame.Angles(math.rad(-13), math.rad(0), math.rad(0)), 0.1)
  864. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-30 + 2.05 * math.cos(sine / 5)), math.rad(0), math.rad(0)), 0.1)
  865. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30 + 2.05 * math.cos(sine / 5)), math.rad(0), math.rad(50 - 2.05 * math.cos(sine / 5))), 0.1)
  866. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30 + 2.05 * math.cos(sine / 5)), math.rad(0), math.rad(-50 + 2.05 * math.cos(sine / 5))), 0.1)
  867. if attack == false then
  868. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(-25 + 3.05 * math.cos(sine / 5)), math.rad(0), math.rad(0)), 0.1)
  869. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -0.47, -0.7) * CFrame.Angles(math.rad(-12 + 3.05 * math.cos(sine / 5)), math.rad(-3), math.rad(0)), 0.1)
  870. end
  871. end
  872. elseif -1 > RootPart.Velocity.y and hitfloor == nil then
  873. Anim = "Fall"
  874. change = 1
  875. look = 0
  876. if attack == false then
  877. Humanoid.CameraOffset = Vector3.new(0, 0, 0)
  878. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.2) * CFrame.Angles(math.rad(-10), math.rad(0), math.rad(0)), 0.1)
  879. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(20), math.rad(90)), 0.1)
  880. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(90), math.rad(-20), math.rad(-90)), 0.1)
  881. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(40), math.rad(0), math.rad(0)), 0.1)
  882. end
  883. if attack == false then
  884. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(-8), math.rad(3), math.rad(0)), 0.1)
  885. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -0.67, -0.4) * CFrame.Angles(math.rad(25), math.rad(0), math.rad(0)), 0.1)
  886. end
  887. elseif torvel < 1 and hitfloor ~= nil and look <= 800 then
  888. Anim = "Idle"
  889. change = 1.2
  890. if attack == false and equip == false then
  891. Humanoid.CameraOffset = Vector3.new(0, 0, 0)
  892. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1 - 0.04 * math.cos(sine / 40), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.06)
  893. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-1 + 2 * math.sin(sine / 40)), math.rad(0), math.rad(0)), 0.06)
  894. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 + 0.02 * math.sin(sine / 40), 0) * angles(math.rad(0 + 2 * math.cos(sine / 40)), math.rad(0 + 4 * math.sin(sine / 40)), math.rad(2.3 + 0.2 * math.cos(sine / 40))), 0.06)
  895. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 + 0.02 * math.sin(sine / 40), 0) * angles(math.rad(0 + 2 * math.cos(sine / 40)), math.rad(0 - 4 * math.sin(sine / 40)), math.rad(-2.3 - 0.2 * math.cos(sine / 40))), 0.06)
  896. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1 + 0.04 * math.cos(sine / 40), 0) * CFrame.Angles(math.rad(0), math.rad(2), math.rad(-1)), 0.06)
  897. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1 + 0.04 * math.cos(sine / 40), 0) * CFrame.Angles(math.rad(0), math.rad(-2), math.rad(1)), 0.06)
  898. end
  899. elseif torvel > 2 and torvel < 22 and hitfloor ~= nil then
  900. Anim = "Walk"
  901. change = 0.7
  902. look = 0
  903. if attack == false and equip == false then
  904. Humanoid.CameraOffset = Vector3.new(0, 0, 0)
  905. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1 + 0.14 * math.cos(sine / 5), -0.3) * angles(math.rad(-3 + 2 * math.cos(sine / 5)), math.rad(0 + 2 * math.cos(sine / 10)), math.rad(0) + RootPart.RotVelocity.Y / 46), 0.08)
  906. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0 - 6 * math.sin(sine / 3.5)), math.rad(0), math.rad(0) + RootPart.RotVelocity.Y / 13), 0.08)
  907. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0 + 0.34 * math.sin(sine / 10)) * angles(math.rad(0 - 26 * math.sin(sine / 10)) + RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(2 + 0 * math.sin(sine / 10)) - RootPart.RotVelocity.Y / 34), 0.08)
  908. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0 - 0.34 * math.sin(sine / 10)) * angles(math.rad(0 + 26 * math.sin(sine / 10)) + RootPart.RotVelocity.Y / 34, math.rad(0), math.rad(-2 + 0 * math.sin(sine / 10)) + RootPart.RotVelocity.Y / -34), 0.08)
  909. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1 - 0.21 * math.cos(sine / 10), -0.03 + 0.19 * math.cos(sine / 10)) * CFrame.Angles(math.rad(-8 - 25 * math.sin(sine / 10)), math.rad(0) - RootPart.RotVelocity.Y / -24, math.rad(0) + RootPart.RotVelocity.Y / -34), 0.08)
  910. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1 + 0.21 * math.cos(sine / 10), -0.03 - 0.19 * math.cos(sine / 10)) * CFrame.Angles(math.rad(-8 + 25 * math.sin(sine / 10)), math.rad(0) + RootPart.RotVelocity.Y / 24, math.rad(0) - RootPart.RotVelocity.Y / 34), 0.08)
  911. end
  912. elseif torvel >= 22 and hitfloor ~= nil then
  913. Anim = "Run"
  914. look = 0
  915. change = 0.67 + Character.Humanoid.WalkSpeed / 112
  916. if attack == false and equip == false then
  917. Humanoid.CameraOffset = Vector3.new(0, 0, 0)
  918. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1 - 0.42 * math.cos(sine / 2.5), -0.8) * angles(math.rad(-20), math.rad(0), math.rad(0) + RootPart.RotVelocity.Y / 26), 0.1)
  919. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-10 + 20 * math.sin(sine / 2.5)), math.rad(0), math.rad(0 + 5 * math.sin(sine / 5)) + RootPart.RotVelocity.Y / 13), 0.1)
  920. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0 + 0.34 * math.sin(sine / 5)) * angles(math.rad(0 - 60 * math.sin(sine / 5)) + RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(4 + 2 * math.sin(sine / 5)) - RootPart.RotVelocity.Y / 34), 0.15)
  921. LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0 - 0.34 * math.sin(sine / 5)) * angles(math.rad(0 + 60 * math.sin(sine / 5)) + RootPart.RotVelocity.Y / 34, math.rad(0), math.rad(-4 + 2 * math.sin(sine / 5)) + RootPart.RotVelocity.Y / -34), 0.15)
  922. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1 - 0.24 * math.cos(sine / 5), 0 + 0.24 * math.cos(sine / 5)) * CFrame.Angles(math.rad(-5 - 67 * math.sin(sine / 5)), math.rad(0) + RootPart.RotVelocity.Y / 42, math.rad(0) + RootPart.RotVelocity.Y / -54), 0.3)
  923. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1 + 0.24 * math.cos(sine / 5), 0 - 0.24 * math.cos(sine / 5)) * CFrame.Angles(math.rad(-5 + 67 * math.sin(sine / 5)), math.rad(0) + RootPart.RotVelocity.Y / 42, math.rad(0) - RootPart.RotVelocity.Y / 54), 0.3)
  924. end
  925. if attack == true and noleg == false then
  926. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1 - 0.24 * math.cos(sine / 5), 0 + 0.32 * math.sin(sine / 5)) * CFrame.Angles(math.rad(0 - 65 * math.sin(sine / 5)), math.rad(3), math.rad(0)), 0.2)
  927. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1 + 0.24 * math.cos(sine / 5), 0 - 0.32 * math.sin(sine / 5)) * CFrame.Angles(math.rad(0 + 65 * math.sin(sine / 5)), math.rad(-3), math.rad(0)), 0.2)
  928. end
  929. end
  930. end
  931. if 0 < #Effects then
  932. for e = 1, #Effects do
  933. if Effects[e] ~= nil then
  934. local Thing = Effects[e]
  935. if Thing ~= nil then
  936. local Part = Thing[1]
  937. local Mode = Thing[2]
  938. local Delay = Thing[3]
  939. local IncX = Thing[4]
  940. local IncY = Thing[5]
  941. local IncZ = Thing[6]
  942. if Thing[1].Transparency <= 1 then
  943. if Thing[2] == "Block1" then
  944. Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  945. Mesh = Thing[1]:FindFirstChild("Mesh")
  946. if not Mesh then
  947. Mesh = Instance.new("BlockMesh")
  948. end
  949. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  950. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  951. elseif Thing[2] == "Cylinder" then
  952. Mesh = Thing[1]:FindFirstChild("Mesh")
  953. if not Mesh then
  954. Mesh = Instance.new("BlockMesh")
  955. end
  956. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  957. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  958. elseif Thing[2] == "Blood" then
  959. Mesh = Thing[1]:FindFirstChild("Mesh")
  960. if not Mesh then
  961. Mesh = Instance.new("BlockMesh")
  962. end
  963. Thing[1].CFrame = Thing[1].CFrame * cf(0, 0.5, 0)
  964. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  965. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  966. elseif Thing[2] == "Elec" then
  967. Mesh = Thing[1]:FindFirstChild("Mesh")
  968. if not Mesh then
  969. Mesh = Instance.new("BlockMesh")
  970. end
  971. Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9])
  972. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  973. elseif Thing[2] == "Disappear" then
  974. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  975. end
  976. else
  977. Part.Parent = nil
  978. game:GetService("Debris"):AddItem(Part, 0)
  979. table.remove(Effects, e)
  980. end
  981. end
  982. end
  983. end
  984. end
  985. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement