Advertisement
xdfromxd

Untitled

Apr 25th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.41 KB | None | 0 0
  1. --[[ Kitchen Gun (REMADE) ]]--
  2. -------------------------------------------------------
  3. --[[
  4.  
  5. This script was created by WafflesAreVeryGood.
  6. TEXT
  7. ______________
  8. local Player_Size = 1
  9. script:ClearAllChildren()
  10. wait(0.2)
  11.  
  12. Player = owner
  13. PlayerGui = Player.PlayerGui
  14. Cam = workspace.CurrentCamera
  15. Backpack = Player.Backpack
  16. Character = Player.Character
  17. Humanoid = Character.Humanoid
  18. Mouse = Player:GetMouse()
  19. RootPart = Character["HumanoidRootPart"]
  20. Torso = Character["Torso"]
  21. Head = Character["Head"]
  22. RightArm = Character["Right Arm"]
  23. LeftArm = Character["Left Arm"]
  24. RightLeg = Character["Right Leg"]
  25. LeftLeg = Character["Left Leg"]
  26. RootJoint = RootPart["RootJoint"]
  27. Neck = Torso["Neck"]
  28. RightShoulder = Torso["Right Shoulder"]
  29. LeftShoulder = Torso["Left Shoulder"]
  30. RightHip = Torso["Right Hip"]
  31. LeftHip = Torso["Left Hip"]
  32. local TIME = 0
  33. local sick = Instance.new("Sound",Torso)
  34.  
  35. IT = Instance.new
  36. CF = CFrame.new
  37. VT = Vector3.new
  38. RAD = math.rad
  39. C3 = Color3.new
  40. UD2 = UDim2.new
  41. BRICKC = BrickColor.new
  42. ANGLES = CFrame.Angles
  43. EULER = CFrame.fromEulerAnglesXYZ
  44. COS = math.cos
  45. ACOS = math.acos
  46. SIN = math.sin
  47. ASIN = math.asin
  48. ABS = math.abs
  49. MRANDOM = math.random
  50. FLOOR = math.floor
  51.  
  52. local naeeym2 = Instance.new("BillboardGui",Character)
  53. naeeym2.AlwaysOnTop = true
  54. naeeym2.Size = UDim2.new(7,35,3,15)
  55. naeeym2.StudsOffset = Vector3.new(0,2,0)
  56. naeeym2.MaxDistance = 75
  57. naeeym2.Adornee = Character.Head
  58. naeeym2.Name = "Name2"
  59. local tecks2 = Instance.new("TextLabel",naeeym2)
  60. tecks2.BackgroundTransparency = 1
  61. tecks2.TextScaled = true
  62. tecks2.BorderSizePixel = 0
  63. tecks2.Text = "L ❤ f i G ❤ d"
  64. tecks2.Font = "Fantasy"
  65. tecks2.TextSize = 100
  66. tecks2.TextStrokeTransparency = 0
  67. tecks2.TextColor3 = Color3.fromRGB(.5,255,.5)
  68. tecks2.TextStrokeColor3 = Color3.fromRGB(.5,255,.5)
  69. tecks2.Size = UDim2.new(1,0,0.5,0)
  70. tecks2.Parent = naeeym2
  71. ATTACKS
  72. _______
  73.  
  74.  
  75. --]]
  76. -------------------------------------------------------
  77. print("This script was created by WafflesAreVeryGood!")
  78. --[[Changeable Variables]]--
  79. local multiplier = 1000000000000 --Attack multiplier (default is 1)
  80. local soundlist = {
  81. HardHit1 = "rbxassetid://565207203",
  82. HardHit2 = "rbxassetid://541909913",
  83. HardHit3 = "rbxassetid://541909983",
  84. WeakHit1 = "rbxassetid://558642292",
  85. WeakHit2 = "rbxassetid://541907812",
  86. Slice1 = "rbxassetid://260429964",
  87. Slice2 = "rbxassetid://260430015",
  88. Explosion1 = "rbxassetid://138186576",
  89. Explosion2 = "rbxassetid://157878578",
  90. Woosh1 = "rbxassetid://541909867",
  91. Woosh2 = "rbxassetid://541909763",
  92.  
  93. }
  94. local bgmusic = Instance.new("Sound")
  95. bgmusic.Volume = 3.5
  96. bgmusic.SoundId = "rbxassetid://877658690"
  97. bgmusic.Looped = true
  98. bgmusic.Parent = game:GetService('Players').LocalPlayer.Character.Torso
  99. bgmusic:Play()
  100.  
  101. --[[Important Variables]]--
  102. local plr = game:GetService('Players').LocalPlayer
  103. local char = plr.Character
  104. local mouse = plr:GetMouse()
  105. local input = game:GetService('UserInputService')
  106. ----
  107. local joints = {"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}
  108. local torso,head,rootpart = char.Torso,char.Head,char.HumanoidRootPart
  109. local rs = torso["Right Shoulder"]
  110. local ls = torso["Left Shoulder"]
  111. local rh = torso["Right Hip"]
  112. local lh = torso["Left Hip"]
  113. local neck = torso.Neck
  114. local rj = rootpart["RootJoint"]
  115. local humanoid = char:FindFirstChildOfClass("Humanoid")
  116. ----
  117. local huge = Vector3.new(math.huge, math.huge, math.huge)
  118. local attacking = false
  119. local cananim = true
  120. local currentanim = "Idle"
  121. local mode = "Normal"
  122.  
  123. --[[ Functions ]]--
  124. function addattack(keycode, func)
  125. if keycode ~= "MouseClick" then
  126. input.InputBegan:connect(function(inp)
  127. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  128. func()
  129. end
  130. end)
  131. else
  132. mouse.Button1Down:connect(function()
  133. func()
  134. end)
  135. end
  136. end
  137. function attackend(keycode, func)
  138. input.InputEnded:connect(function(inp)
  139. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  140. func()
  141. end
  142. end)
  143. end
  144. function swait(t)
  145. if t then
  146. for i = 0, t do
  147. game:GetService('RunService').Stepped:wait(0)
  148. end
  149. else
  150. game:GetService('RunService').Stepped:wait(0)
  151. end
  152. return true
  153. end
  154. function fade(obj, dest, grow)
  155. spawn(function()
  156. local oldcf = obj.CFrame
  157. for i = 0, 10 do
  158. if grow then
  159. obj.Size = obj.Size +Vector3.new(1,1,1)
  160. obj.CFrame = oldcf
  161. end
  162. obj.Transparency = obj.Transparency +0.1
  163. swait()
  164. end
  165. if dest then
  166. obj:Destroy()
  167. end
  168. end)
  169. end
  170. function replacejoint(name)
  171. local j = torso:FindFirstChild(name)
  172. if not j then j = char.HumanoidRootPart:FindFirstChild(name) end
  173. if j then
  174. if true then
  175. local already = j.Parent:FindFirstChild(j.Name.." Replacement")
  176. local new = Instance.new("Weld")
  177. local c0 = j.C0
  178. local c1 = j.C1
  179. new.Part0 = j.Part0
  180. j.Part0 = nil
  181. new.Name = j.Name.." Replacement"
  182. if already then c0 = already.C0 c1 = already.C1 already:Destroy() end
  183. new.Parent = j.Parent
  184. new.Part1 = j.Part1
  185. new.C0 = c0
  186. new.C1 = c1
  187. return new
  188. end
  189. end
  190. end
  191. function removejoint(name, fast)
  192. local j = torso:FindFirstChild(name.." Replacement")
  193. if not j then j = char.HumanoidRootPart:FindFirstChild(name.." Replacement") end
  194. if j then
  195. local p0 = j.Part0
  196. if p0 ~= nil then
  197. local c0 = j.C0
  198. local c1 = j.C1
  199. j:Destroy()
  200. local new = p0:FindFirstChild(name)
  201. local ac0 = new.C0
  202. local ac1 = new.C1
  203. new.Part0 = p0
  204. new.C0 = c0
  205. new.C1 = c1
  206. spawn(function()
  207. if name ~= "RootJoint" then
  208. if not fast then
  209. for i = 0, 0.6, 0.1 do
  210. print(i)
  211. new.C0 = new.C0:Lerp(ac0, 0.5)
  212. new.C1 = new.C1:lerp(ac1, 0.5)
  213. swait()
  214. end
  215. else
  216. new.C0 = new.C0:Lerp(ac0, 1)
  217. new.C1 = new.C1:lerp(ac1, 1)
  218. end
  219. end
  220. end)
  221. end
  222. end
  223. end
  224. function fixalljoints(fast)
  225. for i,v in pairs({"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}) do
  226. removejoint(v, fast)
  227. end
  228. end
  229. function getnewjoints()
  230. local rs = replacejoint("Right Shoulder")
  231. local ls = replacejoint("Left Shoulder")
  232. local rh = replacejoint("Right Hip")
  233. local lh = replacejoint("Left Hip")
  234. local neck = replacejoint("Neck")
  235. local rj = replacejoint("RootJoint")
  236. return rs,ls,rh,lh,neck,rj
  237. end
  238. function knockback(hit, force)
  239. local bv = Instance.new("BodyVelocity")
  240. bv.MaxForce = huge
  241. bv.Velocity = force
  242. bv.Parent = hit
  243. game:GetService('Debris'):AddItem(bv, 0.15)
  244. end
  245. function soundeffect(id, volume, speed, parent, forcewait)
  246. local func = function()
  247. local s = LoadLibrary("RbxUtility").Create("Sound")()
  248. s.Name = "SoundEffect"
  249. s.Volume = volume
  250. s.PlaybackSpeed = speed
  251. s.SoundId = id
  252. s.Looped = false
  253. s.Parent = parent
  254. s:Play()
  255. repeat wait() until not s.Playing
  256. s:Destroy()
  257. end
  258. if forcewait then
  259. func()
  260. else
  261. spawn(func)
  262. end
  263. end
  264. function specialsound(id, volume, speed, parent, starts, ends)
  265. local func = function()
  266. local s = LoadLibrary("RbxUtility").Create("Sound")()
  267. s.Name = "SoundEffect"
  268. s.Volume = volume
  269. s.PlaybackSpeed = speed
  270. s.SoundId = id
  271. s.TimePosition = starts
  272. s.Looped = false
  273. s.Parent = parent
  274. s:Play()
  275. repeat swait() until s.TimePosition >= ends
  276. s:Destroy()
  277. end
  278. spawn(func)
  279. end
  280. function hurt(hit, dmg)
  281. --pcall(function()
  282. local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  283. if hum then
  284. if hum.Parent ~= char and not hum.Parent:FindFirstChild("kk_urcool") then
  285. hum.Health = hum.Health - dmg
  286. return true
  287. end
  288. end
  289. --end)
  290. end
  291. function disable(hit)
  292. pcall(function()
  293. for i,v in pairs(hit.Parent:GetChildren()) do
  294. if v:IsA("Script") and v.Name ~= "Animate" then
  295. v:Destroy()
  296. soundeffect("rbxassetid://1132948877", 1, 1, char.Head)
  297. end
  298. if v:IsA("Model") then
  299. v:BreakJoints()
  300. end
  301. if v.Name ~= "Torso" and v.Name ~= "HumanoidRootPart" then
  302. for _,child in pairs(v:GetChildren()) do
  303. if child:IsA("Weld") then
  304. child:Destroy()
  305. end
  306. end
  307. end
  308. end
  309. end)
  310. end
  311. humanoid.Running:connect(function(speed)
  312. if speed > 2 then
  313. currentanim = "Walking"
  314. else
  315. currentanim = "Idle"
  316. end
  317. end)
  318. humanoid.Jumping:connect(function(active)
  319. if active then
  320. currentanim = "Jumping"
  321. end
  322. end)
  323. humanoid.FallingDown:connect(function(active)
  324. if active then
  325. currentanim = "Falling"
  326. end
  327. end)
  328. humanoid.FreeFalling:connect(function(active)
  329. if active and char.HumanoidRootPart.Velocity.Y < 0 then
  330. currentanim = "Falling"
  331. end
  332. end)
  333. pcall(function()
  334. char.Animate:Destroy()
  335. end)
  336. for i,v in pairs(humanoid:GetPlayingAnimationTracks()) do
  337. v:Stop()
  338. end
  339. --[[ Actual script :OOOOOOOOOO ]]--
  340. local gun = Instance.new("Part")
  341. gun.Size = Vector3.new(1, 1, 2)
  342. gun.CanCollide = false
  343. gun.Anchored = false
  344. gun.Color = Color3.new(0,0,0)
  345. local gunw = Instance.new("Weld")
  346. gunw.Name = "GunWeld"
  347. gunw.Part0 = gun
  348. gunw.Part1 = char["Right Arm"]
  349. gunw.C1 = CFrame.new(0,-1,-0.25) *CFrame.Angles(math.rad(270),math.rad(0),math.rad(0))
  350. gunw.Parent = gun
  351. local m = Instance.new("SpecialMesh")
  352. m.MeshId = "http://www.roblox.com/asset/?id=4372594"
  353. m.Scale = Vector3.new(1.2,1.2,1.2)
  354. m.Parent = gun
  355. gun.Parent = char
  356.  
  357. addattack(Enum.KeyCode.R, function()
  358. if not attacking then
  359. if mode == "Normal" then
  360. mode = "Heal"
  361. gun.Color = Color3.new(0,1,0)
  362. specialsound("rbxassetid://741894739", 5, 1, char, 18.49549100592, 20.526269195994)
  363. else
  364. gun.Color = Color3.new(0,0,0)
  365. mode = "Normal"
  366. soundeffect("rbxassetid://833797091", 5, 1, char)
  367. end
  368. end
  369. end)
  370. addattack(Enum.KeyCode.Q, function()
  371. if not attacking then
  372. mode = "Disable"
  373. gun.Color = Color3.new(1,0,0)
  374. specialsound("rbxassetid://741894739", 5, 1, char, 33.878067323327, 35.438444041738)
  375. end
  376. end)
  377. addattack(Enum.KeyCode.P, function()
  378. if bgmusic.Playing then
  379. bgmusic:Stop()
  380. else
  381. bgmusic:Play()
  382. end
  383. end)
  384. addattack("MouseClick", function()
  385. if not attacking then
  386. cananim = false
  387. attacking = true
  388. for i = 0, 0.6, 0.1 do
  389. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.6)
  390. rs.C1 = rs.C1:Lerp(CFrame.new(-0.235909924, 0.846874475, 0, 0.399310559, 0.00480417395, 0.916803062, -0.916736782, -0.0110294167, 0.399339437, 0.0120302998, -0.99992764, 5.25861077e-10), 0.6)
  391. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.6)
  392. ls.C1 = ls.C1:Lerp(CFrame.new(0.232030958, 1.28329468, 0, 0.758646905, 0.0105680302, -0.651416421, 0.65135318, 0.00907341763, 0.758720517, 0.0139287533, -0.999902964, -6.08845141e-10), 0.6)
  393. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.6)
  394. rh.C1 = rh.C1:Lerp(CFrame.new(0.5, 1, 0, -4.37113883e-08, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-08), 0.6)
  395. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.6)
  396. lh.C1 = lh.C1:Lerp(CFrame.new(-0.5, 1, 0, -4.37113883e-08, 0, -1, 0, 1, 0, 1, 0, -4.37113883e-08), 0.6)
  397. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  398. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  399. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  400. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  401. swait()
  402. end
  403. local sounds = {
  404. {17.49, 17.981267708586};
  405. {17.490114626798, 17.755552823579};
  406. {18, 18.465876732586707476};
  407. }
  408. local ids = sounds[math.random(#sounds)]
  409. specialsound("rbxassetid://741894739", 5, 1, char, ids[1], ids[2])
  410. local p = Instance.new("Part")
  411. p.Anchored = false
  412. p.Material = "Neon"
  413. p.CanCollide = false
  414. local start = gun.Position +Vector3.new(0.5,0,-0.5)
  415. local endp = mouse.Hit.p
  416. local ray = Ray.new(start, (endp-start).unit * 999)
  417. local hit,position = workspace:FindPartOnRayWithIgnoreList(ray, {char, gun})
  418. local mag = (start-position).magnitude + 2
  419. p.Size = Vector3.new(0.1,0.1,mag)
  420. p.CFrame = CFrame.new(start, position) *CFrame.new(0,0,-mag/2)
  421. local bp = Instance.new("BodyPosition")
  422. bp.MaxForce = huge
  423. bp.Position = p.Position
  424. bp.Parent = p
  425. p.Color = gun.Color
  426. if mode == "Normal" then
  427. p.Color = Color3.new(1,1,1)
  428. end
  429. p.Parent = workspace
  430. spawn(function()
  431. for i = 1, 10 do
  432. p.Transparency = i/10
  433. swait()
  434. end
  435. p:Destroy()
  436. end)
  437. local con
  438. local dmg = 750
  439. if mode == "Heal" then dmg = -1000 end
  440. if mode == "Disable" then dmg = 0 end
  441. con = p.Touched:connect(function(hit)
  442. if hurt(hit, dmg) then
  443. pcall(function()
  444. con:disconnect()
  445. if mode == "Disable" then
  446. disable(hit)
  447. end
  448. for i,v in pairs(hit.Parent:GetDescendants()) do
  449. spawn(function()
  450. if v:IsA("BasePart") and mode == "Normal" then
  451. local bv = Instance.new("BodyVelocity")
  452. bv.MaxForce = huge
  453. bv.Velocity = CFrame.new(start, position).lookVector*100
  454. bv.Parent = v
  455. game:GetService('Debris'):AddItem(bv, 0.1)
  456. if v.Transparency <= 0.9 then
  457. for i = 1, 20 do
  458. v.Transparency = i/20
  459. swait()
  460. end
  461. end
  462. v:Destroy()
  463. end
  464. end)
  465. end
  466. end)
  467. end
  468. end)
  469. for i = 0, 0.3, 0.1 do
  470. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.8)
  471. rs.C1 = rs.C1:Lerp(CFrame.new(-0.108213484, 0.142491132, -0.0458124876, 0.399310559, 0.00480417395, 0.916803062, -0.907117367, -0.142995536, 0.395841271, 0.133000448, -0.989711702, -0.0527416691), 0.8)
  472. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.8)
  473. ls.C1 = ls.C1:Lerp(CFrame.new(-0.214841455, 0.866598129, -0.112976491, 0.758646905, 0.0105680302, -0.651416421, 0.64655149, -0.135239884, 0.750787199, -0.0801631361, -0.990756512, -0.109432101), 0.8)
  474. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.8)
  475. rh.C1 = rh.C1:Lerp(CFrame.new(0.5, 1, 0, -4.37113883e-08, 0, 1, -0.104150683, 0.994561553, -4.55257076e-09, -0.994561553, -0.104150683, -4.34736656e-08), 0.8)
  476. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.8)
  477. lh.C1 = lh.C1:Lerp(CFrame.new(-0.5, 1, 0, -4.37113883e-08, 0, -1, -0.0883838907, 0.996086478, 3.8633825e-09, 0.996086478, 0.0883838907, -4.35403216e-08), 0.8)
  478. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.8)
  479. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.49999997, 0, -1, 0, 0, 0, 0.0492738597, 0.998785317, 0, 0.998785317, -0.0492738597), 0.8)
  480. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.8)
  481. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0.0276213959, 0.999618471, 0, 0.999618471, -0.0276213959), 0.8)
  482. swait()
  483. end
  484. cananim = true
  485. attacking = false
  486. end
  487. end)
  488. while true do
  489. swait()
  490. if currentanim == "Jumping" and cananim then
  491. for i = 0, 1.2, 0.1 do
  492. if currentanim ~= "Jumping" or not cananim then break end
  493. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.4)
  494. rs.C1 = rs.C1:Lerp(CFrame.new(0.0997244716, 0.195344329, -0.746855855, -0.155881107, 0.00388455181, 0.987768173, 0.260807574, -0.964343727, 0.0449508503, 0.952722609, 0.264624417, 0.149309859), 0.4)
  495. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.4)
  496. ls.C1 = ls.C1:Lerp(CFrame.new(0.793125331, 0.89348793, -0.0677016973, 0.986068428, -0.132806748, -0.100156575, 0.1031176, 0.0155911446, 0.994546831, -0.130520999, -0.991019309, 0.0290686507), 0.4)
  497. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.4)
  498. rh.C1 = rh.C1:Lerp(CFrame.new(0.49999997, 0.99999994, -4.47034836e-08, -0.0421661586, 0.0827250704, 0.995679915, 0.25110203, 0.965456486, -0.0695800334, -0.967041731, 0.247083336, -0.0614820197), 0.4)
  499. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.4)
  500. lh.C1 = lh.C1:Lerp(CFrame.new(-0.49999997, 1, 2.98023224e-08, 0.0194152314, 0, -0.99981153, 0.178683311, 0.983900607, 0.00346983178, 0.983715117, -0.178716987, 0.0191026554), 0.4)
  501. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  502. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0.0515226237, 0.99867183, 0, 0.99867183, -0.0515226237), 0.4)
  503. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  504. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0.128909558, -0.0269506648, -0.996639967, -0.0819067881, 0, -0.00100739487, 0.0122579783, 0.999924421, -0.0819005966, 0.996564567, -0.0122992992), 0.4)
  505. swait()
  506. end
  507. end
  508. if currentanim == "Falling" and cananim then
  509. for i = 0, 1.2, 0.1 do
  510. if currentanim ~= "Falling" or not cananim then break end
  511. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.4)
  512. rs.C1 = rs.C1:Lerp(CFrame.new(0.0997244716, 0.389569163, -0.799008012, -0.155881107, 0.00388455181, 0.987768173, 0.0170185864, -0.999833226, 0.00661772862, 0.987629175, 0.0178419873, 0.155789018), 0.4)
  513. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.4)
  514. ls.C1 = ls.C1:Lerp(CFrame.new(0.800841689, 0.89348793, 0.000534057617, 0.989977896, 0.0953866094, -0.104139231, 0.1031176, 0.0155911446, 0.994546831, 0.0964901, -0.995318174, 0.00559884822), 0.4)
  515. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.4)
  516. rh.C1 = rh.C1:Lerp(CFrame.new(0.49999997, 1, -1.49011612e-08, -0.0421661586, 0.0827250704, 0.995679915, -0.0600035824, 0.994557679, -0.085172914, -0.997307122, -0.0633357614, -0.0369728766), 0.4)
  517. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.4)
  518. lh.C1 = lh.C1:Lerp(CFrame.new(-0.499999881, 1, 3.7252903e-08, 0.0207479522, -0.155918092, -0.987552047, -0.00691960612, 0.987718761, -0.156089753, 0.999760866, 0.0100720376, 0.0194142479), 0.4)
  519. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  520. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0.0515226237, 0.99867183, 0, 0.99867183, -0.0515226237), 0.4)
  521. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  522. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0.313415587, -0.0163925812, -0.996639967, -0.0819067881, 0, 0.00564728118, -0.0687159598, 0.997620344, -0.0817118809, 0.994268239, 0.068947643), 0.4)
  523. swait()
  524. end
  525. end
  526. if currentanim == "Walking" and cananim then
  527. for i = 0, 0.6, 0.1 do
  528. if currentanim ~= "Walking" or not cananim then break end
  529. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.6)
  530. rs.C1 = rs.C1:Lerp(CFrame.new(0.0997244716, -0.134959042, -0.791477084, -0.155881107, 0.00388455181, 0.987768173, 0.0728884861, -0.997220755, 0.0154243633, 0.985082865, 0.0744013041, 0.155164748), 0.6)
  531. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.6)
  532. ls.C1 = ls.C1:Lerp(CFrame.new(0.728777826, 0.934069037, -0.221951187, 0.958276987, -0.133620545, -0.252687156, 0.254302055, -0.00512516592, 0.96711117, -0.130520999, -0.991019309, 0.0290686507), 0.6)
  533. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.6)
  534. rh.C1 = rh.C1:Lerp(CFrame.new(0.49999997, 1, 0, -0.0421661586, 0.0827250704, 0.995679915, -0.568820775, 0.817300439, -0.0919936299, -0.82137984, -0.570242465, 0.0125933159), 0.6)
  535. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.6)
  536. lh.C1 = lh.C1:Lerp(CFrame.new(-0.49999997, 1, 0, 0.0194152314, 0, -0.99981153, -0.845399499, 0.53388226, -0.0164167192, 0.533781588, 0.845558882, 0.0103654461), 0.6)
  537. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  538. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0.0515226237, 0.99867183, 0, 0.99867183, -0.0515226237), 0.6)
  539. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  540. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0.239933819, 0, -0.996639967, -0.0819067881, 0, 0.00819849782, -0.0997591168, 0.994977891, -0.0814954415, 0.991634667, 0.100095451), 0.6)
  541. swait()
  542. end
  543. local rslastc0 = rs.C0
  544. local rslastc1 = rs.C1
  545. local lslastc0 = ls.C0
  546. local lslastc1 = ls.C1
  547. local rhlastc0 = rh.C0
  548. local rhlastc1 = rh.C1
  549. local lhlastc0 = lh.C0
  550. local lhlastc1 = lh.C1
  551. local necklastc0 = neck.C0
  552. local necklastc1 = neck.C1
  553. local rjlastc0 = rj.C0
  554. local rjlastc1 = rj.C1
  555. local max = 0.6
  556. for i = 0, max, 0.1 do
  557. if currentanim ~= "Walking" or not cananim then break end
  558. rs.C0 = rslastc0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), i/max)
  559. rs.C1 = rslastc1:Lerp(CFrame.new(0.0997244716, -0.134959042, -0.791477084, -0.155881107, 0.00388455181, 0.987768173, 0.0728884861, -0.997220755, 0.0154243633, 0.985082865, 0.0744013041, 0.155164748), i/max)
  560. ls.C0 = lslastc0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), i/max)
  561. ls.C1 = lslastc1:Lerp(CFrame.new(0.728777826, 0.934069037, -0.221951187, 0.958276987, -0.133620545, -0.252687156, 0.254302055, -0.00512516592, 0.96711117, -0.130520999, -0.991019309, 0.0290686507), i/max)
  562. rh.C0 = rhlastc0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), i/max)
  563. rh.C1 = rhlastc1:Lerp(CFrame.new(0.5, 0.675323606, 0, -0.0421661623, 0.0827250704, 0.995679975, 0.221647412, 0.972508371, -0.0714133158, -0.974214792, 0.217678651, -0.059342742), i/max)
  564. lh.C0 = lhlastc0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), i/max)
  565. lh.C1 = lhlastc1:Lerp(CFrame.new(-0.49999997, 0.680277288, -1.49011612e-08, 0.0194152296, -2.24613939e-11, -0.99981153, -0.183868393, 0.982944369, -0.00357052009, 0.982759118, 0.183903053, 0.0190840904), i/max)
  566. neck.C0 = necklastc0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  567. neck.C1 = necklastc1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0.0515226237, 0.99867183, 0, 0.99867183, -0.0515226237), i/max)
  568. rj.C0 = rjlastc0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  569. rj.C1 = rjlastc1:Lerp(CFrame.new(0, 0.169720784, 0, -0.996639967, -0.0819067881, 0, 0.00819849782, -0.0997591168, 0.994977891, -0.0814954415, 0.991634667, 0.100095451), i/max)
  570. swait()
  571. end
  572. for i = 0, 0.6, 0.1 do
  573. if currentanim ~= "Walking" or not cananim then break end
  574. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.6)
  575. rs.C1 = rs.C1:Lerp(CFrame.new(0.0997244716, -0.134959042, -0.791477084, -0.155881107, 0.00388455181, 0.987768173, 0.0728884861, -0.997220755, 0.0154243633, 0.985082865, 0.0744013041, 0.155164748), 0.6)
  576. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.6)
  577. ls.C1 = ls.C1:Lerp(CFrame.new(0.728777826, 0.934069037, -0.221951187, 0.958276987, -0.133620545, -0.252687156, 0.254302055, -0.00512516592, 0.96711117, -0.130520999, -0.991019309, 0.0290686507), 0.6)
  578. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.6)
  579. rh.C1 = rh.C1:Lerp(CFrame.new(0.49999997, 1, 0, -0.0421661586, 0.0827250704, 0.995679915, 0.868188143, 0.496215105, -0.00446053827, -0.494440407, 0.864249468, -0.0927444026), 0.6)
  580. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.6)
  581. lh.C1 = lh.C1:Lerp(CFrame.new(-0.49999997, 1, 0, 0.0194152314, 0, -0.99981153, 0.595236421, 0.803467572, 0.0115588298, 0.803316057, -0.595348656, 0.015599506), 0.6)
  582. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  583. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0.0515226237, 0.99867183, 0, 0.99867183, -0.0515226237), 0.6)
  584. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  585. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0.342528641, -9.31322575e-10, -0.996639967, -0.0819067955, -6.22866592e-10, 0.00819849595, -0.0997591242, 0.994977832, -0.0814954415, 0.991634727, 0.100095443), 0.6)
  586. swait()
  587. end
  588. local rslastc0 = rs.C0
  589. local rslastc1 = rs.C1
  590. local lslastc0 = ls.C0
  591. local lslastc1 = ls.C1
  592. local rhlastc0 = rh.C0
  593. local rhlastc1 = rh.C1
  594. local lhlastc0 = lh.C0
  595. local lhlastc1 = lh.C1
  596. local necklastc0 = neck.C0
  597. local necklastc1 = neck.C1
  598. local rjlastc0 = rj.C0
  599. local rjlastc1 = rj.C1
  600. local max = 0.6
  601. for i = 0, max, 0.1 do
  602. if currentanim ~= "Walking" or not cananim then break end
  603. rs.C0 = rslastc0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), i/max)
  604. rs.C1 = rslastc1:Lerp(CFrame.new(0.0997244716, -0.134959042, -0.791477084, -0.155881107, 0.00388455181, 0.987768173, 0.0728884861, -0.997220755, 0.0154243633, 0.985082865, 0.0744013041, 0.155164748), i/max)
  605. ls.C0 = lslastc0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), i/max)
  606. ls.C1 = lslastc1:Lerp(CFrame.new(0.728777826, 0.934069037, -0.221951187, 0.958276987, -0.133620545, -0.252687156, 0.254302055, -0.00512516592, 0.96711117, -0.130520999, -0.991019309, 0.0290686507), i/max)
  607. rh.C0 = rhlastc0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), i/max)
  608. rh.C1 = rhlastc1:Lerp(CFrame.new(0.5, 0.675323606, 0, -0.0421661623, 0.0827250704, 0.995679975, 0.221647412, 0.972508371, -0.0714133158, -0.974214792, 0.217678651, -0.059342742), i/max)
  609. lh.C0 = lhlastc0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), i/max)
  610. lh.C1 = lhlastc1:Lerp(CFrame.new(-0.49999997, 0.680277288, -1.49011612e-08, 0.0194152296, -2.24613939e-11, -0.99981153, -0.183868393, 0.982944369, -0.00357052009, 0.982759118, 0.183903053, 0.0190840904), i/max)
  611. neck.C0 = necklastc0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  612. neck.C1 = necklastc1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0.0515226237, 0.99867183, 0, 0.99867183, -0.0515226237), i/max)
  613. rj.C0 = rjlastc0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  614. rj.C1 = rjlastc1:Lerp(CFrame.new(5.82076609e-11, 0.2270886, 2.32830644e-10, -0.996639967, -0.0819067881, 4.13409307e-10, 0.00819849502, -0.0997591093, 0.994977832, -0.081495434, 0.991634727, 0.100095429), i/max)
  615. wait()
  616. end
  617. end
  618. if currentanim == "Idle" and cananim then
  619. for i = 0, 5, 0.1 do
  620. if currentanim ~= "Idle" or not cananim then break end
  621. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.05)
  622. rs.C1 = rs.C1:Lerp(CFrame.new(0.0997244716, -0.105339587, -1.12973166, -0.155881107, 0.00388455181, 0.987768173, -0.0249122381, -0.999689579, -1.08894849e-09, 0.987461567, -0.0246075168, 0.155929506), 0.05)
  623. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.05)
  624. ls.C1 = ls.C1:Lerp(CFrame.new(0.998242438, 0.966719627, -0.251513988, 0.948773444, -0.0191214401, -0.315378129, 0.315314144, -0.00635479437, 0.948966026, -0.0201497618, -0.999796987, 8.80774065e-10), 0.05)
  625. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.05)
  626. rh.C1 = rh.C1:Lerp(CFrame.new(0.5, 1, 0, -0.246849835, 0, 0.969053745, 0, 1, 0, -0.969053745, 0, -0.246849835), 0.05)
  627. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.05)
  628. lh.C1 = lh.C1:Lerp(CFrame.new(-0.5, 1, 0, 0.0194152314, 0, -0.99981153, 0, 1, 0, 0.99981153, 0, 0.0194152314), 0.05)
  629. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  630. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  631. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  632. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0, 0, -0.996639967, -0.0819067881, 0, 0, 0, 1, -0.0819067881, 0.996639967, 0), 0.05)
  633. swait()
  634. end
  635. for i = 0, 5, 0.1 do
  636. if currentanim ~= "Idle" or not cananim then break end
  637. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.05)
  638. rs.C1 = rs.C1:Lerp(CFrame.new(0.0997244716, -0.134959042, -1.07218063, -0.155881107, 0.00388455181, 0.987768173, 0.0728884861, -0.997220755, 0.0154243633, 0.985082865, 0.0744013041, 0.155164748), 0.05)
  639. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.05)
  640. ls.C1 = ls.C1:Lerp(CFrame.new(0.994734883, 0.934069037, -0.221951187, 0.958276987, -0.133620545, -0.252687156, 0.254302055, -0.00512516592, 0.96711117, -0.130520999, -0.991019309, 0.0290686507), 0.05)
  641. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.05)
  642. rh.C1 = rh.C1:Lerp(CFrame.new(0.5, 1, 0, -0.246849835, 0, 0.969053745, 0, 1, 0, -0.969053745, 0, -0.246849835), 0.05)
  643. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.05)
  644. lh.C1 = lh.C1:Lerp(CFrame.new(-0.49999997, 1, 0, 0.0194152314, 0, -0.99981153, 0, 1, 0, 0.99981153, 0, 0.0194152314), 0.05)
  645. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  646. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  647. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  648. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0, 0, -0.996639967, -0.0819067881, 0, -0.00139390712, 0.0169610307, 0.999855161, -0.0818949267, 0.996495605, -0.017018212), 0.05)
  649. swait()
  650. function CreateWave(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
  651. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
  652. local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  653. wave.CFrame = CFRAME
  654. coroutine.resume(coroutine.create(function(PART)
  655. for i = 1, WAIT do
  656. Swait()
  657. mesh.Scale = mesh.Scale + GROW
  658. mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
  659. if DOESROT == true then
  660. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
  661. end
  662. wave.Transparency = wave.Transparency + (0.5/WAIT)
  663. if wave.Transparency > 0.99 then
  664. wave:remove()
  665. end
  666. end
  667. end))
  668. end
  669.  
  670. function CreateRing(SIZE,DOESROT,ROT,WAIT,CFRAME,COLOR,GROW)
  671. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
  672. local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "559831844", "", SIZE, VT(0,0,0))
  673. wave.CFrame = CFRAME
  674. coroutine.resume(coroutine.create(function(PART)
  675. for i = 1, WAIT do
  676. Swait()
  677. mesh.Scale = mesh.Scale + GROW
  678. if DOESROT == true then
  679. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
  680. end
  681. wave.Transparency = wave.Transparency + (0.5/WAIT)
  682. if wave.Transparency > 0.99 then
  683. wave:remove()
  684. end
  685. end
  686. end))
  687. end
  688.  
  689. function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
  690. local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  691. local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0))
  692. wave.CFrame = CFRAME
  693. coroutine.resume(coroutine.create(function(PART)
  694. for i = 1, WAIT do
  695. Swait()
  696. mesh.Scale = mesh.Scale + GROW
  697. wave.Transparency = wave.Transparency + (1/WAIT)
  698. if wave.Transparency > 0.99 then
  699. wave:remove()
  700. end
  701. end
  702. end))
  703. end
  704.  
  705. function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
  706. local mesh = nil
  707. if KIND == "Base" then
  708. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
  709. elseif KIND == "Thin" then
  710. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  711. elseif KIND == "Round" then
  712. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  713. end
  714. wave.CFrame = CFRAME
  715. coroutine.resume(coroutine.create(function(PART)
  716. for i = 1, WAIT do
  717. Swait()
  718. mesh.Scale = mesh.Scale + GROW/10
  719. wave.Transparency = wave.Transparency + (0.5/WAIT)
  720. if wave.Transparency > 0.99 then
  721. wave:remove()
  722. end
  723. end
  724. end))
  725. end
  726.  
  727. function Ragdoll(Character2, CharTorso, Headless, Velocity)
  728. local svch = Character2
  729. Character2:BreakJoints()
  730. local hum = Character2:findFirstChild("Humanoid")
  731. local q = Character2:GetChildren()
  732. local CLONE = IT("Model", Effects)
  733. for i = 1, #q do
  734. if q[i].ClassName == "Accessory" and Headless == true then
  735. q[i]:remove()
  736. elseif q[i].ClassName ~= "Humanoid" and q[i].ClassName ~= "LocalScript" and q[i].ClassName ~= "Script" and q[i].ClassName ~= "Gear" then
  737. q[i].Parent = CLONE
  738. elseif q[i].ClassName ~= "Humanoid" then
  739. q[i]:remove()
  740. end
  741. end
  742. local chrclone = CLONE
  743. local ch = chrclone:GetChildren()
  744. local i
  745. for i = 1, #ch do
  746. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then
  747. ch[i]:remove()
  748. end
  749. end
  750. local function Scan(ch)
  751. local e
  752. for e = 1, #ch do
  753. Scan(ch[e]:GetChildren())
  754. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  755. ch[e]:remove()
  756. end
  757. end
  758. end
  759. Character2:remove()
  760. local NEWHUM = IT("Humanoid")
  761. NEWHUM.Name = "Corpse"
  762. NEWHUM.Health = 0
  763. NEWHUM.MaxHealth = 0
  764. NEWHUM.PlatformStand = true
  765. NEWHUM.Parent = CLONE
  766. NEWHUM.DisplayDistanceType = "None"
  767. Scan(chrclone:GetChildren())
  768. local ch = Character2:GetChildren()
  769. local i
  770. for i = 1, #ch do
  771. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  772. ch[i]:remove()
  773. end
  774. end
  775.  
  776. Character2 = chrclone
  777. local Torso2 = Character2.Torso
  778. local movevector = Vector3.new()
  779. if Torso2 then
  780. movevector = CFrame.new(CharTorso.Position, Torso2.Position).lookVector
  781. local Head = Character2:FindFirstChild("Head")
  782. if Head then
  783. local Neck = Instance.new("Weld")
  784. Neck.Name = "Neck"
  785. Neck.Part0 = Torso2
  786. Neck.Part1 = Head
  787. Neck.C0 = CFrame.new(0, 1.5, 0)
  788. Neck.C1 = CFrame.new()
  789. Neck.Parent = Torso2
  790. if Headless == true then
  791. Head.Transparency = 1
  792. Head:ClearAllChildren()
  793. end
  794. end
  795. local Limb = Character2:FindFirstChild("Right Arm")
  796. if Limb then
  797. Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
  798. local Joint = Instance.new("Glue")
  799. Joint.Name = "RightShoulder"
  800. Joint.Part0 = Torso2
  801. Joint.Part1 = Limb
  802. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  803. Joint.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  804. Joint.Parent = Torso2
  805. local B = Instance.new("Part")
  806. B.TopSurface = 0
  807. B.BottomSurface = 0
  808. B.formFactor = "Symmetric"
  809. B.Size = Vector3.new(1, 1, 1)
  810. B.Transparency = 1
  811. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  812. B.Parent = Character2
  813. local W = Instance.new("Weld")
  814. W.Part0 = Limb
  815. W.Part1 = B
  816. W.C0 = CFrame.new(0, -0.5, 0)
  817. W.Parent = Limb
  818. end
  819. local Limb = Character2:FindFirstChild("Left Arm")
  820. if Limb then
  821. Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
  822. local Joint = Instance.new("Glue")
  823. Joint.Name = "LeftShoulder"
  824. Joint.Part0 = Torso2
  825. Joint.Part1 = Limb
  826. Joint.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  827. Joint.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  828. Joint.Parent = Torso2
  829. local B = Instance.new("Part")
  830. B.TopSurface = 0
  831. B.BottomSurface = 0
  832. B.formFactor = "Symmetric"
  833. B.Size = Vector3.new(1, 1, 1)
  834. B.Transparency = 1
  835. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  836. B.Parent = Character2
  837. local W = Instance.new("Weld")
  838. W.Part0 = Limb
  839. W.Part1 = B
  840. W.C0 = CFrame.new(0, -0.5, 0)
  841. W.Parent = Limb
  842. end
  843. local Limb = Character2:FindFirstChild("Right Leg")
  844. if Limb then
  845. Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
  846. local Joint = Instance.new("Glue")
  847. Joint.Name = "RightHip"
  848. Joint.Part0 = Torso2
  849. Joint.Part1 = Limb
  850. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  851. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  852. Joint.Parent = Torso2
  853. local B = Instance.new("Part")
  854. B.TopSurface = 0
  855. B.BottomSurface = 0
  856. B.formFactor = "Symmetric"
  857. B.Size = Vector3.new(1, 1, 1)
  858. B.Transparency = 1
  859. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  860. B.Parent = Character2
  861. local W = Instance.new("Weld")
  862. W.Part0 = Limb
  863. W.Part1 = B
  864. W.C0 = CFrame.new(0, -0.5, 0)
  865. W.Parent = Limb
  866. end
  867. local Limb = Character2:FindFirstChild("Left Leg")
  868. if Limb then
  869. Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
  870. local Joint = Instance.new("Glue")
  871. Joint.Name = "LeftHip"
  872. Joint.Part0 = Torso2
  873. Joint.Part1 = Limb
  874. Joint.C0 = CFrame.new(-0.5, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  875. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  876. Joint.Parent = Torso2
  877. local B = Instance.new("Part")
  878. B.TopSurface = 0
  879. B.BottomSurface = 0
  880. B.formFactor = "Symmetric"
  881. B.Size = Vector3.new(1, 1, 1)
  882. B.Transparency = 1
  883. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  884. B.Parent = Character2
  885. local W = Instance.new("Weld")
  886. W.Part0 = Limb
  887. W.Part1 = B
  888. W.C0 = CFrame.new(0, -0.5, 0)
  889. W.Parent = Limb
  890. end
  891. local Bar = Instance.new("Part")
  892. Bar.TopSurface = 0
  893. Bar.BottomSurface = 0
  894. Bar.formFactor = "Symmetric"
  895. Bar.Size = Vector3.new(1, 1, 1)
  896. Bar.Transparency = 1
  897. Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
  898. Bar.Parent = Character2
  899. local Weld = Instance.new("Weld")
  900. Weld.Part0 = Torso2
  901. Weld.Part1 = Bar
  902. Weld.C0 = CFrame.new(0, 0.5, 0)
  903. Weld.Parent = Torso2
  904. end
  905. Character2.Parent = Weapon
  906. if movevector ~= Vector3.new() then
  907. for i = 1, 10 do
  908. Torso2.Velocity = movevector * Velocity
  909. end
  910. end
  911. Character2.Name = "Corpse"
  912. return Character2, Torso2
  913. end
  914.  
  915. function Banish(Foe)
  916. if Foe then
  917. coroutine.resume(coroutine.create(function()
  918. --if game.Players:FindFirstChild(Foe.Name) then
  919. table.insert(TOBANISH,Foe.Name)
  920. printbye(Foe.Name)
  921. --end
  922. Foe.Archivable = true
  923. local CLONE = Foe:Clone()
  924. Foe:Destroy()
  925. CLONE.Parent = Effects
  926. CLONE:BreakJoints()
  927. local MATERIALS = {"Glass","Neon"}
  928. for _, c in pairs(CLONE:GetDescendants()) do
  929. if c:IsA("BasePart") then
  930. if c.Name == "Torso" or c.Name == "UpperTorso" or c == CLONE.PrimaryPart then
  931. CreateSound(340722848, c, 10, 1, false)
  932. end
  933. c.Anchored = true
  934. c.Transparency = c.Transparency + 0.2
  935. c.Material = MATERIALS[MRANDOM(1,2)]
  936. c.Color = C3(.5,255,.5)
  937. if c.ClassName == "MeshPart" then
  938. c.TextureID = ""
  939. end
  940. if c:FindFirstChildOfClass("SpecialMesh") then
  941. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  942. end
  943. if c:FindFirstChildOfClass("Decal") then
  944. c:FindFirstChildOfClass("Decal"):remove()
  945. end
  946. c.Name = "Banished"
  947. c.CanCollide = false
  948. else
  949. c:remove()
  950. end
  951. end
  952. local A = false
  953. for i = 1, 35 do
  954. if A == false then
  955. A = true
  956. elseif A == true then
  957. A = false
  958. end
  959. for _, c in pairs(CLONE:GetDescendants()) do
  960. if c:IsA("BasePart") then
  961. c.Anchored = true
  962. c.Material = MATERIALS[MRANDOM(1,2)]
  963. c.Transparency = c.Transparency + 0.8/35
  964. if A == false then
  965. c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)
  966. elseif A == true then
  967. c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)
  968. end
  969. end
  970. end
  971. Swait()
  972. end
  973. CLONE:remove()
  974. end))
  975. end
  976. end
  977.  
  978. function PuddleOfBlood(Position, MaxDrop, Model, MaxSize)
  979. local HITFLOOR, HITPOS, NORMAL = Raycast(Position, CF(Position, Position + VT(0, -1, 0)).lookVector, MaxDrop, Model)
  980. if HITFLOOR ~= nil and HITFLOOR.Parent ~= Weapon and HITFLOOR.Parent ~= Character then
  981. if HITFLOOR.Name == "BloodPuddle" then
  982. local DIST = (Position - HITFLOOR.Position).Magnitude
  983. if HITFLOOR.Size.Z <= 5 and MaxSize > HITFLOOR.Size.Z or HITFLOOR.Size.Z > 5 and MaxSize > HITFLOOR.Size.Z and DIST < HITFLOOR.Size.Z / 3 then
  984. HITFLOOR.Size = HITFLOOR.Size + VT(0.1, 0, 0.1)
  985. end
  986. elseif HITFLOOR.Anchored == true then
  987. do
  988. local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Royal purple", "BloodPuddle", VT(2, 0, 2))
  989. BLOOD.CFrame = CF(HITPOS, HITPOS + NORMAL) * ANGLES(RAD(90), RAD(0), RAD(0))
  990. MakeForm(BLOOD, "Cyl")
  991. coroutine.resume(coroutine.create(function()
  992. Swait(75)
  993. while true do
  994. Swait()
  995. BLOOD.Size = BLOOD.Size - VT(0.02, 0, 0.02)
  996. if BLOOD.Size.Z < 0.051 then
  997. BLOOD:remove()
  998. break
  999. end
  1000. end
  1001. end))
  1002. end
  1003. end
  1004. end
  1005. end
  1006.  
  1007. function SprayBlood(POSITION, DIRECTION, BloodSize)
  1008. local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Royal purple", "BloodPuddle", VT(1, 1, 1), false)
  1009. BLOOD.CFrame = CF(POSITION)
  1010. MakeForm(BLOOD, "Ball")
  1011. local bv = Instance.new("BodyVelocity", BLOOD)
  1012. bv.maxForce = Vector3.new(1000000000, 1000000000, 1000000000)
  1013. bv.velocity = CF(POSITION, DIRECTION + VT(MRANDOM(-3, 3) / 30, MRANDOM(-3, 3) / 30, MRANDOM(-3, 3) / 30)).lookVector * 25
  1014. bv.Name = "MOVE"
  1015. Debris:AddItem(bv, 0.05)
  1016. coroutine.resume(coroutine.create(function()
  1017. local HASTOUCHEDGROUND = false
  1018. local HIT = BLOOD.Touched:Connect(function(hit)
  1019. if hit.Anchored == true then
  1020. HASTOUCHEDGROUND = true
  1021. PuddleOfBlood(BLOOD.Position + VT(0, 1, 0), 2, BLOOD, BloodSize)
  1022. end
  1023. end)
  1024. wait(5)
  1025. if HASTOUCHEDGROUND == false then
  1026. BLOOD:remove()
  1027. end
  1028. end))
  1029. end
  1030. function ApplyDamage(Humanoid, Damage, TorsoPart)
  1031. local defence = Instance.new("BoolValue", Humanoid.Parent)
  1032. defence.Name = "HitBy" .. Player.Name
  1033. game:GetService("Debris"):AddItem(defence, 0.001)
  1034. Damage = Damage * DAMAGEMULTIPLIER
  1035. if Humanoid.Health ~= 0 then
  1036. local CritChance = MRANDOM(1, 100)
  1037. if Damage > Humanoid.Health then
  1038. Damage = math.ceil(Humanoid.Health)
  1039. if Damage == 0 then
  1040. Damage = 0.1
  1041. end
  1042. end
  1043. Humanoid.Health = Humanoid.Health - Damage
  1044. StatLabel(TorsoPart.CFrame * CF(0, 0 + (TorsoPart.Size.z - 1), 0), Damage, C3(0, 0, 0))
  1045. end
  1046. end
  1047.  
  1048. function ApplyAoE(POSITION,RANGE,ISBANISH)
  1049. local CHILDREN = workspace:GetDescendants()
  1050. for index, CHILD in pairs(CHILDREN) do
  1051. if CHILD.ClassName == "Model" and CHILD ~= Character then
  1052. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  1053. if HUM then
  1054. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  1055. if TORSO then
  1056. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  1057. if ISBANISH == true then
  1058. Banish(CHILD)
  1059. else
  1060. if ISBANISH == "Gravity" then
  1061. HUM.PlatformStand = true
  1062. if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
  1063. local grav = Instance.new("BodyPosition",TORSO)
  1064. grav.D = 15
  1065. grav.P = 20000
  1066. grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  1067. grav.position = TORSO.Position
  1068. grav.Name = "V3BanishForce"..Player.Name
  1069. else
  1070. TORSO:FindFirstChild("V3BanishForce"..Player.Name).position = TORSO.Position+VT(0,0.3,0)
  1071. TORSO.RotVelocity = VT(MRANDOM(-25,25),MRANDOM(-25,25),MRANDOM(-25,25))
  1072. end
  1073. else
  1074. HUM.PlatformStand = false
  1075. end
  1076. end
  1077. elseif ISBANISH == "Gravity" then
  1078. if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
  1079. TORSO:FindFirstChild("V3BanishForce"..Player.Name):remove()
  1080. HUM.PlatformStand = false
  1081. end
  1082. end
  1083. end
  1084. end
  1085. end
  1086. end
  1087. end
  1088.  
  1089. function AoEDamage(position,radius,min,max,maxstrength,critrate,critmultiplier,CanBeDodgedByJumping)
  1090. local dmg = math.random(min,max)
  1091. for i,v in ipairs(workspace:GetChildren()) do
  1092. if v:FindFirstChild("HitBy"..Player.Name) == nil then
  1093. local body = v:GetChildren()
  1094. for part = 1, #body do
  1095. if(v:FindFirstChild("HitBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  1096. if(body[part].Position - position).Magnitude < radius then
  1097. if v.ClassName == "Model" then
  1098. if v:FindFirstChildOfClass("Humanoid") then
  1099. if CanBeDodgedByJumping == true then
  1100. if body[part].Position.Y < position.Y+5 then
  1101. ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier)
  1102. end
  1103. else
  1104. ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier)
  1105. end
  1106. local bv = Instance.new("BodyVelocity")
  1107. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1108. bv.velocity = RootPart.CFrame.lookVector*maxstrength
  1109. bv.Parent = body[part]
  1110. Debris:AddItem(bv,0.2)
  1111. end
  1112. end
  1113. end
  1114. end
  1115. end
  1116. end
  1117. if v:FindFirstChild("HitBy"..Player.Name) then
  1118. v:FindFirstChild("HitBy"..Player.Name):remove()
  1119. end
  1120. end
  1121. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement