Advertisement
Infintyboy

test script

Sep 22nd, 2018
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 143.41 KB | None | 0 0
  1. wait()
  2. wait()
  3. wait()
  4. wait()
  5. wait()
  6. wait()
  7. wait()
  8. wait()
  9. wait()
  10. wait()
  11. wait()
  12. wait()
  13. wait()
  14. wait()
  15. wait()
  16. wait()
  17. wait()
  18. wait()
  19. wait()
  20. wait()
  21. wait()
  22. wait()
  23. wait()
  24. wait()
  25. wait()
  26. wait()
  27. wait()
  28. wait()
  29. wait()
  30. wait()
  31. wait()
  32. wait()
  33. wait()
  34. wait()
  35. wait()
  36. wait()
  37. wait()
  38. wait()
  39. wait(1)
  40.  
  41. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  42. local Player,game,owner = owner,game
  43. local RealPlayer = Player
  44. do
  45.     local rp = RealPlayer
  46.     script.Parent = rp.Character
  47.    
  48.     --RemoteEvent for communicating
  49.     local Event = Instance.new("RemoteEvent")
  50.     Event.Name = "UserInput_Event"
  51.  
  52.     --Fake event to make stuff like Mouse.KeyDown work
  53.     local function fakeEvent()
  54.         local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  55.         t.connect = t.Connect
  56.         return t
  57.     end
  58.  
  59.     --Creating fake input objects with fake variables
  60.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  61.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  62.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  63.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  64.     end}
  65.     --Merged 2 functions into one by checking amount of arguments
  66.     CAS.UnbindAction = CAS.BindAction
  67.  
  68.     --This function will trigger the events that have been :Connect()'ed
  69.     local function te(self,ev,...)
  70.         local t = m[ev]
  71.         if t and t._fakeEvent then
  72.             for _,f in pairs(t.Functions) do
  73.                 f(...)
  74.             end
  75.         end
  76.     end
  77.     m.TrigEvent = te
  78.     UIS.TrigEvent = te
  79.  
  80.     Event.OnServerEvent:Connect(function(plr,io)
  81.         if plr~=rp then return end
  82.         m.Target = io.Target
  83.         m.Hit = io.Hit
  84.         if not io.isMouse then
  85.             local b = io.UserInputState == Enum.UserInputState.Begin
  86.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  87.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  88.             end
  89.             for _,t in pairs(CAS.Actions) do
  90.                 for _,k in pairs(t.Keys) do
  91.                     if k==io.KeyCode then
  92.                         t.Function(t.Name,io.UserInputState,io)
  93.                     end
  94.                 end
  95.             end
  96.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  97.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  98.         end
  99.     end)
  100.     Event.Parent = NLS([==[
  101.     local Player = game:GetService("Players").LocalPlayer
  102.     local Event = script:WaitForChild("UserInput_Event")
  103.  
  104.     local Mouse = Player:GetMouse()
  105.     local UIS = game:GetService("UserInputService")
  106.     local input = function(io,a)
  107.         if a then return end
  108.         --Since InputObject is a client-side instance, we create and pass table instead
  109.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  110.     end
  111.     UIS.InputBegan:Connect(input)
  112.     UIS.InputEnded:Connect(input)
  113.  
  114.     local h,t
  115.     --Give the server mouse data 30 times every second, but only if the values changed
  116.     --If player is not moving their mouse, client won't fire events
  117.     while wait(1/30) do
  118.         if h~=Mouse.Hit or t~=Mouse.Target then
  119.             h,t=Mouse.Hit,Mouse.Target
  120.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  121.         end
  122.     end]==],Player.Character)
  123.  
  124.     ----Sandboxed game object that allows the usage of client-side methods and services
  125.     --Real game object
  126.     local _rg = game
  127.  
  128.     --Metatable for fake service
  129.     local fsmt = {
  130.         __index = function(self,k)
  131.             local s = rawget(self,"_RealService")
  132.             if s then return s[k] end
  133.         end,
  134.         __newindex = function(self,k,v)
  135.             local s = rawget(self,"_RealService")
  136.             if s then s[k]=v end
  137.         end,
  138.         __call = function(self,...)
  139.             local s = rawget(self,"_RealService")
  140.             if s then return s(...) end
  141.         end
  142.     }
  143.     local function FakeService(t,RealService)
  144.         t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  145.         return setmetatable(t,fsmt)
  146.     end
  147.  
  148.     --Fake game object
  149.     local g = {
  150.         GetService = function(self,s)
  151.             return self[s]
  152.         end,
  153.         Players = FakeService({
  154.             LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  155.         },"Players"),
  156.         UserInputService = FakeService(UIS,"UserInputService"),
  157.         ContextActionService = FakeService(CAS,"ContextActionService"),
  158.     }
  159.     rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  160.     g.service = g.GetService
  161.    
  162.     g.RunService = FakeService({
  163.         RenderStepped = _rg:GetService("RunService").Heartbeat,
  164.         BindToRenderStep = function(self,name,_,fun)
  165.             self._btrs[name] = self.Heartbeat:Connect(fun)
  166.         end,
  167.         UnbindFromRenderStep = function(self,name)
  168.             self._btrs[name]:Disconnect()
  169.         end,
  170.     },"RunService")
  171.  
  172.     setmetatable(g,{
  173.         __index=function(self,s)
  174.             return _rg:GetService(s) or typeof(_rg[s])=="function"
  175.             and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  176.         end,
  177.         __newindex = fsmt.__newindex,
  178.         __call = fsmt.__call
  179.     })
  180.     --Changing owner to fake player object to support owner:GetMouse()
  181.     game,owner = g,g.Players.LocalPlayer
  182. end
  183.  
  184. Player = owner
  185. PlayerGui = Player.PlayerGui
  186. Cam = workspace.CurrentCamera
  187. Backpack = Player.Backpack
  188. Character = Player.Character
  189. Humanoid = Character.Humanoid
  190. Mouse = Player:GetMouse()
  191. RootPart = Character["HumanoidRootPart"]
  192. Torso = Character["Torso"]
  193. Head = Character["Head"]
  194. RightArm = Character["Right Arm"]
  195. LeftArm = Character["Left Arm"]
  196. RightLeg = Character["Right Leg"]
  197. LeftLeg = Character["Left Leg"]
  198. RootJoint = RootPart["RootJoint"]
  199. Neck = Torso["Neck"]
  200. RightShoulder = Torso["Right Shoulder"]
  201. LeftShoulder = Torso["Left Shoulder"]
  202. RightHip = Torso["Right Hip"]
  203. LeftHip = Torso["Left Hip"]
  204.  
  205. Character = Player.Character
  206. Humanoid = Character.Humanoid
  207.  
  208. IT = Instance.new
  209. CF = CFrame.new
  210. VT = Vector3.new
  211. RAD = math.rad
  212. C3 = Color3.new
  213. UD2 = UDim2.new
  214. BRICKC = BrickColor.new
  215. ANGLES = CFrame.Angles
  216. EULER = CFrame.fromEulerAnglesXYZ
  217. COS = math.cos
  218. ACOS = math.acos
  219. SIN = math.sin
  220. ASIN = math.asin
  221. ABS = math.abs
  222. MRANDOM = math.random
  223. FLOOR = math.floor
  224.  
  225. --//=================================\\
  226. --||          USEFUL VALUES
  227. --\\=================================//
  228.  
  229. Animation_Speed = 3
  230. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  231. local Speed = 25
  232. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  233. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  234. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  235. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  236. local DAMAGEMULTIPLIER = 1
  237. local ANIM = "Idle"
  238. local ATTACK = false
  239. local EQUIPPED = false
  240. local HOLD = false
  241. local COMBO = 1
  242. local Rooted = false
  243. local SINE = 0
  244. local KEYHOLD = false
  245. local CHANGE = 2 / Animation_Speed
  246. local WALKINGANIM = false
  247. local VALUE1 = false
  248. local VALUE2 = false
  249. local ROBLOXIDLEANIMATION = IT("Animation")
  250. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  251. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  252. --ROBLOXIDLEANIMATION.Parent = Humanoid
  253. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  254. WEAPONGUI.Name = "Weapon GUI"
  255. local Effects = IT("Folder", Character)
  256. Effects.Name = "Effects"
  257. local ANIMATOR = Humanoid.Animator
  258. local ANIMATE = Character.Animate
  259. local UNANCHOR = true
  260. local PLAYMAINANIM = true
  261. local BOLTSOUNDS = {168586621,168586586,178452241}
  262.  
  263. --//=================================\\
  264. --\\=================================//
  265.  
  266. wait(1)
  267. plr = game.Players.LocalPlayer
  268. char = plr.Character
  269. local larm = char["Left Arm"]
  270. local rarm = char["Right Arm"]
  271. local lleg = char["Left Leg"]
  272. local rleg = char["Right Leg"]
  273. local hed = char.Head
  274. local torso = char.Torso
  275. local hum = char.Humanoid
  276. local cam = game.Workspace.CurrentCamera
  277. local root = char.HumanoidRootPart
  278. local RootPart = root
  279. local l = game:GetService("Lighting")
  280. local debris = game:GetService("Debris")
  281. local rs = game:GetService("RunService").RenderStepped
  282. local Damaged = {}
  283. it = Instance.new
  284. vt = Vector3.new
  285. cn = CFrame.new
  286. euler = CFrame.fromEulerAnglesXYZ
  287. angles = CFrame.Angles
  288. mouse = plr:GetMouse()
  289. whitecolor = Color3.new(255,255,255)
  290. epicmode = false
  291. normal = true
  292. for i,v in pairs(char:GetChildren()) do
  293.    if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "ShirtGraphic" then
  294.       v:Destroy()
  295.      end
  296. end
  297. local shirt = Instance.new("Shirt",char)
  298. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=144423481"
  299. local pants = Instance.new("Pants",char)
  300. pants.PantsTemplate = "http://www.roblox.com/asset/?id=138981718"
  301. local bdycolors = char["Body Colors"]
  302. bdycolors.HeadColor3 = whitecolor
  303. bdycolors.LeftArmColor3 = whitecolor
  304. bdycolors.LeftLegColor3 = whitecolor
  305. bdycolors.RightArmColor3 = whitecolor
  306. bdycolors.RightLegColor3 = whitecolor
  307. bdycolors.TorsoColor3 = whitecolor
  308. for i,v in pairs(char:GetChildren()) do
  309.     if v.ClassName == "Hat" or v.ClassName == "Accessory" then
  310.         v:Destroy()
  311.     end
  312. end
  313. --//=================================\\
  314. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  315. --\\=================================//
  316.  
  317. ArtificialHB = Instance.new("BindableEvent", script)
  318. ArtificialHB.Name = "ArtificialHB"
  319.  
  320. script:WaitForChild("ArtificialHB")
  321.  
  322. frame = Frame_Speed
  323. tf = 0
  324. allowframeloss = false
  325. tossremainder = false
  326. lastframe = tick()
  327. script.ArtificialHB:Fire()
  328.  
  329. game:GetService("RunService").Heartbeat:connect(function(s, p)
  330.     tf = tf + s
  331.     if tf >= frame then
  332.         if allowframeloss then
  333.             script.ArtificialHB:Fire()
  334.             lastframe = tick()
  335.         else
  336.             for i = 1, math.floor(tf / frame) do
  337.                 script.ArtificialHB:Fire()
  338.             end
  339.         lastframe = tick()
  340.         end
  341.         if tossremainder then
  342.             tf = 0
  343.         else
  344.             tf = tf - frame * math.floor(tf / frame)
  345.         end
  346.     end
  347. end)
  348.  
  349. --//=================================\\
  350. --\\=================================//
  351.  
  352. --//=================================\\
  353. --||          SOME FUNCTIONS
  354. --\\=================================//
  355. -------1
  356. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  357.     return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  358. end
  359.  
  360. function PositiveAngle(NUMBER)
  361.     if NUMBER >= 0 then
  362.         NUMBER = 0
  363.     end
  364.     return NUMBER
  365. end
  366.  
  367. function NegativeAngle(NUMBER)
  368.     if NUMBER <= 0 then
  369.         NUMBER = 0
  370.     end
  371.     return NUMBER
  372. end
  373.  
  374. function Swait(NUMBER)
  375.     if NUMBER == 0 or NUMBER == nil then
  376.         ArtificialHB.Event:wait()
  377.     else
  378.         for i = 1, NUMBER do
  379.             ArtificialHB.Event:wait()
  380.         end
  381.     end
  382. end
  383.  
  384. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  385.     local NEWMESH = IT(MESH)
  386.     if MESH == "SpecialMesh" then
  387.         NEWMESH.MeshType = MESHTYPE
  388.         if MESHID ~= "nil" and MESHID ~= "" then
  389.             NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  390.         end
  391.         if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  392.             NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  393.         end
  394.     end
  395.     NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  396.     NEWMESH.Scale = SCALE
  397.     NEWMESH.Parent = PARENT
  398.     return NEWMESH
  399. end
  400.  
  401. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  402.     local NEWPART = IT("Part")
  403.     NEWPART.formFactor = FORMFACTOR
  404.     NEWPART.Reflectance = REFLECTANCE
  405.     NEWPART.Transparency = TRANSPARENCY
  406.     NEWPART.CanCollide = false
  407.     NEWPART.Locked = true
  408.     NEWPART.Anchored = true
  409.     if ANCHOR == false then
  410.         NEWPART.Anchored = false
  411.     end
  412.     NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  413.     NEWPART.Name = NAME
  414.     NEWPART.Size = SIZE
  415.     NEWPART.Position = Torso.Position
  416.     NEWPART.Material = MATERIAL
  417.     NEWPART:BreakJoints()
  418.     NEWPART.Parent = PARENT
  419.     return NEWPART
  420. end
  421.  
  422.     local function weldBetween(a, b)
  423.         local weldd = Instance.new("ManualWeld")
  424.         weldd.Part0 = a
  425.         weldd.Part1 = b
  426.         weldd.C0 = CFrame.new()
  427.         weldd.C1 = b.CFrame:inverse() * a.CFrame
  428.         weldd.Parent = a
  429.         return weldd
  430.     end
  431.  
  432.  
  433. function QuaternionFromCFrame(cf)
  434.     local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  435.     local trace = m00 + m11 + m22
  436.     if trace > 0 then
  437.         local s = math.sqrt(1 + trace)
  438.         local recip = 0.5 / s
  439.         return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  440.     else
  441.         local i = 0
  442.         if m11 > m00 then
  443.             i = 1
  444.         end
  445.         if m22 > (i == 0 and m00 or m11) then
  446.             i = 2
  447.         end
  448.         if i == 0 then
  449.             local s = math.sqrt(m00 - m11 - m22 + 1)
  450.             local recip = 0.5 / s
  451.             return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  452.         elseif i == 1 then
  453.             local s = math.sqrt(m11 - m22 - m00 + 1)
  454.             local recip = 0.5 / s
  455.             return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  456.         elseif i == 2 then
  457.             local s = math.sqrt(m22 - m00 - m11 + 1)
  458.             local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  459.         end
  460.     end
  461. end
  462.  
  463. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  464.     local xs, ys, zs = x + x, y + y, z + z
  465.     local wx, wy, wz = w * xs, w * ys, w * zs
  466.     local xx = x * xs
  467.     local xy = x * ys
  468.     local xz = x * zs
  469.     local yy = y * ys
  470.     local yz = y * zs
  471.     local zz = z * zs
  472.     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))
  473. end
  474.  
  475. function QuaternionSlerp(a, b, t)
  476.     local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  477.     local startInterp, finishInterp;
  478.     if cosTheta >= 0.0001 then
  479.         if (1 - cosTheta) > 0.0001 then
  480.             local theta = ACOS(cosTheta)
  481.             local invSinTheta = 1 / SIN(theta)
  482.             startInterp = SIN((1 - t) * theta) * invSinTheta
  483.             finishInterp = SIN(t * theta) * invSinTheta
  484.         else
  485.             startInterp = 1 - t
  486.             finishInterp = t
  487.         end
  488.     else
  489.         if (1 + cosTheta) > 0.0001 then
  490.             local theta = ACOS(-cosTheta)
  491.             local invSinTheta = 1 / SIN(theta)
  492.             startInterp = SIN((t - 1) * theta) * invSinTheta
  493.             finishInterp = SIN(t * theta) * invSinTheta
  494.         else
  495.             startInterp = t - 1
  496.             finishInterp = t
  497.         end
  498.     end
  499.     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
  500. end
  501.  
  502. function Clerp(a, b, t)
  503.     local qa = {QuaternionFromCFrame(a)}
  504.     local qb = {QuaternionFromCFrame(b)}
  505.     local ax, ay, az = a.x, a.y, a.z
  506.     local bx, by, bz = b.x, b.y, b.z
  507.     local _t = 1 - t
  508.     return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  509. end
  510.  
  511. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  512.     local frame = IT("Frame")
  513.     frame.BackgroundTransparency = TRANSPARENCY
  514.     frame.BorderSizePixel = BORDERSIZEPIXEL
  515.     frame.Position = POSITION
  516.     frame.Size = SIZE
  517.     frame.BackgroundColor3 = COLOR
  518.     frame.BorderColor3 = BORDERCOLOR
  519.     frame.Name = NAME
  520.     frame.Parent = PARENT
  521.     return frame
  522. end
  523.  
  524. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  525.     local label = IT("TextLabel")
  526.     label.BackgroundTransparency = 1
  527.     label.Size = UD2(1, 0, 1, 0)
  528.     label.Position = UD2(0, 0, 0, 0)
  529.     label.TextColor3 = TEXTCOLOR
  530.     label.TextStrokeColor3 = BRICKC"Really white".Color
  531.     label.TextStrokeTransparency = STROKETRANSPARENCY
  532.     label.TextTransparency = TRANSPARENCY
  533.     label.FontSize = TEXTFONTSIZE
  534.     label.Font = TEXTFONT
  535.     label.BorderSizePixel = BORDERSIZEPIXEL
  536.     label.TextScaled = false
  537.     label.Text = TEXT
  538.     label.Name = NAME
  539.     label.Parent = PARENT
  540.     return label
  541. end
  542.  
  543. function NoOutlines(PART)
  544.     PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  545. end
  546.  
  547. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  548.     local NEWWELD = IT(TYPE)
  549.     NEWWELD.Part0 = PART0
  550.     NEWWELD.Part1 = PART1
  551.     NEWWELD.C0 = C0
  552.     NEWWELD.C1 = C1
  553.     NEWWELD.Parent = PARENT
  554.     return NEWWELD
  555. end
  556.  
  557. local S = IT("Sound")
  558. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  559.     local NEWSOUND = nil
  560.     coroutine.resume(coroutine.create(function()
  561.         NEWSOUND = S:Clone()
  562.         NEWSOUND.Parent = PARENT
  563.         NEWSOUND.Volume = VOLUME
  564.         NEWSOUND.Pitch = PITCH
  565.         NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  566.         NEWSOUND:play()
  567.         NEWSOUND.Name = "Audio"
  568.         if DOESLOOP == true then
  569.             NEWSOUND.Looped = true
  570.         else
  571.             repeat Swait() until NEWSOUND.Playing == false
  572.             NEWSOUND:remove()
  573.         end
  574.     end))
  575.     return NEWSOUND
  576. end
  577.  
  578. function CFrameFromTopBack(at, top, back)
  579.     local right = top:Cross(back)
  580.     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)
  581. end
  582.  
  583. --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})
  584. function WACKYEFFECT(Table)
  585.     local TYPE = (Table.EffectType or "Sphere")
  586.     local SIZE = (Table.Size or VT(1,1,1))
  587.     local ENDSIZE = (Table.Size2 or VT(0,0,0))
  588.     local TRANSPARENCY = (Table.Transparency or 0)
  589.     local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  590.     local CFRAME = (Table.CFrame or Torso.CFrame)
  591.     local MOVEDIRECTION = (Table.MoveToPos or nil)
  592.     local ROTATION1 = (Table.RotationX or 0)
  593.     local ROTATION2 = (Table.RotationY or 0)
  594.     local ROTATION3 = (Table.RotationZ or 0)
  595.     local MATERIAL = (Table.Material or "Neon")
  596.     local COLOR = (Table.Color or C3(1,1,1))
  597.     local TIME = (Table.Time or 45)
  598.     local SOUNDID = (Table.SoundID or nil)
  599.     local SOUNDPITCH = (Table.SoundPitch or nil)
  600.     local SOUNDVOLUME = (Table.SoundVolume or nil)
  601.     coroutine.resume(coroutine.create(function()
  602.         local PLAYSSOUND = false
  603.         local SOUND = nil
  604.         local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  605.         if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  606.             PLAYSSOUND = true
  607.             SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  608.         end
  609.         EFFECT.Color = COLOR
  610.         local MSH = nil
  611.         if TYPE == "Sphere" then
  612.             MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  613.         elseif TYPE == "Block" then
  614.             MSH = IT("BlockMesh",EFFECT)
  615.             MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  616.         elseif TYPE == "Box" then
  617.             MSH = IT("BlockMesh",EFFECT)
  618.             MSH.Scale = SIZE
  619.         elseif TYPE == "Wave" then
  620.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  621.         elseif TYPE == "Ring" then
  622.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  623.         elseif TYPE == "Slash" then
  624.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  625.         elseif TYPE == "Round Slash" then
  626.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  627.         elseif TYPE == "Swirl" then
  628.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  629.         elseif TYPE == "Skull" then
  630.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  631.         elseif TYPE == "Crystal" then
  632.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  633.         end
  634.         if MSH ~= nil then
  635.             local MOVESPEED = nil
  636.             if MOVEDIRECTION ~= nil then
  637.                 MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  638.             end
  639.             local GROWTH = SIZE - ENDSIZE
  640.             local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  641.             if TYPE == "Block" then
  642.                 EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  643.             else
  644.                 EFFECT.CFrame = CFRAME
  645.             end
  646.             for LOOP = 1, TIME do
  647.                 Swait()
  648.                 MSH.Scale = MSH.Scale - GROWTH/TIME
  649.                 if TYPE == "Wave" then
  650.                     MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  651.                 end
  652.                 EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  653.                 if TYPE == "Block" then
  654.                     EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  655.                 else
  656.                     EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  657.                 end
  658.                 if MOVEDIRECTION ~= nil then
  659.                     local ORI = EFFECT.Orientation
  660.                     EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  661.                     EFFECT.Orientation = ORI
  662.                 end
  663.             end
  664.             if PLAYSSOUND == false then
  665.                 EFFECT:remove()
  666.             else
  667.                 repeat Swait() until SOUND.Playing == false
  668.                 EFFECT:remove()
  669.             end
  670.         else
  671.             if PLAYSSOUND == false then
  672.                 EFFECT:remove()
  673.             else
  674.                 repeat Swait() until SOUND.Playing == false
  675.                 EFFECT:remove()
  676.             end
  677.         end
  678.     end))
  679. end
  680.  
  681. function Shatter(Part)
  682.     if Part.Transparency == 0 then
  683.         local SOUNDPART = CreatePart(3, Effects, "Neon", 0, 1, Part.BrickColor, "OOF", VT(0,0,0))
  684.         Debris:AddItem(SOUNDPART,5)
  685.         CreateSound("84005018", SOUNDPART, 3, MRANDOM(8,12)/10, false)
  686.         local SIZE = Part.Size.X + Part.Size.Y + Part.Size.Z
  687.         local SIZESET = SIZE/4
  688.         local XOffset = Part.Size.X*1.5/SIZESET
  689.         local YOffset = Part.Size.Y*1.5/SIZESET
  690.         local ZOffset = Part.Size.Z*1.5/SIZESET
  691.         for x = 1, math.ceil(XOffset) do
  692.             for y = 1, math.ceil(YOffset) do
  693.                 for z = 1, math.ceil(ZOffset) do
  694.                     local SHARD = CreatePart(3, Effects, "Neon", 0, 0, Part.BrickColor, "Shard", VT(SIZE,SIZE,SIZE)/10, false)
  695.                     SHARD.CanCollide = true
  696.                     SHARD.CFrame = Part.CFrame*CF((Part.Size.X/2-x/4),(Part.Size.Y/2-y/4),(Part.Size.Z/2-z/4))
  697.                     SHARD.Velocity = VT(MRANDOM(-15,15),MRANDOM(-15,15),MRANDOM(-15,15))*3
  698.                     Debris:AddItem(SHARD,MRANDOM(10,25)/3)
  699.                 end
  700.             end
  701.         end
  702.     end
  703.     Part:remove()
  704. end
  705.  
  706. function MakeForm(PART,TYPE)
  707.     if TYPE == "Cyl" then
  708.         local MSH = IT("CylinderMesh",PART)
  709.     elseif TYPE == "Ball" then
  710.         local MSH = IT("SpecialMesh",PART)
  711.         MSH.MeshType = "Sphere"
  712.     elseif TYPE == "Wedge" then
  713.         local MSH = IT("SpecialMesh",PART)
  714.         MSH.MeshType = "Wedge"
  715.     end
  716. end
  717.  
  718. Debris = game:GetService("Debris")
  719.  
  720. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  721.     local DIRECTION = CF(StartPos,EndPos).lookVector
  722.     return Raycast(StartPos, DIRECTION, Distance, Ignore)
  723. end
  724.  
  725. function turnto(position)
  726.     RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  727. end
  728.  
  729. -------1
  730. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  731.     return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  732. end
  733.  
  734. function PositiveAngle(NUMBER)
  735.     if NUMBER >= 0 then
  736.         NUMBER = 0
  737.     end
  738.     return NUMBER
  739. end
  740.  
  741. function NegativeAngle(NUMBER)
  742.     if NUMBER <= 0 then
  743.         NUMBER = 0
  744.     end
  745.     return NUMBER
  746. end
  747.  
  748. function Swait(NUMBER)
  749.     if NUMBER == 0 or NUMBER == nil then
  750.         ArtificialHB.Event:wait()
  751.     else
  752.         for i = 1, NUMBER do
  753.             ArtificialHB.Event:wait()
  754.         end
  755.     end
  756. end
  757.  
  758. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  759.     local NEWMESH = IT(MESH)
  760.     if MESH == "SpecialMesh" then
  761.         NEWMESH.MeshType = MESHTYPE
  762.         if MESHID ~= "nil" and MESHID ~= "" then
  763.             NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  764.         end
  765.         if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  766.             NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  767.         end
  768.     end
  769.     NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  770.     NEWMESH.Scale = SCALE
  771.     NEWMESH.Parent = PARENT
  772.     return NEWMESH
  773. end
  774.  
  775. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  776.     local NEWPART = IT("Part")
  777.     NEWPART.formFactor = FORMFACTOR
  778.     NEWPART.Reflectance = REFLECTANCE
  779.     NEWPART.Transparency = TRANSPARENCY
  780.     NEWPART.CanCollide = false
  781.     NEWPART.Locked = true
  782.     NEWPART.Anchored = true
  783.     if ANCHOR == false then
  784.         NEWPART.Anchored = false
  785.     end
  786.     NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  787.     NEWPART.Name = NAME
  788.     NEWPART.Size = SIZE
  789.     NEWPART.Position = Torso.Position
  790.     NEWPART.Material = MATERIAL
  791.     NEWPART:BreakJoints()
  792.     NEWPART.Parent = PARENT
  793.     return NEWPART
  794. end
  795.  
  796.     local function weldBetween(a, b)
  797.         local weldd = Instance.new("ManualWeld")
  798.         weldd.Part0 = a
  799.         weldd.Part1 = b
  800.         weldd.C0 = CFrame.new()
  801.         weldd.C1 = b.CFrame:inverse() * a.CFrame
  802.         weldd.Parent = a
  803.         return weldd
  804.     end
  805.  
  806.  
  807. function QuaternionFromCFrame(cf)
  808.     local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  809.     local trace = m00 + m11 + m22
  810.     if trace > 0 then
  811.         local s = math.sqrt(1 + trace)
  812.         local recip = 0.5 / s
  813.         return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  814.     else
  815.         local i = 0
  816.         if m11 > m00 then
  817.             i = 1
  818.         end
  819.         if m22 > (i == 0 and m00 or m11) then
  820.             i = 2
  821.         end
  822.         if i == 0 then
  823.             local s = math.sqrt(m00 - m11 - m22 + 1)
  824.             local recip = 0.5 / s
  825.             return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  826.         elseif i == 1 then
  827.             local s = math.sqrt(m11 - m22 - m00 + 1)
  828.             local recip = 0.5 / s
  829.             return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  830.         elseif i == 2 then
  831.             local s = math.sqrt(m22 - m00 - m11 + 1)
  832.             local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  833.         end
  834.     end
  835. end
  836.  
  837. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  838.     local xs, ys, zs = x + x, y + y, z + z
  839.     local wx, wy, wz = w * xs, w * ys, w * zs
  840.     local xx = x * xs
  841.     local xy = x * ys
  842.     local xz = x * zs
  843.     local yy = y * ys
  844.     local yz = y * zs
  845.     local zz = z * zs
  846.     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))
  847. end
  848.  
  849. function QuaternionSlerp(a, b, t)
  850.     local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  851.     local startInterp, finishInterp;
  852.     if cosTheta >= 0.0001 then
  853.         if (1 - cosTheta) > 0.0001 then
  854.             local theta = ACOS(cosTheta)
  855.             local invSinTheta = 1 / SIN(theta)
  856.             startInterp = SIN((1 - t) * theta) * invSinTheta
  857.             finishInterp = SIN(t * theta) * invSinTheta
  858.         else
  859.             startInterp = 1 - t
  860.             finishInterp = t
  861.         end
  862.     else
  863.         if (1 + cosTheta) > 0.0001 then
  864.             local theta = ACOS(-cosTheta)
  865.             local invSinTheta = 1 / SIN(theta)
  866.             startInterp = SIN((t - 1) * theta) * invSinTheta
  867.             finishInterp = SIN(t * theta) * invSinTheta
  868.         else
  869.             startInterp = t - 1
  870.             finishInterp = t
  871.         end
  872.     end
  873.     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
  874. end
  875.  
  876. function Clerp(a, b, t)
  877.     local qa = {QuaternionFromCFrame(a)}
  878.     local qb = {QuaternionFromCFrame(b)}
  879.     local ax, ay, az = a.x, a.y, a.z
  880.     local bx, by, bz = b.x, b.y, b.z
  881.     local _t = 1 - t
  882.     return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  883. end
  884.  
  885. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  886.     local frame = IT("Frame")
  887.     frame.BackgroundTransparency = TRANSPARENCY
  888.     frame.BorderSizePixel = BORDERSIZEPIXEL
  889.     frame.Position = POSITION
  890.     frame.Size = SIZE
  891.     frame.BackgroundColor3 = COLOR
  892.     frame.BorderColor3 = BORDERCOLOR
  893.     frame.Name = NAME
  894.     frame.Parent = PARENT
  895.     return frame
  896. end
  897.  
  898. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  899.     local label = IT("TextLabel")
  900.     label.BackgroundTransparency = 1
  901.     label.Size = UD2(1, 0, 1, 0)
  902.     label.Position = UD2(0, 0, 0, 0)
  903.     label.TextColor3 = TEXTCOLOR
  904.     label.TextStrokeTransparency = STROKETRANSPARENCY
  905.     label.TextTransparency = TRANSPARENCY
  906.     label.FontSize = TEXTFONTSIZE
  907.     label.Font = TEXTFONT
  908.     label.BorderSizePixel = BORDERSIZEPIXEL
  909.     label.TextScaled = false
  910.     label.Text = TEXT
  911.     label.Name = NAME
  912.     label.Parent = PARENT
  913.     return label
  914. end
  915.  
  916. function NoOutlines(PART)
  917.     PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  918. end
  919.  
  920. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  921.     local NEWWELD = IT(TYPE)
  922.     NEWWELD.Part0 = PART0
  923.     NEWWELD.Part1 = PART1
  924.     NEWWELD.C0 = C0
  925.     NEWWELD.C1 = C1
  926.     NEWWELD.Parent = PARENT
  927.     return NEWWELD
  928. end
  929.  
  930. local S = IT("Sound")
  931. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  932.     local NEWSOUND = nil
  933.     coroutine.resume(coroutine.create(function()
  934.         NEWSOUND = S:Clone()
  935.         NEWSOUND.Parent = PARENT
  936.         NEWSOUND.Volume = VOLUME
  937.         NEWSOUND.Pitch = PITCH
  938.         NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  939.         NEWSOUND:play()
  940.         if DOESLOOP == true then
  941.             NEWSOUND.Looped = true
  942.         else
  943.             repeat wait(1) until NEWSOUND.Playing == false
  944.             NEWSOUND:remove()
  945.         end
  946.     end))
  947.     return NEWSOUND
  948. end
  949.  
  950. local EyeSizes={
  951.     NumberSequenceKeypoint.new(0,2,0),
  952.     NumberSequenceKeypoint.new(1,0,0)
  953. }
  954. local EyeTrans={
  955.     NumberSequenceKeypoint.new(0,0.5,0),
  956.     NumberSequenceKeypoint.new(1,1,0)
  957. }
  958. local PE=Instance.new("ParticleEmitter",nil)
  959. PE.LightEmission=.8
  960. PE.Color = ColorSequence.new(BRICKC("white").Color,BRICKC("Really White").Color)
  961. PE.Size=NumberSequence.new(EyeSizes)
  962. PE.Transparency=NumberSequence.new(EyeTrans)
  963. PE.Lifetime=NumberRange.new(0.35,1)
  964. PE.Rotation=NumberRange.new(0,360)
  965. PE.Rate=100
  966. PE.VelocitySpread = 10000
  967. PE.Acceleration = Vector3.new(0,85,0)
  968. PE.Drag = 5
  969. PE.Speed = NumberRange.new(0.1,5)
  970. PE.Texture="http://www.roblox.com/asset/?id=1460745664"
  971. PE.ZOffset = 0.5
  972. PE.Name = "PE"
  973. PE.Enabled = false
  974.  
  975. function Fire(art)
  976.     local PARTICLES = PE:Clone()
  977.     PARTICLES.Parent = art
  978.     PARTICLES.Enabled = true
  979.     return PARTICLES
  980. end
  981.  
  982. function CFrameFromTopBack(at, top, back)
  983.     local right = top:Cross(back)
  984.     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)
  985. end
  986.  
  987. --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})
  988. function WACKYEFFECT(Table)
  989.     local TYPE = (Table.EffectType or "Sphere")
  990.     local SIZE = (Table.Size or VT(1,1,1))
  991.     local ENDSIZE = (Table.Size2 or VT(0,0,0))
  992.     local TRANSPARENCY = (Table.Transparency or 0)
  993.     local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  994.     local CFRAME = (Table.CFrame or Torso.CFrame)
  995.     local MOVEDIRECTION = (Table.MoveToPos or nil)
  996.     local ROTATION1 = (Table.RotationX or 0)
  997.     local ROTATION2 = (Table.RotationY or 0)
  998.     local ROTATION3 = (Table.RotationZ or 0)
  999.     local MATERIAL = (Table.Material or "Neon")
  1000.     local COLOR = (Table.Color or C3(255,255,255))
  1001.     local TIME = (Table.Time or 45)
  1002.     local SOUNDID = (Table.SoundID or nil)
  1003.     local SOUNDPITCH = (Table.SoundPitch or nil)
  1004.     local SOUNDVOLUME = (Table.SoundVolume or nil)
  1005.     coroutine.resume(coroutine.create(function()
  1006.         local PLAYSSOUND = false
  1007.         local SOUND = nil
  1008.         local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Really black"), "Effect", VT(1,1,1), true)
  1009.         if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  1010.             PLAYSSOUND = true
  1011.             SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  1012.         end
  1013.         EFFECT.Color = COLOR
  1014.         local MSH = nil
  1015.         if TYPE == "Sphere" then
  1016.             MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  1017.         elseif TYPE == "Block" or TYPE == "Box" then
  1018.             MSH = IT("BlockMesh",EFFECT)
  1019.             MSH.Scale = SIZE
  1020.         elseif TYPE == "Wave" then
  1021.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  1022.         elseif TYPE == "Ring" then
  1023.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  1024.         elseif TYPE == "Slash" then
  1025.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  1026.         elseif TYPE == "Round Slash" then
  1027.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  1028.         elseif TYPE == "Swirl" then
  1029.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  1030.         elseif TYPE == "Skull" then
  1031.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  1032.         elseif TYPE == "Crystal" then
  1033.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  1034.         end
  1035.         if MSH ~= nil then
  1036.             local MOVESPEED = nil
  1037.             if MOVEDIRECTION ~= nil then
  1038.                 MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  1039.             end
  1040.             local GROWTH = SIZE - ENDSIZE
  1041.             local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  1042.             if TYPE == "Block" then
  1043.                 EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1044.             else
  1045.                 EFFECT.CFrame = CFRAME
  1046.             end
  1047.             for LOOP = 1, TIME+1 do
  1048.                 Swait()
  1049.                 MSH.Scale = MSH.Scale - GROWTH/TIME
  1050.                 if TYPE == "Wave" then
  1051.                     MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  1052.                 end
  1053.                 EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  1054.                 if TYPE == "Block" then
  1055.                     EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1056.                 else
  1057.                     EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  1058.                 end
  1059.                 if MOVEDIRECTION ~= nil then
  1060.                     local ORI = EFFECT.Orientation
  1061.                     EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  1062.                     EFFECT.Orientation = ORI
  1063.                 end
  1064.             end
  1065.             if PLAYSSOUND == false then
  1066.                 EFFECT:remove()
  1067.             else
  1068.                 repeat wait(1) until SOUND.Playing == false
  1069.                 EFFECT:remove()
  1070.             end
  1071.         else
  1072.             if PLAYSSOUND == false then
  1073.                 EFFECT:remove()
  1074.             else
  1075.                 repeat Swait() until SOUND.Playing == false
  1076.                 EFFECT:remove()
  1077.             end
  1078.         end
  1079.     end))
  1080. end
  1081.  
  1082. function MakeForm(PART,TYPE)
  1083.     if TYPE == "Cyl" then
  1084.         local MSH = IT("CylinderMesh",PART)
  1085.     elseif TYPE == "Ball" then
  1086.         local MSH = IT("SpecialMesh",PART)
  1087.         MSH.MeshType = "Sphere"
  1088.     elseif TYPE == "Wedge" then
  1089.         local MSH = IT("SpecialMesh",PART)
  1090.         MSH.MeshType = "Wedge"
  1091.     end
  1092. end
  1093.  
  1094. Debris = game:GetService("Debris")
  1095.  
  1096. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  1097.     local DIRECTION = CF(StartPos,EndPos).lookVector
  1098.     return Raycast(StartPos, DIRECTION, Distance, Ignore)
  1099. end
  1100.  
  1101. local HATWELD = nil
  1102. function Pose(WhichPose,Speed,Time,Magic,Gyro,Tors)
  1103.     PLAYMAINANIM = false
  1104.     if WhichPose == "Cast1" then
  1105.         for i=0, Time, 0.1 / Animation_Speed do
  1106.             Swait()
  1107.             if Magic == true then
  1108.                 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"Really black".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1109.             end
  1110.             if Gyro ~= nil and Gyro ~= false then
  1111.                 Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  1112.             end
  1113.             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)
  1114.             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)
  1115.             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)
  1116.             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)
  1117.             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)
  1118.             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)
  1119.         end
  1120.     elseif WhichPose == "Cast2" then
  1121.         for i=0, Time, 0.1 / Animation_Speed do
  1122.             Swait()
  1123.             if Magic == true then
  1124.                 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"Really black".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1125.                 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"Really black".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1126.             end
  1127.             if Gyro ~= nil and Gyro ~= false then
  1128.                 Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  1129.             end
  1130.             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)
  1131.             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)
  1132.             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)
  1133.             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)
  1134.             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)
  1135.             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)
  1136.         end
  1137.     elseif WhichPose == "RightArmUp" then
  1138.         for i=0, Time, 0.1 / Animation_Speed do
  1139.             Swait()
  1140.             if Magic == true then
  1141.                 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"Really black".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1142.             end
  1143.             if Gyro ~= nil and Gyro ~= false then
  1144.                 Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  1145.             end
  1146.             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)
  1147.             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)
  1148.             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)
  1149.             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)
  1150.             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)
  1151.             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)
  1152.         end
  1153.     elseif WhichPose == "Taunt" then
  1154.         for i=0, Time, 0.1 / Animation_Speed do
  1155.             Swait()
  1156.             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)
  1157.             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)
  1158.             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)
  1159.             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)
  1160.             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)
  1161.             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)
  1162.         end
  1163.  
  1164.         CreateSound(1466932232,Torso,10,1,false)
  1165.         for i=0, Time*2, 0.1 / Animation_Speed do
  1166.             Swait()
  1167.             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)
  1168.             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)
  1169.             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)
  1170.             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)
  1171.             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)
  1172.             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)
  1173.         end
  1174.         for i=0, Time, 0.1 / Animation_Speed do
  1175.             Swait()
  1176.             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)
  1177.             Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), Speed / Animation_Speed)
  1178.             RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.65, -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  1179.             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)
  1180.             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)
  1181.             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)
  1182.  
  1183.         end
  1184.  
  1185.     elseif WhichPose == "Prepare key" then
  1186.         for i=0, Time, 0.1 / Animation_Speed do
  1187.             Swait()
  1188.             if Gyro ~= nil and Gyro ~= false then
  1189.                 Gyro.cframe = CF(RootPart.Position,Tors.Position)
  1190.             end
  1191.             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)
  1192.             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)
  1193.             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)
  1194.             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)
  1195.             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)
  1196.             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)
  1197.         end
  1198.     elseif WhichPose == "Turn key" then
  1199.         for i=0, Time, 0.1 / Animation_Speed do
  1200.             Swait()
  1201.             if Gyro ~= nil and Gyro ~= false then
  1202.                 Gyro.cframe = CF(RootPart.Position,Tors.Position)
  1203.             end
  1204.             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)
  1205.             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)
  1206.             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)
  1207.             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)
  1208.             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)
  1209.             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)
  1210.         end
  1211.     end
  1212.     PLAYMAINANIM = true
  1213. end
  1214.  
  1215. --Lightning({Color = C3(255,255,255), Start = Torso.Position, End = Mouse.Hit.p, SegmentL = 2, Thickness = 0.1, DoesFade = false, Ignore = Character, MaxDist = 400, Branches = false})
  1216. function Lightning(Table)
  1217.     local Color = Table.Color or C3(255,255,255)
  1218.     local StartPos = Table.Start or Torso.Position
  1219.     local EndPos = Table.End or Mouse.Hit.p
  1220.     local SegmentLength = Table.SegmentL or 2
  1221.     local Thickness = Table.Thickness or 0.1
  1222.     local Dissapear = Table.DoesFade or false
  1223.     local Parent = Table.Ignore or Character
  1224.     local MaxDist = Table.MaxDist or 400
  1225.     local Branches = Table.Branches or false
  1226.     local HIT,HITPOS = CastProperRay(StartPos, EndPos, MaxDist, Parent)
  1227.     local DISTANCE = math.ceil((StartPos - HITPOS).Magnitude/SegmentLength)
  1228.     local LIGHTNINGMODEL = IT("Model",Effects)
  1229.     LIGHTNINGMODEL.Name = "Lightning"
  1230.     local LastBolt = nil
  1231.     for E = 1, DISTANCE do
  1232.         local ExtraSize = (DISTANCE-E)/15
  1233.         local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Really black"), "LightningPart"..E, VT(Thickness+ExtraSize,SegmentLength,Thickness+ExtraSize))
  1234.         PART.Color = Color
  1235.         MakeForm(PART,"Cyl")
  1236.         if LastBolt == nil then
  1237.             PART.CFrame = CF(StartPos,HITPOS)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  1238.         else
  1239.             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)
  1240.         end
  1241.         LastBolt = PART
  1242.         if Branches == true then
  1243.             local CHOICE = MRANDOM(1,7+((DISTANCE-E)*2))
  1244.             if CHOICE == 1 then
  1245.                 local LASTBRANCH = nil
  1246.                 for i = 1, MRANDOM(2,5) do
  1247.                     local ExtraSize2 = ((DISTANCE-E)/25)/i
  1248.                     local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Really black"), "Branch"..E.."-"..i, VT(Thickness+ExtraSize2,SegmentLength,Thickness+ExtraSize2))
  1249.                     PART.Color = Color
  1250.                     MakeForm(PART,"Cyl")
  1251.                     if LASTBRANCH == nil then
  1252.                         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)
  1253.                     else
  1254.                         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)
  1255.                     end
  1256.                     LASTBRANCH = PART
  1257.                 end
  1258.             end
  1259.         end
  1260.     end
  1261.     if Dissapear == true then
  1262.         coroutine.resume(coroutine.create(function()
  1263.             for i = 1, 10 do
  1264.                 Swait()
  1265.                 for _, c in pairs(LIGHTNINGMODEL:GetChildren()) do
  1266.                     if c.ClassName == "Part" then
  1267.                         c.Transparency = i/10
  1268.                     end
  1269.                 end
  1270.             end
  1271.             LIGHTNINGMODEL:remove()
  1272.         end))
  1273.     elseif Dissapear == false then
  1274.         Debris:AddItem(LIGHTNINGMODEL,0.1)
  1275.     end
  1276.     return {End = LastBolt.CFrame*CF(0,0,-LastBolt.Size.Z/2).p,LastBolt = LastBolt,Model = LIGHTNINGMODEL}
  1277. end
  1278.  
  1279. --//=================================\\
  1280. --||         WEAPON CREATION
  1281. --\\=================================//
  1282. ----
  1283. Humanoid.DisplayDistanceType = 'None'
  1284. local naeeym2 = IT("BillboardGui",Character)
  1285. naeeym2.AlwaysOnTop = true
  1286. naeeym2.Size = UDim2.new(5,35,2,15)
  1287. naeeym2.StudsOffset = Vector3.new(0,2,0)
  1288. naeeym2.MaxDistance = 75
  1289. naeeym2.Adornee = Character.Head
  1290. naeeym2.Name = "Name"
  1291. --naeeym2.PlayerToHideFrom = Player
  1292. local tecks2 = IT("TextLabel",naeeym2)
  1293. tecks2.BackgroundTransparency = 1
  1294. tecks2.TextScaled = true
  1295. tecks2.BorderSizePixel = math.huge
  1296. tecks2.Text = "The Last Guardian"
  1297. tecks2.Font = "Code"
  1298. tecks2.TextSize = 30
  1299. tecks2.TextStrokeTransparency = 1
  1300. tecks2.TextColor3 = C3(0,0,0)
  1301. tecks2.TextStrokeColor3 = C3(0,0,0)
  1302. tecks2.Size = UDim2.new(1,0,0.5,0)
  1303. tecks2.Parent = naeeym2
  1304. local top = Instance.new("Shirt")
  1305. top.ShirtTemplate = "rbxassetid://0"
  1306. top.Parent = Character
  1307. top.Name = "Cloth"
  1308. local bottom = Instance.new("Pants")
  1309. bottom.PantsTemplate = "rbxassetid://0"
  1310. bottom.Parent = Character
  1311. bottom.Name = "Cloth"
  1312. ---------------------
  1313. if Character:FindFirstChildOfClass("Accessory") then
  1314.     Character:FindFirstChildOfClass("Accessory"):remove()
  1315. elseif Character:FindFirstChildOfClass("Hat") then
  1316.     Character:FindFirstChildOfClass("Hat"):remove()
  1317. end
  1318. ------------------------
  1319. wait(0.2)
  1320. local plr = game:service'Players'.LocalPlayer
  1321. local char = plr.Character
  1322. local hum = char.Humanoid
  1323. local hed = char.Head
  1324. local root = char.HumanoidRootPart
  1325. local rootj = root.RootJoint
  1326. local tors = char.Torso
  1327. local ra = char["Right Arm"]
  1328. local la = char["Left Arm"]
  1329. local rl = char["Right Leg"]
  1330. local ll = char["Left Leg"]
  1331. local neck = tors["Neck"]
  1332. local mouse = plr:GetMouse()
  1333. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  1334. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  1335. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  1336. local maincolor = BrickColor.new("Institutional white")
  1337.  
  1338. -------------------------------------------------------
  1339. --Start Good Stuff--
  1340. -------------------------------------------------------
  1341. cam = game.Workspace.CurrentCamera
  1342. CF = CFrame.new
  1343. angles = CFrame.Angles
  1344. attack = false
  1345. Euler = CFrame.fromEulerAnglesXYZ
  1346. Rad = math.rad
  1347. IT = Instance.new
  1348. BrickC = BrickColor.new
  1349. Cos = math.cos
  1350. Acos = math.acos
  1351. Sin = math.sin
  1352. Asin = math.asin
  1353. Abs = math.abs
  1354. Mrandom = math.random
  1355. Floor = math.floor
  1356. -------------------------------------------------------
  1357. --End Good Stuff--
  1358. -------------------------------------------------------
  1359. necko = CF(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  1360. RSH, LSH = nil, nil
  1361. RW = Instance.new("Weld")
  1362. LW = Instance.new("Weld")
  1363. RH = tors["Right Hip"]
  1364. LH = tors["Left Hip"]
  1365. RSH = tors["Right Shoulder"]
  1366. LSH = tors["Left Shoulder"]
  1367. RSH.Parent = nil
  1368. LSH.Parent = nil
  1369. RW.Name = "RW"
  1370. RW.Part0 = tors
  1371. RW.C0 = CF(1.5, 0.5, 0)
  1372. RW.C1 = CF(0, 0.5, 0)
  1373. RW.Part1 = ra
  1374. RW.Parent = tors
  1375. LW.Name = "LW"
  1376. LW.Part0 = tors
  1377. LW.C0 = CF(-1.5, 0.5, 0)
  1378. LW.C1 = CF(0, 0.5, 0)
  1379. LW.Part1 = la
  1380. LW.Parent = tors
  1381. Effects = {}
  1382. -------------------------------------------------------
  1383. --Start HeartBeat--
  1384. -------------------------------------------------------
  1385. ArtificialHB = Instance.new("BindableEvent", script)
  1386. ArtificialHB.Name = "Heartbeat"
  1387. script:WaitForChild("Heartbeat")
  1388.  
  1389. frame = 1 / 60
  1390. tf = 0
  1391. allowframeloss = false
  1392. tossremainder = false
  1393.  
  1394.  
  1395. lastframe = tick()
  1396. script.Heartbeat:Fire()
  1397.  
  1398.  
  1399. game:GetService("RunService").Heartbeat:connect(function(s, p)
  1400.     tf = tf + s
  1401.     if tf >= frame then
  1402.         if allowframeloss then
  1403.             script.Heartbeat:Fire()
  1404.             lastframe = tick()
  1405.         else
  1406.             for i = 1, math.floor(tf / frame) do
  1407.                 script.Heartbeat:Fire()
  1408.             end
  1409.             lastframe = tick()
  1410.         end
  1411.         if tossremainder then
  1412.             tf = 0
  1413.         else
  1414.             tf = tf - frame * math.floor(tf / frame)
  1415.         end
  1416.     end
  1417. end)
  1418. -------------------------------------------------------
  1419. --End HeartBeat--
  1420. -------------------------------------------------------
  1421.  
  1422. -------------------------------------------------------
  1423. --Start Important Functions--
  1424. -------------------------------------------------------
  1425. function swait(num)
  1426.     if num == 0 or num == nil then
  1427.         game:service("RunService").Stepped:wait(0)
  1428.     else
  1429.         for i = 0, num do
  1430.             game:service("RunService").Stepped:wait(0)
  1431.         end
  1432.     end
  1433. end
  1434. function thread(f)
  1435.     coroutine.resume(coroutine.create(f))
  1436. end
  1437. function clerp(a, b, t)
  1438.     local qa = {
  1439.         QuaternionFromCFrame(a)
  1440.     }
  1441.     local qb = {
  1442.         QuaternionFromCFrame(b)
  1443.     }
  1444.     local ax, ay, az = a.x, a.y, a.z
  1445.     local bx, by, bz = b.x, b.y, b.z
  1446.     local _t = 1 - t
  1447.     return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  1448. end
  1449. function QuaternionFromCFrame(cf)
  1450.     local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1451.     local trace = m00 + m11 + m22
  1452.     if trace > 0 then
  1453.         local s = math.sqrt(1 + trace)
  1454.         local recip = 0.5 / s
  1455.         return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  1456.     else
  1457.         local i = 0
  1458.         if m00 < m11 then
  1459.             i = 1
  1460.         end
  1461.         if m22 > (i == 0 and m00 or m11) then
  1462.             i = 2
  1463.         end
  1464.         if i == 0 then
  1465.             local s = math.sqrt(m00 - m11 - m22 + 1)
  1466.             local recip = 0.5 / s
  1467.             return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  1468.         elseif i == 1 then
  1469.             local s = math.sqrt(m11 - m22 - m00 + 1)
  1470.             local recip = 0.5 / s
  1471.             return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  1472.         elseif i == 2 then
  1473.             local s = math.sqrt(m22 - m00 - m11 + 1)
  1474.             local recip = 0.5 / s
  1475.             return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  1476.         end
  1477.     end
  1478. end
  1479. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1480.     local xs, ys, zs = x + x, y + y, z + z
  1481.     local wx, wy, wz = w * xs, w * ys, w * zs
  1482.     local xx = x * xs
  1483.     local xy = x * ys
  1484.     local xz = x * zs
  1485.     local yy = y * ys
  1486.     local yz = y * zs
  1487.     local zz = z * zs
  1488.     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))
  1489. end
  1490. function QuaternionSlerp(a, b, t)
  1491.     local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  1492.     local startInterp, finishInterp
  1493.     if cosTheta >= 1.0E-4 then
  1494.         if 1 - cosTheta > 1.0E-4 then
  1495.             local theta = math.acos(cosTheta)
  1496.             local invSinTheta = 1 / Sin(theta)
  1497.             startInterp = Sin((1 - t) * theta) * invSinTheta
  1498.             finishInterp = Sin(t * theta) * invSinTheta
  1499.         else
  1500.             startInterp = 1 - t
  1501.             finishInterp = t
  1502.         end
  1503.     elseif 1 + cosTheta > 1.0E-4 then
  1504.         local theta = math.acos(-cosTheta)
  1505.         local invSinTheta = 1 / Sin(theta)
  1506.         startInterp = Sin((t - 1) * theta) * invSinTheta
  1507.         finishInterp = Sin(t * theta) * invSinTheta
  1508.     else
  1509.         startInterp = t - 1
  1510.         finishInterp = t
  1511.     end
  1512.     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
  1513. end
  1514. function rayCast(Position, Direction, Range, Ignore)
  1515.     return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  1516. end
  1517. local RbxUtility = LoadLibrary("RbxUtility")
  1518. local Create = RbxUtility.Create
  1519.  
  1520.  
  1521.  
  1522. function swait(num)
  1523.     if num == 0 or num == nil then
  1524.         game:service("RunService").Stepped:wait(0)
  1525.     else
  1526.         for i = 0, num do
  1527.             game:service("RunService").Stepped:wait(0)
  1528.         end
  1529.     end
  1530. end
  1531. function thread(f)
  1532.     coroutine.resume(coroutine.create(f))
  1533. end
  1534. function clerp(a, b, t)
  1535.     local qa = {
  1536.         QuaternionFromCFrame(a)
  1537.     }
  1538.     local qb = {
  1539.         QuaternionFromCFrame(b)
  1540.     }
  1541.     local ax, ay, az = a.x, a.y, a.z
  1542.     local bx, by, bz = b.x, b.y, b.z
  1543.     local _t = 1 - t
  1544.     return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  1545. end
  1546. function QuaternionFromCFrame(cf)
  1547.     local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1548.     local trace = m00 + m11 + m22
  1549.     if trace > 0 then
  1550.         local s = math.sqrt(1 + trace)
  1551.         local recip = 0.5 / s
  1552.         return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  1553.     else
  1554.         local i = 0
  1555.         if m00 < m11 then
  1556.             i = 1
  1557.         end
  1558.         if m22 > (i == 0 and m00 or m11) then
  1559.             i = 2
  1560.         end
  1561.         if i == 0 then
  1562.             local s = math.sqrt(m00 - m11 - m22 + 1)
  1563.             local recip = 0.5 / s
  1564.             return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  1565.         elseif i == 1 then
  1566.             local s = math.sqrt(m11 - m22 - m00 + 1)
  1567.             local recip = 0.5 / s
  1568.             return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  1569.         elseif i == 2 then
  1570.             local s = math.sqrt(m22 - m00 - m11 + 1)
  1571.             local recip = 0.5 / s
  1572.             return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  1573.         end
  1574.     end
  1575. end
  1576. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1577.     local xs, ys, zs = x + x, y + y, z + z
  1578.     local wx, wy, wz = w * xs, w * ys, w * zs
  1579.     local xx = x * xs
  1580.     local xy = x * ys
  1581.     local xz = x * zs
  1582.     local yy = y * ys
  1583.     local yz = y * zs
  1584.     local zz = z * zs
  1585.     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))
  1586. end
  1587. function QuaternionSlerp(a, b, t)
  1588.     local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  1589.     local startInterp, finishInterp
  1590.     if cosTheta >= 1.0E-4 then
  1591.         if 1 - cosTheta > 1.0E-4 then
  1592.             local theta = math.acos(cosTheta)
  1593.             local invSinTheta = 1 / Sin(theta)
  1594.             startInterp = Sin((1 - t) * theta) * invSinTheta
  1595.             finishInterp = Sin(t * theta) * invSinTheta
  1596.         else
  1597.             startInterp = 1 - t
  1598.             finishInterp = t
  1599.         end
  1600.     elseif 1 + cosTheta > 1.0E-4 then
  1601.         local theta = math.acos(-cosTheta)
  1602.         local invSinTheta = 1 / Sin(theta)
  1603.         startInterp = Sin((t - 1) * theta) * invSinTheta
  1604.         finishInterp = Sin(t * theta) * invSinTheta
  1605.     else
  1606.         startInterp = t - 1
  1607.         finishInterp = t
  1608.     end
  1609.     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
  1610. end
  1611. function rayCast(Position, Direction, Range, Ignore)
  1612.     return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  1613. end
  1614. local RbxUtility = LoadLibrary("RbxUtility")
  1615. local Create = RbxUtility.Create
  1616. -------------------------------------------------------
  1617. --Start Damage Function--
  1618. -------------------------------------------------------
  1619. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  1620.     if hit.Parent == nil then
  1621.         return
  1622.     end
  1623.     local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  1624.     for _, v in pairs(hit.Parent:children()) do
  1625.         if v:IsA("Humanoid") then
  1626.             h = v
  1627.         end
  1628.     end
  1629.          if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  1630.    
  1631.          hit.Parent:FindFirstChild("Head"):BreakJoints()
  1632.          end
  1633.  
  1634.     if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  1635.         if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  1636.             if hit.Parent.DebounceHit.Value == true then
  1637.                 return
  1638.             end
  1639.         end
  1640.          if insta == true then
  1641.          hit.Parent:FindFirstChild("Head"):BreakJoints()
  1642.          end
  1643.         local c = Create("ObjectValue"){
  1644.             Name = "creator",
  1645.             Value = game:service("Players").LocalPlayer,
  1646.             Parent = h,
  1647.         }
  1648.         game:GetService("Debris"):AddItem(c, .5)
  1649.         if HitSound ~= nil and HitPitch ~= nil then
  1650.             CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  1651.         end
  1652.         local Damage = math.random(minim, maxim)
  1653.         local blocked = false
  1654.         local block = hit.Parent:findFirstChild("Block")
  1655.         if block ~= nil then
  1656.             if block.className == "IntValue" then
  1657.                 if block.Value > 0 then
  1658.                     blocked = true
  1659.                     block.Value = block.Value - 1
  1660.                     print(block.Value)
  1661.                 end
  1662.             end
  1663.         end
  1664.         if blocked == false then
  1665.             h.Health = h.Health - Damage
  1666.             ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  1667.         else
  1668.             h.Health = h.Health - (Damage / 2)
  1669.             ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  1670.         end
  1671.         if Type == "Knockdown" then
  1672.             local hum = hit.Parent.Humanoid
  1673.             hum.PlatformStand = true
  1674.             coroutine.resume(coroutine.create(function(HHumanoid)
  1675.                 swait(1)
  1676.                 HHumanoid.PlatformStand = false
  1677.             end), hum)
  1678.             local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  1679.             local bodvol = Create("BodyVelocity"){
  1680.                 velocity = angle * knockback,
  1681.                 P = 5000,
  1682.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  1683.                 Parent = hit,
  1684.             }
  1685.             local rl = Create("BodyAngularVelocity"){
  1686.                 P = 3000,
  1687.                 maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  1688.                 angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  1689.                 Parent = hit,
  1690.             }
  1691.             game:GetService("Debris"):AddItem(bodvol, .5)
  1692.             game:GetService("Debris"):AddItem(rl, .5)
  1693.         elseif Type == "Normal" then
  1694.             local vp = Create("BodyVelocity"){
  1695.                 P = 500,
  1696.                 maxForce = Vector3.new(math.huge, 0, math.huge),
  1697.                 velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  1698.             }
  1699.             if knockback > 0 then
  1700.                 vp.Parent = hit.Parent.Torso
  1701.             end
  1702.             game:GetService("Debris"):AddItem(vp, .5)
  1703.         elseif Type == "Up" then
  1704.             local bodyVelocity = Create("BodyVelocity"){
  1705.                 velocity = Vector3.new(0, 20, 0),
  1706.                 P = 5000,
  1707.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  1708.                 Parent = hit,
  1709.             }
  1710.             game:GetService("Debris"):AddItem(bodyVelocity, .5)
  1711.         elseif Type == "DarkUp" then
  1712.             coroutine.resume(coroutine.create(function()
  1713.                 for i = 0, 1, 0.1 do
  1714.                     swait()
  1715.                     Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  1716.                 end
  1717.             end))
  1718.             local bodyVelocity = Create("BodyVelocity"){
  1719.                 velocity = Vector3.new(0, 20, 0),
  1720.                 P = 5000,
  1721.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  1722.                 Parent = hit,
  1723.             }
  1724.             game:GetService("Debris"):AddItem(bodyVelocity, 1)
  1725.         elseif Type == "Snare" then
  1726.             local bp = Create("BodyPosition"){
  1727.                 P = 2000,
  1728.                 D = 100,
  1729.                 maxForce = Vector3.new(math.huge, math.huge, math.huge),
  1730.                 position = hit.Parent.Torso.Position,
  1731.                 Parent = hit.Parent.Torso,
  1732.             }
  1733.             game:GetService("Debris"):AddItem(bp, 1)
  1734.         elseif Type == "Freeze" then
  1735.             local BodPos = Create("BodyPosition"){
  1736.                 P = 50000,
  1737.                 D = 1000,
  1738.                 maxForce = Vector3.new(math.huge, math.huge, math.huge),
  1739.                 position = hit.Parent.Torso.Position,
  1740.                 Parent = hit.Parent.Torso,
  1741.             }
  1742.             local BodGy = Create("BodyGyro") {
  1743.                 maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  1744.                 P = 20e+003,
  1745.                 Parent = hit.Parent.Torso,
  1746.                 cframe = hit.Parent.Torso.CFrame,
  1747.             }
  1748.             hit.Parent.Torso.Anchored = true
  1749.             coroutine.resume(coroutine.create(function(Part)
  1750.                 swait(1.5)
  1751.                 Part.Anchored = false
  1752.             end), hit.Parent.Torso)
  1753.             game:GetService("Debris"):AddItem(BodPos, 3)
  1754.             game:GetService("Debris"):AddItem(BodGy, 3)
  1755.         end
  1756.         local debounce = Create("BoolValue"){
  1757.             Name = "DebounceHit",
  1758.             Parent = hit.Parent,
  1759.             Value = true,
  1760.         }
  1761.         game:GetService("Debris"):AddItem(debounce, Delay)
  1762.         c = Create("ObjectValue"){
  1763.             Name = "creator",
  1764.             Value = Player,
  1765.             Parent = h,
  1766.         }
  1767.         game:GetService("Debris"):AddItem(c, .5)
  1768.     end
  1769. end
  1770. -------------------------------------------------------
  1771. --Start Damage Function--
  1772. -------------------------------------------------------
  1773. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  1774.     if hit.Parent == nil then
  1775.         return
  1776.     end
  1777.     local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  1778.     for _, v in pairs(hit.Parent:children()) do
  1779.         if v:IsA("Humanoid") then
  1780.             h = v
  1781.         end
  1782.     end
  1783.          if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  1784.    
  1785.          hit.Parent:FindFirstChild("Head"):BreakJoints()
  1786.          end
  1787.  
  1788.     if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  1789.         if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  1790.             if hit.Parent.DebounceHit.Value == true then
  1791.                 return
  1792.             end
  1793.         end
  1794.          if insta == true then
  1795.          hit.Parent:FindFirstChild("Head"):BreakJoints()
  1796.          end
  1797.         local c = Create("ObjectValue"){
  1798.             Name = "creator",
  1799.             Value = game:service("Players").LocalPlayer,
  1800.             Parent = h,
  1801.         }
  1802.         game:GetService("Debris"):AddItem(c, .5)
  1803.         if HitSound ~= nil and HitPitch ~= nil then
  1804.             CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  1805.         end
  1806.         local Damage = math.random(minim, maxim)
  1807.         local blocked = false
  1808.         local block = hit.Parent:findFirstChild("Block")
  1809.         if block ~= nil then
  1810.             if block.className == "IntValue" then
  1811.                 if block.Value > 0 then
  1812.                     blocked = true
  1813.                     block.Value = block.Value - 1
  1814.                     print(block.Value)
  1815.                 end
  1816.             end
  1817.         end
  1818.         if blocked == false then
  1819.             h.Health = h.Health - Damage
  1820.             ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  1821.         else
  1822.             h.Health = h.Health - (Damage / 2)
  1823.             ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  1824.         end
  1825.         if Type == "Knockdown" then
  1826.             local hum = hit.Parent.Humanoid
  1827.             hum.PlatformStand = true
  1828.             coroutine.resume(coroutine.create(function(HHumanoid)
  1829.                 swait(1)
  1830.                 HHumanoid.PlatformStand = false
  1831.             end), hum)
  1832.             local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  1833.             local bodvol = Create("BodyVelocity"){
  1834.                 velocity = angle * knockback,
  1835.                 P = 5000,
  1836.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  1837.                 Parent = hit,
  1838.             }
  1839.             local rl = Create("BodyAngularVelocity"){
  1840.                 P = 3000,
  1841.                 maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  1842.                 angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  1843.                 Parent = hit,
  1844.             }
  1845.             game:GetService("Debris"):AddItem(bodvol, .5)
  1846.             game:GetService("Debris"):AddItem(rl, .5)
  1847.         elseif Type == "Normal" then
  1848.             local vp = Create("BodyVelocity"){
  1849.                 P = 500,
  1850.                 maxForce = Vector3.new(math.huge, 0, math.huge),
  1851.                 velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  1852.             }
  1853.             if knockback > 0 then
  1854.                 vp.Parent = hit.Parent.Torso
  1855.             end
  1856.             game:GetService("Debris"):AddItem(vp, .5)
  1857.         elseif Type == "Up" then
  1858.             local bodyVelocity = Create("BodyVelocity"){
  1859.                 velocity = Vector3.new(0, 20, 0),
  1860.                 P = 5000,
  1861.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  1862.                 Parent = hit,
  1863.             }
  1864.             game:GetService("Debris"):AddItem(bodyVelocity, .5)
  1865.         elseif Type == "DarkUp" then
  1866.             coroutine.resume(coroutine.create(function()
  1867.                 for i = 0, 1, 0.1 do
  1868.                     swait()
  1869.                     Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  1870.                 end
  1871.             end))
  1872.             local bodyVelocity = Create("BodyVelocity"){
  1873.                 velocity = Vector3.new(0, 20, 0),
  1874.                 P = 5000,
  1875.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  1876.                 Parent = hit,
  1877.             }
  1878.             game:GetService("Debris"):AddItem(bodyVelocity, 1)
  1879.         elseif Type == "Snare" then
  1880.             local bp = Create("BodyPosition"){
  1881.                 P = 2000,
  1882.                 D = 100,
  1883.                 maxForce = Vector3.new(math.huge, math.huge, math.huge),
  1884.                 position = hit.Parent.Torso.Position,
  1885.                 Parent = hit.Parent.Torso,
  1886.             }
  1887.             game:GetService("Debris"):AddItem(bp, 1)
  1888.         elseif Type == "Freeze" then
  1889.             local BodPos = Create("BodyPosition"){
  1890.                 P = 50000,
  1891.                 D = 1000,
  1892.                 maxForce = Vector3.new(math.huge, math.huge, math.huge),
  1893.                 position = hit.Parent.Torso.Position,
  1894.                 Parent = hit.Parent.Torso,
  1895.             }
  1896.             local BodGy = Create("BodyGyro") {
  1897.                 maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  1898.                 P = 20e+003,
  1899.                 Parent = hit.Parent.Torso,
  1900.                 cframe = hit.Parent.Torso.CFrame,
  1901.             }
  1902.             hit.Parent.Torso.Anchored = true
  1903.             coroutine.resume(coroutine.create(function(Part)
  1904.                 swait(1.5)
  1905.                 Part.Anchored = false
  1906.             end), hit.Parent.Torso)
  1907.             game:GetService("Debris"):AddItem(BodPos, 3)
  1908.             game:GetService("Debris"):AddItem(BodGy, 3)
  1909.         end
  1910.         local debounce = Create("BoolValue"){
  1911.             Name = "DebounceHit",
  1912.             Parent = hit.Parent,
  1913.             Value = true,
  1914.         }
  1915.         game:GetService("Debris"):AddItem(debounce, Delay)
  1916.         c = Create("ObjectValue"){
  1917.             Name = "creator",
  1918.             Value = Player,
  1919.             Parent = h,
  1920.         }
  1921.         game:GetService("Debris"):AddItem(c, .5)
  1922.     end
  1923. end
  1924.  
  1925. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  1926.     if hit.Parent == nil then
  1927.         return
  1928.     end
  1929.     local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  1930.     for _, v in pairs(hit.Parent:children()) do
  1931.         if v:IsA("Humanoid") then
  1932.             h = v
  1933.         end
  1934.     end
  1935.          if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  1936.    
  1937.          hit.Parent:FindFirstChild("Head"):BreakJoints()
  1938.          end
  1939.  
  1940.     if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  1941.         if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  1942.             if hit.Parent.DebounceHit.Value == true then
  1943.                 return
  1944.             end
  1945.         end
  1946.          if insta == true then
  1947.          hit.Parent:FindFirstChild("Head"):BreakJoints()
  1948.          end
  1949.         local c = Create("ObjectValue"){
  1950.             Name = "creator",
  1951.             Value = game:service("Players").LocalPlayer,
  1952.             Parent = h,
  1953.         }
  1954.         game:GetService("Debris"):AddItem(c, .5)
  1955.         if HitSound ~= nil and HitPitch ~= nil then
  1956.             CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  1957.         end
  1958.         local Damage = math.random(minim, maxim)
  1959.         local blocked = false
  1960.         local block = hit.Parent:findFirstChild("Block")
  1961.         if block ~= nil then
  1962.             if block.className == "IntValue" then
  1963.                 if block.Value > 0 then
  1964.                     blocked = true
  1965.                     block.Value = block.Value - 1
  1966.                     print(block.Value)
  1967.                 end
  1968.             end
  1969.         end
  1970.         if blocked == false then
  1971.             h.Health = h.Health - Damage
  1972.             ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  1973.         else
  1974.             h.Health = h.Health - (Damage / 2)
  1975.             ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  1976.         end
  1977.         if Type == "Knockdown" then
  1978.             local hum = hit.Parent.Humanoid
  1979.             hum.PlatformStand = true
  1980.             coroutine.resume(coroutine.create(function(HHumanoid)
  1981.                 swait(1)
  1982.                 HHumanoid.PlatformStand = false
  1983.             end), hum)
  1984.             local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  1985.             local bodvol = Create("BodyVelocity"){
  1986.                 velocity = angle * knockback,
  1987.                 P = 5000,
  1988.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  1989.                 Parent = hit,
  1990.             }
  1991.             local rl = Create("BodyAngularVelocity"){
  1992.                 P = 3000,
  1993.                 maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  1994.                 angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  1995.                 Parent = hit,
  1996.             }
  1997.             game:GetService("Debris"):AddItem(bodvol, .5)
  1998.             game:GetService("Debris"):AddItem(rl, .5)
  1999.         elseif Type == "Normal" then
  2000.             local vp = Create("BodyVelocity"){
  2001.                 P = 500,
  2002.                 maxForce = Vector3.new(math.huge, 0, math.huge),
  2003.                 velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  2004.             }
  2005.             if knockback > 0 then
  2006.                 vp.Parent = hit.Parent.Torso
  2007.             end
  2008.             game:GetService("Debris"):AddItem(vp, .5)
  2009.         elseif Type == "Up" then
  2010.             local bodyVelocity = Create("BodyVelocity"){
  2011.                 velocity = Vector3.new(0, 20, 0),
  2012.                 P = 5000,
  2013.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  2014.                 Parent = hit,
  2015.             }
  2016.             game:GetService("Debris"):AddItem(bodyVelocity, .5)
  2017.         elseif Type == "DarkUp" then
  2018.             coroutine.resume(coroutine.create(function()
  2019.                 for i = 0, 1, 0.1 do
  2020.                     swait()
  2021.                     Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  2022.                 end
  2023.             end))
  2024.             local bodyVelocity = Create("BodyVelocity"){
  2025.                 velocity = Vector3.new(0, 20, 0),
  2026.                 P = 5000,
  2027.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  2028.                 Parent = hit,
  2029.             }
  2030.             game:GetService("Debris"):AddItem(bodyVelocity, 1)
  2031.         elseif Type == "Snare" then
  2032.             local bp = Create("BodyPosition"){
  2033.                 P = 2000,
  2034.                 D = 100,
  2035.                 maxForce = Vector3.new(math.huge, math.huge, math.huge),
  2036.                 position = hit.Parent.Torso.Position,
  2037.                 Parent = hit.Parent.Torso,
  2038.             }
  2039.             game:GetService("Debris"):AddItem(bp, 1)
  2040.         elseif Type == "Freeze" then
  2041.             local BodPos = Create("BodyPosition"){
  2042.                 P = 50000,
  2043.                 D = 1000,
  2044.                 maxForce = Vector3.new(math.huge, math.huge, math.huge),
  2045.                 position = hit.Parent.Torso.Position,
  2046.                 Parent = hit.Parent.Torso,
  2047.             }
  2048.             local BodGy = Create("BodyGyro") {
  2049.                 maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  2050.                 P = 20e+003,
  2051.                 Parent = hit.Parent.Torso,
  2052.                 cframe = hit.Parent.Torso.CFrame,
  2053.             }
  2054.             hit.Parent.Torso.Anchored = true
  2055.             coroutine.resume(coroutine.create(function(Part)
  2056.                 swait(1.5)
  2057.                 Part.Anchored = false
  2058.             end), hit.Parent.Torso)
  2059.             game:GetService("Debris"):AddItem(BodPos, 3)
  2060.             game:GetService("Debris"):AddItem(BodGy, 3)
  2061.         end
  2062.         local debounce = Create("BoolValue"){
  2063.             Name = "DebounceHit",
  2064.             Parent = hit.Parent,
  2065.             Value = true,
  2066.         }
  2067.         game:GetService("Debris"):AddItem(debounce, Delay)
  2068.         c = Create("ObjectValue"){
  2069.             Name = "creator",
  2070.             Value = Player,
  2071.             Parent = h,
  2072.         }
  2073.  
  2074.     end
  2075. end
  2076. -------------------------------------------------------
  2077. --End Damage Function--
  2078. -------------------------------------------------------
  2079.  
  2080. -------------------------------------------------------
  2081. --Start Damage Function Customization--
  2082. -------------------------------------------------------
  2083. function ShowDamage(Pos, Text, Time, Color)
  2084.     local Rate = (1 / 30)
  2085.     local Pos = (Pos or Vector3.new(0, 0, 0))
  2086.     local Text = (Text or "")
  2087.     local Time = (Time or 2)
  2088.     local Color = (Color or Color3.new(1, 0, 1))
  2089.     local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  2090.     EffectPart.Anchored = true
  2091.     local BillboardGui = Create("BillboardGui"){
  2092.         Size = UDim2.new(3, 0, 3, 0),
  2093.         Adornee = EffectPart,
  2094.         Parent = EffectPart,
  2095.     }
  2096.     local TextLabel = Create("TextLabel"){
  2097.         BackgroundTransparency = 1,
  2098.         Size = UDim2.new(1, 0, 1, 0),
  2099.         Text = Text,
  2100.         Font = "Bodoni",
  2101.         TextColor3 = Color,
  2102.         TextScaled = true,
  2103.         TextStrokeColor3 = Color3.fromRGB(0,0,0),
  2104.         Parent = BillboardGui,
  2105.     }
  2106.     game.Debris:AddItem(EffectPart, (Time))
  2107.     EffectPart.Parent = game:GetService("Workspace")
  2108.     delay(0, function()
  2109.         local Frames = (Time / Rate)
  2110.         for Frame = 1, Frames do
  2111.             wait(Rate)
  2112.             local Percent = (Frame / Frames)
  2113.             EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  2114.             TextLabel.TextTransparency = Percent
  2115.         end
  2116.         if EffectPart and EffectPart.Parent then
  2117.             EffectPart:Destroy()
  2118.         end
  2119.     end)
  2120. end
  2121. -------------------------------------------------------
  2122. --End Damage Function Customization--
  2123. -------------------------------------------------------
  2124. function MagniDamage(Part, magni, mindam, maxdam, knock, Type)
  2125.   for _, c in pairs(workspace:children()) do
  2126.     local hum = c:findFirstChild("Humanoid")
  2127.     if hum ~= nil then
  2128.       local head = c:findFirstChild("Head")
  2129.       if head ~= nil then
  2130.         local targ = head.Position - Part.Position
  2131.         local mag = targ.magnitude
  2132.         if magni >= mag and c.Name ~= plr.Name then
  2133.           Damage(head, head, mindam, maxdam, knock, Type, root, 0.1, "http://www.roblox.com/asset/?id=0", 1.2)
  2134.         end
  2135.       end
  2136.     end
  2137.   end
  2138. end
  2139.  
  2140.  
  2141. CFuncs = {
  2142.     Part = {
  2143.         Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  2144.             local Part = Create("Part")({
  2145.                 Parent = Parent,
  2146.                 Reflectance = Reflectance,
  2147.                 Transparency = Transparency,
  2148.                 CanCollide = false,
  2149.                 Locked = true,
  2150.                 BrickColor = BrickColor.new(tostring(BColor)),
  2151.                 Name = Name,
  2152.                 Size = Size,
  2153.                 Material = Material
  2154.             })
  2155.             RemoveOutlines(Part)
  2156.             return Part
  2157.         end
  2158.     },
  2159.     Mesh = {
  2160.         Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  2161.             local Msh = Create(Mesh)({
  2162.                 Parent = Part,
  2163.                 Offset = OffSet,
  2164.                 Scale = Scale
  2165.             })
  2166.             if Mesh == "SpecialMesh" then
  2167.                 Msh.MeshType = MeshType
  2168.                 Msh.MeshId = MeshId
  2169.             end
  2170.             return Msh
  2171.         end
  2172.     },
  2173.     Mesh = {
  2174.         Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  2175.             local Msh = Create(Mesh)({
  2176.                 Parent = Part,
  2177.                 Offset = OffSet,
  2178.                 Scale = Scale
  2179.             })
  2180.             if Mesh == "SpecialMesh" then
  2181.                 Msh.MeshType = MeshType
  2182.                 Msh.MeshId = MeshId
  2183.             end
  2184.             return Msh
  2185.         end
  2186.     },
  2187.     Weld = {
  2188.         Create = function(Parent, Part0, Part1, C0, C1)
  2189.             local Weld = Create("Weld")({
  2190.                 Parent = Parent,
  2191.                 Part0 = Part0,
  2192.                 Part1 = Part1,
  2193.                 C0 = C0,
  2194.                 C1 = C1
  2195.             })
  2196.             return Weld
  2197.         end
  2198.     },
  2199.     Sound = {
  2200.         Create = function(id, par, vol, pit)
  2201.             coroutine.resume(coroutine.create(function()
  2202.                 local S = Create("Sound")({
  2203.                     Volume = vol,
  2204.                     Pitch = pit or 1,
  2205.                     SoundId = id,
  2206.                     Parent = par or workspace
  2207.                 })
  2208.                 wait()
  2209.                 S:play()
  2210.                 game:GetService("Debris"):AddItem(S, 6)
  2211.             end))
  2212.         end
  2213.     },
  2214.     ParticleEmitter = {
  2215.         Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  2216.             local fp = Create("ParticleEmitter")({
  2217.                 Parent = Parent,
  2218.                 Color = ColorSequence.new(Color1, Color2),
  2219.                 LightEmission = LightEmission,
  2220.                 Size = Size,
  2221.                 Texture = Texture,
  2222.                 Transparency = Transparency,
  2223.                 ZOffset = ZOffset,
  2224.                 Acceleration = Accel,
  2225.                 Drag = Drag,
  2226.                 LockedToPart = LockedToPart,
  2227.                 VelocityInheritance = VelocityInheritance,
  2228.                 EmissionDirection = EmissionDirection,
  2229.                 Enabled = Enabled,
  2230.                 Lifetime = LifeTime,
  2231.                 Rate = Rate,
  2232.                 Rotation = Rotation,
  2233.                 RotSpeed = RotSpeed,
  2234.                 Speed = Speed,
  2235.                 VelocitySpread = VelocitySpread
  2236.             })
  2237.             return fp
  2238.         end
  2239.     }
  2240. }
  2241. function RemoveOutlines(part)
  2242.     part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  2243. end
  2244. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  2245.     local Part = Create("Part")({
  2246.         formFactor = FormFactor,
  2247.         Parent = Parent,
  2248.         Reflectance = Reflectance,
  2249.         Transparency = Transparency,
  2250.         CanCollide = false,
  2251.         Locked = true,
  2252.         BrickColor = BrickColor.new(tostring(BColor)),
  2253.         Name = Name,
  2254.         Size = Size,
  2255.         Material = Material
  2256.     })
  2257.     RemoveOutlines(Part)
  2258.     return Part
  2259. end
  2260. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  2261.     local Msh = Create(Mesh)({
  2262.         Parent = Part,
  2263.         Offset = OffSet,
  2264.         Scale = Scale
  2265.     })
  2266.     if Mesh == "SpecialMesh" then
  2267.         Msh.MeshType = MeshType
  2268.         Msh.MeshId = MeshId
  2269.     end
  2270.     return Msh
  2271. end
  2272. function CreateWeld(Parent, Part0, Part1, C0, C1)
  2273.     local Weld = Create("Weld")({
  2274.         Parent = Parent,
  2275.         Part0 = Part0,
  2276.         Part1 = Part1,
  2277.         C0 = C0,
  2278.         C1 = C1
  2279.     })
  2280.     return Weld
  2281. end
  2282.  
  2283.  
  2284.  
  2285. function MagniDamage(Part, magni, mindam, maxdam, knock, Type)
  2286.   for _, c in pairs(workspace:children()) do
  2287.     local hum = c:findFirstChild("Humanoid")
  2288.     if hum ~= nil then
  2289.       local head = c:findFirstChild("Head")
  2290.       if head ~= nil then
  2291.         local targ = head.Position - Part.Position
  2292.         local mag = targ.magnitude
  2293.         if magni >= mag and c.Name ~= plr.Name then
  2294.           Damage(head, head, mindam, maxdam, knock, Type, root, 0.1, "http://www.roblox.com/asset/?id=0", 1.2)
  2295.         end
  2296.       end
  2297.     end
  2298.   end
  2299. end
  2300.  
  2301.  
  2302. CFuncs = {
  2303.     Part = {
  2304.         Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  2305.             local Part = Create("Part")({
  2306.                 Parent = Parent,
  2307.                 Reflectance = Reflectance,
  2308.                 Transparency = Transparency,
  2309.                 CanCollide = false,
  2310.                 Locked = true,
  2311.                 BrickColor = BrickColor.new(tostring(BColor)),
  2312.                 Name = Name,
  2313.                 Size = Size,
  2314.                 Material = Material
  2315.             })
  2316.             RemoveOutlines(Part)
  2317.             return Part
  2318.         end
  2319.     },
  2320.     Mesh = {
  2321.         Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  2322.             local Msh = Create(Mesh)({
  2323.                 Parent = Part,
  2324.                 Offset = OffSet,
  2325.                 Scale = Scale
  2326.             })
  2327.             if Mesh == "SpecialMesh" then
  2328.                 Msh.MeshType = MeshType
  2329.                 Msh.MeshId = MeshId
  2330.             end
  2331.             return Msh
  2332.         end
  2333.     },
  2334.     Mesh = {
  2335.         Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  2336.             local Msh = Create(Mesh)({
  2337.                 Parent = Part,
  2338.                 Offset = OffSet,
  2339.                 Scale = Scale
  2340.             })
  2341.             if Mesh == "SpecialMesh" then
  2342.                 Msh.MeshType = MeshType
  2343.                 Msh.MeshId = MeshId
  2344.             end
  2345.             return Msh
  2346.         end
  2347.     },
  2348.     Weld = {
  2349.         Create = function(Parent, Part0, Part1, C0, C1)
  2350.             local Weld = Create("Weld")({
  2351.                 Parent = Parent,
  2352.                 Part0 = Part0,
  2353.                 Part1 = Part1,
  2354.                 C0 = C0,
  2355.                 C1 = C1
  2356.             })
  2357.             return Weld
  2358.         end
  2359.     },
  2360.     Sound = {
  2361.         Create = function(id, par, vol, pit)
  2362.             coroutine.resume(coroutine.create(function()
  2363.                 local S = Create("Sound")({
  2364.                     Volume = vol,
  2365.                     Pitch = pit or 1,
  2366.                     SoundId = id,
  2367.                     Parent = par or workspace
  2368.                 })
  2369.                 wait()
  2370.                 S:play()
  2371.                 game:GetService("Debris"):AddItem(S, 6)
  2372.             end))
  2373.         end
  2374.     },
  2375.     ParticleEmitter = {
  2376.         Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  2377.             local fp = Create("ParticleEmitter")({
  2378.                 Parent = Parent,
  2379.                 Color = ColorSequence.new(Color1, Color2),
  2380.                 LightEmission = LightEmission,
  2381.                 Size = Size,
  2382.                 Texture = Texture,
  2383.                 Transparency = Transparency,
  2384.                 ZOffset = ZOffset,
  2385.                 Acceleration = Accel,
  2386.                 Drag = Drag,
  2387.                 LockedToPart = LockedToPart,
  2388.                 VelocityInheritance = VelocityInheritance,
  2389.                 EmissionDirection = EmissionDirection,
  2390.                 Enabled = Enabled,
  2391.                 Lifetime = LifeTime,
  2392.                 Rate = Rate,
  2393.                 Rotation = Rotation,
  2394.                 RotSpeed = RotSpeed,
  2395.                 Speed = Speed,
  2396.                 VelocitySpread = VelocitySpread
  2397.             })
  2398.             return fp
  2399.         end
  2400.     }
  2401. }
  2402. function RemoveOutlines(part)
  2403.     part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  2404. end
  2405. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  2406.     local Part = Create("Part")({
  2407.         formFactor = FormFactor,
  2408.         Parent = Parent,
  2409.         Reflectance = Reflectance,
  2410.         Transparency = Transparency,
  2411.         CanCollide = false,
  2412.         Locked = true,
  2413.         BrickColor = BrickColor.new(tostring(BColor)),
  2414.         Name = Name,
  2415.         Size = Size,
  2416.         Material = Material
  2417.     })
  2418.     RemoveOutlines(Part)
  2419.     return Part
  2420. end
  2421. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  2422.     local Msh = Create(Mesh)({
  2423.         Parent = Part,
  2424.         Offset = OffSet,
  2425.         Scale = Scale
  2426.     })
  2427.     if Mesh == "SpecialMesh" then
  2428.         Msh.MeshType = MeshType
  2429.         Msh.MeshId = MeshId
  2430.     end
  2431.     return Msh
  2432. end
  2433. function CreateWeld(Parent, Part0, Part1, C0, C1)
  2434.     local Weld = Create("Weld")({
  2435.         Parent = Parent,
  2436.         Part0 = Part0,
  2437.         Part1 = Part1,
  2438.         C0 = C0,
  2439.         C1 = C1
  2440.     })
  2441.     return Weld
  2442. end
  2443.  
  2444.  
  2445. -------------------------------------------------------
  2446. --Start Effect Function--
  2447. -------------------------------------------------------
  2448. EffectModel = Instance.new("Model", char)
  2449. Effects = {
  2450.   Block = {
  2451.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  2452.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  2453.       prt.Anchored = true
  2454.       prt.CFrame = cframe
  2455.       local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  2456.       game:GetService("Debris"):AddItem(prt, 10)
  2457.       if Type == 1 or Type == nil then
  2458.         table.insert(Effects, {
  2459.           prt,
  2460.           "Block1",
  2461.           delay,
  2462.           x3,
  2463.           y3,
  2464.           z3,
  2465.           msh
  2466.         })
  2467.       elseif Type == 2 then
  2468.         table.insert(Effects, {
  2469.           prt,
  2470.           "Block2",
  2471.           delay,
  2472.           x3,
  2473.           y3,
  2474.           z3,
  2475.           msh
  2476.         })
  2477.       else
  2478.         table.insert(Effects, {
  2479.           prt,
  2480.           "Block3",
  2481.           delay,
  2482.           x3,
  2483.           y3,
  2484.           z3,
  2485.           msh
  2486.         })
  2487.       end
  2488.     end
  2489.   },
  2490.   Sphere = {
  2491.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2492.       local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  2493.       prt.Anchored = true
  2494.       prt.CFrame = cframe
  2495.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  2496.       game:GetService("Debris"):AddItem(prt, 10)
  2497.       table.insert(Effects, {
  2498.         prt,
  2499.         "Cylinder",
  2500.         delay,
  2501.         x3,
  2502.         y3,
  2503.         z3,
  2504.         msh
  2505.       })
  2506.     end
  2507.   },
  2508.   Cylinder = {
  2509.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2510.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  2511.       prt.Anchored = true
  2512.       prt.CFrame = cframe
  2513.       local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  2514.       game:GetService("Debris"):AddItem(prt, 10)
  2515.       table.insert(Effects, {
  2516.         prt,
  2517.         "Cylinder",
  2518.         delay,
  2519.         x3,
  2520.         y3,
  2521.         z3,
  2522.         msh
  2523.       })
  2524.     end
  2525.   },
  2526.   Wave = {
  2527.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2528.       local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  2529.       prt.Anchored = true
  2530.       prt.CFrame = cframe
  2531.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
  2532.       game:GetService("Debris"):AddItem(prt, 10)
  2533.       table.insert(Effects, {
  2534.         prt,
  2535.         "Cylinder",
  2536.         delay,
  2537.         x3 / 60,
  2538.         y3 / 60,
  2539.         z3 / 60,
  2540.         msh
  2541.       })
  2542.     end
  2543.   },
  2544.   Ring = {
  2545.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2546.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  2547.       prt.Anchored = true
  2548.       prt.CFrame = cframe
  2549.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  2550.       game:GetService("Debris"):AddItem(prt, 10)
  2551.       table.insert(Effects, {
  2552.         prt,
  2553.         "Cylinder",
  2554.         delay,
  2555.         x3,
  2556.         y3,
  2557.         z3,
  2558.         msh
  2559.       })
  2560.     end
  2561.   },
  2562.   Break = {
  2563.     Create = function(brickcolor, cframe, x1, y1, z1)
  2564.       local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  2565.       prt.Anchored = true
  2566.       prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  2567.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  2568.       local num = math.random(10, 50) / 1000
  2569.       game:GetService("Debris"):AddItem(prt, 10)
  2570.       table.insert(Effects, {
  2571.         prt,
  2572.         "Shatter",
  2573.         num,
  2574.         prt.CFrame,
  2575.         math.random() - math.random(),
  2576.         0,
  2577.         math.random(50, 100) / 100
  2578.       })
  2579.     end
  2580.   },
  2581. Spiral = {
  2582.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2583.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  2584.       prt.Anchored = true
  2585.       prt.CFrame = cframe
  2586.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://1051557", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  2587.       game:GetService("Debris"):AddItem(prt, 10)
  2588.       table.insert(Effects, {
  2589.         prt,
  2590.         "Cylinder",
  2591.         delay,
  2592.         x3,
  2593.         y3,
  2594.         z3,
  2595.         msh
  2596.       })
  2597.     end
  2598.   },
  2599. Push = {
  2600.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2601.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  2602.       prt.Anchored = true
  2603.       prt.CFrame = cframe
  2604.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://437347603", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  2605.       game:GetService("Debris"):AddItem(prt, 10)
  2606.       table.insert(Effects, {
  2607.         prt,
  2608.         "Cylinder",
  2609.         delay,
  2610.         x3,
  2611.         y3,
  2612.         z3,
  2613.         msh
  2614.       })
  2615.     end
  2616.   }
  2617. }
  2618. function part(formfactor ,parent, reflectance, transparency, brickcolor, name, size)
  2619.     local fp = IT("Part")
  2620.     fp.formFactor = formfactor
  2621.     fp.Parent = parent
  2622.     fp.Reflectance = reflectance
  2623.     fp.Transparency = transparency
  2624.     fp.CanCollide = false
  2625.     fp.Locked = true
  2626.     fp.BrickColor = brickcolor
  2627.     fp.Name = name
  2628.     fp.Size = size
  2629.     fp.Position = tors.Position
  2630.     RemoveOutlines(fp)
  2631.     fp.Material = "SmoothPlastic"
  2632.     fp:BreakJoints()
  2633.     return fp
  2634. end
  2635.  
  2636. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  2637.     local mesh = IT(Mesh)
  2638.     mesh.Parent = part
  2639.     if Mesh == "SpecialMesh" then
  2640.         mesh.MeshType = meshtype
  2641.     if meshid ~= "nil" then
  2642.         mesh.MeshId = "http://www.roblox.com/asset/?id="..meshid
  2643.         end
  2644.     end
  2645.     mesh.Offset = offset
  2646.     mesh.Scale = scale
  2647.     return mesh
  2648. end
  2649.  
  2650. function Magic(bonuspeed, type, pos, scale, value, color, MType)
  2651.     local type = type
  2652.     local rng = Instance.new("Part", char)
  2653.     rng.Anchored = true
  2654.     rng.BrickColor = color
  2655.     rng.CanCollide = false
  2656.     rng.FormFactor = 3
  2657.     rng.Name = "Ring"
  2658.     rng.Material = "Neon"
  2659.     rng.Size = Vector3.new(1, 1, 1)
  2660.     rng.Transparency = 0
  2661.     rng.TopSurface = 0
  2662.     rng.BottomSurface = 0
  2663.     rng.CFrame = pos
  2664.     local rngm = Instance.new("SpecialMesh", rng)
  2665.     rngm.MeshType = MType
  2666.     rngm.Scale = scale
  2667.     local scaler2 = 1
  2668.     if type == "Add" then
  2669.         scaler2 = 1 * value
  2670.     elseif type == "Divide" then
  2671.         scaler2 = 1 / value
  2672.     end
  2673.     coroutine.resume(coroutine.create(function()
  2674.         for i = 0, 10 / bonuspeed, 0.1 do
  2675.             swait()
  2676.             if type == "Add" then
  2677.                 scaler2 = scaler2 - 0.01 * value / bonuspeed
  2678.             elseif type == "Divide" then
  2679.                 scaler2 = scaler2 - 0.01 / value * bonuspeed
  2680.             end
  2681.             rng.Transparency = rng.Transparency + 0.01 * bonuspeed
  2682.             rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, scaler2 * bonuspeed)
  2683.         end
  2684.         rng:Destroy()
  2685.     end))
  2686. end
  2687.  
  2688. function Eviscerate(dude)
  2689.     if dude.Name ~= char then
  2690.         local bgf = IT("BodyGyro", dude.Head)
  2691.         bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0)
  2692.         local val = IT("BoolValue", dude)
  2693.         val.Name = "IsHit"
  2694.         local ds = coroutine.wrap(function()
  2695.             dude:WaitForChild("Head"):BreakJoints()
  2696.             wait(0.5)
  2697.             target = nil
  2698.             coroutine.resume(coroutine.create(function()
  2699.                 for i, v in pairs(dude:GetChildren()) do
  2700.                     if v:IsA("Accessory") then
  2701.                         v:Destroy()
  2702.                     end
  2703.                     if v:IsA("Humanoid") then
  2704.                         v:Destroy()
  2705.                     end
  2706.                     if v:IsA("CharacterMesh") then
  2707.                         v:Destroy()
  2708.                     end
  2709.                     if v:IsA("Model") then
  2710.                         v:Destroy()
  2711.                     end
  2712.                     if v:IsA("Part") or v:IsA("MeshPart") then
  2713.                         for x, o in pairs(v:GetChildren()) do
  2714.                             if o:IsA("Decal") then
  2715.                                 o:Destroy()
  2716.                             end
  2717.                         end
  2718.                         coroutine.resume(coroutine.create(function()
  2719.                             v.Material = "Neon"
  2720.                             v.CanCollide = false
  2721.                             local PartEmmit1 = IT("ParticleEmitter", v)
  2722.                             PartEmmit1.LightEmission = 1
  2723.                             PartEmmit1.Texture = "rbxassetid://284205403"
  2724.                             PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  2725.                             PartEmmit1.Rate = 150
  2726.                             PartEmmit1.Lifetime = NumberRange.new(1)
  2727.                             PartEmmit1.Size = NumberSequence.new({
  2728.                                 NumberSequenceKeypoint.new(0, 0.75, 0),
  2729.                                 NumberSequenceKeypoint.new(1, 0, 0)
  2730.                             })
  2731.                             PartEmmit1.Transparency = NumberSequence.new({
  2732.                                 NumberSequenceKeypoint.new(0, 0, 0),
  2733.                                 NumberSequenceKeypoint.new(1, 1, 0)
  2734.                             })
  2735.                             PartEmmit1.Speed = NumberRange.new(0, 0)
  2736.                             PartEmmit1.VelocitySpread = 30000
  2737.                             PartEmmit1.Rotation = NumberRange.new(-500, 500)
  2738.                             PartEmmit1.RotSpeed = NumberRange.new(-500, 500)
  2739.                             local BodPoss = IT("BodyPosition", v)
  2740.                             BodPoss.P = 3000
  2741.                             BodPoss.D = 1000
  2742.                             BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  2743.                             BodPoss.position = v.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15))
  2744.                             v.Color = maincolor.Color
  2745.                             coroutine.resume(coroutine.create(function()
  2746.                                 for i = 0, 49 do
  2747.                                     swait(1)
  2748.                                     v.Transparency = v.Transparency + 0.08
  2749.                                 end
  2750.                                 wait(0.5)
  2751.                                 PartEmmit1.Enabled = false
  2752.                                 wait(3)
  2753.                                 v:Destroy()
  2754.                                 dude:Destroy()
  2755.                             end))
  2756.                         end))
  2757.                     end
  2758.                 end
  2759.             end))
  2760.         end)
  2761.         ds()
  2762.     end
  2763. end
  2764.  
  2765. function FindNearestHead(Position, Distance, SinglePlayer)
  2766.     if SinglePlayer then
  2767.         return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude
  2768.     end
  2769.     local List = {}
  2770.     for i, v in pairs(workspace:GetChildren()) do
  2771.         if v:IsA("Model") and v:findFirstChild("Head") and v ~= char and Distance >= (v.Head.Position - Position).magnitude then
  2772.             table.insert(List, v)
  2773.         end
  2774.     end
  2775.     return List
  2776. end
  2777.  
  2778. function Aura(bonuspeed, FastSpeed, type, pos, x1, y1, z1, value, color, outerpos, MType)
  2779.     local type = type
  2780.     local rng = Instance.new("Part", char)
  2781.     rng.Anchored = true
  2782.     rng.BrickColor = color
  2783.     rng.CanCollide = false
  2784.     rng.FormFactor = 3
  2785.     rng.Name = "Ring"
  2786.     rng.Material = "Neon"
  2787.     rng.Size = Vector3.new(1, 1, 1)
  2788.     rng.Transparency = 0
  2789.     rng.TopSurface = 0
  2790.     rng.BottomSurface = 0
  2791.     rng.CFrame = pos
  2792.     rng.CFrame = rng.CFrame + rng.CFrame.lookVector * outerpos
  2793.     local rngm = Instance.new("SpecialMesh", rng)
  2794.     rngm.MeshType = MType
  2795.     rngm.Scale = Vector3.new(x1, y1, z1)
  2796.     local scaler2 = 1
  2797.     local speeder = FastSpeed
  2798.     if type == "Add" then
  2799.         scaler2 = 1 * value
  2800.     elseif type == "Divide" then
  2801.         scaler2 = 1 / value
  2802.     end
  2803.     coroutine.resume(coroutine.create(function()
  2804.         for i = 0, 10 / bonuspeed, 0.1 do
  2805.             swait()
  2806.             if type == "Add" then
  2807.                 scaler2 = scaler2 - 0.01 * value / bonuspeed
  2808.             elseif type == "Divide" then
  2809.                 scaler2 = scaler2 - 0.01 / value * bonuspeed
  2810.             end
  2811.             speeder = speeder - 0.01 * FastSpeed * bonuspeed
  2812.             rng.CFrame = rng.CFrame + rng.CFrame.lookVector * speeder * bonuspeed
  2813.             rng.Transparency = rng.Transparency + 0.01 * bonuspeed
  2814.             rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, 0)
  2815.         end
  2816.         rng:Destroy()
  2817.     end))
  2818. end
  2819.  
  2820. function SoulSteal(dude)
  2821. if dude.Name ~= char then
  2822. local bgf = IT("BodyGyro", dude.Head)
  2823. bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0)
  2824. local val = IT("BoolValue", dude)
  2825. val.Name = "IsHit"
  2826. local torso = (dude:FindFirstChild'Head' or dude:FindFirstChild'Torso' or dude:FindFirstChild'UpperTorso' or dude:FindFirstChild'LowerTorso' or dude:FindFirstChild'HumanoidRootPart')
  2827. local soulst = coroutine.wrap(function()
  2828. local soul = Instance.new("Part",dude)
  2829. soul.Size = Vector3.new(1,1,1)
  2830. soul.CanCollide = false
  2831. soul.Anchored = false
  2832. soul.Position = torso.Position
  2833. soul.Transparency = 1
  2834. local PartEmmit1 = IT("ParticleEmitter", soul)
  2835. PartEmmit1.LightEmission = 1
  2836. PartEmmit1.Texture = "rbxassetid://569507414"
  2837. PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  2838. PartEmmit1.Rate = 250
  2839. PartEmmit1.Lifetime = NumberRange.new(1.6)
  2840. PartEmmit1.Size = NumberSequence.new({
  2841.     NumberSequenceKeypoint.new(0, 1, 0),
  2842.     NumberSequenceKeypoint.new(1, 0, 0)
  2843. })
  2844. PartEmmit1.Transparency = NumberSequence.new({
  2845.     NumberSequenceKeypoint.new(0, 0, 0),
  2846.     NumberSequenceKeypoint.new(1, 1, 0)
  2847. })
  2848. PartEmmit1.Speed = NumberRange.new(0, 0)
  2849. PartEmmit1.VelocitySpread = 30000
  2850. PartEmmit1.Rotation = NumberRange.new(-360, 360)
  2851. PartEmmit1.RotSpeed = NumberRange.new(-360, 360)
  2852. local BodPoss = IT("BodyPosition", soul)
  2853. BodPoss.P = 3000
  2854. BodPoss.D = 1000
  2855. BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  2856. BodPoss.position = torso.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15))
  2857. wait(1.6)
  2858. soul.Touched:connect(function(hit)
  2859.     if hit.Parent == char then
  2860.     soul:Destroy()
  2861.     end
  2862. end)
  2863. wait(1.2)
  2864. while soul do
  2865.     swait()
  2866.     PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  2867.     BodPoss.Position = tors.Position
  2868. end
  2869. end)
  2870.     soulst()
  2871.     end
  2872. end
  2873. function FaceMouse()
  2874. local   Cam = workspace.CurrentCamera
  2875.     return {
  2876.         CFrame.new(char.Torso.Position, Vector3.new(mouse.Hit.p.x, char.Torso.Position.y, mouse.Hit.p.z)),
  2877.         Vector3.new(mouse.Hit.p.x, mouse.Hit.p.y, mouse.Hit.p.z)
  2878.     }
  2879. end
  2880. -------------------------------------------------------
  2881. --Start Effect Function--
  2882. ------------------------------------------------------
  2883. EffectModel = Instance.new("Model", char)
  2884. Effects = {
  2885.   Block = {
  2886.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  2887.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  2888.       prt.Anchored = true
  2889.       prt.CFrame = cframe
  2890.       local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  2891.       game:GetService("Debris"):AddItem(prt, 10)
  2892.       if Type == 1 or Type == nil then
  2893.         table.insert(Effects, {
  2894.           prt,
  2895.           "Block1",
  2896.           delay,
  2897.           x3,
  2898.           y3,
  2899.           z3,
  2900.           msh
  2901.         })
  2902.       elseif Type == 2 then
  2903.         table.insert(Effects, {
  2904.           prt,
  2905.           "Block2",
  2906.           delay,
  2907.           x3,
  2908.           y3,
  2909.           z3,
  2910.           msh
  2911.         })
  2912.       else
  2913.         table.insert(Effects, {
  2914.           prt,
  2915.           "Block3",
  2916.           delay,
  2917.           x3,
  2918.           y3,
  2919.           z3,
  2920.           msh
  2921.         })
  2922.       end
  2923.     end
  2924.   },
  2925.   Sphere = {
  2926.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2927.       local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  2928.       prt.Anchored = true
  2929.       prt.CFrame = cframe
  2930.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  2931.       game:GetService("Debris"):AddItem(prt, 10)
  2932.       table.insert(Effects, {
  2933.         prt,
  2934.         "Cylinder",
  2935.         delay,
  2936.         x3,
  2937.         y3,
  2938.         z3,
  2939.         msh
  2940.       })
  2941.     end
  2942.   },
  2943.   Cylinder = {
  2944.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2945.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  2946.       prt.Anchored = true
  2947.       prt.CFrame = cframe
  2948.       local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  2949.       game:GetService("Debris"):AddItem(prt, 10)
  2950.       table.insert(Effects, {
  2951.         prt,
  2952.         "Cylinder",
  2953.         delay,
  2954.         x3,
  2955.         y3,
  2956.         z3,
  2957.         msh
  2958.       })
  2959.     end
  2960.   },
  2961.   Wave = {
  2962.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2963.       local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  2964.       prt.Anchored = true
  2965.       prt.CFrame = cframe
  2966.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
  2967.       game:GetService("Debris"):AddItem(prt, 10)
  2968.       table.insert(Effects, {
  2969.         prt,
  2970.         "Cylinder",
  2971.         delay,
  2972.         x3 / 60,
  2973.         y3 / 60,
  2974.         z3 / 60,
  2975.         msh
  2976.       })
  2977.     end
  2978.   },
  2979.   Ring = {
  2980.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2981.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  2982.       prt.Anchored = true
  2983.       prt.CFrame = cframe
  2984.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  2985.       game:GetService("Debris"):AddItem(prt, 10)
  2986.       table.insert(Effects, {
  2987.         prt,
  2988.         "Cylinder",
  2989.         delay,
  2990.         x3,
  2991.         y3,
  2992.         z3,
  2993.         msh
  2994.       })
  2995.     end
  2996.   },
  2997.   Break = {
  2998.     Create = function(brickcolor, cframe, x1, y1, z1)
  2999.       local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  3000.       prt.Anchored = true
  3001.       prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  3002.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  3003.       local num = math.random(10, 50) / 1000
  3004.       game:GetService("Debris"):AddItem(prt, 10)
  3005.       table.insert(Effects, {
  3006.         prt,
  3007.         "Shatter",
  3008.         num,
  3009.         prt.CFrame,
  3010.         math.random() - math.random(),
  3011.         0,
  3012.         math.random(50, 100) / 100
  3013.       })
  3014.     end
  3015.   },
  3016. Spiral = {
  3017.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  3018.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  3019.       prt.Anchored = true
  3020.       prt.CFrame = cframe
  3021.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://1051557", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  3022.       game:GetService("Debris"):AddItem(prt, 10)
  3023.       table.insert(Effects, {
  3024.         prt,
  3025.         "Cylinder",
  3026.         delay,
  3027.         x3,
  3028.         y3,
  3029.         z3,
  3030.         msh
  3031.       })
  3032.     end
  3033.   },
  3034. Push = {
  3035.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  3036.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  3037.       prt.Anchored = true
  3038.       prt.CFrame = cframe
  3039.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://437347603", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  3040.       game:GetService("Debris"):AddItem(prt, 10)
  3041.       table.insert(Effects, {
  3042.         prt,
  3043.         "Cylinder",
  3044.         delay,
  3045.         x3,
  3046.         y3,
  3047.         z3,
  3048.         msh
  3049.       })
  3050.     end
  3051.   }
  3052. }
  3053. function part(formfactor ,parent, reflectance, transparency, brickcolor, name, size)
  3054.     local fp = IT("Part")
  3055.     fp.formFactor = formfactor
  3056.     fp.Parent = parent
  3057.     fp.Reflectance = reflectance
  3058.     fp.Transparency = transparency
  3059.     fp.CanCollide = false
  3060.     fp.Locked = true
  3061.     fp.BrickColor = brickcolor
  3062.     fp.Name = name
  3063.     fp.Size = size
  3064.     fp.Position = tors.Position
  3065.     RemoveOutlines(fp)
  3066.     fp.Material = "SmoothPlastic"
  3067.     fp:BreakJoints()
  3068.     return fp
  3069. end
  3070.  
  3071. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  3072.     local mesh = IT(Mesh)
  3073.     mesh.Parent = part
  3074.     if Mesh == "SpecialMesh" then
  3075.         mesh.MeshType = meshtype
  3076.     if meshid ~= "nil" then
  3077.         mesh.MeshId = "http://www.roblox.com/asset/?id="..meshid
  3078.         end
  3079.     end
  3080.     mesh.Offset = offset
  3081.     mesh.Scale = scale
  3082.     return mesh
  3083. end
  3084.  
  3085. function Magic(bonuspeed, type, pos, scale, value, color, MType)
  3086.     local type = type
  3087.     local rng = Instance.new("Part", char)
  3088.     rng.Anchored = true
  3089.     rng.BrickColor = color
  3090.     rng.CanCollide = false
  3091.     rng.FormFactor = 3
  3092.     rng.Name = "Ring"
  3093.     rng.Material = "Neon"
  3094.     rng.Size = Vector3.new(1, 1, 1)
  3095.     rng.Transparency = 0
  3096.     rng.TopSurface = 0
  3097.     rng.BottomSurface = 0
  3098.     rng.CFrame = pos
  3099.     local rngm = Instance.new("SpecialMesh", rng)
  3100.     rngm.MeshType = MType
  3101.     rngm.Scale = scale
  3102.     local scaler2 = 1
  3103.     if type == "Add" then
  3104.         scaler2 = 1 * value
  3105.     elseif type == "Divide" then
  3106.         scaler2 = 1 / value
  3107.     end
  3108.     coroutine.resume(coroutine.create(function()
  3109.         for i = 0, 10 / bonuspeed, 0.1 do
  3110.             swait()
  3111.             if type == "Add" then
  3112.                 scaler2 = scaler2 - 0.01 * value / bonuspeed
  3113.             elseif type == "Divide" then
  3114.                 scaler2 = scaler2 - 0.01 / value * bonuspeed
  3115.             end
  3116.             rng.Transparency = rng.Transparency + 0.01 * bonuspeed
  3117.             rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, scaler2 * bonuspeed)
  3118.         end
  3119.         rng:Destroy()
  3120.     end))
  3121. end
  3122.  
  3123. function Eviscerate(dude)
  3124.     if dude.Name ~= char then
  3125.         local bgf = IT("BodyGyro", dude.Head)
  3126.         bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0)
  3127.         local val = IT("BoolValue", dude)
  3128.         val.Name = "IsHit"
  3129.         local ds = coroutine.wrap(function()
  3130.             dude:WaitForChild("Head"):BreakJoints()
  3131.             wait(0.5)
  3132.             target = nil
  3133.             coroutine.resume(coroutine.create(function()
  3134.                 for i, v in pairs(dude:GetChildren()) do
  3135.                     if v:IsA("Accessory") then
  3136.                         v:Destroy()
  3137.                     end
  3138.                     if v:IsA("Humanoid") then
  3139.                         v:Destroy()
  3140.                     end
  3141.                     if v:IsA("CharacterMesh") then
  3142.                         v:Destroy()
  3143.                     end
  3144.                     if v:IsA("Model") then
  3145.                         v:Destroy()
  3146.                     end
  3147.                     if v:IsA("Part") or v:IsA("MeshPart") then
  3148.                         for x, o in pairs(v:GetChildren()) do
  3149.                             if o:IsA("Decal") then
  3150.                                 o:Destroy()
  3151.                             end
  3152.                         end
  3153.                         coroutine.resume(coroutine.create(function()
  3154.                             v.Material = "Neon"
  3155.                             v.CanCollide = false
  3156.                             local PartEmmit1 = IT("ParticleEmitter", v)
  3157.                             PartEmmit1.LightEmission = 1
  3158.                             PartEmmit1.Texture = "rbxassetid://284205403"
  3159.                             PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  3160.                             PartEmmit1.Rate = 150
  3161.                             PartEmmit1.Lifetime = NumberRange.new(1)
  3162.                             PartEmmit1.Size = NumberSequence.new({
  3163.                                 NumberSequenceKeypoint.new(0, 0.75, 0),
  3164.                                 NumberSequenceKeypoint.new(1, 0, 0)
  3165.                             })
  3166.                             PartEmmit1.Transparency = NumberSequence.new({
  3167.                                 NumberSequenceKeypoint.new(0, 0, 0),
  3168.                                 NumberSequenceKeypoint.new(1, 1, 0)
  3169.                             })
  3170.                             PartEmmit1.Speed = NumberRange.new(0, 0)
  3171.                             PartEmmit1.VelocitySpread = 30000
  3172.                             PartEmmit1.Rotation = NumberRange.new(-500, 500)
  3173.                             PartEmmit1.RotSpeed = NumberRange.new(-500, 500)
  3174.                             local BodPoss = IT("BodyPosition", v)
  3175.                             BodPoss.P = 3000
  3176.                             BodPoss.D = 1000
  3177.                             BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  3178.                             BodPoss.position = v.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15))
  3179.                             v.Color = maincolor.Color
  3180.                             coroutine.resume(coroutine.create(function()
  3181.                                 for i = 0, 49 do
  3182.                                     swait(1)
  3183.                                     v.Transparency = v.Transparency + 0.08
  3184.                                 end
  3185.                                 wait(0.5)
  3186.                                 PartEmmit1.Enabled = false
  3187.                                 wait(3)
  3188.                                 v:Destroy()
  3189.                                 dude:Destroy()
  3190.                             end))
  3191.                         end))
  3192.                     end
  3193.                 end
  3194.             end))
  3195.         end)
  3196.         ds()
  3197.     end
  3198. end
  3199.  
  3200. function FindNearestHead(Position, Distance, SinglePlayer)
  3201.     if SinglePlayer then
  3202.         return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude
  3203.     end
  3204.     local List = {}
  3205.     for i, v in pairs(workspace:GetChildren()) do
  3206.         if v:IsA("Model") and v:findFirstChild("Head") and v ~= char and Distance >= (v.Head.Position - Position).magnitude then
  3207.             table.insert(List, v)
  3208.         end
  3209.     end
  3210.     return List
  3211. end
  3212.  
  3213. function Aura(bonuspeed, FastSpeed, type, pos, x1, y1, z1, value, color, outerpos, MType)
  3214.     local type = type
  3215.     local rng = Instance.new("Part", char)
  3216.     rng.Anchored = true
  3217.     rng.BrickColor = color
  3218.     rng.CanCollide = false
  3219.     rng.FormFactor = 3
  3220.     rng.Name = "Ring"
  3221.     rng.Material = "Neon"
  3222.     rng.Size = Vector3.new(1, 1, 1)
  3223.     rng.Transparency = 0
  3224.     rng.TopSurface = 0
  3225.     rng.BottomSurface = 0
  3226.     rng.CFrame = pos
  3227.     rng.CFrame = rng.CFrame + rng.CFrame.lookVector * outerpos
  3228.     local rngm = Instance.new("SpecialMesh", rng)
  3229.     rngm.MeshType = MType
  3230.     rngm.Scale = Vector3.new(x1, y1, z1)
  3231.     local scaler2 = 1
  3232.     local speeder = FastSpeed
  3233.     if type == "Add" then
  3234.         scaler2 = 1 * value
  3235.     elseif type == "Divide" then
  3236.         scaler2 = 1 / value
  3237.     end
  3238.     coroutine.resume(coroutine.create(function()
  3239.         for i = 0, 10 / bonuspeed, 0.1 do
  3240.             swait()
  3241.             if type == "Add" then
  3242.                 scaler2 = scaler2 - 0.01 * value / bonuspeed
  3243.             elseif type == "Divide" then
  3244.                 scaler2 = scaler2 - 0.01 / value * bonuspeed
  3245.             end
  3246.             speeder = speeder - 0.01 * FastSpeed * bonuspeed
  3247.             rng.CFrame = rng.CFrame + rng.CFrame.lookVector * speeder * bonuspeed
  3248.             rng.Transparency = rng.Transparency + 0.01 * bonuspeed
  3249.             rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, 0)
  3250.         end
  3251.         rng:Destroy()
  3252.     end))
  3253. end
  3254.  
  3255. function SoulSteal(dude)
  3256. if dude.Name ~= char then
  3257. local bgf = IT("BodyGyro", dude.Head)
  3258. bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0)
  3259. local val = IT("BoolValue", dude)
  3260. val.Name = "IsHit"
  3261. local torso = (dude:FindFirstChild'Head' or dude:FindFirstChild'Torso' or dude:FindFirstChild'UpperTorso' or dude:FindFirstChild'LowerTorso' or dude:FindFirstChild'HumanoidRootPart')
  3262. local soulst = coroutine.wrap(function()
  3263. local soul = Instance.new("Part",dude)
  3264. soul.Size = Vector3.new(1,1,1)
  3265. soul.CanCollide = false
  3266. soul.Anchored = false
  3267. soul.Position = torso.Position
  3268. soul.Transparency = 1
  3269. local PartEmmit1 = IT("ParticleEmitter", soul)
  3270. PartEmmit1.LightEmission = 1
  3271. PartEmmit1.Texture = "rbxassetid://569507414"
  3272. PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  3273. PartEmmit1.Rate = 250
  3274. PartEmmit1.Lifetime = NumberRange.new(1.6)
  3275. PartEmmit1.Size = NumberSequence.new({
  3276.     NumberSequenceKeypoint.new(0, 1, 0),
  3277.     NumberSequenceKeypoint.new(1, 0, 0)
  3278. })
  3279. PartEmmit1.Transparency = NumberSequence.new({
  3280.     NumberSequenceKeypoint.new(0, 0, 0),
  3281.     NumberSequenceKeypoint.new(1, 1, 0)
  3282. })
  3283. PartEmmit1.Speed = NumberRange.new(0, 0)
  3284. PartEmmit1.VelocitySpread = 30000
  3285. PartEmmit1.Rotation = NumberRange.new(-360, 360)
  3286. PartEmmit1.RotSpeed = NumberRange.new(-360, 360)
  3287. local BodPoss = IT("BodyPosition", soul)
  3288. BodPoss.P = 3000
  3289. BodPoss.D = 1000
  3290. BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  3291. BodPoss.position = torso.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15))
  3292. wait(1.6)
  3293. soul.Touched:connect(function(hit)
  3294.     if hit.Parent == char then
  3295.     soul:Destroy()
  3296.     end
  3297. end)
  3298. wait(1.2)
  3299. while soul do
  3300.     swait()
  3301.     PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  3302.     BodPoss.Position = tors.Position
  3303. end
  3304. end)
  3305.     soulst()
  3306.     end
  3307. end
  3308. function FaceMouse()
  3309. local   Cam = workspace.CurrentCamera
  3310.     return {
  3311.         CFrame.new(char.Torso.Position, Vector3.new(mouse.Hit.p.x, char.Torso.Position.y, mouse.Hit.p.z)),
  3312.         Vector3.new(mouse.Hit.p.x, mouse.Hit.p.y, mouse.Hit.p.z)
  3313.     }
  3314. end
  3315.  
  3316. function ShowDamage(Pos, Text, Time, Color)
  3317.     local Rate = (1 / 30)
  3318.     local Pos = (Pos or Vector3.new(0, 0, 0))
  3319.     local Text = (Text or "")
  3320.     local Time = (Time or 2)
  3321.     local Color = (Color or Color3.new(1, 0, 1))
  3322.     local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  3323.     EffectPart.Anchored = true
  3324.     local BillboardGui = Create("BillboardGui"){
  3325.         Size = UDim2.new(3, 0, 3, 0),
  3326.         Adornee = EffectPart,
  3327.         Parent = EffectPart,
  3328.     }
  3329.     local TextLabel = Create("TextLabel"){
  3330.         BackgroundTransparency = 1,
  3331.         Size = UDim2.new(1, 0, 1, 0),
  3332.         Text = Text,
  3333.         Font = "Bodoni",
  3334.         TextColor3 = Color,
  3335.         TextScaled = true,
  3336.         TextStrokeColor3 = Color3.fromRGB(0,0,0),
  3337.         Parent = BillboardGui,
  3338.     }
  3339.     game.Debris:AddItem(EffectPart, (Time))
  3340.     EffectPart.Parent = game:GetService("Workspace")
  3341.     delay(0, function()
  3342.         local Frames = (Time / Rate)
  3343.         for Frame = 1, Frames do
  3344.             wait(Rate)
  3345.             local Percent = (Frame / Frames)
  3346.             EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  3347.             TextLabel.TextTransparency = Percent
  3348.         end
  3349.         if EffectPart and EffectPart.Parent then
  3350.             EffectPart:Destroy()
  3351.         end
  3352.     end)
  3353. end
  3354.  
  3355.  
  3356. EffectModel = Instance.new("Model", char)
  3357. Effects = {
  3358.   Block = {
  3359.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  3360.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  3361.       prt.Anchored = true
  3362.       prt.CFrame = cframe
  3363.       local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  3364.       game:GetService("Debris"):AddItem(prt, 10)
  3365.       if Type == 1 or Type == nil then
  3366.         table.insert(Effects, {
  3367.           prt,
  3368.           "Block1",
  3369.           delay,
  3370.           x3,
  3371.           y3,
  3372.           z3,
  3373.           msh
  3374.         })
  3375.       elseif Type == 2 then
  3376.         table.insert(Effects, {
  3377.           prt,
  3378.           "Block2",
  3379.           delay,
  3380.           x3,
  3381.           y3,
  3382.           z3,
  3383.           msh
  3384.         })
  3385.       else
  3386.         table.insert(Effects, {
  3387.           prt,
  3388.           "Block3",
  3389.           delay,
  3390.           x3,
  3391.           y3,
  3392.           z3,
  3393.           msh
  3394.         })
  3395.       end
  3396.     end
  3397.   },
  3398.   Sphere = {
  3399.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  3400.       local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  3401.       prt.Anchored = true
  3402.       prt.CFrame = cframe
  3403.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  3404.       game:GetService("Debris"):AddItem(prt, 10)
  3405.       table.insert(Effects, {
  3406.         prt,
  3407.         "Cylinder",
  3408.         delay,
  3409.         x3,
  3410.         y3,
  3411.         z3,
  3412.         msh
  3413.       })
  3414.     end
  3415.   },
  3416.   Cylinder = {
  3417.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  3418.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  3419.       prt.Anchored = true
  3420.       prt.CFrame = cframe
  3421.       local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  3422.       game:GetService("Debris"):AddItem(prt, 10)
  3423.       table.insert(Effects, {
  3424.         prt,
  3425.         "Cylinder",
  3426.         delay,
  3427.         x3,
  3428.         y3,
  3429.         z3,
  3430.         msh
  3431.       })
  3432.     end
  3433.   },
  3434.   Wave = {
  3435.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  3436.       local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  3437.       prt.Anchored = true
  3438.       prt.CFrame = cframe
  3439.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
  3440.       game:GetService("Debris"):AddItem(prt, 10)
  3441.       table.insert(Effects, {
  3442.         prt,
  3443.         "Cylinder",
  3444.         delay,
  3445.         x3 / 60,
  3446.         y3 / 60,
  3447.         z3 / 60,
  3448.         msh
  3449.       })
  3450.     end
  3451.   },
  3452.   Ring = {
  3453.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  3454.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  3455.       prt.Anchored = true
  3456.       prt.CFrame = cframe
  3457.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  3458.       game:GetService("Debris"):AddItem(prt, 10)
  3459.       table.insert(Effects, {
  3460.         prt,
  3461.         "Cylinder",
  3462.         delay,
  3463.         x3,
  3464.         y3,
  3465.         z3,
  3466.         msh
  3467.       })
  3468.     end
  3469.   },
  3470.   Break = {
  3471.     Create = function(brickcolor, cframe, x1, y1, z1)
  3472.       local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  3473.       prt.Anchored = true
  3474.       prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  3475.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  3476.       local num = math.random(10, 50) / 1000
  3477.       game:GetService("Debris"):AddItem(prt, 10)
  3478.       table.insert(Effects, {
  3479.         prt,
  3480.         "Shatter",
  3481.         num,
  3482.         prt.CFrame,
  3483.         math.random() - math.random(),
  3484.         0,
  3485.         math.random(50, 100) / 100
  3486.       })
  3487.     end
  3488.   },
  3489. Spiral = {
  3490.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  3491.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  3492.       prt.Anchored = true
  3493.       prt.CFrame = cframe
  3494.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://1051557", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  3495.       game:GetService("Debris"):AddItem(prt, 10)
  3496.       table.insert(Effects, {
  3497.         prt,
  3498.         "Cylinder",
  3499.         delay,
  3500.         x3,
  3501.         y3,
  3502.         z3,
  3503.         msh
  3504.       })
  3505.     end
  3506.   },
  3507. Push = {
  3508.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  3509.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  3510.       prt.Anchored = true
  3511.       prt.CFrame = cframe
  3512.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://437347603", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  3513.       game:GetService("Debris"):AddItem(prt, 10)
  3514.       table.insert(Effects, {
  3515.         prt,
  3516.         "Cylinder",
  3517.         delay,
  3518.         x3,
  3519.         y3,
  3520.         z3,
  3521.         msh
  3522.       })
  3523.     end
  3524.   }
  3525. }
  3526. function part(formfactor ,parent, reflectance, transparency, brickcolor, name, size)
  3527.     local fp = IT("Part")
  3528.     fp.formFactor = formfactor
  3529.     fp.Parent = parent
  3530.     fp.Reflectance = reflectance
  3531.     fp.Transparency = transparency
  3532.     fp.CanCollide = false
  3533.     fp.Locked = true
  3534.     fp.BrickColor = brickcolor
  3535.     fp.Name = name
  3536.     fp.Size = size
  3537.     fp.Position = tors.Position
  3538.     RemoveOutlines(fp)
  3539.     fp.Material = "SmoothPlastic"
  3540.     fp:BreakJoints()
  3541.     return fp
  3542. end
  3543.  
  3544. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  3545.     local mesh = IT(Mesh)
  3546.     mesh.Parent = part
  3547.     if Mesh == "SpecialMesh" then
  3548.         mesh.MeshType = meshtype
  3549.     if meshid ~= "nil" then
  3550.         mesh.MeshId = "http://www.roblox.com/asset/?id="..meshid
  3551.         end
  3552.     end
  3553.     mesh.Offset = offset
  3554.     mesh.Scale = scale
  3555.     return mesh
  3556. end
  3557.  
  3558. function Magic(bonuspeed, type, pos, scale, value, color, MType)
  3559.     local type = type
  3560.     local rng = Instance.new("Part", char)
  3561.     rng.Anchored = true
  3562.     rng.BrickColor = color
  3563.     rng.CanCollide = false
  3564.     rng.FormFactor = 3
  3565.     rng.Name = "Ring"
  3566.     rng.Material = "Neon"
  3567.     rng.Size = Vector3.new(1, 1, 1)
  3568.     rng.Transparency = 0
  3569.     rng.TopSurface = 0
  3570.     rng.BottomSurface = 0
  3571.     rng.CFrame = pos
  3572.     local rngm = Instance.new("SpecialMesh", rng)
  3573.     rngm.MeshType = MType
  3574.     rngm.Scale = scale
  3575.     local scaler2 = 1
  3576.     if type == "Add" then
  3577.         scaler2 = 1 * value
  3578.     elseif type == "Divide" then
  3579.         scaler2 = 1 / value
  3580.     end
  3581.     coroutine.resume(coroutine.create(function()
  3582.         for i = 0, 10 / bonuspeed, 0.1 do
  3583.             swait()
  3584.             if type == "Add" then
  3585.                 scaler2 = scaler2 - 0.01 * value / bonuspeed
  3586.             elseif type == "Divide" then
  3587.                 scaler2 = scaler2 - 0.01 / value * bonuspeed
  3588.             end
  3589.             rng.Transparency = rng.Transparency + 0.01 * bonuspeed
  3590.             rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, scaler2 * bonuspeed)
  3591.         end
  3592.         rng:Destroy()
  3593.     end))
  3594. end
  3595.  
  3596. function Eviscerate(dude)
  3597.     if dude.Name ~= char then
  3598.         local bgf = IT("BodyGyro", dude.Head)
  3599.         bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0)
  3600.         local val = IT("BoolValue", dude)
  3601.         val.Name = "IsHit"
  3602.         local ds = coroutine.wrap(function()
  3603.             dude:WaitForChild("Head"):BreakJoints()
  3604.             wait(0.5)
  3605.             target = nil
  3606.             coroutine.resume(coroutine.create(function()
  3607.                 for i, v in pairs(dude:GetChildren()) do
  3608.                     if v:IsA("Accessory") then
  3609.                         v:Destroy()
  3610.                     end
  3611.                     if v:IsA("Humanoid") then
  3612.                         v:Destroy()
  3613.                     end
  3614.                     if v:IsA("CharacterMesh") then
  3615.                         v:Destroy()
  3616.                     end
  3617.                     if v:IsA("Model") then
  3618.                         v:Destroy()
  3619.                     end
  3620.                     if v:IsA("Part") or v:IsA("MeshPart") then
  3621.                         for x, o in pairs(v:GetChildren()) do
  3622.                             if o:IsA("Decal") then
  3623.                                 o:Destroy()
  3624.                             end
  3625.                         end
  3626.                         coroutine.resume(coroutine.create(function()
  3627.                             v.Material = "Neon"
  3628.                             v.CanCollide = false
  3629.                             local PartEmmit1 = IT("ParticleEmitter", v)
  3630.                             PartEmmit1.LightEmission = 1
  3631.                             PartEmmit1.Texture = "rbxassetid://1523916715"
  3632.                             PartEmmit1.Color = ColorSequence.new(Color3.new(0, 0, 0))
  3633.                             PartEmmit1.Rate = 150
  3634.                             PartEmmit1.Lifetime = NumberRange.new(1)
  3635.                             PartEmmit1.Size = NumberSequence.new({
  3636.                                 NumberSequenceKeypoint.new(0, 0.75, 0),
  3637.                                 NumberSequenceKeypoint.new(1, 0, 0)
  3638.                             })
  3639.                             PartEmmit1.Transparency = NumberSequence.new({
  3640.                                 NumberSequenceKeypoint.new(0, 0, 0),
  3641.                                 NumberSequenceKeypoint.new(1, 1, 0)
  3642.                             })
  3643.                             PartEmmit1.Speed = NumberRange.new(0, 0)
  3644.                             PartEmmit1.VelocitySpread = 30000
  3645.                             PartEmmit1.Rotation = NumberRange.new(-500, 500)
  3646.                             PartEmmit1.RotSpeed = NumberRange.new(-500, 500)
  3647.                             local BodPoss = IT("BodyPosition", v)
  3648.                             BodPoss.P = 3000
  3649.                             BodPoss.D = 1000
  3650.                             BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  3651.                             BodPoss.position = v.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15))
  3652.                             v.Color = maincolor.Color
  3653.                             coroutine.resume(coroutine.create(function()
  3654.                                 for i = 0, 49 do
  3655.                                     swait(1)
  3656.                                     v.Transparency = v.Transparency + 0.08
  3657.                                 end
  3658.                                 wait(0.5)
  3659.                                 PartEmmit1.Enabled = false
  3660.                                 wait(3)
  3661.                                 v:Destroy()
  3662.                                 dude:Destroy()
  3663.                             end))
  3664.                         end))
  3665.                     end
  3666.                 end
  3667.             end))
  3668.         end)
  3669.         ds()
  3670.     end
  3671. end
  3672.  
  3673. function FindNearestHead(Position, Distance, SinglePlayer)
  3674.     if SinglePlayer then
  3675.         return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude
  3676.     end
  3677.     local List = {}
  3678.     for i, v in pairs(workspace:GetChildren()) do
  3679.         if v:IsA("Model") and v:findFirstChild("Head") and v ~= char and Distance >= (v.Head.Position - Position).magnitude then
  3680.             table.insert(List, v)
  3681.         end
  3682.     end
  3683.     return List
  3684. end
  3685.  
  3686. function Aura(bonuspeed, FastSpeed, type, pos, x1, y1, z1, value, color, outerpos, MType)
  3687.     local type = type
  3688.     local rng = Instance.new("Part", char)
  3689.     rng.Anchored = true
  3690.     rng.BrickColor = color
  3691.     rng.CanCollide = false
  3692.     rng.FormFactor = 3
  3693.     rng.Name = "Ring"
  3694.     rng.Material = "Neon"
  3695.     rng.Size = Vector3.new(1, 1, 1)
  3696.     rng.Transparency = 0
  3697.     rng.TopSurface = 0
  3698.     rng.BottomSurface = 0
  3699.     rng.CFrame = pos
  3700.     rng.CFrame = rng.CFrame + rng.CFrame.lookVector * outerpos
  3701.     local rngm = Instance.new("SpecialMesh", rng)
  3702.     rngm.MeshType = MType
  3703.     rngm.Scale = Vector3.new(x1, y1, z1)
  3704.     local scaler2 = 1
  3705.     local speeder = FastSpeed
  3706.     if type == "Add" then
  3707.         scaler2 = 1 * value
  3708.     elseif type == "Divide" then
  3709.         scaler2 = 1 / value
  3710.     end
  3711.     coroutine.resume(coroutine.create(function()
  3712.         for i = 0, 10 / bonuspeed, 0.1 do
  3713.             swait()
  3714.             if type == "Add" then
  3715.                 scaler2 = scaler2 - 0.01 * value / bonuspeed
  3716.             elseif type == "Divide" then
  3717.                 scaler2 = scaler2 - 0.01 / value * bonuspeed
  3718.             end
  3719.             speeder = speeder - 0.01 * FastSpeed * bonuspeed
  3720.             rng.CFrame = rng.CFrame + rng.CFrame.lookVector * speeder * bonuspeed
  3721.             rng.Transparency = rng.Transparency + 0.01 * bonuspeed
  3722.             rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, 0)
  3723.         end
  3724.         rng:Destroy()
  3725.     end))
  3726. end
  3727.  
  3728. function SoulSteal(dude)
  3729. if dude.Name ~= char then
  3730. local bgf = IT("BodyGyro", dude.Head)
  3731. bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0)
  3732. local val = IT("BoolValue", dude)
  3733. val.Name = "IsHit"
  3734. local torso = (dude:FindFirstChild'Head' or dude:FindFirstChild'Torso' or dude:FindFirstChild'UpperTorso' or dude:FindFirstChild'LowerTorso' or dude:FindFirstChild'HumanoidRootPart')
  3735. local soulst = coroutine.wrap(function()
  3736. local soul = Instance.new("Part",dude)
  3737. soul.Size = Vector3.new(1,1,1)
  3738. soul.CanCollide = false
  3739. soul.Anchored = false
  3740. soul.Position = torso.Position
  3741. soul.Transparency = 1
  3742. local PartEmmit1 = IT("ParticleEmitter", soul)
  3743. PartEmmit1.LightEmission = 1
  3744. PartEmmit1.Texture = "rbxassetid://569507414"
  3745. PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  3746. PartEmmit1.Rate = 250
  3747. PartEmmit1.Lifetime = NumberRange.new(1.6)
  3748. PartEmmit1.Size = NumberSequence.new({
  3749.     NumberSequenceKeypoint.new(0, 1, 0),
  3750.     NumberSequenceKeypoint.new(1, 0, 0)
  3751. })
  3752. PartEmmit1.Transparency = NumberSequence.new({
  3753.     NumberSequenceKeypoint.new(0, 0, 0),
  3754.     NumberSequenceKeypoint.new(1, 1, 0)
  3755. })
  3756. PartEmmit1.Speed = NumberRange.new(0, 0)
  3757. PartEmmit1.VelocitySpread = 30000
  3758. PartEmmit1.Rotation = NumberRange.new(-360, 360)
  3759. PartEmmit1.RotSpeed = NumberRange.new(-360, 360)
  3760. local BodPoss = IT("BodyPosition", soul)
  3761. BodPoss.P = 3000
  3762. BodPoss.D = 1000
  3763. BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  3764. BodPoss.position = torso.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15))
  3765. wait(1.6)
  3766. soul.Touched:connect(function(hit)
  3767.     if hit.Parent == char then
  3768.     soul:Destroy()
  3769.     end
  3770. end)
  3771. wait(1.2)
  3772. while soul do
  3773.     swait()
  3774.     PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  3775.     BodPoss.Position = tors.Position
  3776. end
  3777. end)
  3778.     soulst()
  3779.     end
  3780. end
  3781. function FaceMouse()
  3782. local   Cam = workspace.CurrentCamera
  3783.     return {
  3784.         CFrame.new(char.Torso.Position, Vector3.new(mouse.Hit.p.x, char.Torso.Position.y, mouse.Hit.p.z)),
  3785.         Vector3.new(mouse.Hit.p.x, mouse.Hit.p.y, mouse.Hit.p.z)
  3786.     }
  3787. end
  3788. -------------------------------------------------------
  3789. --End Effect Function--
  3790. -------------------------------------------------------
  3791. -------------------------------------------------------
  3792. --End Important Functions--
  3793. -------------------------------------------------------
  3794.  
  3795.  
  3796. -------------------------------------------------------
  3797. --Start Customization--
  3798. -------------------------------------------------------
  3799. local Player_Size = 1
  3800. if Player_Size ~= 1 then
  3801. root.Size = root.Size * Player_Size
  3802. tors.Size = tors.Size * Player_Size
  3803. hed.Size = hed.Size * Player_Size
  3804. ra.Size = ra.Size * Player_Size
  3805. la.Size = la.Size * Player_Size
  3806. rl.Size = rl.Size * Player_Size
  3807. ll.Size = ll.Size * Player_Size
  3808. ----------------------------------------------------------------------------------
  3809. rootj.Parent = root
  3810. neck.Parent = tors
  3811. RW.Parent = tors
  3812. LW.Parent = tors
  3813. RH.Parent = tors
  3814. LH.Parent = tors
  3815. ----------------------------------------------------------------------------------
  3816. rootj.C0 = RootCF * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0))
  3817. rootj.C1 = RootCF * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0))
  3818. neck.C0 = necko * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * angles(Rad(0), Rad(0), Rad(0))
  3819. neck.C1 = CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * angles(Rad(-90), Rad(0), Rad(180))
  3820. RW.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0)) --* RIGHTSHOULDERC0
  3821. LW.C0 = CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0)) --* LEFTSHOULDERC0
  3822. ----------------------------------------------------------------------------------
  3823. RH.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))
  3824. LH.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))
  3825. RH.C1 = CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
  3826. LH.C1 = CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(-90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
  3827. --hat.Parent = Character
  3828. end
  3829. ----------------------------------------------------------------------------------
  3830. local equipped = false
  3831. local idle = 0
  3832. local change = 1
  3833. local val = 0
  3834. local toim = 0
  3835. local idleanim = 0.4
  3836. local sine = 0
  3837. local Sit = 1
  3838. ----------------------------------------------------------------------------------
  3839. hum.WalkSpeed = 16
  3840. hum.Animator.Parent = nil
  3841. ----------------------------------------------------------------------------------
  3842. char.Parent = Lighting
  3843. wait()
  3844. char.Parent = workspace
  3845.  
  3846. function AnimationSwitch()
  3847. print("hello")
  3848. end
  3849. -------------------------------------------------------
  3850. --End Customization--
  3851. -------------------------------------------------------
  3852. attack = false
  3853. local attack = false
  3854. ATTACK = false
  3855. local ATTACK = false
  3856. --//=================================\\
  3857. --||      ASSIGN THINGS TO KEYS
  3858. --\\=================================//
  3859. mouse.KeyDown:connect(function(key)
  3860.     if key == 'z' then
  3861.        AnimationSwitch()
  3862.     end
  3863. end)
  3864. --//=================================\\
  3865. --\\=================================//
  3866. local naeeym2 = Instance.new("BillboardGui",char)
  3867. naeeym2.AlwaysOnTop = true
  3868. naeeym2.Size = UDim2.new(5,35,2,35)
  3869. naeeym2.StudsOffset = Vector3.new(0,2,0)
  3870. naeeym2.Adornee = hed
  3871. naeeym2.Name = "Name"
  3872.  
  3873. local IN = Instance.new
  3874. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  3875.     local Sound = IN("Sound")
  3876.     Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  3877.     Sound.Pitch = pitch or 1
  3878.     Sound.Volume = volume or 1
  3879.     Sound.Looped = looped or false
  3880.     if(autoPlay)then
  3881.         coroutine.wrap(function()
  3882.             repeat wait() until Sound.IsLoaded
  3883.             Sound.Playing = autoPlay or false
  3884.         end)()
  3885.     end
  3886.     if(not looped and effect)then
  3887.         Sound.Stopped:connect(function()
  3888.             Sound.Volume = 0
  3889.             Sound:destroy()
  3890.         end)
  3891.     elseif(effect)then
  3892.         warn("Sound can't be looped and a sound effect!")
  3893.     end
  3894.     Sound.Parent =parent or Torso
  3895.     return Sound
  3896. end
  3897. local MusicID = 723652641
  3898. local Music = Sound(char,MusicID,1,3,true,false,true)
  3899. Music.Name = 'Music'
  3900. MODE = 4
  3901. --Note MODE 4 is the animations the script normaly uses. All of the other modes are just testing.--
  3902. while true do
  3903.     swait()
  3904.     sine = sine + change
  3905.   if(not Music or not Music.Parent)then
  3906.         local tPos = 0
  3907.         pcall(function()tPos = Music.TimePosition; Music:destroy() end)
  3908.         Music = Sound(char,MusicID,1,10,true,false,true)
  3909.         Music.Name = 'Music'
  3910.         Music.TimePosition = tPos
  3911.     end
  3912.     local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
  3913.     local velderp = root.Velocity.y
  3914.     hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).lookVector, 4* Player_Size, char)
  3915.     if equipped == true or equipped == false then
  3916.         if attack == false then
  3917.             idle = idle + 1
  3918.         else
  3919.             idle = 0
  3920.         end
  3921.         if 1 < root.Velocity.y and hitfloor == nil then
  3922.             Anim = "Jump"
  3923.             if attack == false then
  3924.                 rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.1 + 0.1 * Cos(sine / 20)* Player_Size) * angles(Rad(-16), Rad(0), Rad(0)), 0.15)
  3925.                 neck.C0 = clerp(neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(10 - 2.5 * Sin(sine / 30)), Rad(0), Rad(0)), 0.3)
  3926.                 RH.C0 = clerp(RH.C0, CF(1* Player_Size, -.2 - 0.1 * Cos(sine / 20)* Player_Size, -.3* Player_Size) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  3927.                 LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -.9 - 0.1 * Cos(sine / 20), -.5* Player_Size) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  3928.                 RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(25), Rad(-.6), Rad(13 + 4.5 * Sin(sine / 20))), 0.1)
  3929.                 LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(25), Rad(-.6), Rad(-13 - 4.5 * Sin(sine / 20))), 0.1)
  3930. elseif MODE == 4 and attack == false then
  3931.  
  3932. end
  3933.         elseif -1 > root.Velocity.y and hitfloor == nil then
  3934.             Anim = "Fall"
  3935.             if attack == false then
  3936.                 rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.1 + 0.1 * Cos(sine / 20)* Player_Size) * angles(Rad(24), Rad(0), Rad(0)), 0.15)
  3937.                 neck.C0 = clerp(neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(10 - 2.5 * Sin(sine / 30)), Rad(0), Rad(0)), 0.3)
  3938.                 RH.C0 = clerp(RH.C0, CF(1* Player_Size, -1 - 0.1 * Cos(sine / 20)* Player_Size, -.3* Player_Size) * RHCF * angles(Rad(-3.5), Rad(0), Rad(0)), 0.15)
  3939.                 LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -.8 - 0.1 * Cos(sine / 20)* Player_Size, -.3* Player_Size) * LHCF * angles(Rad(-3.5), Rad(0), Rad(0)), 0.15)
  3940.                 RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(65), Rad(-.6), Rad(45 + 4.5 * Sin(sine / 20))), 0.1)
  3941.                 LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(55), Rad(-.6), Rad(-45 - 4.5 * Sin(sine / 20))), 0.1)
  3942. elseif MODE == 4 and attack == false then
  3943.  
  3944. end
  3945.         elseif torvel < 1 and hitfloor ~= nil then
  3946.             Anim = "Idle"
  3947.             change = 1
  3948.             if attack == false and MODE == 1 then
  3949.                 rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.1 + 0.1* Player_Size * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(20)), 0.15)
  3950.                 tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(15 - 7.5 * Sin(sine / 30)), Rad(0), Rad(-20)), 0.3)
  3951.                 RH.C0 = clerp(RH.C0, CF(1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(75), Rad(0)) * angles(Rad(-12.5), Rad(0), Rad(0)), 0.15)
  3952.                 LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(-75), Rad(0)) * angles(Rad(-12.5), Rad(0), Rad(8)), 0.15)
  3953.                 RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.05 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(10), Rad(-.6), Rad(15 + 6.5 * Sin(sine / 20))), 0.1)
  3954.                 LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.05 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(-10), Rad(-.6), Rad(-15 - 6.5 * Sin(sine / 20))), 0.1)
  3955.     elseif MODE == 2 and attack == false then
  3956. rootj.C0=clerp(rootj.C0,RootCF*CF(0,0,-0.1+0.1*math.cos(sine/20))*angles(math.rad(15),math.rad(0),math.rad(0)),0.15)
  3957. tors.Neck.C0=clerp(tors.Neck.C0,necko*angles(math.rad(15*math.sin(sine/25)/2),math.rad(0),math.rad(10*math.sin(sine/25))),.3)
  3958. RH.C0=clerp(RH.C0,CF(1,-0.9-0.1*math.cos(sine/20),0.025*math.cos(sine/20))*RHCF*angles(math.rad(-10),math.rad(-0),math.rad(15)),0.15)
  3959. LH.C0=clerp(LH.C0,CF(-1,-0.9-0.1*math.cos(sine/20),0.025*math.cos(sine/20))*LHCF*angles(math.rad(-3),math.rad(-4*math.sin(sine/25)),math.rad(-5)),0.15)
  3960. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5+0.04*math.sin(sine/25), 0) * angles(math.rad(20 ), math.rad(-7*math.sin(sine/25)), math.rad(5)), 0.1)
  3961. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5+0.04*math.sin(sine/25),0) * angles(math.rad(20 ), math.rad(7*math.sin(sine/25)), math.rad(-5)), 0.1)
  3962.     elseif MODE == 3 and attack == false then
  3963.             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(5 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  3964.             Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-5 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  3965.             RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  3966.             LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 2.5 * SIN(SINE / 12)), RAD(-5 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  3967.             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)
  3968.             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)
  3969.     elseif MODE == 4 and attack == false then
  3970.                 rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.1 + 0.1* Player_Size * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(20)), 0.08)
  3971.                 tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(46 - 2.5 * Sin(sine / 30)), Rad(-4.5 * Sin(sine / .5)), Rad(-20 - 4.5 * Sin(sine / .5))), 0.08)
  3972.                 RH.C0 = clerp(RH.C0, CF(1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(80), Rad(0)) * angles(Rad(-10.5), Rad(0), Rad(0)), 0.08)
  3973.                 LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(-80), Rad(0)) * angles(Rad(-10.5), Rad(0), Rad(0)), 0.08)
  3974.                 RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(155), Rad(0), Rad(-45)), 0.08)
  3975.                 LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(0), Rad(-25)), 0.08)
  3976. end
  3977.         elseif torvel > 2 and torvel < 25 and hitfloor ~= nil then
  3978.             Anim = "Walk"
  3979.             change = 1
  3980.             if attack == false and MODE == 1 then
  3981.                 rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.175 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7* Player_Size) * angles(Rad(3 - 2.5 * Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(8 * Cos(sine / 7))), 0.15)
  3982.                 tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(6 - 2.5 * Sin(sine / 7)), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3)
  3983.                 RH.C0 = clerp(RH.C0, CF(1* Player_Size, -0.8 - 0.5 * Cos(sine / 7) / 2* Player_Size, 0.6 * Cos(sine / 7) / 2* Player_Size)  * angles(Rad(-10 - 25 * Cos(sine / 7)) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 10 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 2 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  3984.                 LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -0.8 + 0.5 * Cos(sine / 7) / 2* Player_Size, -0.6 * Cos(sine / 7) / 2* Player_Size) * angles(Rad(-10 + 25 * Cos(sine / 7)) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 10 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 2 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  3985.                 RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.05 * Sin(sine / 7)* Player_Size, 0* Player_Size) * angles(Rad(37)  * Cos(sine / 7) , Rad(8 * Cos(sine / 7)), Rad(6) - ra.RotVelocity.Y / 75), 0.1)
  3986.                 LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.05 * Sin(sine / 7)* Player_Size, 0* Player_Size) * angles(Rad(-37)  * Cos(sine / 7) , Rad(8 * Cos(sine / 7)) ,   Rad(-6) + la.RotVelocity.Y / 75), 0.1)
  3987.     elseif MODE == 2 and attack == false then
  3988.                 rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.175 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7) * angles(Rad(3 - 2.5 * Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(8 * Cos(sine / 7))), 0.15)
  3989.                 tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(6 - 2.5 * Sin(sine / 7)), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3)
  3990.                 RH.C0 = clerp(RH.C0, CF(1, -0.8 - 0.5 * Cos(sine / 7) / 2, 0.6 * Cos(sine / 7) / 2)  * angles(Rad(-15 - 5 * Cos(sine / 7)) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 3 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 2 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  3991.                 LH.C0 = clerp(LH.C0, CF(-1, -0.8 + 0.5 * Cos(sine / 7) / 2, -0.6 * Cos(sine / 7) / 2) * angles(Rad(-15 + 5 * Cos(sine / 7)) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 3 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 2 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  3992.                 RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.05 * Sin(sine / 7), 0) * angles(Rad(37)  * Cos(sine / 7) , Rad(0), Rad(-.6) - ra.RotVelocity.Y / 75), 0.1)
  3993.                 LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.05 * Sin(sine / 7), 0) * angles(Rad(-37)  * Cos(sine / 7) , Rad(0) ,  Rad(.6) + la.RotVelocity.Y / 75), 0.1)
  3994.     elseif MODE == 3 and attack == false then
  3995.             RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(25 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(5 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  3996.             Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-5 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  3997.             RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(-25), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(15 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  3998.             LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(-25), RAD(0 + 2.5 * SIN(SINE / 12)), RAD(-15 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  3999.             RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-25-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 5.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  4000.             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)
  4001.     elseif MODE == 4 and attack == false then
  4002.                 rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, 2 + 0.25* Player_Size * Cos(sine / 12)) * angles(Rad(25), Rad(0), Rad(0)), 0.1)
  4003.                 tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(-15 - 6.5 * Sin(sine / 12)), Rad(20), Rad(0)), 0.1)
  4004.                 RH.C0 = clerp(RH.C0, CF(1* Player_Size, -1 - 0.15 * Cos(sine / 20)* Player_Size, -0.1* Player_Size) * angles(Rad(0), Rad(76), Rad(0)) * angles(Rad(-18.5 - 6.5 * Sin(sine / 12)), Rad(0), Rad(-35)), 0.1)
  4005.                 LH.C0 = clerp(LH.C0, CF(-1.1* Player_Size, -0.6 - 0.15 * Cos(sine / 20)* Player_Size, -0.2* Player_Size) * angles(Rad(0), Rad(-76), Rad(0)) * angles(Rad(-18.5 - 6.5 * Sin(sine / 12)), Rad(15), Rad(35)), 0.1)
  4006.                 RW.C0 = clerp(RW.C0, CF(1.4* Player_Size, 0.4 + 0.08 * Sin(sine / 12)* Player_Size, 0* Player_Size) * angles(Rad(-45 - 6.5 * Cos(sine / 12)), Rad(-.6), Rad(25 + 6.5 * Sin(sine / 12))), 0.1)
  4007.                 LW.C0 = clerp(LW.C0, CF(-1.4* Player_Size, 0.4 + 0.08 * Sin(sine / 12)* Player_Size, 0* Player_Size) * angles(Rad(-45 - 6.5 * Cos(sine / 12)), Rad(-.6), Rad(-25 - 6.5 * Sin(sine / 12))), 0.1)
  4008. end
  4009.         elseif torvel >= 25 and hitfloor ~= nil then
  4010.             Anim = "Sprint"
  4011.             change = 1.35
  4012.             if attack == false then
  4013.             rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.175 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7* Player_Size) * angles(Rad(26 - 4.5 * Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(15 * Cos(sine / 7))), 0.15)
  4014.             tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(-2.5 * Sin(sine / 20)), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3)
  4015.             RH.C0 = clerp(RH.C0, CF(1* Player_Size, -0.925 - 0.5 * Cos(sine / 7) / 2* Player_Size, 0.7 * Cos(sine / 7) / 2* Player_Size) * angles(Rad(-15 - 55 * Cos(sine / 7)) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 0.1 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  4016.             LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -0.925 + 0.5 * Cos(sine / 7) / 2* Player_Size, -0.7 * Cos(sine / 7) / 2* Player_Size) * angles(Rad(-15 + 55 * Cos(sine / 7)) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 0.1 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  4017.             RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.05 * Sin(sine / 30)* Player_Size, 0.34 * Cos(sine / 7* Player_Size)) * angles(Rad(110)  * Cos(sine / 7) , Rad(0), Rad(13) - ra.RotVelocity.Y / 75), 0.15)
  4018.             LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.05 * Sin(sine / 30)* Player_Size, -0.34 * Cos(sine / 7* Player_Size)) * angles(Rad(-110)  * Cos(sine / 7) , Rad(0) , Rad(-13) + la.RotVelocity.Y / 75), 0.15)
  4019.             end
  4020.         end
  4021.     end
  4022.     if 0 < #Effects then
  4023.         for e = 1, #Effects do
  4024.             if Effects[e] ~= nil then
  4025.                 local Thing = Effects[e]
  4026.                 if Thing ~= nil then
  4027.                     local Part = Thing[1]
  4028.                     local Mode = Thing[2]
  4029.                     local Delay = Thing[3]
  4030.                     local IncX = Thing[4]
  4031.                     local IncY = Thing[5]
  4032.                     local IncZ = Thing[6]
  4033.                     if 1 >= Thing[1].Transparency then
  4034.                         if Thing[2] == "Block1" then
  4035.                             Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  4036.                             local Mesh = Thing[1].Mesh
  4037.                             Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  4038.                             Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  4039.                         elseif Thing[2] == "Block2" then
  4040.                             Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0)
  4041.                             local Mesh = Thing[7]
  4042.                             Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  4043.                             Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  4044.                         elseif Thing[2] == "Block3" then
  4045.                             Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0)
  4046.                             local Mesh = Thing[7]
  4047.                             Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  4048.                             Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  4049.                         elseif Thing[2] == "Cylinder" then
  4050.                             local Mesh = Thing[1].Mesh
  4051.                             Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  4052.                             Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  4053.                         elseif Thing[2] == "Blood" then
  4054.                             local Mesh = Thing[7]
  4055.                             Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  4056.                             Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  4057.                             Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  4058.                         elseif Thing[2] == "Elec" then
  4059.                             local Mesh = Thing[1].Mesh
  4060.                             Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  4061.                             Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  4062.                         elseif Thing[2] == "Disappear" then
  4063.                             Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  4064.                         elseif Thing[2] == "Shatter" then
  4065.                             Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  4066.                             Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  4067.                             Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  4068.                             Thing[6] = Thing[6] + Thing[5]
  4069.                         end
  4070.                     else
  4071.                         Part.Parent = nil
  4072.                         table.remove(Effects, e)
  4073.                     end
  4074.                 end
  4075.             end
  4076.         end
  4077.     end
  4078. end
  4079. -------------------------------------------------------
  4080. --End Animations And Script--
  4081. -------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement