Advertisement
AstroScripts

Untitled

Nov 27th, 2019
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 63.38 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152. ---
  153. --hi fat
  154. --why did i make this? because I'm BORED.
  155. --also i took the base for this script from memeusv2 so if it's similar you know why
  156. wait()
  157. Player_Size = 1 --Size of the player.
  158. local Player = game.Players.ArtistBase
  159. local Character = Player.Character
  160. local plr = game:service'Players'.ArtistBase
  161. local Humanoid = Character.Humanoid
  162. local char = plr.Character
  163. local hum = char.Humanoid
  164. local ra = char["Right Arm"]
  165. local la= char["Left Arm"]
  166. local rl= char["Right Leg"]
  167. local ll = char["Left Leg"]
  168. Torso=Character.Torso
  169. RootPart=Character.HumanoidRootPart
  170. RootJoint=RootPart.RootJoint
  171. local hed = char.Head
  172. local root = char.HumanoidRootPart
  173. local rootj = root.RootJoint
  174. local tors = char.Torso
  175. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  176. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  177. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  178. local cam = game.Workspace.CurrentCamera
  179. trazx = Instance.new("ParticleEmitter")
  180. c = game.Players.ArtistBase.Character
  181. local sine=0
  182.  
  183. -------------------------------------------------------
  184. --Start Good Stuff--
  185. -------------------------------------------------------
  186. CF = CFrame.new
  187. angles = CFrame.Angles
  188. attack = false
  189. timetofly = true
  190. Euler = CFrame.fromEulerAnglesXYZ
  191. Rad = math.rad
  192. IT = Instance.new
  193. BrickC = BrickColor.new
  194. Cos = math.cos
  195. Acos = math.acos
  196. Sin = math.sin
  197. Asin = math.asin
  198. Abs = math.abs
  199. Mrandom = math.random
  200. Floor = math.floor
  201. random = math.random
  202. radian = math.rad
  203. Vec3 = Vector3.new
  204. cFrame = CFrame.new
  205. Euler = CFrame.fromEulerAnglesXYZ
  206. cf = CFrame.new
  207. -------------------------------------------------------
  208. --End Good Stuff--
  209. -------------------------------------------------------
  210. necko = CF(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  211. RSH, LSH = nil, nil
  212. RW = Instance.new("Weld")
  213. LW = Instance.new("Weld")
  214. RH = tors["Right Hip"]
  215. LH = tors["Left Hip"]
  216. RSH = tors["Right Shoulder"]
  217. LSH = tors["Left Shoulder"]
  218. RSH.Parent = nil
  219. LSH.Parent = nil
  220. RW.Name = "RW"
  221. RW.Part0 = tors
  222. RW.C0 = CF(1.5, 0.5, 0)
  223. RW.C1 = CF(0, 0.5, 0)
  224. RW.Part1 = ra
  225. RW.Parent = tors
  226. LW.Name = "LW"
  227. LW.Part0 = tors
  228. LW.C0 = CF(-1.5, 0.5, 0)
  229. LW.C1 = CF(0, 0.5, 0)
  230. LW.Part1 = la
  231. LW.Parent = tors
  232. Effects = {}
  233. -------------------------------------------------------
  234. --Start HeartBeat--
  235. -------------------------------------------------------
  236. ArtificialHB = Instance.new("BindableEvent", script)
  237. ArtificialHB.Name = "Heartbeat"
  238. script:WaitForChild("Heartbeat")
  239.  
  240. frame = 1 / 60
  241. tf = 0
  242. allowframeloss = false
  243. tossremainder = false
  244.  
  245.  
  246. lastframe = tick()
  247. script.Heartbeat:Fire()
  248.  
  249.  
  250. game:GetService("RunService").Heartbeat:connect(function(s, p)
  251. tf = tf + s
  252. if tf >= frame then
  253. if allowframeloss then
  254. script.Heartbeat:Fire()
  255. lastframe = tick()
  256. else
  257. for i = 1, math.floor(tf / frame) do
  258. script.Heartbeat:Fire()
  259. end
  260. lastframe = tick()
  261. end
  262. if tossremainder then
  263. tf = 0
  264. else
  265. tf = tf - frame * math.floor(tf / frame)
  266. end
  267. end
  268. end)
  269. -------------------------------------------------------
  270. --End HeartBeat--
  271. -------------------------------------------------------
  272. local halocolor = BrickColor.new("Pastel light blue")
  273. local halocolor2 = BrickColor.new("Cool yellow")
  274. local starcolor = BrickColor.new("Bright yellow")
  275. local lunacolor = BrickColor.new("Navy blue")
  276. local lunacolor2 = BrickColor.new("Bright blue")
  277. local wepcolor = BrickColor.new("Really black")
  278. local maincolor = BrickColor.new("Really black")
  279. local m = Instance.new("Model",char)
  280. local m2 = Instance.new("Model",char)
  281. local m3 = Instance.new("Model",char)
  282. local mw1 = Instance.new("Model",char)
  283. local mw2 = Instance.new("Model",char)
  284.  
  285. local extrawingmod1 = Instance.new("Model",char)
  286. local extrawingmod2 = Instance.new("Model",char)
  287.  
  288. function CameraEnshaking(Length, Intensity) --Took Straight from StarGlitcher!
  289. coroutine.resume(coroutine.create(function()
  290. local intensity = 1 * Intensity
  291. local rotM = 0.01 * Intensity
  292. for i = 0, Length, 0.1 do
  293. swait()
  294. intensity = intensity - 0.05 * Intensity / Length
  295. rotM = rotM - 5.0E-4 * Intensity / Length
  296. hum.CameraOffset = Vec3(radian(random(-intensity, intensity)), radian(random(-intensity, intensity)), radian(random(-intensity, intensity)))
  297. cam.CFrame = cam.CFrame * cFrame(radian(random(-intensity, intensity)), radian(random(-intensity, intensity)), radian(random(-intensity, intensity))) * Euler(radian(random(-intensity, intensity)) * rotM, radian(random(-intensity, intensity)) * rotM, radian(random(-intensity, intensity)) * rotM)
  298. end
  299. Humanoid.CameraOffset = Vec3(0, 0, 0)
  300. end))
  301. end
  302.  
  303. local joyemoji = Instance.new('ParticleEmitter', tors)
  304. joyemoji.VelocitySpread = 2000
  305. joyemoji.Lifetime = NumberRange.new(1)
  306. joyemoji.Speed = NumberRange.new(40)
  307. joy= {}
  308. for i=0, 19 do
  309. joy[#joy+ 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
  310. end
  311. joyemoji.Size = NumberSequence.new(joy)
  312. joyemoji.Rate = 0
  313. joyemoji.LockedToPart = false
  314. joyemoji.LightEmission = 0
  315. joyemoji.Texture = "rbxassetid://1176402123"
  316. joyemoji.Color = ColorSequence.new(BrickColor.new("Institutional white").Color)
  317.  
  318.  
  319. local LIT = Instance.new('ParticleEmitter', tors)
  320. LIT.VelocitySpread = 2000
  321. LIT.Lifetime = NumberRange.new(1)
  322. LIT.Speed = NumberRange.new(45)
  323. nani= {}
  324. for i=0, 19 do
  325. nani[#nani+ 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
  326. end
  327. LIT.Size = NumberSequence.new(nani)
  328. LIT.Rate = 0
  329. LIT.LockedToPart = false
  330. LIT.LightEmission = 0
  331. LIT.Texture = "rbxassetid://1492670151"
  332. LIT.Color = ColorSequence.new(BrickColor.new("Institutional white").Color)
  333.  
  334. local toast = Instance.new('ParticleEmitter', tors)
  335. toast.VelocitySpread = 2000
  336. toast.Lifetime = NumberRange.new(1)
  337. toast.Speed = NumberRange.new(60)
  338. toasterstoasttoast= {}
  339. for i=0, 19 do
  340. toasterstoasttoast[#toasterstoasttoast+ 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
  341. end
  342. toast.Size = NumberSequence.new(toasterstoasttoast)
  343. toast.Rate = 0
  344. toast.LockedToPart = false
  345. toast.LightEmission = 0
  346. toast.Texture = "rbxassetid://436096230"
  347. toast.Color = ColorSequence.new(BrickColor.new("Institutional white").Color)
  348.  
  349. local ok = Instance.new('ParticleEmitter', tors)
  350. ok.VelocitySpread = 2000
  351. ok.Lifetime = NumberRange.new(1)
  352. ok.Speed = NumberRange.new(50)
  353. cool= {}
  354. for i=0, 19 do
  355. cool[#cool+ 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
  356. end
  357. ok.Size = NumberSequence.new(cool)
  358. ok.Rate = 0
  359. ok.LockedToPart = false
  360. ok.LightEmission = 0
  361. ok.Texture = "rbxassetid://636768448"
  362. ok.Color = ColorSequence.new(BrickColor.new("Institutional white").Color)
  363.  
  364. -------------------------------------------------------
  365. --Start Kyu's shitty stuff--
  366. -------------------------------------------------------
  367.  
  368. function ragdoll(model)
  369. local char = model
  370. torso = char.HumanoidRootPart
  371. torso2 = char.Torso
  372. LW.Parent = nil
  373. RW.Parent = nil
  374. LH.Parent = nil
  375. RH.Parent = nil
  376. if hum ~= nil then
  377. hum.PlatformStand = true
  378. end
  379.  
  380. local Head = char:FindFirstChild("Head")
  381. if Head then
  382. local Neck = Instance.new("Weld")
  383. Neck.Name = "Neck"
  384. Neck.Part0 = torso
  385. Neck.Part1 = Head
  386. Neck.C0 = CFrame.new(0, 1.5, 0)
  387. Neck.C1 = CFrame.new()
  388. Neck.Parent = torso
  389. end
  390. local Limb = char:FindFirstChild("Right Arm")
  391. if Limb then
  392.  
  393. Limb.CFrame = torso.CFrame * CFrame.new(1.5, 0, 0)
  394. local Joint = Instance.new("Glue")
  395. Joint.Name = "RightShoulder"
  396. Joint.Part0 = torso
  397. Joint.Part1 = Limb
  398. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  399. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  400. Joint.Parent = torso
  401.  
  402. local B = Instance.new("Part")
  403. B.TopSurface = 0
  404. B.BottomSurface = 0
  405. B.formFactor = "Symmetric"
  406. B.Size = Vector3.new(1, 1, 1)
  407. B.Transparency = 1
  408. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  409. B.Parent = char
  410. local W = Instance.new("Weld")
  411. W.Part0 = Limb
  412. W.Part1 = B
  413. W.C0 = CFrame.new(0, -0.5, 0)
  414. W.Parent = Limb
  415.  
  416. end
  417. local Limb = char:FindFirstChild("Left Arm")
  418. if Limb then
  419.  
  420. Limb.CFrame = torso.CFrame * CFrame.new(-1.5, 0, 0)
  421. local Joint = Instance.new("Glue")
  422. Joint.Name = "LeftShoulder"
  423. Joint.Part0 = torso
  424. Joint.Part1 = Limb
  425. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  426. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  427. Joint.Parent = torso
  428.  
  429. local B = Instance.new("Part")
  430. B.TopSurface = 0
  431. B.BottomSurface = 0
  432. B.formFactor = "Symmetric"
  433. B.Size = Vector3.new(1, 1, 1)
  434. B.Transparency = 1
  435. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  436. B.Parent = char
  437. local W = Instance.new("Weld")
  438. W.Part0 = Limb
  439. W.Part1 = B
  440. W.C0 = CFrame.new(0, -0.5, 0)
  441. W.Parent = Limb
  442.  
  443. end
  444. local Limb = char:FindFirstChild("Right Leg")
  445. if Limb then
  446.  
  447. Limb.CFrame = torso.CFrame * CFrame.new(0.5, -2, 0)
  448. local Joint = Instance.new("Glue")
  449. Joint.Name = "RightHip"
  450. Joint.Part0 = torso
  451. Joint.Part1 = Limb
  452. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  453. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  454. Joint.Parent = torso
  455.  
  456. local B = Instance.new("Part")
  457. B.TopSurface = 0
  458. B.BottomSurface = 0
  459. B.formFactor = "Symmetric"
  460. B.Size = Vector3.new(1, 1, 1)
  461. B.Transparency = 1
  462. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  463. B.Parent = char
  464. local W = Instance.new("Weld")
  465. W.Part0 = Limb
  466. W.Part1 = B
  467. W.C0 = CFrame.new(0, -0.5, 0)
  468. W.Parent = Limb
  469.  
  470. end
  471. local Limb = char:FindFirstChild("Left Leg")
  472. if Limb then
  473.  
  474. Limb.CFrame = torso.CFrame * CFrame.new(-0.5, -2, 0)
  475. local Joint = Instance.new("Glue")
  476. Joint.Name = "LeftHip"
  477. Joint.Part0 = torso
  478. Joint.Part1 = Limb
  479. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  480. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  481. Joint.Parent = torso
  482.  
  483. local B = Instance.new("Part")
  484. B.TopSurface = 0
  485. B.BottomSurface = 0
  486. B.formFactor = "Symmetric"
  487. B.Size = Vector3.new(1, 1, 1)
  488. B.Transparency = 1
  489. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  490. B.Parent = char
  491. local W = Instance.new("Weld")
  492. W.Part0 = Limb
  493. W.Part1 = B
  494. W.C0 = CFrame.new(0, -0.5, 0)
  495. W.Parent = Limb
  496.  
  497. end
  498. --[
  499. local Bar = Instance.new("Part")
  500. Bar.TopSurface = 0
  501. Bar.BottomSurface = 0
  502. Bar.formFactor = "Symmetric"
  503. Bar.Size = Vector3.new(1, 1, 1)
  504. Bar.Transparency = 1
  505. Bar.CFrame = torso.CFrame * CFrame.new(0, 0.5, 0)
  506. Bar.Parent = char
  507. local Weld = Instance.new("Weld")
  508. Weld.Part0 = torso
  509. Weld.Part1 = Bar
  510. Weld.C0 = CFrame.new(0, 0.5, 0)
  511. Weld.Parent = torso
  512. --]]
  513.  
  514. torso.CFrame = CFrame.new(torso.Position)*CFrame.Angles(math.rad(20),math.rad(torso.Orientation.Y),math.rad(torso.Orientation.Z))
  515.  
  516. end
  517.  
  518. -------------------------------------------------------
  519. --End Kyu's shitty stuff--
  520. -------------------------------------------------------
  521.  
  522. -------------------------------------------------------
  523. --Start Important Functions--
  524. -------------------------------------------------------
  525. function swait(num)
  526. if num == 0 or num == nil then
  527. game:service("RunService").Stepped:wait(0)
  528. else
  529. for i = 0, num do
  530. game:service("RunService").Stepped:wait(0)
  531. end
  532. end
  533. end
  534. function thread(f)
  535. coroutine.resume(coroutine.create(f))
  536. end
  537. function clerp(a, b, t)
  538. local qa = {
  539. QuaternionFromCFrame(a)
  540. }
  541. local qb = {
  542. QuaternionFromCFrame(b)
  543. }
  544. local ax, ay, az = a.x, a.y, a.z
  545. local bx, by, bz = b.x, b.y, b.z
  546. local _t = 1 - t
  547. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  548. end
  549. function QuaternionFromCFrame(cf)
  550. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  551. local trace = m00 + m11 + m22
  552. if trace > 0 then
  553. local s = math.sqrt(1 + trace)
  554. local recip = 0.5 / s
  555. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  556. else
  557. local i = 0
  558. if m00 < m11 then
  559. i = 1
  560. end
  561. if m22 > (i == 0 and m00 or m11) then
  562. i = 2
  563. end
  564. if i == 0 then
  565. local s = math.sqrt(m00 - m11 - m22 + 1)
  566. local recip = 0.5 / s
  567. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  568. elseif i == 1 then
  569. local s = math.sqrt(m11 - m22 - m00 + 1)
  570. local recip = 0.5 / s
  571. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  572. elseif i == 2 then
  573. local s = math.sqrt(m22 - m00 - m11 + 1)
  574. local recip = 0.5 / s
  575. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  576. end
  577. end
  578. end
  579. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  580. local xs, ys, zs = x + x, y + y, z + z
  581. local wx, wy, wz = w * xs, w * ys, w * zs
  582. local xx = x * xs
  583. local xy = x * ys
  584. local xz = x * zs
  585. local yy = y * ys
  586. local yz = y * zs
  587. local zz = z * zs
  588. 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))
  589. end
  590. function QuaternionSlerp(a, b, t)
  591. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  592. local startInterp, finishInterp
  593. if cosTheta >= 1.0E-4 then
  594. if 1 - cosTheta > 1.0E-4 then
  595. local theta = math.acos(cosTheta)
  596. local invSinTheta = 1 / Sin(theta)
  597. startInterp = Sin((1 - t) * theta) * invSinTheta
  598. finishInterp = Sin(t * theta) * invSinTheta
  599. else
  600. startInterp = 1 - t
  601. finishInterp = t
  602. end
  603. elseif 1 + cosTheta > 1.0E-4 then
  604. local theta = math.acos(-cosTheta)
  605. local invSinTheta = 1 / Sin(theta)
  606. startInterp = Sin((t - 1) * theta) * invSinTheta
  607. finishInterp = Sin(t * theta) * invSinTheta
  608. else
  609. startInterp = t - 1
  610. finishInterp = t
  611. end
  612. 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
  613. end
  614. function rayCast(Position, Direction, Range, Ignore)
  615. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  616. end
  617. local RbxUtility = LoadLibrary("RbxUtility")
  618. local Create = RbxUtility.Create
  619.  
  620. -------------------------------------------------------
  621. --Start Damage Function--
  622. -------------------------------------------------------
  623. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  624. if hit.Parent == nil then
  625. return
  626. end
  627. local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  628. for _, v in pairs(hit.Parent:children()) do
  629. if v:IsA("Humanoid") then
  630. h = v
  631. end
  632. end
  633. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  634. warn'No R15 allowed'
  635. hit.Parent:FindFirstChild("Head"):BreakJoints()
  636. end
  637.  
  638. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  639. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  640. if hit.Parent.DebounceHit.Value == true then
  641. return
  642. end
  643. end
  644. if insta == true then
  645. hit.Parent:FindFirstChild("Head"):BreakJoints()
  646. end
  647. local c = Create("ObjectValue"){
  648. Name = "creator",
  649. Value = game:service("Players").ArtistBase,
  650. Parent = h,
  651. }
  652. game:GetService("Debris"):AddItem(c, .5)
  653. if HitSound ~= nil and HitPitch ~= nil then
  654. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  655. end
  656. local Damage = math.random(minim, maxim)
  657. local blocked = false
  658. local block = hit.Parent:findFirstChild("Block")
  659. if block ~= nil then
  660. if block.className == "IntValue" then
  661. if block.Value > 0 then
  662. blocked = true
  663. block.Value = block.Value - 1
  664. print(block.Value)
  665. end
  666. end
  667. end
  668. if blocked == false then
  669. h.Health = h.Health - Damage
  670. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  671. else
  672. h.Health = h.Health - (Damage / 2)
  673. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  674. end
  675. if Type == "Knockdown" then
  676. local hum = hit.Parent.Humanoid
  677. hum.PlatformStand = true
  678. coroutine.resume(coroutine.create(function(HHumanoid)
  679. swait(1)
  680. HHumanoid.PlatformStand = false
  681. end), hum)
  682. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  683. local bodvol = Create("BodyVelocity"){
  684. velocity = angle * knockback,
  685. P = 5000,
  686. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  687. Parent = hit,
  688. }
  689. local rl = Create("BodyAngularVelocity"){
  690. P = 3000,
  691. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  692. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  693. Parent = hit,
  694. }
  695. game:GetService("Debris"):AddItem(bodvol, .5)
  696. game:GetService("Debris"):AddItem(rl, .5)
  697. elseif Type == "Normal" then
  698. local vp = Create("BodyVelocity"){
  699. P = 500,
  700. maxForce = Vector3.new(math.huge, 0, math.huge),
  701. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  702. }
  703. if knockback > 0 then
  704. vp.Parent = hit.Parent.Torso
  705. end
  706. game:GetService("Debris"):AddItem(vp, .5)
  707. elseif Type == "Up" then
  708. local bodyVelocity = Create("BodyVelocity"){
  709. velocity = Vector3.new(0, 20, 0),
  710. P = 5000,
  711. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  712. Parent = hit,
  713. }
  714. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  715. elseif Type == "DarkUp" then
  716. coroutine.resume(coroutine.create(function()
  717. for i = 0, 1, 0.1 do
  718. swait()
  719. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  720. end
  721. end))
  722. local bodyVelocity = Create("BodyVelocity"){
  723. velocity = Vector3.new(0, 20, 0),
  724. P = 5000,
  725. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  726. Parent = hit,
  727. }
  728. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  729. elseif Type == "Snare" then
  730. local bp = Create("BodyPosition"){
  731. P = 2000,
  732. D = 100,
  733. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  734. position = hit.Parent.Torso.Position,
  735. Parent = hit.Parent.Torso,
  736. }
  737. game:GetService("Debris"):AddItem(bp, 1)
  738. elseif Type == "Freeze" then
  739. local BodPos = Create("BodyPosition"){
  740. P = 50000,
  741. D = 1000,
  742. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  743. position = hit.Parent.Torso.Position,
  744. Parent = hit.Parent.Torso,
  745. }
  746. local BodGy = Create("BodyGyro") {
  747. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  748. P = 20e+003,
  749. Parent = hit.Parent.Torso,
  750. cframe = hit.Parent.Torso.CFrame,
  751. }
  752. hit.Parent.Torso.Anchored = true
  753. coroutine.resume(coroutine.create(function(Part)
  754. swait(1.5)
  755. Part.Anchored = false
  756. end), hit.Parent.Torso)
  757. game:GetService("Debris"):AddItem(BodPos, 3)
  758. game:GetService("Debris"):AddItem(BodGy, 3)
  759. end
  760. local debounce = Create("BoolValue"){
  761. Name = "DebounceHit",
  762. Parent = hit.Parent,
  763. Value = true,
  764. }
  765. game:GetService("Debris"):AddItem(debounce, Delay)
  766. c = Create("ObjectValue"){
  767. Name = "creator",
  768. Value = Player,
  769. Parent = h,
  770. }
  771. game:GetService("Debris"):AddItem(c, .5)
  772. end
  773. end
  774. -------------------------------------------------------
  775. --End Damage Function--
  776. -------------------------------------------------------
  777.  
  778. -------------------------------------------------------
  779. --Start Damage Function Customization--
  780. -------------------------------------------------------
  781. function ShowDamage(Pos, Text, Time, Color)
  782. local Rate = (1 / 30)
  783. local Pos = (Pos or Vector3.new(0, 0, 0))
  784. local Text = (Text or "")
  785. local Time = (Time or 2)
  786. local Color = (Color or Color3.new(1, 0, 1))
  787. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  788. EffectPart.Anchored = true
  789. local BillboardGui = Create("BillboardGui"){
  790. Size = UDim2.new(3, 0, 3, 0),
  791. Adornee = EffectPart,
  792. Parent = EffectPart,
  793. }
  794. local TextLabel = Create("TextLabel"){
  795. BackgroundTransparency = 1,
  796. Size = UDim2.new(1, 0, 1, 0),
  797. Text = Text,
  798. Font = "Highway",
  799. TextColor3 = Color,
  800. TextScaled = true,
  801. Parent = BillboardGui,
  802. }
  803. game.Debris:AddItem(EffectPart, (Time))
  804. EffectPart.Parent = game:GetService("Workspace")
  805. delay(0, function()
  806. local Frames = (Time / Rate)
  807. for Frame = 1, Frames do
  808. wait(Rate)
  809. local Percent = (Frame / Frames)
  810. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  811. TextLabel.TextTransparency = Percent
  812. end
  813. if EffectPart and EffectPart.Parent then
  814. EffectPart:Destroy()
  815. end
  816. end)
  817. end
  818. -------------------------------------------------------
  819. --End Damage Function Customization--
  820. -------------------------------------------------------
  821.  
  822. function MagniDamage(Part, magni, mindam, maxdam, knock, Type)
  823. for _, c in pairs(workspace:children()) do
  824. local hum = c:findFirstChild("Humanoid")
  825. if hum ~= nil then
  826. local head = c:findFirstChild("Head")
  827. if head ~= nil then
  828. local targ = head.Position - Part.Position
  829. local mag = targ.magnitude
  830. if magni >= mag and c.Name ~= plr.Name then
  831. Damage(head, head, mindam, maxdam, knock, Type, root, 0.1, "http://www.roblox.com/asset/?id=231917784", 1.2)
  832. end
  833. end
  834. end
  835. end
  836. end
  837.  
  838.  
  839. CFuncs = {
  840. Part = {
  841. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  842. local Part = Create("Part")({
  843. Parent = Parent,
  844. Reflectance = Reflectance,
  845. Transparency = Transparency,
  846. CanCollide = false,
  847. Locked = true,
  848. BrickColor = BrickColor.new(tostring(BColor)),
  849. Name = Name,
  850. Size = Size,
  851. Material = Material
  852. })
  853. RemoveOutlines(Part)
  854. return Part
  855. end
  856. },
  857. Mesh = {
  858. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  859. local Msh = Create(Mesh)({
  860. Parent = Part,
  861. Offset = OffSet,
  862. Scale = Scale
  863. })
  864. if Mesh == "SpecialMesh" then
  865. Msh.MeshType = MeshType
  866. Msh.MeshId = MeshId
  867. end
  868. return Msh
  869. end
  870. },
  871. Mesh = {
  872. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  873. local Msh = Create(Mesh)({
  874. Parent = Part,
  875. Offset = OffSet,
  876. Scale = Scale
  877. })
  878. if Mesh == "SpecialMesh" then
  879. Msh.MeshType = MeshType
  880. Msh.MeshId = MeshId
  881. end
  882. return Msh
  883. end
  884. },
  885. Weld = {
  886. Create = function(Parent, Part0, Part1, C0, C1)
  887. local Weld = Create("Weld")({
  888. Parent = Parent,
  889. Part0 = Part0,
  890. Part1 = Part1,
  891. C0 = C0,
  892. C1 = C1
  893. })
  894. return Weld
  895. end
  896. },
  897. Sound = {
  898. Create = function(id, par, vol, pit)
  899. coroutine.resume(coroutine.create(function()
  900. local S = Create("Sound")({
  901. Volume = vol,
  902. Pitch = pit or 1,
  903. SoundId = id,
  904. Parent = par or workspace
  905. })
  906. wait()
  907. S:play()
  908. game:GetService("Debris"):AddItem(S, 6)
  909. end))
  910. end
  911. },
  912. ParticleEmitter = {
  913. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  914. local fp = Create("ParticleEmitter")({
  915. Parent = Parent,
  916. Color = ColorSequence.new(Color1, Color2),
  917. LightEmission = LightEmission,
  918. Size = Size,
  919. Texture = Texture,
  920. Transparency = Transparency,
  921. ZOffset = ZOffset,
  922. Acceleration = Accel,
  923. Drag = Drag,
  924. LockedToPart = LockedToPart,
  925. VelocityInheritance = VelocityInheritance,
  926. EmissionDirection = EmissionDirection,
  927. Enabled = Enabled,
  928. Lifetime = LifeTime,
  929. Rate = Rate,
  930. Rotation = Rotation,
  931. RotSpeed = RotSpeed,
  932. Speed = Speed,
  933. VelocitySpread = VelocitySpread
  934. })
  935. return fp
  936. end
  937. }
  938. }
  939. function RemoveOutlines(part)
  940. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  941. end
  942. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  943. local Part = Create("Part")({
  944. formFactor = FormFactor,
  945. Parent = Parent,
  946. Reflectance = Reflectance,
  947. Transparency = Transparency,
  948. CanCollide = false,
  949. Locked = true,
  950. BrickColor = BrickColor.new(tostring(BColor)),
  951. Name = Name,
  952. Size = Size,
  953. Material = Material
  954. })
  955. RemoveOutlines(Part)
  956. return Part
  957. end
  958. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  959. local Msh = Create(Mesh)({
  960. Parent = Part,
  961. Offset = OffSet,
  962. Scale = Scale
  963. })
  964. if Mesh == "SpecialMesh" then
  965. Msh.MeshType = MeshType
  966. Msh.MeshId = MeshId
  967. end
  968. return Msh
  969. end
  970. function CreateWeld(Parent, Part0, Part1, C0, C1)
  971. local Weld = Create("Weld")({
  972. Parent = Parent,
  973. Part0 = Part0,
  974. Part1 = Part1,
  975. C0 = C0,
  976. C1 = C1
  977. })
  978. return Weld
  979. end
  980. -------------------------------------------------------
  981. --Start Effect Function--
  982. -------------------------------------------------------
  983. EffectModel = Instance.new("Model", char)
  984. Effects = {
  985. Block = {
  986. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  987. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  988. prt.Anchored = true
  989. prt.CFrame = cframe
  990. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  991. game:GetService("Debris"):AddItem(prt, 10)
  992. if Type == 1 or Type == nil then
  993. table.insert(Effects, {
  994. prt,
  995. "Block1",
  996. delay,
  997. x3,
  998. y3,
  999. z3,
  1000. msh
  1001. })
  1002. elseif Type == 2 then
  1003. table.insert(Effects, {
  1004. prt,
  1005. "Block2",
  1006. delay,
  1007. x3,
  1008. y3,
  1009. z3,
  1010. msh
  1011. })
  1012. else
  1013. table.insert(Effects, {
  1014. prt,
  1015. "Block3",
  1016. delay,
  1017. x3,
  1018. y3,
  1019. z3,
  1020. msh
  1021. })
  1022. end
  1023. end
  1024. },
  1025. Sphere = {
  1026. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1027. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1028. prt.Anchored = true
  1029. prt.CFrame = cframe
  1030. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0,0,0), Vector3.new(x1, y1, z1))
  1031. game:GetService("Debris"):AddItem(prt, 10)
  1032. table.insert(Effects, {
  1033. prt,
  1034. "Cylinder",
  1035. delay,
  1036. x3,
  1037. y3,
  1038. z3,
  1039. msh
  1040. })
  1041. end
  1042. },
  1043. Cylinder = {
  1044. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1045. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1046. prt.Anchored = true
  1047. prt.CFrame = cframe
  1048. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1049. game:GetService("Debris"):AddItem(prt, 10)
  1050. table.insert(Effects, {
  1051. prt,
  1052. "Cylinder",
  1053. delay,
  1054. x3,
  1055. y3,
  1056. z3,
  1057. msh
  1058. })
  1059. end
  1060. },
  1061. Wave = {
  1062. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1063. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1064. prt.Anchored = true
  1065. prt.CFrame = cframe
  1066. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
  1067. game:GetService("Debris"):AddItem(prt, 10)
  1068. table.insert(Effects, {
  1069. prt,
  1070. "Cylinder",
  1071. delay,
  1072. x3 / 60,
  1073. y3 / 60,
  1074. z3 / 60,
  1075. msh
  1076. })
  1077. end
  1078. },
  1079. Ring = {
  1080. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1081. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1082. prt.Anchored = true
  1083. prt.CFrame = cframe
  1084. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1085. game:GetService("Debris"):AddItem(prt, 10)
  1086. table.insert(Effects, {
  1087. prt,
  1088. "Cylinder",
  1089. delay,
  1090. x3,
  1091. y3,
  1092. z3,
  1093. msh
  1094. })
  1095. end
  1096. },
  1097. Break = {
  1098. Create = function(brickcolor, cframe, x1, y1, z1)
  1099. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  1100. prt.Anchored = true
  1101. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1102. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1103. local num = math.random(10, 50) / 1000
  1104. game:GetService("Debris"):AddItem(prt, 10)
  1105. table.insert(Effects, {
  1106. prt,
  1107. "Shatter",
  1108. num,
  1109. prt.CFrame,
  1110. math.random() - math.random(),
  1111. 0,
  1112. math.random(50, 100) / 100
  1113. })
  1114. end
  1115. },
  1116. Spiral = {
  1117. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1118. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1119. prt.Anchored = true
  1120. prt.CFrame = cframe
  1121. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://1051557", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1122. game:GetService("Debris"):AddItem(prt, 10)
  1123. table.insert(Effects, {
  1124. prt,
  1125. "Cylinder",
  1126. delay,
  1127. x3,
  1128. y3,
  1129. z3,
  1130. msh
  1131. })
  1132. end
  1133. },
  1134. Push = {
  1135. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1136. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1137. prt.Anchored = true
  1138. prt.CFrame = cframe
  1139. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://437347603", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1140. game:GetService("Debris"):AddItem(prt, 10)
  1141. table.insert(Effects, {
  1142. prt,
  1143. "Cylinder",
  1144. delay,
  1145. x3,
  1146. y3,
  1147. z3,
  1148. msh
  1149. })
  1150. end
  1151. }
  1152. }
  1153. -------------------------------------------------------
  1154. --End Effect Function--
  1155. -------------------------------------------------------
  1156.  
  1157. function CreateSound(ID, PARENT, VOLUME, PITCH) --Very important.
  1158. local NSound = nil
  1159. coroutine.resume(coroutine.create(function()
  1160. NSound = Instance.new("Sound", PARENT)
  1161. NSound.Volume = VOLUME
  1162. NSound.Pitch = PITCH
  1163. NSound.SoundId = "http://www.roblox.com/asset/?id="..ID
  1164. swait()
  1165. NSound:play()
  1166. game:GetService("Debris"):AddItem(NSound, 10)
  1167. end))
  1168. return NSound
  1169. end
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175. -------------------------------------------------------
  1176. --End Important Functions--
  1177. -------------------------------------------------------
  1178.  
  1179. NEWS = Instance.new("Sound", tors) --O NO
  1180. NEWS.SoundId = "http://www.roblox.com/asset/?id=1933822358"
  1181. NEWS.Volume = 100
  1182. NEWS.Pitch = 1
  1183. NEWS.Looped = false
  1184. NEWS.TimePosition = 1
  1185.  
  1186. AAAAA = Instance.new("Sound", tors) --aaa
  1187. AAAAA.SoundId = "http://www.roblox.com/asset/?id=0"
  1188. AAAAA.Volume = 10
  1189. AAAAA.Pitch = 1
  1190. AAAAA.Looped = false
  1191. AAAAA.TimePosition = 1
  1192.  
  1193. MERKIO = Instance.new("Sound", tors) --why
  1194. MERKIO.SoundId = "rbxassetid://1117396305"
  1195. MERKIO.Volume = 10
  1196. MERKIO.Pitch = 1
  1197. MERKIO.Looped = false
  1198. MERKIO.TimePosition = 0
  1199.  
  1200. -------------------------------------------------------
  1201. --Start Music Option--
  1202. -------------------------------------------------------
  1203. local Music = Instance.new("Sound",tors)
  1204. Music.Volume = 2.5
  1205. Music.SoundId = "rbxassetid://"
  1206. Music.Looped = true
  1207. Music.Pitch = 1 --Pitcher
  1208. Music:Play()
  1209. -------------------------------------------------------
  1210. --End Music Option--
  1211. -------------------------------------------------------
  1212. --hi fat >:)
  1213. -------------------------------------------------------
  1214. local MAINRUINCOLOR = "Cyan"
  1215. local NewInstance = function(instance,parent,properties)
  1216. local inst = Instance.new(instance,parent)
  1217. if(properties)then
  1218. for i,v in next, properties do
  1219. pcall(function() inst[i] = v end)
  1220. end
  1221. end
  1222. return inst;
  1223. end
  1224. function chatfunc(text)
  1225. coroutine.wrap(function()
  1226. if(Character:FindFirstChild'ChatGUI')then Character.ChatGUI:destroy() end
  1227. local BBG = NewInstance("BillboardGui",Character,{Name='ChatGUI',Size=UDim2.new(0,100,0,40),StudsOffset=Vector3.new(0,2.753,0),Adornee=Head})
  1228. 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)})
  1229. coroutine.resume(coroutine.create(function()
  1230. repeat swait()
  1231. --lol
  1232. until Txt.Transparency > 1
  1233. end))
  1234. for i = 1, #text do
  1235. delay(i/25, function()
  1236. CFuncs.Sound.Create("http://www.roblox.com/asset/?id=418252437", Head, 1, math.random(2,12)/15)
  1237. Txt.Text = text:sub(1,i)
  1238. end)
  1239. end
  1240. delay((#text/25)+2.6, function()
  1241. wait(0.2)
  1242. for i = 1, 15 do
  1243. swait()
  1244. Txt.TextTransparency = Txt.TextTransparency + 1/15
  1245. Txt.TextStrokeTransparency = Txt.TextStrokeTransparency + 1/15
  1246. end
  1247. end)
  1248. delay((#text/25)+3, function()
  1249. BBG:destroy()
  1250. end)
  1251. end)()
  1252. end
  1253. it = Instance.new
  1254. plr.Chatted:connect(function(message)
  1255. chatfunc(message)
  1256. if message:sub(1,3) == "id/" then
  1257. local OVMID = message:sub(4)
  1258. MERKIO.SoundId = "rbxassetid://" ..OVMID
  1259. end
  1260. end)
  1261. chatfunc("aye")
  1262. LeDrink = it("Model")
  1263. LeDrink.Parent = char
  1264. LeDrink.Name = "LeDrink"
  1265. RHe = it("Part")
  1266. RHe.Parent = LeDrink
  1267. RHe.BrickColor = BrickColor.new("Really black")
  1268. RHe.Locked = true
  1269. RHe.CanCollide = false
  1270. RHe.Transparency = 1
  1271. PMesh = it("SpecialMesh")
  1272. RHe.formFactor = "Symmetric"
  1273. PMesh.MeshType = "FileMesh"
  1274. PMesh.MeshId = "rbxassetid://10470609"
  1275. PMesh.TextureId = "rbxassetid://111405256"
  1276. PMesh.Scale = Vector3.new(1.3, 1.4, 1.3)
  1277. PMesh.Parent = RHe
  1278. local RWeld = it("Weld")
  1279. RWeld.Parent = RHe
  1280. RWeld.Part0 = RHe
  1281. RWeld.Part1 = ra
  1282. RWeld.C0 = CF(-1.2, -0.5, 0) * angles(Rad(90), Rad(0), Rad(90))
  1283.  
  1284.  
  1285. -------------------------------------------------------
  1286. --Start Attacks N Stuff--
  1287. -------------------------------------------------------
  1288.  
  1289. function THEBESTOVERUSEDJOKEEVER() --oh god why did i make this a thing jeezus help me pls
  1290. attack = true
  1291. hum.WalkSpeed = 16
  1292.  
  1293. NEWS:Play()
  1294. repeat
  1295. NEWS.Parent = tors
  1296. swait()
  1297. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1) * angles(math.random(-25,25),math.random(-25,25),math.random(-25,25)), 0.15)
  1298. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(math.random(-25,25),math.random(-25,25),math.random(-25,25)), 0.3)
  1299. RH.C0 = clerp(RH.C0, CF(1, -0.9 - 0.1 , 0.001 * Cos(sine / 20)) * RHCF * angles (math.random(-25,25),math.random(-25,25),math.random(-25,25)), 0.15)
  1300. LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 , 0.001 * Cos(sine / 20)) * LHCF * angles(math.random(-25,25),math.random(-25,25),math.random(-25,25)), 0.15)
  1301. RW.C0 = clerp(RW.C0, CF(1.2, 0.5 + 0.05 * Sin(sine / 30), 0.001 * Cos(sine / 20)) * angles (math.random(-25,25),math.random(-25,25),math.random(-25,25)), 0.1)
  1302. LW.C0 = clerp(LW.C0, CF(-1.2, 0.5 + 0.05 * Sin(sine / 30), 0.001 * Cos(sine / 20)) * angles(math.random(-25,25),math.random(-25,25),math.random(-25,25)), 0.1)
  1303. until NEWS.Playing == false
  1304. game.Players.ArtistBase.Character:BreakJoints()
  1305. local S = Instance.new("Explosion",workspace)
  1306. S.Position = tors.Position
  1307. S.BlastPressure = 9
  1308. S.BlastRadius = 30
  1309. S.ExplosionType = 0
  1310. attack = false
  1311. hum.WalkSpeed = 16
  1312. attack = false
  1313. hum.WalkSpeed = 16
  1314. end
  1315.  
  1316. function sneakonehundred()
  1317. attack = true
  1318. hum.WalkSpeed = 0.03
  1319. CreateSound("1542642349", tors, 10, 1.05)
  1320. for i = 0,20,0.1 do
  1321. swait()
  1322. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -2.64 + 0.1) * angles(Rad(90), Rad(0), Rad(0)), 0.15)
  1323. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-110), Rad(0), Rad(0)), 0.4)
  1324. RH.C0 = clerp(RH.C0, CF(1, -0.9 - 0.1 , 0.025 * Cos(sine / 20)) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1325. LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 , 0.025 * Cos(sine / 20)) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1326. RW.C0 = clerp(RW.C0, CF(1.3, 0.9 + 0.05 * Sin(sine / 30), 0.0001 * Cos(sine / 20)) * angles(Rad(1), Rad(0), Rad(-180)), 0.4)
  1327. LW.C0 = clerp(LW.C0, CF(-1.3, 0.8 + 0.05 * Sin(sine / 30), -0.0001 * Cos(sine / 20)) * angles(Rad(1), Rad(0), Rad(180)), 0.4)
  1328. end
  1329. CreateSound("3048623108", tors, 10, 1.05)
  1330. wait(0.25)
  1331. for i = 0,7,0.1 do
  1332. swait()
  1333. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -2.64 + 0.1) * angles(Rad(90), Rad(0), Rad(0)), 0.15)
  1334. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-110), Rad(0), Rad(0)), 0.4)
  1335. RH.C0 = clerp(RH.C0, CF(1, -0.9 - 0.1 , 0.025 * Cos(sine / 20)) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1336. LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 , 0.025 * Cos(sine / 20)) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1337. RW.C0 = clerp(RW.C0, CF(1.3, 0.9 + 0.05 * Sin(sine / 30), 0.0001 * Cos(sine / 20)) * angles(Rad(40), Rad(0), Rad(-180)), 0.4)
  1338. LW.C0 = clerp(LW.C0, CF(-1.3, 0.8 + 0.05 * Sin(sine / 30), -0.0001 * Cos(sine / 20)) * angles(Rad(40), Rad(0), Rad(180)), 0.4)
  1339. end
  1340.  
  1341. attack = false
  1342. hum.WalkSpeed = 16
  1343. end
  1344. function DANCEFORME()
  1345. attack = true
  1346.  
  1347. MERKIO:Play()
  1348. repeat
  1349. for i = 0, 4, 0.1 do
  1350. swait()
  1351. MERKIO.Parent = tors
  1352. local Alpha = .3
  1353. RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0)*angles(math.rad(0.2),math.rad(13.1),math.rad(-0.2))*RootCF,Alpha)
  1354. 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)
  1355. 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)
  1356. LW.C0 = LW.C0:lerp(cf(-1.6,0.5,-0.4)*angles(math.rad(131),math.rad(-11),math.rad(-12.4)),Alpha)
  1357. 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)
  1358. 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)
  1359. end
  1360. for i = 0, 4, 0.1 do
  1361. swait()
  1362. MERKIO.Parent = tors
  1363. local Alpha = .3
  1364. 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)
  1365. 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)
  1366. 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)
  1367. 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)
  1368. 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)
  1369. 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)
  1370. end
  1371. until MERKIO.Playing == false
  1372. MERKIO:Stop()
  1373.  
  1374. attack = false
  1375. hum.WalkSpeed = 16
  1376. end
  1377.  
  1378. function takethat()
  1379. attack = true
  1380. hum.WalkSpeed = 0
  1381. CreateSound("3048623108", tors, 10, 1.05)
  1382. chatfunc("hee-hee")
  1383. for i = 0,8.3,0.1 do
  1384. swait()
  1385. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1) * angles(Rad(0), Rad(0), Rad(90)), 0.7)
  1386. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(30), Rad(0), Rad(0)), 0.7)
  1387. RH.C0 = clerp(RH.C0, CF(1, -0.9 - 0.1 , 0.025 * Cos(sine / 20)) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.7)
  1388. LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 , 0.025 * Cos(sine / 20)) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.7)
  1389. RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.05 * Sin(sine / 30), 0.025 * Cos(sine / 20)) * angles(Rad(0), Rad(-.6), Rad(0)), 0.7)
  1390. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.05 * Sin(sine / 30), 0.025 * Cos(sine / 20)) * angles(Rad(-45), Rad(-.6), Rad(136 - 4.5 * Sin(sine / 20))), 0.7)
  1391. end
  1392. CreateSound("135165859", tors, 10, 1.05)
  1393. chatfunc("take that!!!11!!")
  1394. for i = 0,6,0.1 do
  1395. swait()
  1396. rootj.C0 = char.Torso.Neck.C0 * CFrame.Angles(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1397. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1) * angles(Rad(0), Rad(0), Rad(0)), 0.85)
  1398. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(0), Rad(0)), 0.7)
  1399. RH.C0 = clerp(RH.C0, CF(1, -0.9 - 0.1 , 0.025 * Cos(sine / 20)) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.7)
  1400. LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 , 0.025 * Cos(sine / 20)) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.7)
  1401. RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.05 * Sin(sine / 30), 0.025 * Cos(sine / 20)) * angles(Rad(90), Rad(-.6), Rad(0)), 0.7)
  1402. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.05 * Sin(sine / 30), 0.025 * Cos(sine / 20)) * angles(Rad(-0), Rad(-.6), Rad(0 - 4.5 * Sin(sine / 20))), 0.7)
  1403. end
  1404. attack = false
  1405. hum.WalkSpeed = 16
  1406. end
  1407. function DrinkdaDrink()
  1408. attack = true
  1409. RHe.Transparency = 0
  1410. hum.WalkSpeed = 0
  1411. local Munch = CreateSound("554208103", hed, 5, 1)
  1412. swait(2)
  1413. repeat
  1414. for i = 0,6,0.1 do
  1415. swait()
  1416. rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.2 + 0.1* Player_Size * Cos(sine / 20)) * angles(Rad(-20), Rad(0), Rad(0)), 0.3)
  1417. tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(-35 - 5 * Sin(sine / 20)), Rad(0), Rad(0)), 0.3)
  1418. RH.C0 = clerp(RH.C0, CF(0.5* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(-20), Rad(-10), Rad(0)) * angles(Rad(0), Rad(0), Rad(5)), 0.3)
  1419. LH.C0 = clerp(LH.C0, CF(-0.5* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(-20), Rad(10), Rad(0)) * angles(Rad(0), Rad(0), Rad(-5)), 0.3)
  1420. RW.C0 = clerp(RW.C0, CF(1* Player_Size, 0.1 + 0.1 * Sin(sine / 20)* Player_Size, -0.6* Player_Size) * angles(Rad(160), Rad(0), Rad(-35)), 0.1)
  1421. LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.1 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(-20), Rad(0 - 5 * Sin(sine / 20)), Rad(-10 - 5 * Sin(sine / 20))), 0.3)
  1422. end
  1423. until Munch.Playing == false
  1424. hum.WalkSpeed = 16
  1425. RHe.Transparency = 1
  1426. attack = false
  1427. end
  1428.  
  1429. function SCREAM()
  1430. attack = true
  1431. hum.WalkSpeed = 16
  1432.  
  1433. local A = math.random(1,13)
  1434. if A == 1 then
  1435. AAAAA.SoundId = "rbxassetid://1213175909"
  1436. AAAAA.TimePosition = 0
  1437. end
  1438. if A == 2 then
  1439. AAAAA.SoundId = "rbxassetid://1439720915"
  1440. AAAAA.TimePosition = 0
  1441. end
  1442. if A == 3 then
  1443. AAAAA.SoundId = "rbxassetid://1213179504"
  1444. AAAAA.TimePosition = 0
  1445. end
  1446. if A == 4 then
  1447. AAAAA.SoundId = "rbxassetid://1129186687"
  1448. AAAAA.TimePosition = 0
  1449. end
  1450. if A == 5 then
  1451. AAAAA.SoundId = "rbxassetid://1163493843"
  1452. AAAAA.TimePosition = 0
  1453. end
  1454. if A == 6 then
  1455. AAAAA.SoundId = "rbxassetid://1163494840"
  1456. AAAAA.TimePosition = 0
  1457. end
  1458. if A == 7 then
  1459. AAAAA.SoundId = "rbxassetid://963936697"
  1460. AAAAA.TimePosition = 0
  1461. end
  1462. if A == 8 then
  1463. AAAAA.SoundId = "rbxassetid://1494176499"
  1464. AAAAA.TimePosition = 1
  1465. end
  1466. if A == 9 then
  1467. AAAAA.SoundId = "rbxassetid://1591656314"
  1468. AAAAA.TimePosition = 0
  1469. end
  1470. if A == 10 then
  1471. AAAAA.SoundId = "rbxassetid://130767645"
  1472. AAAAA.TimePosition = 0
  1473. end
  1474. if A == 11 then
  1475. AAAAA.SoundId = "rbxassetid://172818886"
  1476. AAAAA.TimePosition = 0
  1477. end
  1478. if A == 12 then
  1479. AAAAA.SoundId = "rbxassetid://1402021995"
  1480. AAAAA.TimePosition = 0
  1481. end
  1482. if A == 13 then
  1483. AAAAA.SoundId = "rbxassetid://130766856"
  1484. AAAAA.TimePosition = 0
  1485. end
  1486. AAAAA:Play()
  1487. repeat
  1488. swait()
  1489. AAAAA.Parent = tors
  1490. rootj.C0 = char.Torso.Neck.C0 * CFrame.Angles(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1491. until AAAAA.Playing == false
  1492. hum.WalkSpeed = 16
  1493. attack = false
  1494. hum.WalkSpeed = 16
  1495. end
  1496.  
  1497. MoreTaunts = false
  1498. mouse.KeyDown:connect(function(key)
  1499. if attack == false then
  1500. if MoreTaunts == false then
  1501. if key == 'q' then
  1502. THEBESTOVERUSEDJOKEEVER()
  1503. elseif key == 'e' then
  1504. SCREAM()
  1505. elseif key == 'r' then
  1506. sneakonehundred()
  1507. elseif key == 't' then
  1508. DANCEFORME()
  1509. elseif key == 'y' then
  1510. takethat()
  1511. elseif key == 'u' then
  1512. DrinkdaDrink()
  1513. end
  1514. end
  1515. end
  1516. end)
  1517.  
  1518. -------------------------------------------------------
  1519. --End Attacks N Stuff--
  1520. -------------------------------------------------------
  1521.  
  1522.  
  1523.  
  1524.  
  1525. while jumping do
  1526. Humanoid.Jump = true
  1527. wait(0.9)
  1528. end
  1529.  
  1530.  
  1531.  
  1532.  
  1533. -------------------------------------------------------
  1534. --Start Animations--
  1535. -------------------------------------------------------
  1536. local equipped = false
  1537. local idle = 0
  1538. local change = 1
  1539. local val = 0
  1540. local toim = 0
  1541. local idleanim = 0.4
  1542. hum.Animator.Parent = nil
  1543. while true do
  1544. swait()
  1545. sine = sine + change
  1546. local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
  1547. local velderp = root.Velocity.y
  1548. hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).lookVector, 4, char)
  1549. if equipped == true or equipped == false then
  1550. if attack == false then
  1551. idle = idle + 1
  1552. else
  1553. idle = 0
  1554. end
  1555. if 1 < root.Velocity.y and hitfloor == nil then
  1556. Anim = "Jump"
  1557. if attack == false then
  1558. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1) * angles(Rad(0), Rad(0), Rad(60)), 0.15)
  1559. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-0), Rad(0), Rad(0)), 0.3)
  1560. RH.C0 = clerp(RH.C0, CF(1, -0.9 - 0.1 , 0.025 * Cos(sine / 20)) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1561. LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 , 0.025 * Cos(sine / 20)) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1562. RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.05 * Sin(sine / 30), 0.025 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(90)), 0.1)
  1563. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.05 * Sin(sine / 30), 0.025 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(-90)), 0.1)
  1564. end
  1565. elseif -1 > root.Velocity.y and hitfloor == nil then
  1566. Anim = "Fall"
  1567. if attack == false then
  1568. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1) * angles(Rad(180), Rad(0), Rad(0)), 0.15)
  1569. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-0), Rad(0), Rad(0)), 0.3)
  1570. RH.C0 = clerp(RH.C0, CF(1, -0.9 - 0.1 , 0.025 * Cos(sine / 20)) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1571. LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 , 0.025 * Cos(sine / 20)) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1572. RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.05 * Sin(sine / 30), 0.025 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(90)), 0.1)
  1573. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.05 * Sin(sine / 30), 0.025 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(-90)), 0.1)
  1574. end
  1575. elseif torvel < 1 and hitfloor ~= nil then
  1576. Anim = "Idle"
  1577. change = 1
  1578. if attack == false then
  1579. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(0)), 0.15)
  1580. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-20), Rad(0), Rad(0)), 0.3)
  1581. RH.C0 = clerp(RH.C0, CF(1, -0.9 - 0.1 * Cos(sine / 20), 0.025 * Cos(sine / 20)) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1582. LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 * Cos(sine / 20), 0.025 * Cos(sine / 20)) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1583. RW.C0=clerp(RW.C0,cf(1,0.35 + 0.025 * math.cos(sine / 45),-0.5)*angles(math.rad(62 + 6 * math.cos(sine / 72)),math.rad(3 - 2 * math.cos(sine / 58)),math.rad(-82 + 2 * math.cos(sine / 45))),.1)
  1584. LW.C0=clerp(LW.C0,cf(-0.95,0.65 + 0.075 * math.cos(sine / 28),-0.65)*angles(math.rad(90 + 2 * math.cos(sine / 73)),math.rad(25 + 5 * math.cos(sine / 24)),math.rad(73 - 3 * math.cos(sine / 65))),.1)
  1585. end
  1586. elseif tors.Velocity.magnitude < 50 and hitfloor ~= nil then
  1587. Anim = "Walk"
  1588. change = 1
  1589. if attack == false then
  1590. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.175 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7) * angles(Rad(9-2.5 * Cos(sine / 3.5)), Rad(0), Rad(10 * Cos(sine / 7))), 0.15)
  1591. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(0), Rad(0)), 0.3)
  1592. RH.C0 = clerp(RH.C0, CFrame.new(1, -0.925 - 0.5 * math.cos(sine / 7) / 2, 0.5 * math.cos(sine / 7) / 2) * angles(math.rad(-15 - 35 * math.cos(sine / 7)) + -math.sin(sine / 7) / 2.5, math.rad(90 - 2 * math.cos(sine / 7)), math.rad(0)) * angles(math.rad(0 + 2.5 * math.cos(sine / 7)), math.rad(0), math.rad(0)), 0.3)
  1593. LH.C0 = clerp(LH.C0, CFrame.new(-1, -0.925 + 0.5 * math.cos(sine / 7) / 2, -0.5 * math.cos(sine / 7) / 2) * angles(math.rad(-15 + 35 * math.cos(sine / 7)) + math.sin(sine / 7) / 2.5, math.rad(-90 - 2 * math.cos(sine / 7)), math.rad(0)) * angles(math.rad(0 - 2.5 * math.cos(sine / 7)), math.rad(0), math.rad(0)), 0.3)
  1594. RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.05 * Sin(sine / 30), 0.025 * Cos(sine / 20)) * angles(Rad(70) * Cos(sine / 7) , Rad(0), Rad(5)), 0.1)
  1595. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.05 * Sin(sine / 30), 0.025 * Cos(sine / 20)) * angles(Rad(-70) * Cos(sine / 7) , Rad(0), Rad(-5)), 0.1)
  1596. end
  1597. end
  1598. end
  1599. if 0 < #Effects then
  1600. for e = 1, #Effects do
  1601. if Effects[e] ~= nil then
  1602. local Thing = Effects[e]
  1603. if Thing ~= nil then
  1604. local Part = Thing[1]
  1605. local Mode = Thing[2]
  1606. local Delay = Thing[3]
  1607. local IncX = Thing[4]
  1608. local IncY = Thing[5]
  1609. local IncZ = Thing[6]
  1610. if 1 >= Thing[1].Transparency then
  1611. if Thing[2] == "Block1" then
  1612. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1613. local Mesh = Thing[1].Mesh
  1614. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1615. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1616. elseif Thing[2] == "Block2" then
  1617. Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0)
  1618. local Mesh = Thing[7]
  1619. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1620. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1621. elseif Thing[2] == "Block3" then
  1622. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0)
  1623. local Mesh = Thing[7]
  1624. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1625. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1626. elseif Thing[2] == "Cylinder" then
  1627. local Mesh = Thing[1].Mesh
  1628. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1629. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1630. elseif Thing[2] == "Blood" then
  1631. local Mesh = Thing[7]
  1632. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  1633. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1634. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1635. elseif Thing[2] == "Elec" then
  1636. local Mesh = Thing[1].Mesh
  1637. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1638. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1639. elseif Thing[2] == "Disappear" then
  1640. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1641. elseif Thing[2] == "Shatter" then
  1642. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1643. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1644. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1645. Thing[6] = Thing[6] + Thing[5]
  1646. end
  1647. else
  1648. Part.Parent = nil
  1649. table.remove(Effects, e)
  1650. end
  1651. end
  1652. end
  1653. end
  1654. end
  1655. end
  1656. -------------------------------------------------------
  1657. --End Animations And Script--
  1658. -------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement