Advertisement
voidscriptbuilderr

fe last god script

Jul 11th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 155.22 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. Player = game.Players.LocalPlayer
  153. Character = Player.Character
  154. local txt = Instance.new("BillboardGui", Character)
  155. txt.Adornee = Character.Head
  156. txt.Name = "_status"
  157. txt.Size = UDim2.new(2, 0, 1.2, 0)
  158. txt.StudsOffset = Vector3.new(-9, 8, 0)
  159. local text = Instance.new("TextLabel", txt)
  160. text.Size = UDim2.new(10, 0, 7, 0)
  161. text.FontSize = "Size24"
  162. text.TextScaled = true
  163. text.TextTransparency = 0
  164. text.BackgroundTransparency = 1
  165. text.TextTransparency = 0
  166. text.TextStrokeTransparency = 0
  167. text.Font = "Antique"
  168. text.TextStrokeColor3 = Color3.new(196, 40, 28)
  169. text.Text = "The Last God"
  170. script.Name = "Banisher Gun V3 / 1"
  171. --//====================================================\\--
  172. --|| CREATED BY SHACKLUSTER
  173. --\\====================================================//--
  174.  
  175. script:ClearAllChildren()
  176. wait(0.2)
  177.  
  178. Player = game:GetService("Players").LocalPlayer
  179. PlayerGui = Player.PlayerGui
  180. Cam = workspace.CurrentCamera
  181. Backpack = Player.Backpack
  182. Character = Player.Character
  183. Humanoid = Character.Humanoid
  184. Mouse = Player:GetMouse()
  185. RootPart = Character["HumanoidRootPart"]
  186. Torso = Character["Torso"]
  187. Head = Character["Head"]
  188. RightArm = Character["Right Arm"]
  189. LeftArm = Character["Left Arm"]
  190. RightLeg = Character["Right Leg"]
  191. LeftLeg = Character["Left Leg"]
  192. RootJoint = RootPart["RootJoint"]
  193. Neck = Torso["Neck"]
  194. RightShoulder = Torso["Right Shoulder"]
  195. LeftShoulder = Torso["Left Shoulder"]
  196. RightHip = Torso["Right Hip"]
  197. LeftHip = Torso["Left Hip"]
  198. local TIME = 0
  199. local sick = Instance.new("Sound",Torso)
  200.  
  201.  
  202. for i,v in pairs(Character:GetChildren()) do
  203. if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "CharacterMesh" then
  204. v:Destroy()
  205. end
  206. end
  207.  
  208. for i,v in pairs(Character:GetChildren()) do
  209. if v.ClassName == "Accessory" or v.ClassName == "Hat" then
  210. v:Destroy()
  211. end
  212. end
  213.  
  214. local Shirt = Instance.new("Shirt",Character)
  215. local Pants = Instance.new("Pants",Character)
  216. Shirt.ShirtTemplate = "rbxassetid://1390096242"
  217. Pants.PantsTemplate = "rbxassetid://1756876037"
  218.  
  219. IT = Instance.new
  220. CF = CFrame.new
  221. VT = Vector3.new
  222. RAD = math.rad
  223. C3 = Color3.new
  224. UD2 = UDim2.new
  225. BRICKC = BrickColor.new
  226. ANGLES = CFrame.Angles
  227. EULER = CFrame.fromEulerAnglesXYZ
  228. COS = math.cos
  229. ACOS = math.acos
  230. SIN = math.sin
  231. ASIN = math.asin
  232. ABS = math.abs
  233. MRANDOM = math.random
  234. FLOOR = math.floor
  235.  
  236. Player = game:GetService("Players").LocalPlayer
  237. PlayerGui = Player.PlayerGui
  238. Cam = workspace.CurrentCamera
  239. Backpack = Player.Backpack
  240. Character = Player.Character
  241. Humanoid = Character.Humanoid
  242. Mouse = Player:GetMouse()
  243. RootPart = Character["HumanoidRootPart"]
  244. Torso = Character["Torso"]
  245. Head = Character["Head"]
  246. RightArm = Character["Right Arm"]
  247. LeftArm = Character["Left Arm"]
  248. RightLeg = Character["Right Leg"]
  249. LeftLeg = Character["Left Leg"]
  250. RootJoint = RootPart["RootJoint"]
  251. Neck = Torso["Neck"]
  252. RightShoulder = Torso["Right Shoulder"]
  253. LeftShoulder = Torso["Left Shoulder"]
  254. RightHip = Torso["Right Hip"]
  255. LeftHip = Torso["Left Hip"]
  256. warn("Anti-Death Loaded (edited by promlg112)")
  257.  
  258. IT = Instance.new
  259. CF = CFrame.new
  260. VT = Vector3.new
  261. RAD = math.rad
  262. C3 = Color3.new
  263. UD2 = UDim2.new
  264. BRICKC = BrickColor.new
  265. ANGLES = CFrame.Angles
  266. EULER = CFrame.fromEulerAnglesXYZ
  267. COS = math.cos
  268. ACOS = math.acos
  269. SIN = math.sin
  270. ASIN = math.asin
  271. ABS = math.abs
  272. MRANDOM = math.random
  273. FLOOR = math.floor
  274.  
  275. local Speed = 55
  276. local Rooted = false
  277. local Effects = IT("Folder", Character)
  278. Effects.Name = "Effects"
  279. local UNANCHOR = true
  280. local HITPOS = nil
  281. local HITFLOOR = nil
  282. local LEFTWINGS = {}
  283. local RIGHTWINGS = {}
  284. local BODY = {}
  285.  
  286. for _, c in pairs(Character:GetChildren()) do
  287. if c.ClassName == "Part" then
  288. table.insert(BODY,{c,Character})
  289. for _, q in pairs(c:GetChildren()) do
  290. if q.ClassName == "Motor6D" or q.ClassName == "Weld" or q.ClassName == "ManualWeld" then
  291. table.insert(BODY,{q,c})
  292. end
  293. end
  294. end
  295. end
  296.  
  297. function refit()
  298. Character.Parent = workspace
  299. for e = 1, #BODY do
  300. if BODY[e] ~= nil then
  301. local STUFF = BODY[e]
  302. local PART = STUFF[1]
  303. local PARENT = STUFF[2]
  304. PART.Parent = PARENT
  305. end
  306. end
  307. end
  308.  
  309. Humanoid.HealthChanged:connect(function()
  310. Humanoid.Parent = nil
  311. Humanoid.MaxHealth = "inf"
  312. Humanoid.Health = "inf"
  313. refit()
  314. Humanoid.Parent = Character
  315. end)
  316.  
  317. Humanoid.Died:connect(function()
  318. Humanoid.Parent = nil
  319. Humanoid.MaxHealth = "inf"
  320. Humanoid.Health = "inf"
  321. refit()
  322. Humanoid.Parent = Character
  323. end)
  324. --//=================================\\
  325. --|| CUSTOMIZATION
  326. --\\=================================//
  327.  
  328. Player_Size = 1 --Size of the player.
  329. Animation_Speed = 3
  330. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  331.  
  332. local Speed = 16
  333. local Effects2 = {}
  334.  
  335. --//=================================\\
  336. --|| END OF CUSTOMIZATION
  337. --\\=================================//
  338.  
  339. local function weldBetween(a, b)
  340. local weldd = Instance.new("ManualWeld")
  341. weldd.Part0 = a
  342. weldd.Part1 = b
  343. weldd.C0 = CFrame.new()
  344. weldd.C1 = b.CFrame:inverse() * a.CFrame
  345. weldd.Parent = a
  346. return weldd
  347. end
  348. --//=================================\\
  349. --|| PARTICLES N STUFF
  350. --\\=================================//
  351.  
  352. local particleemitter = Instance.new('ParticleEmitter', LeftArm)
  353. particleemitter.VelocitySpread = 350
  354. particleemitter.Lifetime = NumberRange.new(1)
  355. particleemitter.Speed = NumberRange.new(0)
  356. cringememe= {}
  357. for i=0, 19 do
  358. cringememe[#cringememe + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
  359. end
  360. particleemitter.Size = NumberSequence.new(cringememe)
  361. particleemitter.Rate = 20
  362. particleemitter.LockedToPart = true
  363. particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)})
  364. particleemitter.LightEmission = 1
  365. particleemitter.Texture = "rbxassetid://38727848"
  366. particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color)
  367.  
  368. local particleemitter = Instance.new('ParticleEmitter', Torso)
  369. particleemitter.VelocitySpread = 250
  370. particleemitter.Lifetime = NumberRange.new(3)
  371. particleemitter.Speed = NumberRange.new(1.5)
  372. youAreATHOT = {}
  373. for i=0, 19 do
  374. youAreATHOT[#youAreATHOT + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
  375. end
  376. particleemitter.Size = NumberSequence.new(youAreATHOT)
  377. particleemitter.Rate = 10
  378. particleemitter.LockedToPart = false
  379. particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)})
  380. particleemitter.LightEmission = 1
  381. particleemitter.Texture = "rbxassetid://253188763"
  382. particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color)
  383.  
  384. local particleemitter = Instance.new('ParticleEmitter', RightArm)
  385. particleemitter.VelocitySpread = 350
  386. particleemitter.Lifetime = NumberRange.new(1)
  387. particleemitter.Speed = NumberRange.new(0)
  388. cringememe2= {}
  389. for i=0, 19 do
  390. cringememe2[#cringememe2 + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
  391. end
  392. particleemitter.Size = NumberSequence.new(cringememe2)
  393. particleemitter.Rate = 20
  394. particleemitter.LockedToPart = true
  395. particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)})
  396. particleemitter.LightEmission = 1
  397. particleemitter.Texture = "rbxassetid://38727848"
  398. particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color)
  399.  
  400. local particleemitter = Instance.new('ParticleEmitter', RightLeg)
  401. particleemitter.VelocitySpread = 350
  402. particleemitter.Lifetime = NumberRange.new(1)
  403. particleemitter.Speed = NumberRange.new(0)
  404. cringememe3= {}
  405. for i=0, 19 do
  406. cringememe3[#cringememe3 + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
  407. end
  408. particleemitter.Size = NumberSequence.new(cringememe3)
  409. particleemitter.Rate = 30
  410. particleemitter.LockedToPart = true
  411. particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)})
  412. particleemitter.LightEmission = 1
  413. particleemitter.Texture = "rbxassetid://38727848"
  414. particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color)
  415.  
  416. local particleemitter = Instance.new('ParticleEmitter', LeftLeg)
  417. particleemitter.VelocitySpread = 350
  418. particleemitter.Lifetime = NumberRange.new(1)
  419. particleemitter.Speed = NumberRange.new(0)
  420. cringememe4= {}
  421. for i=0, 19 do
  422. cringememe4[#cringememe4 + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
  423. end
  424. particleemitter.Size = NumberSequence.new(cringememe4)
  425. particleemitter.Rate = 30
  426. particleemitter.LockedToPart = true
  427. particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)})
  428. particleemitter.LightEmission = 1
  429. particleemitter.Texture = "rbxassetid://38727848"
  430. particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color)
  431. --//=================================\\
  432. --|| USEFUL VALUES
  433. --\\=================================//
  434.  
  435. Animation_Speed = 3
  436. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  437. local Speed = 35
  438. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  439. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  440. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  441. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  442. local DAMAGEMULTIPLIER = 1
  443. local ANIM = "Idle"
  444. local ATTACK = false
  445. local EQUIPPED = false
  446. local HOLD = false
  447. local COMBO = 1
  448. local Rooted = false
  449. local SINE = 0
  450. local KEYHOLD = false
  451. local CHANGE = 2 / Animation_Speed
  452. local WALKINGANIM = false
  453. local VALUE1 = false
  454. local VALUE2 = false
  455. local ROBLOXIDLEANIMATION = IT("Animation")
  456. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  457. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  458. --ROBLOXIDLEANIMATION.Parent = Humanoid
  459. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  460. WEAPONGUI.Name = "Weapon GUI"
  461. local Effects = IT("Folder", Character)
  462. Effects.Name = "Effects"
  463. local ANIMATOR = Humanoid.Animator
  464. local ANIMATE = Character.Animate
  465. local UNANCHOR = true
  466. local LAUGHS = {834001699,834001752,834001797,834001828}
  467.  
  468. Animation_Speed = 3
  469. local FORCERESET = false
  470. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  471. local Speed = 16
  472. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  473. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  474. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  475. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  476. local DAMAGEMULTIPLIER = 1
  477. local ANIM = "Idle"
  478. local ATTACK = false
  479. local EQUIPPED = false
  480. local HOLD = true
  481. local COMBO = 3
  482. local Rooted = false
  483. local SINE = 5
  484. local KEYHOLD = false
  485. local CHANGE = 2 / Animation_Speed
  486. local WALKINGANIM = false
  487. local VALUE1 = false
  488. local VALUE2 = false
  489. local ROBLOXIDLEANIMATION = IT("Animation")
  490. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  491. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  492. --ROBLOXIDLEANIMATION.Parent = Humanoid
  493. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  494. WEAPONGUI.Name = "BanishV4Gui"
  495. local Weapon = IT("Model")
  496. Weapon.Name = "Adds"
  497. local Effects = IT("Folder", Weapon)
  498. Effects.Name = "Effects"
  499. local ANIMATOR = Humanoid.Animator
  500. local ANIMATE = Character:FindFirstChild("Animate")
  501. local UNANCHOR = true
  502. local TOBANISH = {}
  503. script.Parent = PlayerGui
  504.  
  505. --//=================================\\
  506. --\\=================================//
  507.  
  508.  
  509. --//=================================\\
  510. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  511. --\\=================================//
  512.  
  513. ArtificialHB = Instance.new("BindableEvent", script)
  514. ArtificialHB.Name = "ArtificialHB"
  515.  
  516. script:WaitForChild("ArtificialHB")
  517.  
  518. frame = Frame_Speed
  519. tf = 0
  520. allowframeloss = false
  521. tossremainder = false
  522. lastframe = tick()
  523. script.ArtificialHB:Fire()
  524.  
  525. game:GetService("RunService").Heartbeat:connect(function(s, p)
  526. tf = tf + s
  527. if tf >= frame then
  528. if allowframeloss then
  529. script.ArtificialHB:Fire()
  530. lastframe = tick()
  531. else
  532. for i = 1, math.floor(tf / frame) do
  533. script.ArtificialHB:Fire()
  534. end
  535. lastframe = tick()
  536. end
  537. if tossremainder then
  538. tf = 0
  539. else
  540. tf = tf - frame * math.floor(tf / frame)
  541. end
  542. end
  543. end)
  544.  
  545. --//=================================\\
  546. --\\=================================//
  547.  
  548. --//=================================\\
  549. --|| SOME FUNCTIONS
  550. --\\=================================//
  551. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  552. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  553. end
  554.  
  555. function PositiveAngle(NUMBER)
  556. if NUMBER >= 0 then
  557. NUMBER = 0
  558. end
  559. return NUMBER
  560. end
  561.  
  562. function NegativeAngle(NUMBER)
  563. if NUMBER <= 0 then
  564. NUMBER = 0
  565. end
  566. return NUMBER
  567. end
  568.  
  569. function Swait(NUMBER)
  570. if NUMBER == 0 or NUMBER == nil then
  571. ArtificialHB.Event:wait()
  572. else
  573. for i = 1, NUMBER do
  574. ArtificialHB.Event:wait()
  575. end
  576. end
  577. end
  578.  
  579. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  580. local NEWMESH = IT(MESH)
  581. if MESH == "SpecialMesh" then
  582. NEWMESH.MeshType = MESHTYPE
  583. if MESHID ~= "nil" and MESHID ~= "" then
  584. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  585. end
  586. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  587. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  588. end
  589. end
  590. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  591. NEWMESH.Scale = SCALE
  592. NEWMESH.Parent = PARENT
  593. return NEWMESH
  594. end
  595.  
  596. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  597. local NEWPART = IT("Part")
  598. NEWPART.formFactor = FORMFACTOR
  599. NEWPART.Reflectance = REFLECTANCE
  600. NEWPART.Transparency = TRANSPARENCY
  601. NEWPART.CanCollide = false
  602. NEWPART.Locked = true
  603. NEWPART.Anchored = true
  604. if ANCHOR == false then
  605. NEWPART.Anchored = false
  606. end
  607. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  608. NEWPART.Name = NAME
  609. NEWPART.Size = SIZE
  610. NEWPART.Position = Torso.Position
  611. NEWPART.Material = MATERIAL
  612. NEWPART:BreakJoints()
  613. NEWPART.Parent = PARENT
  614. return NEWPART
  615. end
  616.  
  617. local function weldBetween(a, b)
  618. local weldd = Instance.new("ManualWeld")
  619. weldd.Part0 = a
  620. weldd.Part1 = b
  621. weldd.C0 = CFrame.new()
  622. weldd.C1 = b.CFrame:inverse() * a.CFrame
  623. weldd.Parent = a
  624. return weldd
  625. end
  626.  
  627.  
  628. function QuaternionFromCFrame(cf)
  629. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  630. local trace = m00 + m11 + m22
  631. if trace > 0 then
  632. local s = math.sqrt(1 + trace)
  633. local recip = 0.5 / s
  634. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  635. else
  636. local i = 0
  637. if m11 > m00 then
  638. i = 1
  639. end
  640. if m22 > (i == 0 and m00 or m11) then
  641. i = 2
  642. end
  643. if i == 0 then
  644. local s = math.sqrt(m00 - m11 - m22 + 1)
  645. local recip = 0.5 / s
  646. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  647. elseif i == 1 then
  648. local s = math.sqrt(m11 - m22 - m00 + 1)
  649. local recip = 0.5 / s
  650. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  651. elseif i == 2 then
  652. local s = math.sqrt(m22 - m00 - m11 + 1)
  653. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  654. end
  655. end
  656. end
  657.  
  658. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  659. local xs, ys, zs = x + x, y + y, z + z
  660. local wx, wy, wz = w * xs, w * ys, w * zs
  661. local xx = x * xs
  662. local xy = x * ys
  663. local xz = x * zs
  664. local yy = y * ys
  665. local yz = y * zs
  666. local zz = z * zs
  667. 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))
  668. end
  669.  
  670. function QuaternionSlerp(a, b, t)
  671. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  672. local startInterp, finishInterp;
  673. if cosTheta >= 0.0001 then
  674. if (1 - cosTheta) > 0.0001 then
  675. local theta = ACOS(cosTheta)
  676. local invSinTheta = 1 / SIN(theta)
  677. startInterp = SIN((1 - t) * theta) * invSinTheta
  678. finishInterp = SIN(t * theta) * invSinTheta
  679. else
  680. startInterp = 1 - t
  681. finishInterp = t
  682. end
  683. else
  684. if (1 + cosTheta) > 0.0001 then
  685. local theta = ACOS(-cosTheta)
  686. local invSinTheta = 1 / SIN(theta)
  687. startInterp = SIN((t - 1) * theta) * invSinTheta
  688. finishInterp = SIN(t * theta) * invSinTheta
  689. else
  690. startInterp = t - 1
  691. finishInterp = t
  692. end
  693. end
  694. 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
  695. end
  696.  
  697. function Clerp(a, b, t)
  698. local qa = {QuaternionFromCFrame(a)}
  699. local qb = {QuaternionFromCFrame(b)}
  700. local ax, ay, az = a.x, a.y, a.z
  701. local bx, by, bz = b.x, b.y, b.z
  702. local _t = 1 - t
  703. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  704. end
  705.  
  706. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  707. local frame = IT("Frame")
  708. frame.BackgroundTransparency = TRANSPARENCY
  709. frame.BorderSizePixel = BORDERSIZEPIXEL
  710. frame.Position = POSITION
  711. frame.Size = SIZE
  712. frame.BackgroundColor3 = COLOR
  713. frame.BorderColor3 = BORDERCOLOR
  714. frame.Name = NAME
  715. frame.Parent = PARENT
  716. return frame
  717. end
  718.  
  719. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  720. local label = IT("TextLabel")
  721. label.BackgroundTransparency = 1
  722. label.Size = UD2(1, 0, 1, 0)
  723. label.Position = UD2(0, 0, 0, 0)
  724. label.TextColor3 = TEXTCOLOR
  725. label.TextStrokeTransparency = STROKETRANSPARENCY
  726. label.TextTransparency = TRANSPARENCY
  727. label.FontSize = TEXTFONTSIZE
  728. label.Font = TEXTFONT
  729. label.BorderSizePixel = BORDERSIZEPIXEL
  730. label.TextScaled = false
  731. label.Text = TEXT
  732. label.Name = NAME
  733. label.Parent = PARENT
  734. return label
  735. end
  736.  
  737. function NoOutlines(PART)
  738. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  739. end
  740.  
  741. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  742. local NEWWELD = IT(TYPE)
  743. NEWWELD.Part0 = PART0
  744. NEWWELD.Part1 = PART1
  745. NEWWELD.C0 = C0
  746. NEWWELD.C1 = C1
  747. NEWWELD.Parent = PARENT
  748. return NEWWELD
  749. end
  750.  
  751. local S = IT("Sound")
  752. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  753. local NEWSOUND = nil
  754. coroutine.resume(coroutine.create(function()
  755. NEWSOUND = S:Clone()
  756. NEWSOUND.Parent = PARENT
  757. NEWSOUND.Volume = VOLUME
  758. NEWSOUND.Pitch = PITCH
  759. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  760. NEWSOUND:play()
  761. if DOESLOOP == true then
  762. NEWSOUND.Looped = true
  763. else
  764. repeat wait(1) until NEWSOUND.Playing == false
  765. NEWSOUND:remove()
  766. end
  767. end))
  768. return NEWSOUND
  769. end
  770.  
  771.  
  772. local EyeSizes={
  773. NumberSequenceKeypoint.new(0,2,0),
  774. NumberSequenceKeypoint.new(1,0,0)
  775. }
  776. local EyeTrans={
  777. NumberSequenceKeypoint.new(0,0.5,0),
  778. NumberSequenceKeypoint.new(1,1,0)
  779. }
  780. local PE=Instance.new("ParticleEmitter",nil)
  781. PE.LightEmission=.8
  782. PE.Color = ColorSequence.new(BRICKC("Lime green").Color,BRICKC("Lime green").Color)
  783. PE.Size=NumberSequence.new(EyeSizes)
  784. PE.Transparency=NumberSequence.new(EyeTrans)
  785. PE.Lifetime=NumberRange.new(0.35,1)
  786. PE.Rotation=NumberRange.new(0,360)
  787. PE.Rate=100
  788. PE.VelocitySpread = 10000
  789. PE.Acceleration = Vector3.new(0,85,0)
  790. PE.Drag = 5
  791. PE.Speed = NumberRange.new(0.1,5)
  792. PE.Texture="http://www.roblox.com/asset/?id=1460745664"
  793. PE.ZOffset = 0.5
  794. PE.Name = "PE"
  795. PE.Enabled = false
  796.  
  797. function Fire(art)
  798. local PARTICLES = PE:Clone()
  799. PARTICLES.Parent = art
  800. PARTICLES.Enabled = true
  801. return PARTICLES
  802. end
  803.  
  804. function CFrameFromTopBack(at, top, back)
  805. local right = top:Cross(back)
  806. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  807. end
  808.  
  809. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  810. function WACKYEFFECT(Table)
  811. local TYPE = (Table.EffectType or "Sphere")
  812. local SIZE = (Table.Size or VT(1,1,1))
  813. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  814. local TRANSPARENCY = (Table.Transparency or 0)
  815. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  816. local CFRAME = (Table.CFrame or Torso.CFrame)
  817. local MOVEDIRECTION = (Table.MoveToPos or nil)
  818. local ROTATION1 = (Table.RotationX or 0)
  819. local ROTATION2 = (Table.RotationY or 0)
  820. local ROTATION3 = (Table.RotationZ or 0)
  821. local MATERIAL = (Table.Material or "Neon")
  822. local COLOR = (Table.Color or C3(1,1,1))
  823. local TIME = (Table.Time or 45)
  824. local SOUNDID = (Table.SoundID or nil)
  825. local SOUNDPITCH = (Table.SoundPitch or nil)
  826. local SOUNDVOLUME = (Table.SoundVolume or nil)
  827. coroutine.resume(coroutine.create(function()
  828. local PLAYSSOUND = false
  829. local SOUND = nil
  830. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Lime green"), "Effect", VT(1,1,1), true)
  831. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  832. PLAYSSOUND = true
  833. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  834. end
  835. EFFECT.Color = COLOR
  836. local MSH = nil
  837. if TYPE == "Sphere" then
  838. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  839. elseif TYPE == "Block" or TYPE == "Box" then
  840. MSH = IT("BlockMesh",EFFECT)
  841. MSH.Scale = SIZE
  842. elseif TYPE == "Wave" then
  843. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  844. elseif TYPE == "Ring" then
  845. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  846. elseif TYPE == "Slash" then
  847. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  848. elseif TYPE == "Round Slash" then
  849. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  850. elseif TYPE == "Swirl" then
  851. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  852. elseif TYPE == "Skull" then
  853. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  854. elseif TYPE == "Crystal" then
  855. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  856. end
  857. if MSH ~= nil then
  858. local MOVESPEED = nil
  859. if MOVEDIRECTION ~= nil then
  860. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  861. end
  862. local GROWTH = SIZE - ENDSIZE
  863. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  864. if TYPE == "Block" then
  865. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  866. else
  867. EFFECT.CFrame = CFRAME
  868. end
  869. for LOOP = 1, TIME+1 do
  870. Swait()
  871. MSH.Scale = MSH.Scale - GROWTH/TIME
  872. if TYPE == "Wave" then
  873. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  874. end
  875. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  876. if TYPE == "Block" then
  877. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  878. else
  879. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  880. end
  881. if MOVEDIRECTION ~= nil then
  882. local ORI = EFFECT.Orientation
  883. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  884. EFFECT.Orientation = ORI
  885. end
  886. end
  887. if PLAYSSOUND == false then
  888. EFFECT:remove()
  889. else
  890. repeat wait(1) until SOUND.Playing == false
  891. EFFECT:remove()
  892. end
  893. else
  894. if PLAYSSOUND == false then
  895. EFFECT:remove()
  896. else
  897. repeat Swait() until SOUND.Playing == false
  898. EFFECT:remove()
  899. end
  900. end
  901. end))
  902. end
  903.  
  904. function MakeForm(PART,TYPE)
  905. if TYPE == "Cyl" then
  906. local MSH = IT("CylinderMesh",PART)
  907. elseif TYPE == "Ball" then
  908. local MSH = IT("SpecialMesh",PART)
  909. MSH.MeshType = "Sphere"
  910. elseif TYPE == "Wedge" then
  911. local MSH = IT("SpecialMesh",PART)
  912. MSH.MeshType = "Wedge"
  913. end
  914. end
  915.  
  916. Debris = game:GetService("Debris")
  917.  
  918. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  919. local DIRECTION = CF(StartPos,EndPos).lookVector
  920. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  921. end
  922.  
  923. local HATWELD = nil
  924. function Pose(WhichPose,Speed,Time,Magic,Gyro,Tors)
  925. PLAYMAINANIM = false
  926. if WhichPose == "Cast1" then
  927. for i=0, Time, 0.1 / Animation_Speed do
  928. Swait()
  929. if Magic == true then
  930. WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  931. end
  932. if Gyro ~= nil and Gyro ~= false then
  933. Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  934. end
  935. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(35)), Speed / Animation_Speed)
  936. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-35)), Speed / Animation_Speed)
  937. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(125), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  938. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  939. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  940. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  941. end
  942. elseif WhichPose == "Cast2" then
  943. for i=0, Time, 0.1 / Animation_Speed do
  944. Swait()
  945. if Magic == true then
  946. WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  947. WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = LeftArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  948. end
  949. if Gyro ~= nil and Gyro ~= false then
  950. Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  951. end
  952. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
  953. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
  954. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(15)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  955. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  956. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  957. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  958. end
  959. elseif WhichPose == "RightArmUp" then
  960. for i=0, Time, 0.1 / Animation_Speed do
  961. Swait()
  962. if Magic == true then
  963. WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  964. end
  965. if Gyro ~= nil and Gyro ~= false then
  966. Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  967. end
  968. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(15)), Speed / Animation_Speed)
  969. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-15)), Speed / Animation_Speed)
  970. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.2) * ANGLES(RAD(125), RAD(0), RAD(25)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  971. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  972. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  973. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  974. end
  975. elseif WhichPose == "Taunt" then
  976. for i=0, Time, 0.1 / Animation_Speed do
  977. Swait()
  978. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
  979. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
  980. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  981. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  982. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  983. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  984. end
  985. HATWELD.Part0 = RightArm
  986. HATWELD.C0 = CF(0,-1.1,-0.4) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(-20), RAD(0), RAD(0))
  987. CreateSound(137473066,Torso,10,1,false)
  988. for i=0, Time*2, 0.1 / Animation_Speed do
  989. Swait()
  990. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
  991. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(35 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
  992. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(145), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  993. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(5), RAD(25), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  994. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  995. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  996. end
  997. for i=0, Time, 0.1 / Animation_Speed do
  998. Swait()
  999. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
  1000. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), Speed / Animation_Speed)
  1001. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.65, -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  1002. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  1003. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  1004. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  1005. HATWELD.C0 = Clerp(HATWELD.C0, CF(-0.5,-1.2,-0.3) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(35), RAD(0), RAD(35)), Speed / Animation_Speed)
  1006. end
  1007. HATWELD.Part0 = Head
  1008. HATWELD.C0 = CF(0,0.35,0)
  1009. elseif WhichPose == "Prepare key" then
  1010. for i=0, Time, 0.1 / Animation_Speed do
  1011. Swait()
  1012. if Gyro ~= nil and Gyro ~= false then
  1013. Gyro.cframe = CF(RootPart.Position,Tors.Position)
  1014. end
  1015. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(65)), Speed / Animation_Speed)
  1016. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-65)), Speed / Animation_Speed)
  1017. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(65)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  1018. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  1019. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  1020. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  1021. end
  1022. elseif WhichPose == "Turn key" then
  1023. for i=0, Time, 0.1 / Animation_Speed do
  1024. Swait()
  1025. if Gyro ~= nil and Gyro ~= false then
  1026. Gyro.cframe = CF(RootPart.Position,Tors.Position)
  1027. end
  1028. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(75)), Speed / Animation_Speed)
  1029. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-75)), Speed / Animation_Speed)
  1030. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(75)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  1031. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  1032. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  1033. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  1034. end
  1035. end
  1036. PLAYMAINANIM = true
  1037. end
  1038.  
  1039. --Lightning({Color = C3(1,1,1), Start = Torso.Position, End = Mouse.Hit.p, SegmentL = 2, Thickness = 0.1, DoesFade = false, Ignore = Character, MaxDist = 400, Branches = false})
  1040. function Lightning(Table)
  1041. local Color = Table.Color or C3(1,1,1)
  1042. local StartPos = Table.Start or Torso.Position
  1043. local EndPos = Table.End or Mouse.Hit.p
  1044. local SegmentLength = Table.SegmentL or 2
  1045. local Thickness = Table.Thickness or 0.1
  1046. local Dissapear = Table.DoesFade or false
  1047. local Parent = Table.Ignore or Character
  1048. local MaxDist = Table.MaxDist or 400
  1049. local Branches = Table.Branches or false
  1050. local HIT,HITPOS = CastProperRay(StartPos, EndPos, MaxDist, Parent)
  1051. local DISTANCE = math.ceil((StartPos - HITPOS).Magnitude/SegmentLength)
  1052. local LIGHTNINGMODEL = IT("Model",Effects)
  1053. LIGHTNINGMODEL.Name = "Lightning"
  1054. local LastBolt = nil
  1055. for E = 1, DISTANCE do
  1056. local ExtraSize = (DISTANCE-E)/15
  1057. local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Lime green"), "LightningPart"..E, VT(Thickness+ExtraSize,SegmentLength,Thickness+ExtraSize))
  1058. PART.Color = Color
  1059. MakeForm(PART,"Cyl")
  1060. if LastBolt == nil then
  1061. PART.CFrame = CF(StartPos,HITPOS)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  1062. else
  1063. PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,CF(HITPOS)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,SegmentLength/3+(DISTANCE-E)).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  1064. end
  1065. LastBolt = PART
  1066. if Branches == true then
  1067. local CHOICE = MRANDOM(1,7+((DISTANCE-E)*2))
  1068. if CHOICE == 1 then
  1069. local LASTBRANCH = nil
  1070. for i = 1, MRANDOM(2,5) do
  1071. local ExtraSize2 = ((DISTANCE-E)/25)/i
  1072. local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Crimson"), "Branch"..E.."-"..i, VT(Thickness+ExtraSize2,SegmentLength,Thickness+ExtraSize2))
  1073. PART.Color = Color
  1074. MakeForm(PART,"Cyl")
  1075. if LASTBRANCH == nil then
  1076. PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*7,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  1077. else
  1078. PART.CFrame = CF(LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0).p,LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*3,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  1079. end
  1080. LASTBRANCH = PART
  1081. end
  1082. end
  1083. end
  1084. end
  1085. if Dissapear == true then
  1086. coroutine.resume(coroutine.create(function()
  1087. for i = 1, 10 do
  1088. Swait()
  1089. for _, c in pairs(LIGHTNINGMODEL:GetChildren()) do
  1090. if c.ClassName == "Part" then
  1091. c.Transparency = i/10
  1092. end
  1093. end
  1094. end
  1095. LIGHTNINGMODEL:remove()
  1096. end))
  1097. elseif Dissapear == false then
  1098. Debris:AddItem(LIGHTNINGMODEL,0.1)
  1099. end
  1100. return {End = LastBolt.CFrame*CF(0,0,-LastBolt.Size.Z/2).p,LastBolt = LastBolt,Model = LIGHTNINGMODEL}
  1101. end
  1102.  
  1103. function PositiveAngle(NUMBER)
  1104. if NUMBER >= 0 then
  1105. NUMBER = 0
  1106. end
  1107. return NUMBER
  1108. end
  1109.  
  1110. function NegativeAngle(NUMBER)
  1111. if NUMBER <= 0 then
  1112. NUMBER = 0
  1113. end
  1114. return NUMBER
  1115. end
  1116.  
  1117. function Swait(NUMBER)
  1118. if NUMBER == 0 or NUMBER == nil then
  1119. ArtificialHB.Event:wait()
  1120. else
  1121. for i = 1, NUMBER do
  1122. ArtificialHB.Event:wait()
  1123. end
  1124. end
  1125. end
  1126.  
  1127. function QuaternionFromCFrame(cf)
  1128. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1129. local trace = m00 + m11 + m22
  1130. if trace > 0 then
  1131. local s = math.sqrt(1 + trace)
  1132. local recip = 0.5 / s
  1133. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  1134. else
  1135. local i = 0
  1136. if m11 > m00 then
  1137. i = 1
  1138. end
  1139. if m22 > (i == 0 and m00 or m11) then
  1140. i = 2
  1141. end
  1142. if i == 0 then
  1143. local s = math.sqrt(m00 - m11 - m22 + 1)
  1144. local recip = 0.5 / s
  1145. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  1146. elseif i == 1 then
  1147. local s = math.sqrt(m11 - m22 - m00 + 1)
  1148. local recip = 0.5 / s
  1149. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  1150. elseif i == 2 then
  1151. local s = math.sqrt(m22 - m00 - m11 + 1)
  1152. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  1153. end
  1154. end
  1155. end
  1156.  
  1157. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1158. local xs, ys, zs = x + x, y + y, z + z
  1159. local wx, wy, wz = w * xs, w * ys, w * zs
  1160. local xx = x * xs
  1161. local xy = x * ys
  1162. local xz = x * zs
  1163. local yy = y * ys
  1164. local yz = y * zs
  1165. local zz = z * zs
  1166. 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))
  1167. end
  1168.  
  1169. function QuaternionSlerp(a, b, t)
  1170. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  1171. local startInterp, finishInterp;
  1172. if cosTheta >= 0.0001 then
  1173. if (1 - cosTheta) > 0.0001 then
  1174. local theta = ACOS(cosTheta)
  1175. local invSinTheta = 1 / SIN(theta)
  1176. startInterp = SIN((1 - t) * theta) * invSinTheta
  1177. finishInterp = SIN(t * theta) * invSinTheta
  1178. else
  1179. startInterp = 1 - t
  1180. finishInterp = t
  1181. end
  1182. else
  1183. if (1 + cosTheta) > 0.0001 then
  1184. local theta = ACOS(-cosTheta)
  1185. local invSinTheta = 1 / SIN(theta)
  1186. startInterp = SIN((t - 1) * theta) * invSinTheta
  1187. finishInterp = SIN(t * theta) * invSinTheta
  1188. else
  1189. startInterp = t - 1
  1190. finishInterp = t
  1191. end
  1192. end
  1193. 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
  1194. end
  1195.  
  1196. function Clerp(a, b, t)
  1197. local qa = {QuaternionFromCFrame(a)}
  1198. local qb = {QuaternionFromCFrame(b)}
  1199. local ax, ay, az = a.x, a.y, a.z
  1200. local bx, by, bz = b.x, b.y, b.z
  1201. local _t = 1 - t
  1202. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  1203. end
  1204.  
  1205. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  1206. local frame = IT("Frame")
  1207. frame.BackgroundTransparency = TRANSPARENCY
  1208. frame.BorderSizePixel = BORDERSIZEPIXEL
  1209. frame.Position = POSITION
  1210. frame.Size = SIZE
  1211. frame.BackgroundColor3 = COLOR
  1212. frame.BorderColor3 = BORDERCOLOR
  1213. frame.Name = NAME
  1214. frame.Parent = PARENT
  1215. return frame
  1216. end
  1217.  
  1218. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  1219. local label = IT("TextLabel")
  1220. label.BackgroundTransparency = 1
  1221. label.Size = UD2(1, 0, 1, 0)
  1222. label.Position = UD2(0, 0, 0, 0)
  1223. label.TextColor3 = TEXTCOLOR
  1224. label.TextStrokeTransparency = STROKETRANSPARENCY
  1225. label.TextTransparency = TRANSPARENCY
  1226. label.FontSize = TEXTFONTSIZE
  1227. label.Font = TEXTFONT
  1228. label.BorderSizePixel = BORDERSIZEPIXEL
  1229. label.TextScaled = false
  1230. label.Text = TEXT
  1231. label.Name = NAME
  1232. label.Parent = PARENT
  1233. return label
  1234. end
  1235.  
  1236. function NoOutlines(PART)
  1237. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  1238. end
  1239.  
  1240.  
  1241. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  1242. local NEWWELD = IT(TYPE)
  1243. NEWWELD.Part0 = PART0
  1244. NEWWELD.Part1 = PART1
  1245. NEWWELD.C0 = C0
  1246. NEWWELD.C1 = C1
  1247. NEWWELD.Parent = PARENT
  1248. return NEWWELD
  1249. end
  1250.  
  1251. function CreateSound(ID, PARENT, VOLUME, PITCH)
  1252. local NEWSOUND = nil
  1253. coroutine.resume(coroutine.create(function()
  1254. NEWSOUND = IT("Sound", PARENT)
  1255. NEWSOUND.Volume = VOLUME
  1256. NEWSOUND.Pitch = PITCH
  1257. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  1258. Swait()
  1259. NEWSOUND:play()
  1260. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  1261. end))
  1262. return NEWSOUND
  1263. end
  1264.  
  1265. function CFrameFromTopBack(at, top, back)
  1266. local right = top:Cross(back)
  1267. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  1268. end
  1269.  
  1270. function CreateWave(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
  1271. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC("Really red"), "Effect", VT(1,1,1), true)
  1272. local mesh = IT("SpecialMesh",wave)
  1273. mesh.MeshType = "FileMesh"
  1274. mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  1275. mesh.Scale = SIZE
  1276. mesh.Offset = VT(0,0,-SIZE.X/8)
  1277. wave.CFrame = CFRAME
  1278. coroutine.resume(coroutine.create(function(PART)
  1279. for i = 1, WAIT do
  1280. Swait()
  1281. mesh.Scale = mesh.Scale + GROW
  1282. mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
  1283. if DOESROT == true then
  1284. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
  1285. end
  1286. wave.Transparency = wave.Transparency + (0.5/WAIT)
  1287. if wave.Transparency > 0.99 then
  1288. wave:remove()
  1289. end
  1290. end
  1291. end))
  1292. end
  1293.  
  1294. function CreateWave2(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
  1295. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC("Really red"), "Effect", VT(1,1,1), true)
  1296. local mesh = IT("SpecialMesh",wave)
  1297. mesh.MeshType = "FileMesh"
  1298. mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  1299. mesh.Scale = SIZE
  1300. --mesh.Offset = VT(0,0,-SIZE.X/8)
  1301. wave.CFrame = CFRAME
  1302. coroutine.resume(coroutine.create(function(PART)
  1303. for i = 1, WAIT do
  1304. Swait()
  1305. mesh.Scale = mesh.Scale + GROW
  1306. --mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
  1307. if DOESROT == true then
  1308. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
  1309. end
  1310. wave.Transparency = wave.Transparency + (0.5/WAIT)
  1311. if wave.Transparency > 0.99 then
  1312. wave:remove()
  1313. end
  1314. end
  1315. end))
  1316. end
  1317.  
  1318. function CreateSwirl(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
  1319. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC("Really red"), "Effect", VT(1,1,1), true)
  1320. local mesh = IT("SpecialMesh",wave)
  1321. mesh.MeshType = "FileMesh"
  1322. mesh.MeshId = "http://www.roblox.com/asset/?id=1051557"
  1323. mesh.Scale = SIZE
  1324. wave.CFrame = CFRAME
  1325. coroutine.resume(coroutine.create(function(PART)
  1326. for i = 1, WAIT do
  1327. Swait()
  1328. mesh.Scale = mesh.Scale + GROW
  1329. mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
  1330. if DOESROT == true then
  1331. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
  1332. end
  1333. wave.Transparency = wave.Transparency + (0.5/WAIT)
  1334. if wave.Transparency > 0.99 then
  1335. wave:remove()
  1336. end
  1337. end
  1338. end))
  1339. end
  1340.  
  1341.  
  1342. function Slice(SIZE,WAIT,CFRAME,COLOR,GROW)
  1343. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC("Really red"), "Effect", VT(1,1,1), true)
  1344. local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
  1345. wave.CFrame = CFRAME
  1346. coroutine.resume(coroutine.create(function(PART)
  1347. for i = 1, WAIT do
  1348. Swait()
  1349. mesh.Scale = mesh.Scale * GROW
  1350. wave.Transparency = wave.Transparency + (0.5/WAIT)
  1351. if wave.Transparency > 0.99 then
  1352. wave:remove()
  1353. end
  1354. end
  1355. end))
  1356. end
  1357.  
  1358. function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
  1359. local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC("Really red"), "Effect", VT(1,1,1), true)
  1360. local mesh = IT("SpecialMesh",wave)
  1361. mesh.MeshType = "Sphere"
  1362. mesh.Scale = SIZE
  1363. mesh.Offset = VT(0,0,0)
  1364. wave.CFrame = CFRAME
  1365. coroutine.resume(coroutine.create(function(PART)
  1366. for i = 1, WAIT do
  1367. Swait()
  1368. mesh.Scale = mesh.Scale + GROW
  1369. wave.Transparency = wave.Transparency + (1/WAIT)
  1370. if wave.Transparency > 0.99 then
  1371. wave:remove()
  1372. end
  1373. end
  1374. end))
  1375. end
  1376.  
  1377. function MakeForm(PART,TYPE)
  1378. if TYPE == "Cyl" then
  1379. local MSH = IT("CylinderMesh",PART)
  1380. elseif TYPE == "Ball" then
  1381. local MSH = IT("SpecialMesh",PART)
  1382. MSH.MeshType = "Sphere"
  1383. elseif TYPE == "Wedge" then
  1384. local MSH = IT("SpecialMesh",PART)
  1385. MSH.MeshType = "Wedge"
  1386. end
  1387. end
  1388.  
  1389. function CreateDebreeRing(FLOOR,POSITION,SIZE,BLOCKSIZE,SWAIT)
  1390. if FLOOR ~= nil then
  1391. coroutine.resume(coroutine.create(function()
  1392. local PART = CreatePart(3, Effects, "Neon", 0, 1, "Pearl", "DebreeCenter", VT(0,0,0))
  1393. PART.CFrame = CF(POSITION)
  1394. for i = 1, 45 do
  1395. local RingPiece = CreatePart(3, Effects, "Plastic", 0, 0, "Pearl", "DebreePart", BLOCKSIZE)
  1396. RingPiece.Material = FLOOR.Material
  1397. RingPiece.Color = FLOOR.Color
  1398. RingPiece.CFrame = PART.CFrame * ANGLES(RAD(0), RAD(i*8), RAD(0)) * CF(SIZE*4, 0, 0) * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
  1399. Debris:AddItem(RingPiece,SWAIT/100)
  1400. end
  1401. PART:remove()
  1402. end))
  1403. end
  1404. end
  1405.  
  1406. function CheckTableForString(Table, String)
  1407. for i, v in pairs(Table) do
  1408. if string.find(string.lower(String), string.lower(v)) then
  1409. return true
  1410. end
  1411. end
  1412. return false
  1413. end
  1414.  
  1415. function CheckIntangible(Hit)
  1416. local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
  1417. if Hit and Hit.Parent then
  1418. if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
  1419. return true
  1420. end
  1421. end
  1422. return false
  1423. end
  1424.  
  1425. Debris = game:GetService("Debris")
  1426.  
  1427. function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
  1428. local Direction = CFrame.new(StartPos, Vec).lookVector
  1429. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  1430. local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
  1431. if RayHit and CheckIntangible(RayHit) then
  1432. if DelayIfHit then
  1433. wait()
  1434. end
  1435. RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
  1436. end
  1437. return RayHit, RayPos, RayNormal
  1438. end
  1439.  
  1440. function turnto(position)
  1441. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  1442. end
  1443.  
  1444. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  1445. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  1446. end
  1447.  
  1448. function PositiveAngle(NUMBER)
  1449. if NUMBER >= 0 then
  1450. NUMBER = 0
  1451. end
  1452. return NUMBER
  1453. end
  1454.  
  1455. function NegativeAngle(NUMBER)
  1456. if NUMBER <= 0 then
  1457. NUMBER = 0
  1458. end
  1459. return NUMBER
  1460. end
  1461.  
  1462. function Swait(NUMBER)
  1463. if NUMBER == 0 or NUMBER == nil then
  1464. ArtificialHB.Event:wait()
  1465. else
  1466. for i = 1, NUMBER do
  1467. ArtificialHB.Event:wait()
  1468. end
  1469. end
  1470. end
  1471.  
  1472. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  1473. local NEWMESH = IT(MESH)
  1474. if MESH == "SpecialMesh" then
  1475. NEWMESH.MeshType = MESHTYPE
  1476. if MESHID ~= "nil" and MESHID ~= "" then
  1477. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  1478. end
  1479. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  1480. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  1481. end
  1482. end
  1483. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  1484. NEWMESH.Scale = SCALE
  1485. NEWMESH.Parent = PARENT
  1486. return NEWMESH
  1487. end
  1488.  
  1489. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  1490. local NEWPART = IT("Part")
  1491. NEWPART.formFactor = FORMFACTOR
  1492. NEWPART.Reflectance = REFLECTANCE
  1493. NEWPART.Transparency = TRANSPARENCY
  1494. NEWPART.CanCollide = false
  1495. NEWPART.Locked = true
  1496. NEWPART.Anchored = true
  1497. if ANCHOR == false then
  1498. NEWPART.Anchored = false
  1499. end
  1500. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  1501. NEWPART.Name = NAME
  1502. NEWPART.Size = SIZE
  1503. NEWPART.Position = Torso.Position
  1504. NEWPART.Material = MATERIAL
  1505. NEWPART:BreakJoints()
  1506. NEWPART.Parent = PARENT
  1507. return NEWPART
  1508. end
  1509.  
  1510. local function weldBetween(a, b)
  1511. local weldd = IT("Weld")
  1512. weldd.Part0 = a
  1513. weldd.Part1 = b
  1514. weldd.C0 = CF()
  1515. weldd.C1 = b.CFrame:inverse() * a.CFrame
  1516. weldd.Parent = a
  1517. return weldd
  1518. end
  1519.  
  1520.  
  1521. function QuaternionFromCFrame(cf)
  1522. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1523. local trace = m00 + m11 + m22
  1524. if trace > 0 then
  1525. local s = math.sqrt(1 + trace)
  1526. local recip = 0.5 / s
  1527. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  1528. else
  1529. local i = 0
  1530. if m11 > m00 then
  1531. i = 1
  1532. end
  1533. if m22 > (i == 0 and m00 or m11) then
  1534. i = 2
  1535. end
  1536. if i == 0 then
  1537. local s = math.sqrt(m00 - m11 - m22 + 1)
  1538. local recip = 0.5 / s
  1539. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  1540. elseif i == 1 then
  1541. local s = math.sqrt(m11 - m22 - m00 + 1)
  1542. local recip = 0.5 / s
  1543. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  1544. elseif i == 2 then
  1545. local s = math.sqrt(m22 - m00 - m11 + 1)
  1546. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  1547. end
  1548. end
  1549. end
  1550.  
  1551. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1552. local xs, ys, zs = x + x, y + y, z + z
  1553. local wx, wy, wz = w * xs, w * ys, w * zs
  1554. local xx = x * xs
  1555. local xy = x * ys
  1556. local xz = x * zs
  1557. local yy = y * ys
  1558. local yz = y * zs
  1559. local zz = z * zs
  1560. 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))
  1561. end
  1562.  
  1563. function QuaternionSlerp(a, b, t)
  1564. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  1565. local startInterp, finishInterp;
  1566. if cosTheta >= 0.0001 then
  1567. if (1 - cosTheta) > 0.0001 then
  1568. local theta = ACOS(cosTheta)
  1569. local invSinTheta = 1 / SIN(theta)
  1570. startInterp = SIN((1 - t) * theta) * invSinTheta
  1571. finishInterp = SIN(t * theta) * invSinTheta
  1572. else
  1573. startInterp = 1 - t
  1574. finishInterp = t
  1575. end
  1576. else
  1577. if (1 + cosTheta) > 0.0001 then
  1578. local theta = ACOS(-cosTheta)
  1579. local invSinTheta = 1 / SIN(theta)
  1580. startInterp = SIN((t - 1) * theta) * invSinTheta
  1581. finishInterp = SIN(t * theta) * invSinTheta
  1582. else
  1583. startInterp = t - 1
  1584. finishInterp = t
  1585. end
  1586. end
  1587. 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
  1588. end
  1589.  
  1590. function Clerp(a, b, t)
  1591. local qa = {QuaternionFromCFrame(a)}
  1592. local qb = {QuaternionFromCFrame(b)}
  1593. local ax, ay, az = a.x, a.y, a.z
  1594. local bx, by, bz = b.x, b.y, b.z
  1595. local _t = 1 - t
  1596. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  1597. end
  1598.  
  1599. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  1600. local frame = IT("Frame")
  1601. frame.BackgroundTransparency = TRANSPARENCY
  1602. frame.BorderSizePixel = BORDERSIZEPIXEL
  1603. frame.Position = POSITION
  1604. frame.Size = SIZE
  1605. frame.BackgroundColor3 = COLOR
  1606. frame.BorderColor3 = BORDERCOLOR
  1607. frame.Name = NAME
  1608. frame.Parent = PARENT
  1609. return frame
  1610. end
  1611.  
  1612. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  1613. local label = IT("TextLabel")
  1614. label.BackgroundTransparency = 1
  1615. label.Size = UD2(1, 0, 1, 0)
  1616. label.Position = UD2(0, 0, 0, 0)
  1617. label.TextColor3 = TEXTCOLOR
  1618. label.TextStrokeTransparency = STROKETRANSPARENCY
  1619. label.TextTransparency = TRANSPARENCY
  1620. label.FontSize = TEXTFONTSIZE
  1621. label.Font = TEXTFONT
  1622. label.BorderSizePixel = BORDERSIZEPIXEL
  1623. label.TextScaled = false
  1624. label.Text = TEXT
  1625. label.Name = NAME
  1626. label.Parent = PARENT
  1627. return label
  1628. end
  1629.  
  1630. function NoOutlines(PART)
  1631. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  1632. end
  1633.  
  1634. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  1635. local NEWWELD = IT(TYPE)
  1636. NEWWELD.Part0 = PART0
  1637. NEWWELD.Part1 = PART1
  1638. NEWWELD.C0 = C0
  1639. NEWWELD.C1 = C1
  1640. NEWWELD.Parent = PARENT
  1641. return NEWWELD
  1642. end
  1643.  
  1644. local S = IT("Sound")
  1645. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  1646. local NEWSOUND = nil
  1647. coroutine.resume(coroutine.create(function()
  1648. NEWSOUND = S:Clone()
  1649. NEWSOUND.Parent = PARENT
  1650. NEWSOUND.Volume = VOLUME
  1651. NEWSOUND.Pitch = PITCH
  1652. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  1653. NEWSOUND:play()
  1654. if DOESLOOP == true then
  1655. NEWSOUND.Looped = true
  1656. else
  1657. repeat wait(1) until NEWSOUND.Playing == false
  1658. NEWSOUND:remove()
  1659. end
  1660. end))
  1661. return NEWSOUND
  1662. end
  1663.  
  1664. function CFrameFromTopBack(at, top, back)
  1665. local right = top:Cross(back)
  1666. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  1667. end
  1668.  
  1669. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1670. function WACKYEFFECT(Table)
  1671. local TYPE = (Table.EffectType or "Sphere")
  1672. local SIZE = (Table.Size or VT(1,1,1))
  1673. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  1674. local TRANSPARENCY = (Table.Transparency or 0)
  1675. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  1676. local CFRAME = (Table.CFrame or Torso.CFrame)
  1677. local MOVEDIRECTION = (Table.MoveToPos or nil)
  1678. local ROTATION1 = (Table.RotationX or 0)
  1679. local ROTATION2 = (Table.RotationY or 0)
  1680. local ROTATION3 = (Table.RotationZ or 0)
  1681. local MATERIAL = (Table.Material or "Neon")
  1682. local COLOR = (Table.Color or C3(1,1,1))
  1683. local TIME = (Table.Time or 45)
  1684. local SOUNDID = (Table.SoundID or nil)
  1685. local SOUNDPITCH = (Table.SoundPitch or nil)
  1686. local SOUNDVOLUME = (Table.SoundVolume or nil)
  1687. coroutine.resume(coroutine.create(function()
  1688. local PLAYSSOUND = false
  1689. local SOUND = nil
  1690. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  1691. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  1692. PLAYSSOUND = true
  1693. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  1694. end
  1695. EFFECT.Color = COLOR
  1696. local MSH = nil
  1697. if TYPE == "Sphere" then
  1698. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  1699. elseif TYPE == "Block" then
  1700. MSH = IT("BlockMesh",EFFECT)
  1701. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  1702. elseif TYPE == "Wave" then
  1703. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  1704. elseif TYPE == "Ring" then
  1705. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  1706. elseif TYPE == "Slash" then
  1707. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  1708. elseif TYPE == "Round Slash" then
  1709. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  1710. elseif TYPE == "Swirl" then
  1711. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  1712. elseif TYPE == "Skull" then
  1713. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  1714. elseif TYPE == "Crystal" then
  1715. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  1716. end
  1717. if MSH ~= nil then
  1718. local MOVESPEED = nil
  1719. if MOVEDIRECTION ~= nil then
  1720. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  1721. end
  1722. local GROWTH = SIZE - ENDSIZE
  1723. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  1724. if TYPE == "Block" then
  1725. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1726. else
  1727. EFFECT.CFrame = CFRAME
  1728. end
  1729. for LOOP = 1, TIME+1 do
  1730. Swait()
  1731. MSH.Scale = MSH.Scale - GROWTH/TIME
  1732. if TYPE == "Wave" then
  1733. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  1734. end
  1735. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  1736. if TYPE == "Block" then
  1737. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1738. else
  1739. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  1740. end
  1741. if MOVEDIRECTION ~= nil then
  1742. local ORI = EFFECT.Orientation
  1743. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  1744. EFFECT.Orientation = ORI
  1745. end
  1746. end
  1747. if PLAYSSOUND == false then
  1748. EFFECT:remove()
  1749. else
  1750. SOUND.Stopped:Connect(function()
  1751. EFFECT:remove()
  1752. end)
  1753. end
  1754. else
  1755. if PLAYSSOUND == false then
  1756. EFFECT:remove()
  1757. else
  1758. repeat Swait() until SOUND.Playing == false
  1759. EFFECT:remove()
  1760. end
  1761. end
  1762. end))
  1763. end
  1764.  
  1765. function MakeForm(PART,TYPE)
  1766. if TYPE == "Cyl" then
  1767. local MSH = IT("CylinderMesh",PART)
  1768. elseif TYPE == "Ball" then
  1769. local MSH = IT("SpecialMesh",PART)
  1770. MSH.MeshType = "Sphere"
  1771. elseif TYPE == "Wedge" then
  1772. local MSH = IT("SpecialMesh",PART)
  1773. MSH.MeshType = "Wedge"
  1774. end
  1775. end
  1776.  
  1777. Debris = game:GetService("Debris")
  1778.  
  1779. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  1780. local DIRECTION = CF(StartPos,EndPos).lookVector
  1781. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  1782. end
  1783.  
  1784. function turnto(position)
  1785. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  1786. end
  1787.  
  1788. function SpawnTrail(FROM,TO,BIG)
  1789. local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Really red", "Trail", VT(0,0,0))
  1790. MakeForm(TRAIL,"Cyl")
  1791. local DIST = (FROM - TO).Magnitude
  1792. if BIG == true then
  1793. TRAIL.Size = VT(0.5,DIST,0.5)
  1794. else
  1795. TRAIL.Size = VT(0.25,DIST,0.25)
  1796. end
  1797. TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
  1798. coroutine.resume(coroutine.create(function()
  1799. for i = 1, 5 do
  1800. Swait()
  1801. TRAIL.Transparency = TRAIL.Transparency + 0.1
  1802. end
  1803. TRAIL:remove()
  1804. end))
  1805. end
  1806.  
  1807. local asd = Instance.new("ParticleEmitter")
  1808. asd.Color = ColorSequence.new(Color3.new(0.5, 0, 0), Color3.new(.3, 0, 0))
  1809. asd.LightEmission = .1
  1810. asd.Texture = "http://www.roblox.com/asset/?ID=291880914"
  1811. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.6),NumberSequenceKeypoint.new(1, 2)})
  1812. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  1813. asd.Transparency = bbb
  1814. asd.Size = aaa
  1815. asd.ZOffset = .9
  1816. asd.Acceleration = Vector3.new(0, -15, 0)
  1817. asd.LockedToPart = false
  1818. asd.EmissionDirection = "Back"
  1819. asd.Lifetime = NumberRange.new(1, 2)
  1820. asd.Rotation = NumberRange.new(-100, 100)
  1821. asd.RotSpeed = NumberRange.new(-100, 100)
  1822. asd.Speed = NumberRange.new(10)
  1823. asd.Enabled = false
  1824. asd.VelocitySpread = 999
  1825.  
  1826. function getbloody(victim,amount)
  1827. local PART = CreatePart(3, Effects, "Metal", 0, 1, "Mid gray", "Blood", victim.Size)
  1828. PART.CFrame = victim.CFrame
  1829. local HITPLAYERSOUNDS = {"356551938","264486467"}
  1830. Debris:AddItem(PART,5)
  1831. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  1832. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  1833. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  1834. local prtcl = asd:Clone()
  1835. prtcl.Parent = PART
  1836. prtcl:Emit(amount*10)
  1837. end
  1838.  
  1839. local Particle = IT("ParticleEmitter",nil)
  1840. Particle.Enabled = false
  1841. Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1),NumberSequenceKeypoint.new(0.3,0.95),NumberSequenceKeypoint.new(1,1)})
  1842. Particle.LightEmission = 0.5
  1843. Particle.Rate = 150
  1844. Particle.ZOffset = 1
  1845. Particle.Rotation = NumberRange.new(-180, 180)
  1846. Particle.RotSpeed = NumberRange.new(-180, 180)
  1847. Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
  1848. Particle.Color = ColorSequence.new(C3(1,0,0),C3(0.4,0,0))
  1849.  
  1850. --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
  1851. function ParticleEmitter(Table)
  1852. local PRTCL = Particle:Clone()
  1853. local Speed = Table.Speed or 5
  1854. local Drag = Table.Drag or 0
  1855. local Size1 = Table.Size1 or 1
  1856. local Size2 = Table.Size2 or 5
  1857. local Lifetime1 = Table.Lifetime1 or 1
  1858. local Lifetime2 = Table.Lifetime2 or 1.5
  1859. local Parent = Table.Parent or Torso
  1860. local Emit = Table.Emit or 100
  1861. local Offset = Table.Offset or 360
  1862. local Acel = Table.Acel or VT(0,0,0)
  1863. local Enabled = Table.Enabled or false
  1864. PRTCL.Parent = Parent
  1865. PRTCL.Size = NumberSequence.new(Size1,Size2)
  1866. PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  1867. PRTCL.Speed = NumberRange.new(Speed)
  1868. PRTCL.VelocitySpread = Offset
  1869. PRTCL.Drag = Drag
  1870. PRTCL.Acceleration = Acel
  1871. if Enabled == false then
  1872. PRTCL:Emit(Emit)
  1873. Debris:AddItem(PRTCL,Lifetime2)
  1874. else
  1875. PRTCL.Enabled = true
  1876. end
  1877. return PRTCL
  1878. end
  1879.  
  1880. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  1881. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  1882. end
  1883.  
  1884. function PositiveAngle(NUMBER)
  1885. if NUMBER >= 0 then
  1886. NUMBER = 0
  1887. end
  1888. return NUMBER
  1889. end
  1890.  
  1891. function NegativeAngle(NUMBER)
  1892. if NUMBER <= 0 then
  1893. NUMBER = 0
  1894. end
  1895. return NUMBER
  1896. end
  1897.  
  1898. function Swait(NUMBER)
  1899. if NUMBER == 0 or NUMBER == nil then
  1900. ArtificialHB.Event:wait()
  1901. else
  1902. for i = 1, NUMBER do
  1903. ArtificialHB.Event:wait()
  1904. end
  1905. end
  1906. end
  1907.  
  1908. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  1909. local NEWMESH = IT(MESH)
  1910. if MESH == "SpecialMesh" then
  1911. NEWMESH.MeshType = MESHTYPE
  1912. if MESHID ~= "nil" and MESHID ~= "" then
  1913. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  1914. end
  1915. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  1916. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  1917. end
  1918. end
  1919. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  1920. NEWMESH.Scale = SCALE
  1921. NEWMESH.Parent = PARENT
  1922. return NEWMESH
  1923. end
  1924.  
  1925. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  1926. local NEWPART = IT("Part")
  1927. NEWPART.formFactor = FORMFACTOR
  1928. NEWPART.Reflectance = REFLECTANCE
  1929. NEWPART.Transparency = TRANSPARENCY
  1930. NEWPART.CanCollide = false
  1931. NEWPART.Locked = true
  1932. NEWPART.Anchored = true
  1933. if ANCHOR == false then
  1934. NEWPART.Anchored = false
  1935. end
  1936. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  1937. NEWPART.Name = NAME
  1938. NEWPART.Size = SIZE
  1939. NEWPART.Position = Torso.Position
  1940. NEWPART.Material = MATERIAL
  1941. NEWPART:BreakJoints()
  1942. NEWPART.Parent = PARENT
  1943. return NEWPART
  1944. end
  1945.  
  1946. local function weldBetween(a, b)
  1947. local weldd = Instance.new("ManualWeld")
  1948. weldd.Part0 = a
  1949. weldd.Part1 = b
  1950. weldd.C0 = CFrame.new()
  1951. weldd.C1 = b.CFrame:inverse() * a.CFrame
  1952. weldd.Parent = a
  1953. return weldd
  1954. end
  1955.  
  1956.  
  1957. function QuaternionFromCFrame(cf)
  1958. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1959. local trace = m00 + m11 + m22
  1960. if trace > 0 then
  1961. local s = math.sqrt(1 + trace)
  1962. local recip = 0.5 / s
  1963. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  1964. else
  1965. local i = 0
  1966. if m11 > m00 then
  1967. i = 1
  1968. end
  1969. if m22 > (i == 0 and m00 or m11) then
  1970. i = 2
  1971. end
  1972. if i == 0 then
  1973. local s = math.sqrt(m00 - m11 - m22 + 1)
  1974. local recip = 0.5 / s
  1975. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  1976. elseif i == 1 then
  1977. local s = math.sqrt(m11 - m22 - m00 + 1)
  1978. local recip = 0.5 / s
  1979. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  1980. elseif i == 2 then
  1981. local s = math.sqrt(m22 - m00 - m11 + 1)
  1982. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  1983. end
  1984. end
  1985. end
  1986.  
  1987. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1988. local xs, ys, zs = x + x, y + y, z + z
  1989. local wx, wy, wz = w * xs, w * ys, w * zs
  1990. local xx = x * xs
  1991. local xy = x * ys
  1992. local xz = x * zs
  1993. local yy = y * ys
  1994. local yz = y * zs
  1995. local zz = z * zs
  1996. 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))
  1997. end
  1998.  
  1999. function QuaternionSlerp(a, b, t)
  2000. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  2001. local startInterp, finishInterp;
  2002. if cosTheta >= 0.0001 then
  2003. if (1 - cosTheta) > 0.0001 then
  2004. local theta = ACOS(cosTheta)
  2005. local invSinTheta = 1 / SIN(theta)
  2006. startInterp = SIN((1 - t) * theta) * invSinTheta
  2007. finishInterp = SIN(t * theta) * invSinTheta
  2008. else
  2009. startInterp = 1 - t
  2010. finishInterp = t
  2011. end
  2012. else
  2013. if (1 + cosTheta) > 0.0001 then
  2014. local theta = ACOS(-cosTheta)
  2015. local invSinTheta = 1 / SIN(theta)
  2016. startInterp = SIN((t - 1) * theta) * invSinTheta
  2017. finishInterp = SIN(t * theta) * invSinTheta
  2018. else
  2019. startInterp = t - 1
  2020. finishInterp = t
  2021. end
  2022. end
  2023. 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
  2024. end
  2025.  
  2026. function Clerp(a, b, t)
  2027. local qa = {QuaternionFromCFrame(a)}
  2028. local qb = {QuaternionFromCFrame(b)}
  2029. local ax, ay, az = a.x, a.y, a.z
  2030. local bx, by, bz = b.x, b.y, b.z
  2031. local _t = 1 - t
  2032. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  2033. end
  2034.  
  2035. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  2036. local frame = IT("Frame")
  2037. frame.BackgroundTransparency = TRANSPARENCY
  2038. frame.BorderSizePixel = BORDERSIZEPIXEL
  2039. frame.Position = POSITION
  2040. frame.Size = SIZE
  2041. frame.BackgroundColor3 = COLOR
  2042. frame.BorderColor3 = BORDERCOLOR
  2043. frame.Name = NAME
  2044. frame.Parent = PARENT
  2045. return frame
  2046. end
  2047.  
  2048. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  2049. local label = IT("TextLabel")
  2050. label.BackgroundTransparency = 1
  2051. label.Size = UD2(1, 0, 1, 0)
  2052. label.Position = UD2(0, 0, 0, 0)
  2053. label.TextColor3 = TEXTCOLOR
  2054. label.TextStrokeTransparency = STROKETRANSPARENCY
  2055. label.TextTransparency = TRANSPARENCY
  2056. label.FontSize = TEXTFONTSIZE
  2057. label.Font = TEXTFONT
  2058. label.BorderSizePixel = BORDERSIZEPIXEL
  2059. label.TextScaled = false
  2060. label.Text = TEXT
  2061. label.Name = NAME
  2062. label.Parent = PARENT
  2063. return label
  2064. end
  2065.  
  2066. function NoOutlines(PART)
  2067. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  2068. end
  2069.  
  2070. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  2071. local NEWWELD = IT(TYPE)
  2072. NEWWELD.Part0 = PART0
  2073. NEWWELD.Part1 = PART1
  2074. NEWWELD.C0 = C0
  2075. NEWWELD.C1 = C1
  2076. NEWWELD.Parent = PARENT
  2077. return NEWWELD
  2078. end
  2079.  
  2080. local S = IT("Sound")
  2081. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  2082. local NEWSOUND = nil
  2083. coroutine.resume(coroutine.create(function()
  2084. NEWSOUND = S:Clone()
  2085. NEWSOUND.Parent = PARENT
  2086. NEWSOUND.Volume = VOLUME
  2087. NEWSOUND.Pitch = PITCH
  2088. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  2089. NEWSOUND:play()
  2090. if DOESLOOP == true then
  2091. NEWSOUND.Looped = true
  2092. else
  2093. repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT
  2094. NEWSOUND:remove()
  2095. end
  2096. end))
  2097. return NEWSOUND
  2098. end
  2099.  
  2100. function CFrameFromTopBack(at, top, back)
  2101. local right = top:Cross(back)
  2102. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  2103. end
  2104.  
  2105. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2106. function WACKYEFFECT(Table)
  2107. local TYPE = (Table.EffectType or "Sphere")
  2108. local SIZE = (Table.Size or VT(1,1,1))
  2109. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  2110. local TRANSPARENCY = (Table.Transparency or 0)
  2111. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  2112. local CFRAME = (Table.CFrame or Torso.CFrame)
  2113. local MOVEDIRECTION = (Table.MoveToPos or nil)
  2114. local ROTATION1 = (Table.RotationX or 0)
  2115. local ROTATION2 = (Table.RotationY or 0)
  2116. local ROTATION3 = (Table.RotationZ or 0)
  2117. local MATERIAL = (Table.Material or "Neon")
  2118. local COLOR = (Table.Color or C3(1,1,1))
  2119. local TIME = (Table.Time or 45)
  2120. local SOUNDID = (Table.SoundID or nil)
  2121. local SOUNDPITCH = (Table.SoundPitch or nil)
  2122. local SOUNDVOLUME = (Table.SoundVolume or nil)
  2123. coroutine.resume(coroutine.create(function()
  2124. local PLAYSSOUND = false
  2125. local SOUND = nil
  2126. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  2127. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  2128. PLAYSSOUND = true
  2129. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  2130. end
  2131. EFFECT.Color = COLOR
  2132. local MSH = nil
  2133. if TYPE == "Sphere" then
  2134. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  2135. elseif TYPE == "Block" then
  2136. MSH = IT("BlockMesh",EFFECT)
  2137. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  2138. elseif TYPE == "Wave" then
  2139. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  2140. elseif TYPE == "Ring" then
  2141. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  2142. elseif TYPE == "Slash" then
  2143. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  2144. elseif TYPE == "Round Slash" then
  2145. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  2146. elseif TYPE == "Swirl" then
  2147. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  2148. elseif TYPE == "Skull" then
  2149. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  2150. elseif TYPE == "Crystal" then
  2151. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  2152. end
  2153. if MSH ~= nil then
  2154. local MOVESPEED = nil
  2155. if MOVEDIRECTION ~= nil then
  2156. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  2157. end
  2158. local GROWTH = SIZE - ENDSIZE
  2159. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  2160. if TYPE == "Block" then
  2161. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  2162. else
  2163. EFFECT.CFrame = CFRAME
  2164. end
  2165. for LOOP = 1, TIME+1 do
  2166. Swait()
  2167. MSH.Scale = MSH.Scale - GROWTH/TIME
  2168. if TYPE == "Wave" then
  2169. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  2170. end
  2171. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  2172. if TYPE == "Block" then
  2173. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  2174. else
  2175. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  2176. end
  2177. if MOVEDIRECTION ~= nil then
  2178. local ORI = EFFECT.Orientation
  2179. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  2180. EFFECT.Orientation = ORI
  2181. end
  2182. end
  2183. if PLAYSSOUND == false then
  2184. EFFECT:remove()
  2185. else
  2186. SOUND.Stopped:Connect(function()
  2187. EFFECT:remove()
  2188. end)
  2189. end
  2190. else
  2191. if PLAYSSOUND == false then
  2192. EFFECT:remove()
  2193. else
  2194. repeat Swait() until SOUND.Playing == false
  2195. EFFECT:remove()
  2196. end
  2197. end
  2198. end))
  2199. end
  2200.  
  2201. function MakeForm(PART,TYPE)
  2202. if TYPE == "Cyl" then
  2203. local MSH = IT("CylinderMesh",PART)
  2204. elseif TYPE == "Ball" then
  2205. local MSH = IT("SpecialMesh",PART)
  2206. MSH.MeshType = "Sphere"
  2207. elseif TYPE == "Wedge" then
  2208. local MSH = IT("SpecialMesh",PART)
  2209. MSH.MeshType = "Wedge"
  2210. end
  2211. end
  2212.  
  2213. function SpawnTrail(FROM,TO,BIG)
  2214. local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Really red", "Trail", VT(0,0,0))
  2215. MakeForm(TRAIL,"Cyl")
  2216. local DIST = (FROM - TO).Magnitude
  2217. if BIG == true then
  2218. TRAIL.Size = VT(0.5,DIST,0.5)
  2219. else
  2220. TRAIL.Size = VT(0.25,DIST,0.25)
  2221. end
  2222. TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
  2223. coroutine.resume(coroutine.create(function()
  2224. for i = 1, 5 do
  2225. Swait()
  2226. TRAIL.Transparency = TRAIL.Transparency + 0.1
  2227. end
  2228. TRAIL:remove()
  2229. end))
  2230. end
  2231.  
  2232. Debris = game:GetService("Debris")
  2233.  
  2234. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  2235. local DIRECTION = CF(StartPos,EndPos).lookVector
  2236. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  2237. end
  2238.  
  2239. function turnto(position)
  2240. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  2241. end
  2242.  
  2243. --//=================================\\
  2244. --|| WEAPON CREATION
  2245. --\\=================================//
  2246.  
  2247.  
  2248. local FIST = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Neon Gauntlet Part", VT(1.01*Player_Size,1.4*Player_Size,1.01*Player_Size),false)
  2249. local weld = CreateWeldOrSnapOrMotor("Weld", FIST, RightArm, FIST, CF(0 * Player_Size, -0.25 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2250. local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.2*Player_Size,0.3*Player_Size,1.2*Player_Size),false)
  2251. local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.6 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2252.  
  2253. local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.05*Player_Size,0.05*Player_Size,1.05*Player_Size),false)
  2254. local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2255. local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.05*Player_Size,0.05*Player_Size,1.05*Player_Size),false)
  2256. local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.2 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2257. local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.05*Player_Size,0.05*Player_Size,1.05*Player_Size),false)
  2258. local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.3 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2259. local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.05*Player_Size,0.05*Player_Size,1.05*Player_Size),false)
  2260. local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.4 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2261.  
  2262. local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,1.1*Player_Size),false)
  2263. local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, -0.35 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2264. local part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Neon Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,1*Player_Size),false)
  2265. local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0.05 * Player_Size, -0.375 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2266. local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,0.3*Player_Size),false)
  2267. local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0.1 * Player_Size, -0.4 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2268. local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,0.3*Player_Size),false)
  2269. local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0.1 * Player_Size, -0.4 * Player_Size, 0.33 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2270. local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,0.3*Player_Size),false)
  2271. local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0.1 * Player_Size, -0.4 * Player_Size, -0.33 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2272.  
  2273. ParticleEmitter({Speed = 0.2, Drag = 0, Size1 = 0.1, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.5, Parent = Hole, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
  2274. --ParticleEmitter({Speed = 0.5, Drag = 0, Size1 = 0.2, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.7, Parent = Dangle, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
  2275.  
  2276. for _, c in pairs(Weapon:GetDescendants()) do
  2277. if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then
  2278. c.Material = "Glass"
  2279. c.Color = C3(0,0,0)
  2280. elseif c.ClassName == "Part" and c.Name == "Eye" then
  2281. c.Color = C3(1,0,0)
  2282. c.Material = "Neon"
  2283. end
  2284. end
  2285.  
  2286. Weapon.Parent = Character
  2287. for _, c in pairs(Weapon:GetChildren()) do
  2288. if c.ClassName == "Part" then
  2289. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  2290. end
  2291. end
  2292.  
  2293. New = function(Object, Parent, Name, Data)
  2294. local Object = Instance.new(Object)
  2295. for Index, Value in pairs(Data or {}) do
  2296. Object[Index] = Value
  2297. end
  2298. Object.Parent = Parent
  2299. Object.Name = Name
  2300. return Object
  2301. end
  2302.  
  2303.  
  2304. Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.330000252, 0.660000384, 0.0500000007),CFrame = CFrame.new(-67.6787415, 1.33912802, 93.9772263, 0, 0, -1, 0, 1, 0, 1, 0, 0),})
  2305. mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = LeftLeg,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.0127105713, 0.339127064, 0.487541199, 0, 0, 1, 0, 1, 0, -1, 0, 0),})
  2306. Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.330000252, 0.660000384, 0.0500000007),CFrame = CFrame.new(-66.6787415, 1.33912802, 93.9772263, 0, 0, -1, 0, 1, 0, 1, 0, 0),})
  2307. mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = LeftLeg,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.0127105713, 0.339127064, -0.512458801, 0, 0, 1, 0, 1, 0, -1, 0, 0),})
  2308.  
  2309. Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.740000069, 0.140000015, 0.0500000007),CFrame = CFrame.new(-67.6787415, 3.12643075, 92.6921463, -9.31322575e-10, -1.86264515e-09, -0.999999285, 0.777135551, 0.629333496, 9.31322575e-10, 0.6293329, -0.777134895, 0),})
  2310. mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0.777135491, 0.629333377, 0, 0.629333377, -0.777135491, -1, 0, 0),C1 = CFrame.new(-0.766067505, 0.138611317, 0.515716553, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
  2311. Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(1.12999988, 1.12000012, 0.0500000007),CFrame = CFrame.new(-67.6951752, 3.43133378, 93.991272, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),})
  2312. mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.533157349, 0.443484068, 0.50994873, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
  2313. Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.450000018, 0.590000272, 0.0500000007),CFrame = CFrame.new(-67.6951752, 2.60608268, 94.3512573, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),})
  2314. mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.893096924, -0.381786108, 0.509513855, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
  2315. Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.330000013, 0.590000272, 0.0500000007),CFrame = CFrame.new(-66.6951752, 2.60608268, 94.2912598, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),})
  2316. mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.817497253, -0.388065577, -0.489402771, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
  2317. Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.220000237, 0.660000384, 0.0500000007),CFrame = CFrame.new(-66.6787338, 2.57395577, 93.9222183, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),})
  2318. mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.448242188, -0.420258999, -0.49987793, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
  2319. Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(1.07999992, 1.12000012, 0.0500000007),CFrame = CFrame.new(-66.6951752, 3.43133354, 93.9662704, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),})
  2320. mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.492546082, 0.437201023, -0.489517212, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
  2321. Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.740000069, 0.340000302, 0.0500000007),CFrame = CFrame.new(-66.6787415, 3.2281816, 93.1287689, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),})
  2322. mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(-0.345108032, 0.234031916, -0.491600037, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
  2323. Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(1.0999999, 0.0500000007, 1.00999975),CFrame = CFrame.new(-67.1759109, 3.99574399, 93.9762726, 0, -0.0260759834, -0.999659359, 0, 0.999660075, -0.0260760002, 0.999999225, -2.91038305e-11, -9.31322575e-10),})
  2324. mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, -0.0260760002, 0.999660015, 0, -0.999660015, -0.0260760002, 0),C1 = CFrame.new(0.510047913, 1.00462079, -0.0125579834, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
  2325.  
  2326. Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.740000069, 0.419999987, 0.870000064),CFrame = CFrame.new(-67.0815201, 2.81366396, 91.9528885, 0, 0, -1, 0.777135491, 0.629333377, 0, 0.629333377, -0.777135491, 0),})
  2327. mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = LeftArm,C0 = CFrame.new(0, 0, 0, 0, 0.777135491, 0.629333377, 0, 0.629333377, -0.777135491, -1, 0, 0),C1 = CFrame.new(-0.00936126709, -0.184385061, -0.0693511963, 0, 0, 1, 0, 1, 0, -1, 0, 0),})
  2328.  
  2329. local Trail = IT("Trail",Leftbarrel)
  2330. Trail.Attachment0 = A
  2331. Trail.Attachment1 = B
  2332. Trail.Lifetime = 0.2
  2333. Trail.Color = ColorSequence.new(BRICKC"Really red".Color)
  2334. Trail.Transparency = NumberSequence.new(0, 1)
  2335. Trail.Enabled = true
  2336.  
  2337. local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.2, Lifetime2 = 1, Parent = RightLeg, Emit = 100, Offset = 360, Enabled = true})
  2338. PRT.LockedToPart = true
  2339. local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.2, Lifetime2 = 1, Parent = LeftLeg, Emit = 100, Offset = 360, Enabled = true})
  2340. PRT.LockedToPart = true
  2341. local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.3, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = true})
  2342. PRT.LockedToPart = true
  2343. local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.2, Lifetime2 = 1, Parent = RightArm, Emit = 100, Offset = 360, Enabled = true})
  2344. PRT.LockedToPart = true
  2345. local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.2, Lifetime2 = 1, Parent = LeftArm, Emit = 100, Offset = 360, Enabled = true})
  2346. PRT.LockedToPart = true
  2347.  
  2348. local HAT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Tophat", VT(1,1,1),false)
  2349. local Hatweld = CreateWeldOrSnapOrMotor("Weld", Head, Head, HAT, CF(0,1,0), CF(0, 0, 0))
  2350. CreateMesh("SpecialMesh", HAT, "FileMesh", "97094619", "97094572", VT(1,1,1), VT(0,0,0))
  2351. for i = 1, 16 do
  2352. local FACE = CreatePart(3, Character, "Neon", 0, 0+(i-1)/16.2, "White", "FaceGradient", VT(1.01,0.65,1.01),false)
  2353. FACE.Color = C3(0,0,0)
  2354. Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
  2355. CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.45-(i-1)/25,0), CF(0, 0, 0))
  2356. end
  2357. local EYE = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false)
  2358. MakeForm(EYE,"Ball")
  2359. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.26,-0.55), CF(0, 0, 0))
  2360. local EYE2 = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false)
  2361. MakeForm(EYE2,"Ball")
  2362. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE2, CF(-0.15,0.26,-0.55), CF(0, 0, 0))
  2363.  
  2364. local Particle = IT("ParticleEmitter",nil)
  2365. Particle.Enabled = false
  2366. Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)})
  2367. Particle.LightEmission = 5
  2368. Particle.Rate = 300
  2369. Particle.ZOffset = 0.2
  2370. Particle.Rotation = NumberRange.new(-180, 180)
  2371. Particle.RotSpeed = NumberRange.new(-180, 180)
  2372. Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
  2373. Particle.Color = ColorSequence.new(C3(1,0,0),C3(0.4,0,0),C3(1,0,0),C3(0,4,0),C3(1,0,0),C3(1,0,0),C3(1,0,0),C3(1,0,0))
  2374.  
  2375. --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
  2376. function ParticleEmitter(Table)
  2377. local PRTCL = Particle:Clone()
  2378. local Speed = Table.Speed or 5
  2379. local Drag = Table.Drag or 0
  2380. local Size1 = Table.Size1 or 1
  2381. local Size2 = Table.Size2 or 5
  2382. local Lifetime1 = Table.Lifetime1 or 1
  2383. local Lifetime2 = Table.Lifetime2 or 1.5
  2384. local Parent = Table.Parent or Torso
  2385. local Emit = Table.Emit or 100
  2386. local Offset = Table.Offset or 360
  2387. local Acel = Table.Acel or VT(0,0,0)
  2388. local Enabled = Table.Enabled or false
  2389. PRTCL.Parent = Parent
  2390. PRTCL.Size = NumberSequence.new(Size1,Size2)
  2391. PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  2392. PRTCL.Speed = NumberRange.new(Speed)
  2393. PRTCL.VelocitySpread = Offset
  2394. PRTCL.Drag = Drag
  2395. PRTCL.Acceleration = Acel
  2396. if Enabled == false then
  2397. PRTCL:Emit(Emit)
  2398. Debris:AddItem(PRTCL,Lifetime2)
  2399. else
  2400. PRTCL.Enabled = true
  2401. end
  2402. return PRTCL
  2403. end
  2404.  
  2405. local Handle = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.6,0.2),false)
  2406. local RightArmGrasp = CreateWeldOrSnapOrMotor("Weld", Handle, RightArm, Handle, CF(0,-1, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0.21, 0))
  2407. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
  2408. MakeForm(Part,"Wedge")
  2409. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.3, 0.2) * ANGLES(RAD(0), RAD(180), RAD(0)), CF(0, 0, 0))
  2410. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.3,0.2),false)
  2411. MakeForm(Part,"Wedge")
  2412. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(180)), CF(0, 0, 0))
  2413. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.3,0.3),false)
  2414. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.5, 0.2) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2415. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.5,0.5),false)
  2416. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2417. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.4,0.4,0.4),false)
  2418. MakeForm(Part,"Cyl")
  2419. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  2420. for i = 1, 8 do
  2421. local Piece = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0,0.35,0.41),false)
  2422. CreateWeldOrSnapOrMotor("Weld", Handle, Part, Piece, CF(0, 0, 0) * ANGLES(RAD(0), RAD((360/8)*i), RAD(0)), CF(0, 0, 0))
  2423. end
  2424. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.38,0.41,0.38),false)
  2425. MakeForm(Part,"Cyl")
  2426. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  2427. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.37,0.5,0.37),false)
  2428. MakeForm(Part,"Ball")
  2429. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.3) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  2430. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.7,0.4),false)
  2431. MakeForm(Part,"Wedge")
  2432. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.7, 0.5) * ANGLES(RAD(90), RAD(180), RAD(180)), CF(0, 0, 0))
  2433. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.4,0.2),false)
  2434. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  2435. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.35,0.35,0.35),false)
  2436. MakeForm(Part,"Cyl")
  2437. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  2438. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.5),false)
  2439. MakeForm(Part,"Cyl")
  2440. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  2441. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.45),false)
  2442. MakeForm(Part,"Cyl")
  2443. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1.1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  2444. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
  2445. MakeForm(Part,"Wedge")
  2446. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.55, 0.2) * ANGLES(RAD(-135), RAD(0), RAD(0)), CF(0, -0.3, 0))
  2447. local LASTPART = Handle
  2448. for i = 1, 10 do
  2449. if LASTPART == Handle then
  2450. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.2,0),false)
  2451. LASTPART = Part
  2452. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.1, 0.2) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  2453. else
  2454. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.05,0),false)
  2455. CreateWeldOrSnapOrMotor("Weld", Handle, LASTPART, Part, CF(0, 0.025, 0) * ANGLES(RAD(8), RAD(0), RAD(0)), CF(0, -0.025, 0))
  2456. LASTPART = Part
  2457. end
  2458. end
  2459.  
  2460. local Barrel = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.15,2,0.15),false)
  2461. MakeForm(Barrel,"Cyl")
  2462. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Barrel, CF(0, -0.6, 1.8) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  2463. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.25,1,0.25),false)
  2464. MakeForm(Part,"Cyl")
  2465. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, -0.6, 0), CF(0, 0, 0))
  2466. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0.1,0.2),false)
  2467. MakeForm(Part,"Wedge")
  2468. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, 0.945, 0.1) * ANGLES(RAD(180), RAD(0), RAD(0)), CF(0, 0, 0))
  2469. local Hole = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.125,0,0.125),false)
  2470. MakeForm(Hole,"Cyl")
  2471. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Hole, CF(0, 0.98, 0), CF(0, 0, 0))
  2472. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0,0),false)
  2473. local GEARWELD = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
  2474. CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.8,0.8,1.5), VT(0,0,0.2))
  2475. local Part = CreatePart(3, Weapon, "Metal", 0, 0.5, "Mid gray", "Eye", VT(0,0,0),false)
  2476. local GEARWELD2 = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
  2477. CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.9,0.9,0.3), VT(0,0,0.2))
  2478. coroutine.resume(coroutine.create(function()
  2479. while wait() do
  2480. GEARWELD.C0 = GEARWELD.C0 * ANGLES(RAD(0), RAD(0), RAD(5))
  2481. GEARWELD2.C0 = GEARWELD2.C0 * ANGLES(RAD(0), RAD(0), RAD(-5))
  2482. end
  2483. end))
  2484.  
  2485. ParticleEmitter({Speed = 0.2, Drag = 0, Size1 = 0.7, Size2 = 0, Lifetime1 = 0.7, Lifetime2 = 0.7, Parent = Hole, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
  2486. --ParticleEmitter({Speed = 0.5, Drag = 0, Size1 = 10, Size2 = 0, Lifetime1 = 0.8, Lifetime2 = 0.9, Parent = Dangle, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
  2487.  
  2488. for _, c in pairs(Weapon:GetDescendants()) do
  2489. if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then
  2490. c.Material = "Glass"
  2491. c.Color = C3(0,0,0)
  2492. elseif c.ClassName == "Part" and c.Name == "Eye" then
  2493. c.Color = C3(1,0,0)
  2494. c.Material = "Neon"
  2495. end
  2496. end
  2497.  
  2498. Weapon.Parent = Character
  2499. for _, c in pairs(Weapon:GetChildren()) do
  2500. if c.ClassName == "Part" then
  2501. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  2502. end
  2503. end
  2504.  
  2505. local SKILLTEXTCOLOR = C3(1,0,0)
  2506. local SKILLFONT = "Antique"
  2507. local SKILLTEXTSIZE = 7
  2508.  
  2509. Humanoid.Died:connect(function()
  2510. ATTACK = true
  2511. end)
  2512.  
  2513. local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.1, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  2514. --[[local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.63, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  2515. local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.215, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
  2516. local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.525, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
  2517. local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
  2518. ]]
  2519. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Banisher Bullet", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 1")
  2520. --[[local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Ability 2", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 2")
  2521. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Ability 3", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 3")
  2522. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Ability 4", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 4")
  2523. local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Mercy", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 5")
  2524. ]]
  2525. function printbye(Name)
  2526. local MESSAGES = {"You cannot struggle, ","Your existance is an insult, ","Fade, ","Your existance is not desired, ","You are not permitted here, ","You are not to decide your fate, ","Be gone, ","You are already dead, ","Your live is an anomaly, ","Don't dare to return, ","Why are you resisting, ","You cannot exist here, ","Why are you struggling, ","Your fate was already decided, ","Goodbye, ","You cannot ignore my command, ","You cannot resist my command, ","You already died, "}
  2527. warn(MESSAGES[MRANDOM(1,#MESSAGES)]..Name..".")
  2528. end
  2529.  
  2530. workspace.ChildAdded:connect(function(instance)
  2531. for BANISH = 1, #TOBANISH do
  2532. if TOBANISH[BANISH] ~= nil then
  2533. if instance.Name == TOBANISH[BANISH] then
  2534. coroutine.resume(coroutine.create(function()
  2535. printbye(instance.Name)
  2536. instance:ClearAllChildren()
  2537. Debris:AddItem(instance,0.0005)
  2538. end))
  2539. end
  2540. end
  2541. end
  2542. end)
  2543.  
  2544. function refit()
  2545. Character.Parent = workspace
  2546. for e = 1, #BODY do
  2547. if BODY[e] ~= nil then
  2548. local STUFF = BODY[e]
  2549. local PART = STUFF[1]
  2550. local PARENT = STUFF[2]
  2551. local MATERIAL = STUFF[3]
  2552. local COLOR = STUFF[4]
  2553. local TRANSPARENCY = STUFF[5]
  2554. if PART.ClassName == "Part" and PART ~= RootPart then
  2555. PART.Material = MATERIAL
  2556. PART.Color = COLOR
  2557. PART.Transparency = TRANSPARENCY
  2558. end
  2559. if PART.Parent ~= PARENT then
  2560. Humanoid:remove()
  2561. PART.Parent = PARENT
  2562. Humanoid = IT("Humanoid",Character)
  2563. end
  2564. end
  2565. end
  2566. end
  2567. --//=================================\\
  2568. --|| DAMAGE FUNCTIONS
  2569. --\\=================================//
  2570. function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR)
  2571. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  2572. STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0))
  2573. local BODYGYRO = IT("BodyGyro", STATPART)
  2574. local BODYPOSITION = IT("BodyPosition", STATPART)
  2575. BODYPOSITION.P = 2000
  2576. BODYPOSITION.D = 100
  2577. BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge)
  2578. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2))
  2579. game:GetService("Debris"):AddItem(STATPART ,5)
  2580. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  2581. BILLBOARDGUI.Adornee = STATPART
  2582. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  2583. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  2584. BILLBOARDGUI.AlwaysOnTop = false
  2585. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  2586. TEXTLABEL.BackgroundTransparency = 1
  2587. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  2588. TEXTLABEL.Text = TEXT
  2589. TEXTLABEL.Font = "SciFi"
  2590. TEXTLABEL.FontSize="Size42"
  2591. TEXTLABEL.TextColor3 = ("255,215,0")
  2592. TEXTLABEL.TextStrokeTransparency = 1
  2593. TEXTLABEL.TextScaled = true
  2594. TEXTLABEL.TextWrapped = true
  2595. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  2596. if LABELTYPE == "Normal" then
  2597. for i = 1, 30 do
  2598. Swait()
  2599. STATPART.Position = STATPART.Position + VT(0, (15-i)/10 ,0)
  2600. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
  2601. end
  2602. elseif LABELTYPE == "Debuff" then
  2603. for i = 1, 30 do
  2604. Swait()
  2605. STATPART.Position = STATPART.Position - VT(0, i/10 ,0)
  2606. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
  2607. end
  2608. elseif LABELTYPE == "Shock" then
  2609. local ORIGIN = STATPART.Position
  2610. for i = 1, 30 do
  2611. Swait()
  2612. STATPART.Position = ORIGIN + VT(MRANDOM(-2,2),MRANDOM(-2,2),MRANDOM(-2,2))
  2613. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
  2614. end
  2615. end
  2616. THEPART.Parent = nil
  2617. end),STATPART, BODYPOSITION, TEXTLABEL)
  2618. end
  2619.  
  2620. function StatLabel(CFRAME, TEXT, COLOR)
  2621. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  2622. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  2623. local BODYGYRO = IT("BodyGyro", STATPART)
  2624. game:GetService("Debris"):AddItem(STATPART ,5)
  2625. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  2626. BILLBOARDGUI.Adornee = STATPART
  2627. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  2628. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  2629. BILLBOARDGUI.AlwaysOnTop = false
  2630. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  2631. TEXTLABEL.BackgroundTransparency = 1
  2632. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  2633. TEXTLABEL.Text = TEXT
  2634. TEXTLABEL.Font = SKILLFONT
  2635. TEXTLABEL.FontSize="Size42"
  2636. TEXTLABEL.TextColor3 = COLOR
  2637. TEXTLABEL.TextStrokeTransparency = 0
  2638. TEXTLABEL.TextScaled = true
  2639. TEXTLABEL.TextWrapped = true
  2640. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  2641. for i = 1, 50 do
  2642. Swait()
  2643. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  2644. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
  2645. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  2646. end
  2647. THEPART.Parent = nil
  2648. end),STATPART, TEXTLABEL)
  2649. end
  2650.  
  2651. function StatLabel(CFRAME, TEXT, COLOR)
  2652. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  2653. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  2654. local BODYGYRO = IT("BodyGyro", STATPART)
  2655. game:GetService("Debris"):AddItem(STATPART ,5)
  2656. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  2657. BILLBOARDGUI.Adornee = STATPART
  2658. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  2659. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  2660. BILLBOARDGUI.AlwaysOnTop = false
  2661. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  2662. TEXTLABEL.BackgroundTransparency = 1
  2663. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  2664. TEXTLABEL.Text = TEXT
  2665. TEXTLABEL.Font = SKILLFONT
  2666. TEXTLABEL.FontSize="Size42"
  2667. TEXTLABEL.TextColor3 = COLOR
  2668. TEXTLABEL.TextStrokeTransparency = 0
  2669. TEXTLABEL.TextScaled = true
  2670. TEXTLABEL.TextWrapped = true
  2671. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  2672. for i = 1, 50 do
  2673. Swait()
  2674. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  2675. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
  2676. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  2677. end
  2678. THEPART.Parent = nil
  2679. end),STATPART, TEXTLABEL)
  2680. end
  2681.  
  2682. function StatLabel(CFRAME, TEXT, COLOR)
  2683. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  2684. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  2685. local BODYGYRO = IT("BodyGyro", STATPART)
  2686. game:GetService("Debris"):AddItem(STATPART ,5)
  2687. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  2688. BILLBOARDGUI.Adornee = STATPART
  2689. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  2690. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  2691. BILLBOARDGUI.AlwaysOnTop = false
  2692. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  2693. TEXTLABEL.BackgroundTransparency = 1
  2694. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  2695. TEXTLABEL.Text = TEXT
  2696. TEXTLABEL.Font = SKILLFONT
  2697. TEXTLABEL.FontSize="Size42"
  2698. TEXTLABEL.TextColor3 = COLOR
  2699. TEXTLABEL.TextStrokeTransparency = 1
  2700. TEXTLABEL.TextScaled = true
  2701. TEXTLABEL.TextWrapped = true
  2702. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  2703. for i = 1, 50 do
  2704. Swait()
  2705. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  2706. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
  2707. end
  2708. THEPART.Parent = nil
  2709. end),STATPART, TEXTLABEL)
  2710. end
  2711. --//=================================\\
  2712. --|| DAMAGING
  2713. --\\=================================//
  2714. function killnearest(position,range,maxstrength,direction)
  2715. for i,v in ipairs(workspace:GetChildren()) do
  2716. local body = v:GetChildren()
  2717. for part = 1, #body do
  2718. if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  2719. if(body[part].Position - position).Magnitude < range then
  2720. if v.ClassName == "Model" then
  2721. --v:BreakJoints()
  2722. end
  2723. local POS = position
  2724. coroutine.resume(coroutine.create(function()
  2725. body[part].Anchored = true
  2726. body[part].Parent = Effects
  2727. body[part].CanCollide = true
  2728. local SIZE = body[part].Size
  2729. body[part].Material = "Neon"
  2730. CreateSound("952306739", body[part], 2, MRANDOM(7, 12) / 10)
  2731. for i = 1, 75 do
  2732. Swait()
  2733. body[part].Color = C3(MRANDOM(0,100)/100,MRANDOM(0,100)/100,MRANDOM(0,100)/100)
  2734. body[part].Size = VT(SIZE.X+MRANDOM(-2,2),SIZE.Y+MRANDOM(-2,2),SIZE.Z+MRANDOM(-2,2))
  2735. end
  2736. coroutine.resume(coroutine.create(function()
  2737. while true do
  2738. Swait()
  2739. body[part].Color = C3(MRANDOM(0,100)/100,MRANDOM(0,100)/100,MRANDOM(0,100)/100)
  2740. body[part].Size = VT(SIZE.X+MRANDOM(-2,2),SIZE.Y+MRANDOM(-2,2),SIZE.Z+MRANDOM(-2,2))
  2741. end
  2742. end))
  2743. body[part].Anchored = false
  2744. body[part].Velocity = direction.lookVector*maxstrength
  2745. end))
  2746. end
  2747. end
  2748. end
  2749. if v.ClassName == "Part" then
  2750. if v.Anchored == false and (v.Position - position).Magnitude < range then
  2751. local POS = position
  2752. coroutine.resume(coroutine.create(function()
  2753. v.Anchored = true
  2754. v.Parent = Effects
  2755. local SIZE = v.Size
  2756. v.Material = "Neon"
  2757. CreateSound("952306739", v, 2, MRANDOM(7, 12) / 10)
  2758. for i = 1, 75 do
  2759. Swait()
  2760. v.Color = C3(MRANDOM(0,100)/100,MRANDOM(0,100)/100,MRANDOM(0,100)/100)
  2761. v.Size = VT(SIZE.X+MRANDOM(-2,2),SIZE.Y+MRANDOM(-2,2),SIZE.Z+MRANDOM(-2,2))
  2762. end
  2763. coroutine.resume(coroutine.create(function()
  2764. while true do
  2765. Swait()
  2766. v.Color = C3(MRANDOM(0,100)/100,MRANDOM(0,100)/100,MRANDOM(0,100)/100)
  2767. v.Size = VT(SIZE.X+MRANDOM(-2,2),SIZE.Y+MRANDOM(-2,2),SIZE.Z+MRANDOM(-2,2))
  2768. end
  2769. end))
  2770. v.Anchored = false
  2771. v.Velocity = direction.lookVector*maxstrength
  2772. end))
  2773. end
  2774. end
  2775. end
  2776. end
  2777.  
  2778. function Kill(Char)
  2779. local NewCharacter = IT("Model",Effects)
  2780. NewCharacter.Name = "Ow im ded ;-;"
  2781. for _, c in pairs(Char:GetDescendants()) do
  2782. if c:IsA("BasePart") and c.Transparency == 0 then
  2783. if c.Parent == Char then
  2784. getbloody(c,5)
  2785. end
  2786. c:BreakJoints()
  2787. c.Material = "Glass"
  2788. c.Color = C3(0.5,0,0)
  2789. c.CanCollide = true
  2790. c.Transparency = 0.3
  2791. if c:FindFirstChildOfClass("SpecialMesh") then
  2792. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  2793. end
  2794. if c.Name == "Head" then
  2795. c:ClearAllChildren()
  2796. c.Size = VT(c.Size.Y,c.Size.Y,c.Size.Y)
  2797. end
  2798. if c.ClassName == "MeshPart" then
  2799. c.TextureID = ""
  2800. end
  2801. if c:FindFirstChildOfClass("BodyPosition") then
  2802. c:FindFirstChildOfClass("BodyPosition"):remove()
  2803. end
  2804. if c:FindFirstChildOfClass("ParticleEmitter") then
  2805. c:FindFirstChildOfClass("ParticleEmitter"):remove()
  2806. end
  2807. c.Parent = NewCharacter
  2808. c.Name = "DeadPart"
  2809. c.Velocity = VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45))/15
  2810. c.RotVelocity = VT(MRANDOM(-45,45),MRANDOM(-15,85),MRANDOM(-45,45))
  2811. end
  2812. end
  2813. Char:remove()
  2814. Debris:AddItem(NewCharacter,5)
  2815. end
  2816.  
  2817. function ApplyAoE(POSITION,RANGE,BRUTAL)
  2818. local CHILDREN = workspace:GetDescendants()
  2819. for index, CHILD in pairs(CHILDREN) do
  2820. if CHILD.ClassName == "Model" and CHILD ~= Character then
  2821. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  2822. if HUM then
  2823. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  2824. if TORSO then
  2825. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  2826. if BRUTAL == true then
  2827. Kill(CHILD)
  2828. else
  2829. CHILD:BreakJoints()
  2830. end
  2831. end
  2832. end
  2833. end
  2834. end
  2835. end
  2836. end
  2837.  
  2838. function Kill(Char)
  2839. local NewCharacter = IT("Model",Effects)
  2840. NewCharacter.Name = "Ow im ded ;-;"
  2841. for _, c in pairs(Char:GetDescendants()) do
  2842. if c:IsA("BasePart") and c.Transparency == 0 then
  2843. if c.Parent == Char then
  2844. getbloody(c,5)
  2845. end
  2846. c:BreakJoints()
  2847. c.Material = "Glass"
  2848. c.Color = C3(0.5,0,0)
  2849. c.CanCollide = true
  2850. c.Transparency = 0.3
  2851. if c:FindFirstChildOfClass("SpecialMesh") then
  2852. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  2853. end
  2854. if c.Name == "Head" then
  2855. c:ClearAllChildren()
  2856. c.Size = VT(c.Size.Y,c.Size.Y,c.Size.Y)
  2857. end
  2858. if c.ClassName == "MeshPart" then
  2859. c.TextureID = ""
  2860. end
  2861. if c:FindFirstChildOfClass("BodyPosition") then
  2862. c:FindFirstChildOfClass("BodyPosition"):remove()
  2863. end
  2864. if c:FindFirstChildOfClass("ParticleEmitter") then
  2865. c:FindFirstChildOfClass("ParticleEmitter"):remove()
  2866. end
  2867. c.Parent = NewCharacter
  2868. c.Name = "DeadPart"
  2869. c.Velocity = VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45))/15
  2870. c.RotVelocity = VT(MRANDOM(-45,45),MRANDOM(-15,85),MRANDOM(-45,45))
  2871. end
  2872. end
  2873. Char:remove()
  2874. Debris:AddItem(NewCharacter,5)
  2875. end
  2876.  
  2877. function ApplyAoE(POSITION,RANGE,BRUTAL)
  2878. local CHILDREN = workspace:GetDescendants()
  2879. for index, CHILD in pairs(CHILDREN) do
  2880. if CHILD.ClassName == "Model" and CHILD ~= Character then
  2881. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  2882. if HUM then
  2883. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  2884. if TORSO then
  2885. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  2886. if BRUTAL == true then
  2887. Kill(CHILD)
  2888. else
  2889. CHILD:BreakJoints()
  2890. end
  2891. end
  2892. end
  2893. end
  2894. end
  2895. end
  2896. end
  2897.  
  2898. function Kill(Char)
  2899. local NewCharacter = IT("Model",Effects)
  2900. NewCharacter.Name = "Ow im ded ;-;"
  2901. for _, c in pairs(Char:GetDescendants()) do
  2902. if c:IsA("BasePart") and c.Transparency == 0 then
  2903. if c.Parent == Char then
  2904. getbloody(c,5)
  2905. end
  2906. c:BreakJoints()
  2907. c.Material = "Glass"
  2908. c.Color = C3(0.5,0,0)
  2909. c.CanCollide = true
  2910. c.Transparency = 0.3
  2911. if c:FindFirstChildOfClass("SpecialMesh") then
  2912. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  2913. end
  2914. if c.Name == "Head" then
  2915. c:ClearAllChildren()
  2916. c.Size = VT(c.Size.Y,c.Size.Y,c.Size.Y)
  2917. end
  2918. if c.ClassName == "MeshPart" then
  2919. c.TextureID = ""
  2920. end
  2921. if c:FindFirstChildOfClass("BodyPosition") then
  2922. c:FindFirstChildOfClass("BodyPosition"):remove()
  2923. end
  2924. if c:FindFirstChildOfClass("ParticleEmitter") then
  2925. c:FindFirstChildOfClass("ParticleEmitter"):remove()
  2926. end
  2927. c.Parent = NewCharacter
  2928. c.Name = "DeadPart"
  2929. c.Velocity = VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45))/15
  2930. c.RotVelocity = VT(MRANDOM(-45,45),MRANDOM(-15,85),MRANDOM(-45,45))
  2931. end
  2932. end
  2933. Char:remove()
  2934. Debris:AddItem(NewCharacter,5)
  2935. end
  2936.  
  2937. function ApplyAoE(POSITION,RANGE,BRUTAL)
  2938. local CHILDREN = workspace:GetDescendants()
  2939. for index, CHILD in pairs(CHILDREN) do
  2940. if CHILD.ClassName == "Model" and CHILD ~= Character then
  2941. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  2942. if HUM then
  2943. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  2944. if TORSO then
  2945. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  2946. if BRUTAL == true then
  2947. Kill(CHILD)
  2948. else
  2949. CHILD:BreakJoints()
  2950. end
  2951. end
  2952. end
  2953. end
  2954. end
  2955. end
  2956. end
  2957.  
  2958. function BulletDetection(FROM,TO,BRUTAL)
  2959. local AIMHIT,AIMPOS,NORMAL = CastProperRay(FROM,TO,2000,Character)
  2960. coroutine.resume(coroutine.create(function()
  2961. if AIMHIT ~= nil then
  2962. if AIMHIT.Parent ~= Character then
  2963. if AIMHIT.Parent:FindFirstChildOfClass("Humanoid") or AIMHIT.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  2964. if AIMHIT.Parent:FindFirstChildOfClass("Humanoid") then
  2965. if BRUTAL == true then
  2966. Kill(AIMHIT.Parent)
  2967. else
  2968. getbloody(AIMHIT,15)
  2969. AIMHIT.Parent:BreakJoints()
  2970. if AIMHIT.Name == "Head" then
  2971. AIMHIT.Name = "HEADSHOT"
  2972. AIMHIT:remove()
  2973. end
  2974. end
  2975. else
  2976. if BRUTAL == true then
  2977. Kill(AIMHIT.Parent.Parent)
  2978. else
  2979. AIMHIT.Parent.Parent:BreakJoints()
  2980. end
  2981. end
  2982. end
  2983. end
  2984. end
  2985. end))
  2986. SpawnTrail(FROM,AIMPOS)
  2987. return AIMHIT,AIMPOS,NORMAL
  2988. end
  2989.  
  2990. function ApplyDamage(Humanoid,Damage,CritRate,CritMultiplier,DoesOneShot)
  2991. coroutine.resume(coroutine.create(function()
  2992. local defence = Instance.new("BoolValue",Humanoid.Parent)
  2993. defence.Name = ("HitBy"..Player.Name)
  2994. game:GetService("Debris"):AddItem(defence, 0.001)
  2995. Damage = Damage * DAMAGEMULTIPLIER
  2996. if Humanoid.Health ~= 0 then
  2997. local CritChance = MRANDOM(1,100)
  2998. if CritChance < CritRate + 1 then
  2999. Damage = Damage*CritMultiplier
  3000. end
  3001. if Damage > Humanoid.Health then
  3002. Damage = math.ceil(Humanoid.Health)
  3003. if Damage == 0 then
  3004. Damage = 0.1
  3005. end
  3006. end
  3007. if DoesOneShot == false then
  3008. for _, c in pairs(Humanoid.Parent:GetChildren()) do
  3009. if c.Name ~= "HumanoidRootPart" and c.Name ~= "Torso" and c.Name ~= "Head" and c.Name ~= "UpperTorso" and c.Name ~= "LowerTorso" then
  3010. if c.ClassName == "Part" or c.ClassName == "MeshPart" then
  3011. if MRANDOM(1,20) == 1 then
  3012. Shatter(c)
  3013. end
  3014. end
  3015. end
  3016. end
  3017. Humanoid.Health = Humanoid.Health - Damage
  3018. if Humanoid.Parent:FindFirstChild("Head") then
  3019. CreateSound(HITPLAYERSOUNDS[MRANDOM(1,#HITPLAYERSOUNDS)], Humanoid.Parent.Head, 5, 1)
  3020. if CritChance < CritRate + 1 then
  3021. StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), "CRIT//"..Damage, C3(1, 0, 0))
  3022. else
  3023. StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), Damage, C3(0, 0, 0))
  3024. end
  3025. end
  3026. elseif DoesOneShot == true then
  3027. --print("["..Humanoid.Parent.Name.."]: One shot!? Really!?!?")
  3028. Humanoid.Parent:BreakJoints()
  3029. if Humanoid.Parent:FindFirstChild("Head") then
  3030. StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), "INF", C3(1, 0, 0))
  3031. end
  3032. for _, c in pairs(Humanoid.Parent:GetChildren()) do
  3033. if c.ClassName == "Part" or c.ClassName == "MeshPart" then
  3034. Shatter(c)
  3035. end
  3036. end
  3037. end
  3038. if Humanoid.Health == 0 then
  3039. --print("["..Humanoid.Parent.Name.."]: It's like stepping on glass, but worse!")
  3040. SpawnSoul(Humanoid)
  3041. for _, c in pairs(Humanoid.Parent:GetChildren()) do
  3042. if c.ClassName == "Part" or c.ClassName == "MeshPart" then
  3043. Shatter(c)
  3044. end
  3045. end
  3046. end
  3047. end
  3048. end))
  3049. end
  3050.  
  3051. function AoEDamage(position,radius,min,max,maxstrength,critrate,critmultiplier,BESERK)
  3052. local dmg = math.random(10000,100000)
  3053. for i,v in ipairs(workspace:GetChildren()) do
  3054. if v:FindFirstChild("HitBy"..Player.Name) == nil then
  3055. local body = v:GetChildren()
  3056. for part = 1, #body do
  3057. if(v:FindFirstChild("HitBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  3058. if(body[part].Position - position).Magnitude < radius then
  3059. if v.ClassName == "Model" then
  3060. if v:FindFirstChildOfClass("Humanoid") then
  3061. ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier,BESERK)
  3062. local bv = Instance.new("BodyVelocity")
  3063. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  3064. bv.velocity = CF(position,body[part].Position).lookVector*maxstrength
  3065. bv.Parent = body[part]
  3066. Debris:AddItem(bv,0.2)
  3067. end
  3068. end
  3069. end
  3070. end
  3071. end
  3072. end
  3073. if v:FindFirstChild("HitBy"..Player.Name) then
  3074. v:FindFirstChild("HitBy"..Player.Name):remove()
  3075. end
  3076. end
  3077. end
  3078.  
  3079. function Banish(Foe)
  3080. if Foe then
  3081. coroutine.resume(coroutine.create(function()
  3082. --if game.Players:FindFirstChild(Foe.Name) then
  3083. table.insert(TOBANISH,Foe.Name)
  3084. printbye(Foe.Name)
  3085. --end
  3086. Foe.Archivable = true
  3087. local CLONE = Foe:Clone()
  3088. Foe:Destroy()
  3089. CLONE.Parent = Effects
  3090. CLONE:BreakJoints()
  3091. local MATERIALS = {"Glass","Neon"}
  3092. for _, c in pairs(CLONE:GetDescendants()) do
  3093. if c:IsA("BasePart") then
  3094. if c.Name == "Torso" or c.Name == "UpperTorso" or c == CLONE.PrimaryPart then
  3095. CreateSound(340722848, c, 10, 1, false)
  3096. end
  3097. c.Anchored = true
  3098. c.Transparency = c.Transparency + 0.2
  3099. c.Material = MATERIALS[MRANDOM(1,2)]
  3100. c.Color = C3(1,0,0)
  3101. if c.ClassName == "MeshPart" then
  3102. c.TextureID = ""
  3103. end
  3104. if c:FindFirstChildOfClass("SpecialMesh") then
  3105. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  3106. end
  3107. if c:FindFirstChildOfClass("Decal") then
  3108. c:FindFirstChildOfClass("Decal"):remove()
  3109. end
  3110. c.Name = "Banished"
  3111. c.CanCollide = false
  3112. else
  3113. c:remove()
  3114. end
  3115. end
  3116. local A = false
  3117. for i = 1, 35 do
  3118. if A == false then
  3119. A = true
  3120. elseif A == true then
  3121. A = false
  3122. end
  3123. for _, c in pairs(CLONE:GetDescendants()) do
  3124. if c:IsA("BasePart") then
  3125. c.Anchored = true
  3126. c.Material = MATERIALS[MRANDOM(1,2)]
  3127. c.Transparency = c.Transparency + 0.8/35
  3128. if A == false then
  3129. c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)
  3130. elseif A == true then
  3131. c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)
  3132. end
  3133. end
  3134. end
  3135. Swait()
  3136. end
  3137. CLONE:remove()
  3138. end))
  3139. end
  3140. end
  3141.  
  3142. function ApplyAoE(POSITION,RANGE,ISBANISH)
  3143. local CHILDREN = workspace:GetDescendants()
  3144. for index, CHILD in pairs(CHILDREN) do
  3145. if CHILD.ClassName == "Model" and CHILD ~= Character then
  3146. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  3147. if HUM then
  3148. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  3149. if TORSO then
  3150. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  3151. if ISBANISH == true then
  3152. Banish(CHILD)
  3153. else
  3154. if ISBANISH == "Gravity" then
  3155. HUM.PlatformStand = true
  3156. if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
  3157. local grav = Instance.new("BodyPosition",TORSO)
  3158. grav.D = 15
  3159. grav.P = 20000
  3160. grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  3161. grav.position = TORSO.Position
  3162. grav.Name = "V3BanishForce"..Player.Name
  3163. else
  3164. TORSO:FindFirstChild("V3BanishForce"..Player.Name).position = TORSO.Position+VT(0,0.3,0)
  3165. TORSO.RotVelocity = VT(MRANDOM(-25,25),MRANDOM(-25,25),MRANDOM(-25,25))
  3166. end
  3167. else
  3168. HUM.PlatformStand = false
  3169. end
  3170. end
  3171. elseif ISBANISH == "Gravity" then
  3172. if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
  3173. TORSO:FindFirstChild("V3BanishForce"..Player.Name):remove()
  3174. HUM.PlatformStand = false
  3175. end
  3176. end
  3177. end
  3178. end
  3179. end
  3180. end
  3181. end
  3182.  
  3183. --//=================================\\
  3184. --|| ATTACK FUNCTIONS AND STUFF
  3185. --\\=================================//
  3186. function FireArc(Part,ToLocation,AmountOfTime,Height,DoesCourontine)
  3187. if DoesCourontine == false then
  3188. local Direction = CF(Part.Position,ToLocation)
  3189. local Distance = (Part.Position - ToLocation).magnitude
  3190. for i = 1, AmountOfTime do
  3191. Swait()
  3192. Part.CFrame = Direction*CF(0,(AmountOfTime/200)+((AmountOfTime/Height)-((i*2)/Height)),-Distance/AmountOfTime)
  3193. Direction = Part.CFrame
  3194. end
  3195. Part:remove()
  3196. elseif DoesCourontine == true then
  3197. coroutine.resume(coroutine.create(function()
  3198. local Direction = CF(Part.Position,ToLocation)
  3199. local Distance = (Part.Position - ToLocation).magnitude
  3200. for i = 1, AmountOfTime do
  3201. Swait()
  3202. Part.CFrame = Direction*CF(0,(AmountOfTime/200)+((AmountOfTime/Height)-((i*2)/Height)),-Distance/AmountOfTime)
  3203. Direction = Part.CFrame
  3204. end
  3205. Part:remove()
  3206. end))
  3207. end
  3208. end
  3209.  
  3210. function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
  3211. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  3212. local mesh = nil
  3213. if KIND == "Base" then
  3214. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
  3215. elseif KIND == "Thin" then
  3216. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  3217. elseif KIND == "Round" then
  3218. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  3219. end
  3220. wave.CFrame = CFRAME
  3221. coroutine.resume(coroutine.create(function(PART)
  3222. for i = 1, WAIT do
  3223. Swait()
  3224. mesh.Scale = mesh.Scale + GROW/10
  3225. wave.Transparency = wave.Transparency + (0.5/WAIT)
  3226. if wave.Transparency > 0.99 then
  3227. wave:remove()
  3228. end
  3229. end
  3230. end))
  3231. end
  3232.  
  3233. function killnearest(position,range,maxstrength)
  3234. for i,v in ipairs(workspace:GetChildren()) do
  3235. local body = v:GetChildren()
  3236. for part = 1, #body do
  3237. if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  3238. if(body[part].Position - position).Magnitude < range then
  3239. if v.ClassName == "Model" then
  3240. v:BreakJoints()
  3241. end
  3242. --table.insert(Effects2,{body[part],"Disappear",0.02,2,2,2,2})
  3243. local bv = Instance.new("BodyVelocity")
  3244. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  3245. bv.velocity = CF(position,body[part].Position).lookVector*maxstrength
  3246. bv.Parent = body[part]
  3247. Debris:AddItem(bv,0.2)
  3248. end
  3249. end
  3250. end
  3251. if v.ClassName == "Part" then
  3252. if v.Anchored == false and (v.Position - position).Magnitude < range then
  3253. --table.insert(Effects2,{v,"Disappear",0.02,2,2,2,2})
  3254. v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength
  3255. end
  3256. end
  3257. end
  3258. end
  3259.  
  3260. function Supernova()
  3261. local HITFLOOR,HITPOS,NORMAL = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 7 * Player_Size, Character)
  3262. if HITFLOOR ~= nil then
  3263. local HITBODIES = {}
  3264. ATTACK = true
  3265. Rooted = true
  3266. local ABSOLUTE = CreatePart(3, Effects, "Neon", 0, 1, "Relly red", "Star", VT(0,0,0))
  3267. MakeForm(ABSOLUTE,"Ball")
  3268. CreateSound("429459101", ABSOLUTE, 10, 1)
  3269. for i=0, 4, 0.1 / Animation_Speed do
  3270. Swait()
  3271. ABSOLUTE.Size = ABSOLUTE.Size + VT(0.2,0.2,0.2)
  3272. ABSOLUTE.CFrame = RootPart.CFrame*CF(0,5+(ABSOLUTE.Size.Y/2),0)
  3273. ABSOLUTE.Transparency = ABSOLUTE.Transparency - 0.01
  3274. local CHARGE = CreatePart(3, Effects, "Neon", 0, 0, "Really red", "Star", VT(1,1,1))
  3275. MakeForm(CHARGE,"Ball")
  3276. CHARGE.Color = C3(1,0,0)
  3277. CHARGE.CFrame = CF(RootPart.Position) * CF(MRANDOM(-15,15),-6,MRANDOM(-15,15))
  3278. FireArc(CHARGE,ABSOLUTE.Position,45,45,true)
  3279. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(15 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  3280. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(25), RAD(-15 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  3281. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 1.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(170), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(-12 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  3282. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-12 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  3283. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  3284. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  3285. end
  3286. CreateSound("907330103", Head, 10, 1.2)
  3287. for i = 1, 75 do
  3288. Swait()
  3289. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(15 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  3290. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(25), RAD(-15 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  3291. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 1.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(170), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(-12 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  3292. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-12 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  3293. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  3294. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  3295. end
  3296. coroutine.resume(coroutine.create(function()
  3297. for i = 1, 13 do
  3298. for e = 1, 8 do
  3299. Swait()
  3300. MagicSphere(VT(1,1,1),15,CF(ABSOLUTE.Position)*CF(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45)),C3(255,0,0),VT(0,0,0))
  3301. CreateSwirl(ABSOLUTE.Size/2,15,CF(HITPOS),true,15,BRICKC"Reakky red".Color,VT(i,0.3,i)*2)
  3302. end
  3303. for i = 1, 5 do
  3304. Slice("Round",0,35,CF(ABSOLUTE.Position)*ANGLES(RAD(MRANDOM(-18,18)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-18,18))),C3(1,1,1),VT(i,0,i)/3)
  3305. Slice("Thin",i,55,ABSOLUTE.CFrame * CF(0,-1.1,0) * ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),C3(255,0,0),VT(0,0,0))
  3306. end
  3307. CreateSwirl(ABSOLUTE.Size/2,25,CF(ABSOLUTE.Position),true,-25,BRICKC"Relly red".Color,VT(i,i*2,i))
  3308. CreateSwirl(ABSOLUTE.Size/2,55,CF(ABSOLUTE.Position),true,25,C3(255,0,0),VT(i,i*2,i))
  3309. CreateSound("168586621", ABSOLUTE, 4, 0.8)
  3310. CreateSound("201858144", ABSOLUTE, 10, 0.8)
  3311. killnearest(ABSOLUTE.Position,i*18,i)
  3312. ABSOLUTE.Size = ABSOLUTE.Size*0.9
  3313. MagicSphere(ABSOLUTE.Size,25,CF(ABSOLUTE.Position),BRICKC"Relly red".Color,VT(i,i,i)/1.1)
  3314. MagicSphere(ABSOLUTE.Size,45,CF(ABSOLUTE.Position),C3(255,0,0),VT(i,i,i))
  3315. end
  3316. ABSOLUTE.Transparency = 1
  3317. Debris:AddItem(ABSOLUTE,10)
  3318. end))
  3319. ATTACK = false
  3320. Rooted = false
  3321. end
  3322. end
  3323.  
  3324. function DeathAgreement()
  3325. ATTACK = true
  3326. Rooted = false
  3327. local SPEED = Speed
  3328. Speed = 8
  3329. CreateSound("357202141", RightArm, 10, 1.1)
  3330. for i=0, 0, 0.01 / Animation_Speed do
  3331. Swait()
  3332. turnto(Mouse.Hit.p)
  3333. MagicSphere(VT(1,1,1),15,RightArm.CFrame * CF(MRANDOM(-3,3),MRANDOM(-3,3),MRANDOM(-3,3)),"Deep orange",VT(-1/15,-1/15,-1/15))
  3334. MagicSphere(VT(2,2,2),15,RightArm.CFrame * CF(MRANDOM(-3,3),MRANDOM(-3,3),MRANDOM(-3,3)),"Deep orange",VT(-2/15,-2/15,-2/15))
  3335. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-85)), 0.15 / Animation_Speed)
  3336. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(85)), 0.2 / Animation_Speed)
  3337. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90+(MRANDOM(-45,45)/10)), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 3 / Animation_Speed)
  3338. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-85)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  3339. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3340. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3341. end
  3342. for i=0, 0, 0.01 / Animation_Speed do
  3343. Swait()
  3344. turnto(Mouse.Hit.p)
  3345. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(65)), 1 / Animation_Speed)
  3346. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(25), RAD(0), RAD(35)), 1 / Animation_Speed)
  3347. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(65)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  3348. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  3349. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  3350. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  3351. end
  3352. local PART = CreatePart(3, Effects, "Neon", 0, 0.8, "Deep orange", "Punch", VT(50,50,50),false)
  3353. PART.CFrame = RootPart.CFrame * CF(0,0,-25)
  3354. PART.Shape = "Ball"
  3355. local bv = Instance.new("BodyVelocity")
  3356. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  3357. bv.velocity = RootPart.CFrame.lookVector*600
  3358. bv.Parent = PART
  3359. bv.Name = "PROJECTILEVELOCITY"
  3360. CreateWave(VT(1,5,1),55,RootPart.CFrame * CF(0,0,-6)*ANGLES(RAD(-90),RAD(0),RAD(0)),true,1,"Lime green",VT(3,0.2,3))
  3361. CreateSwirl(VT(3,5,3),75,RootPart.CFrame * CF(0,0,-15)*ANGLES(RAD(-90),RAD(0),RAD(0)),true,1,"Lime green",VT(2.2,0.6,2.2))
  3362. CreateSound("414517163", Effects, 10, MRANDOM(7, 12) / 10)
  3363. coroutine.resume(coroutine.create(function()
  3364. for i = 1, 3 do
  3365. Swait()
  3366. PART.Transparency = PART.Transparency + 0.2/10
  3367. PART.Size = PART.Size + VT(5,5,5)
  3368. killnearest(PART.Position,PART.Size.Y/2+15,100,RootPart.CFrame)
  3369. end
  3370. PART:Destroy()
  3371. end))
  3372. for i=0, 0, 0.01 / Animation_Speed do
  3373. Swait()
  3374. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(15), RAD(0), RAD(95)), 2 / Animation_Speed)
  3375. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(25), RAD(0), RAD(35)), 3 / Animation_Speed)
  3376. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 3 / Animation_Speed)
  3377. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-70), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 3 / Animation_Speed)
  3378. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 3 / Animation_Speed)
  3379. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 3 / Animation_Speed)
  3380. end
  3381. Speed = SPEED
  3382. ATTACK = false
  3383. Rooted = false
  3384. end
  3385.  
  3386. function Morning_Star()
  3387. ATTACK = true
  3388. Rooted = true
  3389. CreateSound(LAUGHS[MRANDOM(1,#LAUGHS)], Torso, 7, 1, false)
  3390. for i=0, 1, 0.1 / Animation_Speed do
  3391. Swait()
  3392. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  3393. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  3394. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.5) * ANGLES(RAD(0), RAD(0), RAD(-85)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  3395. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.15, -0.5) * ANGLES(RAD(-15), RAD(0), RAD(85)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  3396. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  3397. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  3398. end
  3399. coroutine.resume(coroutine.create(function()
  3400. local POS = Mouse.Hit.p
  3401. local RAY = CreatePart(3, Effects, "Neon", 0, 0, "Really red", "Strike", VT(0,2000,0))
  3402. MakeForm(RAY,"Cyl")
  3403. local SPHERE = CreatePart(3, Effects, "Neon", 0, 0, "Really red", "Strike", VT(0,0,0))
  3404. MakeForm(SPHERE,"Ball")
  3405. local SHIELD = CreatePart(3, Effects, "Neon", 0, 0.5, "Really black", "Strike", VT(0,0,0))
  3406. MakeForm(SHIELD,"Ball")
  3407. SHIELD.CFrame = CF(POS)
  3408. RAY.CFrame = CF(POS)
  3409. SPHERE.CFrame = CF(POS)
  3410. CreateSound(440145570, SPHERE, 10, 0.8, false)
  3411. CreateSound(415700134, SPHERE, 10, 0.8, false)
  3412. for i = 1, 200 do
  3413. Swait()
  3414. WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(0,0,0), Size2 = VT(SPHERE.Size.X*1.2,5+(i),SPHERE.Size.X*1.2), Transparency = 0, Transparency2 = 1, CFrame = SPHERE.CFrame*ANGLES(RAD(0), RAD(i), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  3415. RAY.Size = RAY.Size + VT(0.05,0,0.05)
  3416. SPHERE.Size = SPHERE.Size + VT(2,2,2)
  3417. SHIELD.Size = SPHERE.Size + VT(3,3,3)
  3418. ApplyAoE(SPHERE.Position,SPHERE.Size.X/2,true)
  3419. end
  3420. for i = 1, 45 do
  3421. Swait()
  3422. RAY.Transparency = RAY.Transparency + 1/45
  3423. SPHERE.Transparency = RAY.Transparency
  3424. SHIELD.Transparency = SPHERE.Transparency + 1/45
  3425. end
  3426. RAY:remove()
  3427. SHIELD:remove()
  3428. SPHERE:remove()
  3429. end))
  3430. for i=0, 1, 0.1 / Animation_Speed do
  3431. Swait()
  3432. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed)
  3433. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  3434. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.15) * ANGLES(RAD(65), RAD(-45), RAD(85)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  3435. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.15) * ANGLES(RAD(65), RAD(45), RAD(-85)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  3436. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-35-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  3437. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-35-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  3438. end
  3439. ATTACK = false
  3440. Rooted = false
  3441. end
  3442.  
  3443. function Shot()
  3444. ATTACK = true
  3445. Rooted = false
  3446. for i=0, 0.05, 0.1 / Animation_Speed do
  3447. Swait()
  3448. turnto(Mouse.Hit.p)
  3449. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
  3450. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
  3451. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  3452. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  3453. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  3454. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  3455. end
  3456. repeat
  3457. for i=0, 0.05, 0.1 / Animation_Speed do
  3458. Swait()
  3459. turnto(Mouse.Hit.p)
  3460. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
  3461. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
  3462. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  3463. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  3464. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  3465. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  3466. end
  3467. local HIT,POS = CastProperRay(Hole.Position, Mouse.Hit.p, 1000, Character)
  3468. SpawnTrail(Hole.Position,POS)
  3469. if HIT ~= nil then
  3470. if HIT.Parent ~= workspace and HIT.Parent.ClassName ~= "Folder" then
  3471. Banish(HIT.Parent)
  3472. end
  3473. end
  3474. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(6,7.5,6), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = Hole.CFrame*CF(0,0.5,0).p, RotationX = 0, RotationY = -15, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  3475. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(6,6.5,6), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = 904440937, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
  3476. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(6,6.5,6), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = -5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
  3477. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(6,6.5,6), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
  3478. for i=0, 0.05, 0.1 / Animation_Speed do
  3479. Swait()
  3480. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
  3481. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.25 / Animation_Speed)
  3482. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(15), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  3483. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  3484. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  3485. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  3486. end
  3487. until KEYHOLD == false
  3488. ATTACK = false
  3489. Rooted = false
  3490. end
  3491.  
  3492. function AttackTemplate()
  3493. ATTACK = true
  3494. Rooted = false
  3495. for i=0, 1, 0.1 / Animation_Speed do
  3496. Swait()
  3497. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3498. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3499. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  3500. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  3501. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3502. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3503. end
  3504. ATTACK = false
  3505. Rooted = false
  3506. end
  3507.  
  3508. --//=================================\\
  3509. --|| ASSIGN THINGS TO KEYS
  3510. --\\=================================//
  3511.  
  3512. function MouseDown(Mouse)
  3513. if ATTACK == false then
  3514. end
  3515. end
  3516.  
  3517. function MouseUp(Mouse)
  3518. HOLD = false
  3519. end
  3520.  
  3521. function KeyDown(Key)
  3522. KEYHOLD = true
  3523. if Key == "z" and ATTACK == false then
  3524. Shot()
  3525. end
  3526.  
  3527. if Key == "q" and ATTACK == false then
  3528. Morning_Star()
  3529. end
  3530.  
  3531. if Key == "f" and ATTACK == false then
  3532. Supernova()
  3533. end
  3534.  
  3535. if Key == "e" and ATTACK == false then
  3536. DeathAgreement()
  3537. end
  3538.  
  3539. if Key == "b" and ATTACK == false then
  3540. end
  3541.  
  3542. if Key == "c" and ATTACK == false then
  3543. end
  3544.  
  3545. if Key == "q" and ATTACK == false then
  3546. end
  3547.  
  3548. if Key == "x" and ATTACK == false then
  3549. end
  3550. end
  3551.  
  3552. function KeyUp(Key)
  3553. KEYHOLD = false
  3554. end
  3555.  
  3556. Mouse.Button1Down:connect(function(NEWKEY)
  3557. MouseDown(NEWKEY)
  3558. end)
  3559. Mouse.Button1Up:connect(function(NEWKEY)
  3560. MouseUp(NEWKEY)
  3561. end)
  3562. Mouse.KeyDown:connect(function(NEWKEY)
  3563. KeyDown(NEWKEY)
  3564. end)
  3565. Mouse.KeyUp:connect(function(NEWKEY)
  3566. KeyUp(NEWKEY)
  3567. end)
  3568.  
  3569. --//=================================\\
  3570. --\\=================================//
  3571.  
  3572.  
  3573. function unanchor()
  3574. if UNANCHOR == true then
  3575. g = Character:GetChildren()
  3576. for i = 1, #g do
  3577. if g[i].ClassName == "Part" then
  3578. g[i].Anchored = false
  3579. end
  3580. end
  3581. end
  3582. end
  3583.  
  3584.  
  3585. --//=================================\\
  3586. --|| WRAP THE WHOLE SCRIPT UP
  3587. --\\=================================//
  3588.  
  3589. Humanoid.Changed:connect(function(Jump)
  3590. if Jump == "Jump" and (Disable_Jump == true) then
  3591. Humanoid.Jump = false
  3592. end
  3593. end)
  3594.  
  3595. local CONNECT = nil
  3596.  
  3597. while true do
  3598. Swait()
  3599. ANIMATE.Parent = nil
  3600. if Character:FindFirstChildOfClass("Humanoid") == nil then
  3601. Humanoid = IT("Humanoid",Character)
  3602. end
  3603. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  3604. v:Stop();
  3605. end
  3606. SINE = SINE + CHANGE
  3607. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  3608. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  3609. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  3610. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  3611. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  3612. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  3613. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  3614. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  3615. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  3616. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  3617. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3618. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3619. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3620. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3621. end
  3622. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  3623. ANIM = "Jump"
  3624. if ATTACK == false then
  3625. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3626. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3627. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  3628. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  3629. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  3630. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  3631. end
  3632. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  3633. ANIM = "Fall"
  3634. if ATTACK == false then
  3635. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3636. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3637. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  3638. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  3639. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  3640. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  3641. end
  3642. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  3643. ANIM = "Idle"
  3644. if ATTACK == false then
  3645. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 0.15 / Animation_Speed)
  3646. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.15 / Animation_Speed)
  3647. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.5) * ANGLES(RAD(75), RAD(45), RAD(-25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  3648. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  3649. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3650. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3651. end
  3652. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  3653. ANIM = "Walk"
  3654. if ATTACK == false then
  3655. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3656. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3657. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.1, -0.4) * ANGLES(RAD(150), RAD(0), RAD(0))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  3658. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
  3659. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
  3660. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
  3661. end
  3662. end
  3663. unanchor()
  3664. Humanoid.MaxHealth = "inf"
  3665. Humanoid.Health = "inf"
  3666. if Rooted == false then
  3667. Disable_Jump = false
  3668. Humanoid.WalkSpeed = Speed
  3669. elseif Rooted == true then
  3670. Disable_Jump = true
  3671. Humanoid.WalkSpeed = 0
  3672. end
  3673. sick.Parent = Torso
  3674. sick:resume()
  3675. sick.Volume = 8.2
  3676. sick.Pitch = 1
  3677. sick.SoundId = "rbxassetid://151224226"
  3678. sick.Name = "Dead"
  3679. end
  3680.  
  3681. --//=================================\\
  3682. --\\=================================//
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688. --//====================================================\\--
  3689. --|| END OF SCRIPT
  3690. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement