Advertisement
agu29029320904930935

sakuya test

Nov 23rd, 2020 (edited)
1,617
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 46.42 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5.     print("FE Compatibility code by Mokiros")
  6.     local rp = RealPlayer
  7.     script.Parent = rp.Character
  8.    
  9.     --RemoteEvent for communicating
  10.     local Event = Instance.new("RemoteEvent")
  11.     Event.Name = "UserInput_Event"
  12.  
  13.     --Fake event to make stuff like Mouse.KeyDown work
  14.     local function fakeEvent()
  15.         local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16.         t.connect = t.Connect
  17.         return t
  18.     end
  19.  
  20.     --Creating fake input objects with fake variables
  21.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25.     end}
  26.     --Merged 2 functions into one by checking amount of arguments
  27.     CAS.UnbindAction = CAS.BindAction
  28.  
  29.     --This function will trigger the events that have been :Connect()'ed
  30.    local function te(self,ev,...)
  31.        local t = m[ev]
  32.        if t and t._fakeEvent then
  33.            for _,f in pairs(t.Functions) do
  34.                f(...)
  35.            end
  36.        end
  37.    end
  38.    m.TrigEvent = te
  39.    UIS.TrigEvent = te
  40.  
  41.    Event.OnServerEvent:Connect(function(plr,io)
  42.        if plr~=rp then return end
  43.        m.Target = io.Target
  44.        m.Hit = io.Hit
  45.        if not io.isMouse then
  46.            local b = io.UserInputState == Enum.UserInputState.Begin
  47.            if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48.                return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49.            end
  50.            for _,t in pairs(CAS.Actions) do
  51.                for _,k in pairs(t.Keys) do
  52.                    if k==io.KeyCode then
  53.                        t.Function(t.Name,io.UserInputState,io)
  54.                    end
  55.                end
  56.            end
  57.            m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58.            UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59.        end
  60.    end)
  61.    Event.Parent = NLS([==[
  62.    local Player = game:GetService("Players").LocalPlayer
  63.    local Event = script:WaitForChild("UserInput_Event")
  64.  
  65.    local Mouse = Player:GetMouse()
  66.    local UIS = game:GetService("UserInputService")
  67.    local input = function(io,a)
  68.        if a then return end
  69.        --Since InputObject is a client-side instance, we create and pass table instead
  70.        Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71.    end
  72.    UIS.InputBegan:Connect(input)
  73.    UIS.InputEnded:Connect(input)
  74.  
  75.    local h,t
  76.    --Give the server mouse data 30 times every second, but only if the values changed
  77.    --If player is not moving their mouse, client won't fire events
  78.     while wait(1/30) do
  79.         if h~=Mouse.Hit or t~=Mouse.Target then
  80.             h,t=Mouse.Hit,Mouse.Target
  81.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  82.         end
  83.     end]==],Player.Character)
  84.  
  85.     ----Sandboxed game object that allows the usage of client-side methods and services
  86.     --Real game object
  87.     local _rg = game
  88.  
  89.     --Metatable for fake service
  90.     local fsmt = {
  91.         __index = function(self,k)
  92.             local s = rawget(self,"_RealService")
  93.             if s then return s[k] end
  94.         end,
  95.         __newindex = function(self,k,v)
  96.             local s = rawget(self,"_RealService")
  97.             if s then s[k]=v end
  98.         end,
  99.         __call = function(self,...)
  100.             local s = rawget(self,"_RealService")
  101.             if s then return s(...) end
  102.         end
  103.     }
  104.     local function FakeService(t,RealService)
  105.         t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106.         return setmetatable(t,fsmt)
  107.     end
  108.  
  109.     --Fake game object
  110.     local g = {
  111.         GetService = function(self,s)
  112.             return self[s]
  113.         end,
  114.         Players = FakeService({
  115.             LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116.         },"Players"),
  117.         UserInputService = FakeService(UIS,"UserInputService"),
  118.         ContextActionService = FakeService(CAS,"ContextActionService"),
  119.     }
  120.     rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121.     g.service = g.GetService
  122.    
  123.     g.RunService = FakeService({
  124.         RenderStepped = _rg:GetService("RunService").Heartbeat,
  125.         BindToRenderStep = function(self,name,_,fun)
  126.             self._btrs[name] = self.Heartbeat:Connect(fun)
  127.         end,
  128.         UnbindFromRenderStep = function(self,name)
  129.             self._btrs[name]:Disconnect()
  130.         end,
  131.     },"RunService")
  132.  
  133.     setmetatable(g,{
  134.         __index=function(self,s)
  135.             return _rg:GetService(s) or typeof(_rg[s])=="function"
  136.             and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137.         end,
  138.         __newindex = fsmt.__newindex,
  139.         __call = fsmt.__call
  140.     })
  141.     --Changing owner to fake player object to support owner:GetMouse()
  142.     game,owner = g,g.Players.LocalPlayer
  143. end
  144. wait(0.016666666666667)
  145. Anim = nil
  146. cf = CFrame.new
  147. function c3(cz, cx, cc)
  148.   return Color3.new(cz / 255, cx / 255, cc / 255)
  149. end
  150. angles = CFrame.Angles
  151. Player = game.Players.LocalPlayer
  152. Character = Player.Character
  153. Humanoid = Character.Humanoid
  154. mouse = Player:GetMouse()
  155. local LeftArm = Character["Left Arm"]
  156. RightArm = Character["Right Arm"]
  157. LeftLeg = Character["Left Leg"]
  158. RightLeg = Character["Right Leg"]
  159. Head = Character.Head
  160. Torso = Character.Torso
  161. RootPart = Character.HumanoidRootPart
  162. RootJoint = RootPart.RootJoint
  163. Humanoid.Animator:Destroy()
  164. Character.Animate:Destroy()
  165. NeckCF = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  166. RootCF = angles(-1.57, 0, 3.14)
  167. LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  168. LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  169. RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  170. RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  171. RW = Instance.new("Weld")
  172. LW = Instance.new("Weld")
  173. RH = Torso["Right Hip"]
  174. LH = Torso["Left Hip"]
  175. Neck = Torso.Neck
  176. RSH = Torso["Right Shoulder"]
  177. LSH = Torso["Left Shoulder"]
  178. RSH.Parent = nil
  179. LSH.Parent = nil
  180. RW.Name = "Right Shoulder"
  181. RW.Part0 = Torso
  182. RW.C0 = cf(1.5, 0.5, 0)
  183. RW.C1 = cf(0, 0.5, 0)
  184. RW.Part1 = RightArm
  185. RW.Parent = Torso
  186. LW.Name = "Left Shoulder"
  187. LW.Part0 = Torso
  188. LW.C0 = cf(-1.5, 0.5, 0)
  189. LW.C1 = cf(0, 0.5, 0)
  190. LW.Part1 = LeftArm
  191. LW.Parent = Torso
  192. Effects = Instance.new("Model", Character)
  193. Effects.Name = "Effects"
  194. Humanoid.WalkSpeed = 16
  195. partEffects, AttackHas, AttackNeeded, AttackCan = {}, {}, {}, {}
  196. AttackHas[1], AttackHas[2], AttackHas[3], AttackHas[4] = 1, 1, 1, 1
  197. AttackNeeded[1], AttackNeeded[2], AttackNeeded[3], AttackNeeded[4] = 1, 1, 1, 1
  198. AttackCan[1], AttackCan[2], AttackCan[3], AttackCan[4] = true, true, true, true
  199. sine = 0
  200. attackcounter = 1
  201. torvel = nil
  202. attacking = false
  203. hitfloor, posfloor = nil, nil
  204. tool = nil
  205. if script.Parent.ClassName == "HopperBin" then
  206.   tool = script.Parent
  207.   tool.Parent = Player.Backpack
  208. else
  209.   tool = Instance.new("HopperBin", Player.Backpack)
  210.   tool.Name = ""
  211. end
  212. meshes = {
  213.   3270017,
  214.   20329976,
  215.   448386996,
  216.   1095708,
  217.   1033714,
  218.   9756362
  219. }
  220. sounds = {
  221.   {
  222.     320557413,
  223.     320557453,
  224.     320557487,
  225.     320557518,
  226.     320557537,
  227.     320557563,
  228.     233856146,
  229.     233856140
  230.   },
  231.   {
  232.     234365549,
  233.     234365573,
  234.     231917961,
  235.     231917950,
  236.     231917856,
  237.     231917863,
  238.     231917871
  239.   },
  240.   {
  241.     262562442,
  242.     231917806,
  243.     231917784
  244.   },
  245.   {
  246.     262562442,
  247.     233856048,
  248.     306247739
  249.   }
  250. }
  251. ArtificialHB = Instance.new("BindableEvent", script)
  252. ArtificialHB.Name = "Heartbeat"
  253. script:WaitForChild("Heartbeat")
  254. frame = 0.025
  255. tf = 0
  256. allowframeloss = true
  257. tossremainder = false
  258. lastframe = tick()
  259. script.Heartbeat:Fire()
  260. game:GetService("RunService").Heartbeat:connect(function(s, p)
  261.   tf = tf + s
  262.   if tf >= frame then
  263.     if allowframeloss then
  264.       script.Heartbeat:Fire()
  265.       lastframe = tick()
  266.     else
  267.       for i = 1, math.floor(tf / frame) do
  268.         script.Heartbeat:Fire()
  269.       end
  270.       lastframe = tick()
  271.     end
  272.     if tossremainder then
  273.       tf = 0
  274.     else
  275.       tf = tf - frame * math.floor(tf / frame)
  276.     end
  277.   end
  278. end)
  279. function swait(num)
  280.   if num == 0 or num == nil then
  281.     ArtificialHB.Event:wait()
  282.   else
  283.     for i = 0, num do
  284.       ArtificialHB.Event:wait()
  285.     end
  286.   end
  287. end
  288. function thread(f)
  289.   coroutine.resume(coroutine.create(f))
  290. end
  291. function clerp(a, b, t)
  292.   local qa = {
  293.     QuaternionFromCFrame(a)
  294.   }
  295.   local qb = {
  296.     QuaternionFromCFrame(b)
  297.   }
  298.   local ax, ay, az = a.x, a.y, a.z
  299.   local bx, by, bz = b.x, b.y, b.z
  300.   local _t = 1 - t
  301.   return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  302. end
  303. function QuaternionFromCFrame(cf)
  304.   local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  305.   local trace = m00 + m11 + m22
  306.   if trace > 0 then
  307.     local s = math.sqrt(1 + trace)
  308.     local recip = 0.5 / s
  309.     return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  310.   else
  311.     local i = 0
  312.     if m00 < m11 then
  313.       i = 1
  314.     end
  315.     if m22 > (i == 0 and m00 or m11) then
  316.       i = 2
  317.     end
  318.     if i == 0 then
  319.       local s = math.sqrt(m00 - m11 - m22 + 1)
  320.       local recip = 0.5 / s
  321.       return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  322.     elseif i == 1 then
  323.       local s = math.sqrt(m11 - m22 - m00 + 1)
  324.       local recip = 0.5 / s
  325.       return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  326.     elseif i == 2 then
  327.       local s = math.sqrt(m22 - m00 - m11 + 1)
  328.       local recip = 0.5 / s
  329.       return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  330.     end
  331.   end
  332. end
  333. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  334.   local xs, ys, zs = x + x, y + y, z + z
  335.   local wx, wy, wz = w * xs, w * ys, w * zs
  336.   local xx = x * xs
  337.   local xy = x * ys
  338.   local xz = x * zs
  339.   local yy = y * ys
  340.   local yz = y * zs
  341.   local zz = z * zs
  342.   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))
  343. end
  344. function QuaternionSlerp(a, b, t)
  345.   local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  346.   local startInterp, finishInterp
  347.   if cosTheta >= 1.0E-4 then
  348.     if 1 - cosTheta > 1.0E-4 then
  349.       local theta = math.acos(cosTheta)
  350.       local invSinTheta = 1 / math.sin(theta)
  351.       startInterp = math.sin((1 - t) * theta) * invSinTheta
  352.       finishInterp = math.sin(t * theta) * invSinTheta
  353.     else
  354.       startInterp = 1 - t
  355.       finishInterp = t
  356.     end
  357.   elseif 1 + cosTheta > 1.0E-4 then
  358.     local theta = math.acos(-cosTheta)
  359.     local invSinTheta = 1 / math.sin(theta)
  360.     startInterp = math.sin((t - 1) * theta) * invSinTheta
  361.     finishInterp = math.sin(t * theta) * invSinTheta
  362.   else
  363.     startInterp = t - 1
  364.     finishInterp = t
  365.   end
  366.   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
  367. end
  368. function rayCast(Pos, Dir, Max, Ignore)
  369.   return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  370. end
  371. function newPart(par, brick, transp, anch, canc, size, name, mat, cfra)
  372.   local p = Instance.new("Part")
  373.   p.BrickColor = brick
  374.   p.Transparency = transp
  375.   p.Material = mat and mat or "SmoothPlastic"
  376.   p.Anchored = anch
  377.   p.CanCollide = canc
  378.   p.Size = size
  379.   p.TopSurface, p.BottomSurface, p.LeftSurface, p.RightSurface, p.FrontSurface, p.BackSurface = 10, 10, 10, 10, 10, 10
  380.   p.Name = name
  381.   p.CFrame = cfra or RootPart.CFrame
  382.   p.Parent = par
  383.   return p
  384. end
  385. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  386.   local mesh = Instance.new(Mesh)
  387.   mesh.Parent = part
  388.   if Mesh == "SpecialMesh" then
  389.     mesh.MeshType = meshtype
  390.     if meshid then
  391.       mesh.MeshId = "http://www.roblox.com/asset/?id=" .. meshid
  392.     end
  393.   end
  394.   if offset then
  395.     mesh.Offset = offset
  396.   end
  397.   mesh.Scale = scale
  398.   return mesh
  399. end
  400. function weld(parent, part0, part1, c0, c1)
  401.   local weld = Instance.new("Weld")
  402.   weld.Parent = parent
  403.   weld.Part0 = part0
  404.   weld.Part1 = part1
  405.   weld.C0 = c0
  406.   if c1 then
  407.     weld.C1 = c1
  408.   end
  409.   return weld
  410. end
  411. function sound(id, par, vol, dur, pit)
  412.   coroutine.resume(coroutine.create(function()
  413.     local sou = Instance.new("Sound", par or workspace)
  414.     sou.Volume = vol
  415.     sou.Pitch = pit or 1
  416.     sou.SoundId = "http://www.roblox.com/asset/?id=" .. id
  417.     swait()
  418.     sou:play()
  419.     wait(dur)
  420.     sou:Destroy()
  421.   end))
  422. end
  423. function round(num)
  424.   local a, b = math.modf(num)
  425.   if num % 1 ~= 0 then
  426.     return math.floor(num) + math.floor(b * 10 + 0.5) / 10
  427.   else
  428.     return math.floor(num)
  429.   end
  430. end
  431. function findCloseHumanoid(centre, distance)
  432.   local tab = {}
  433.   for _, child in pairs(game.Workspace:GetChildren()) do
  434.     if child:findFirstChild("Humanoid") and child:findFirstChild("Humanoid") ~= Humanoid and child:findFirstChild("Torso") then
  435.       local vtors = child.Torso
  436.       local mag = math.abs((vtors.Position - centre).magnitude)
  437.       if distance >= mag then
  438.         table.insert(tab, child.Humanoid)
  439.       end
  440.     end
  441.   end
  442.   return tab
  443. end
  444. function basicDamage(vhum, damage, colour)
  445.   if not vhum or not vhum.Parent:findFirstChild("Humanoid") or vhum.Health <= 0 then
  446.     return
  447.   end
  448.   vhum.Health = vhum.Health - damage
  449.   local damagepart = Instance.new("Part", Effects)
  450.   damagepart.Transparency = 1
  451.   damagepart.Anchored = true
  452.   damagepart.CanCollide = false
  453.   damagepart.Size = Vector3.new(1, 1, 1)
  454.   damagepart.Name = "DamagePart"
  455.   damagepart.CFrame = vhum.Parent.Head.CFrame * CFrame.new(0, 1, 0)
  456.   local g = Instance.new("BillboardGui", damagepart)
  457.   g.Enabled = true
  458.   g.Adornee = damagepart
  459.   g.Size = UDim2.new(5, 0, 5, 0)
  460.   g.ExtentsOffset = Vector3.new(0, 0, 0)
  461.   g.StudsOffset = Vector3.new(0, 0, 0)
  462.   local t = Instance.new("TextLabel", g)
  463.   t.BackgroundTransparency = 1
  464.   t.Font = "ArialBold"
  465.   t.TextSize = 24
  466.   t.Text = "-" .. round(damage)
  467.   if round(damage) % 1 == 0 then
  468.     t.Text = "-" .. round(damage) .. ".0"
  469.   end
  470.   t.Size = UDim2.new(1, 0, 1, 0)
  471.   t.TextStrokeTransparency = 0
  472.   t.TextTransparency = 0
  473.   t.TextScaled = true
  474.   t.TextWrapped = true
  475.   t.TextXAlignment = "Center"
  476.   t.TextYAlignment = "Center"
  477.   t.TextColor3 = colour
  478.   coroutine.resume(coroutine.create(function()
  479.     for i = 1, 50 do
  480.       game:GetService("RunService").Heartbeat:wait()
  481.       local sinewave = math.sin(i / 500) * 4
  482.       damagepart.CFrame = damagepart.CFrame * CFrame.new(Vector3.new(0, 0.3 - sinewave, 0))
  483.       t.TextTransparency = t.TextTransparency + 0.02
  484.       t.TextStrokeTransparency = t.TextTransparency + 0.02
  485.     end
  486.     damagepart:Destroy()
  487.   end), t)
  488. end
  489. function createBodyTrail()
  490.   local nPart = function(parent, brickcolor, transparency, anchored, cancollide, size, name)
  491.     local fp = Instance.new("Part")
  492.     fp.Parent = parent
  493.     fp.Transparency = transparency
  494.     fp.Anchored = anchored
  495.     fp.CanCollide = cancollide
  496.     fp.Locked = true
  497.     fp.BrickColor = BrickColor.new(brickcolor)
  498.     fp.Name = name
  499.     fp.Size = size
  500.     fp.Position = RootPart.Position
  501.     fp.TopSurface, fp.BottomSurface, fp.LeftSurface, fp.RightSurface, fp.FrontSurface, fp.BackSurface = 10, 10, 10, 10, 10, 10
  502.     fp.Material = "SmoothPlastic"
  503.     fp:BreakJoints()
  504.     return fp
  505.   end
  506.   local faketab = {}
  507.   local fakel = nPart(Effects, Character["Right Arm"].BrickColor.Color, 0, true, false, Character["Right Arm"].Size, "")
  508.   local faker = nPart(Effects, Character["Left Arm"].BrickColor.Color, 0, true, false, Character["Left Arm"].Size, "")
  509.   local fakell = nPart(Effects, Character["Left Leg"].BrickColor.Color, 0, true, false, Character["Left Leg"].Size, "")
  510.   local fakerl = nPart(Effects, Character["Right Leg"].BrickColor.Color, 0, true, false, Character["Right Leg"].Size, "")
  511.   local faketors = nPart(Effects, Character.Torso.BrickColor.Color, 0, true, false, Character.Torso.Size, "")
  512.   local fakehead = nPart(Effects, Character.Head.BrickColor.Color, 0, true, false, Character.Head.Size, "")
  513.   fakel.BrickColor = BrickColor.new("Fog")
  514.   faker.BrickColor = BrickColor.new("Fog")
  515.   fakell.BrickColor = BrickColor.new("Fog")
  516.   fakerl.BrickColor = BrickColor.new("Fog")
  517.   faketors.BrickColor = BrickColor.new("Fog")
  518.   fakehead.BrickColor = BrickColor.new("Fog")
  519.   if Character.Head:findFirstChild("Mesh") then
  520.     Character.Head.Mesh:Clone().Parent = fakehead
  521.   end
  522.   fakel.Name = "FakeLeft"
  523.   faker.Name = "FakeRight"
  524.   fakell.Name = "FakeLeftL"
  525.   fakerl.Name = "FakeRightL"
  526.   faketors.Name = "FakeTorso"
  527.   fakehead.Name = "FakeHead"
  528.   table.insert(faketab, fakel)
  529.   table.insert(faketab, faker)
  530.   table.insert(faketab, fakell)
  531.   table.insert(faketab, fakerl)
  532.   table.insert(faketab, faketors)
  533.   table.insert(faketab, fakehead)
  534.   for _, v in pairs(faketab) do
  535.     v.Archivable = true
  536.     v.CanCollide = false
  537.     v.Anchored = true
  538.     v.Material = "SmoothPlastic"
  539.     v.Transparency = 0.2
  540.     v.Locked = true
  541.     game.Debris:AddItem(v, 3)
  542.   end
  543.   fakel.CFrame = Character["Left Arm"].CFrame
  544.   faker.CFrame = Character["Right Arm"].CFrame
  545.   fakell.CFrame = Character["Left Leg"].CFrame
  546.   fakerl.CFrame = Character["Right Leg"].CFrame
  547.   faketors.CFrame = Character.Torso.CFrame
  548.   fakehead.CFrame = Character.Head.CFrame
  549.   local hats = {}
  550.   for _, v in pairs(hats) do
  551.     if v:findFirstChild("Handle") then
  552.       do
  553.         local vc = v.Handle:Clone()
  554.         vc.Parent = Effects
  555.         vc.CFrame = v.Handle.CFrame
  556.         vc.Anchored = true
  557.         vc.CanCollide = false
  558.         thread(function()
  559.           for i = 1, 15 do
  560.             swait()
  561.             vc.Transparency = vc.Transparency + 0.06666666666666667
  562.           end
  563.           vc:Destroy()
  564.         end)
  565.       end
  566.     end
  567.   end
  568.   return faketors, fakehead, faker, fakel, fakerl, fakell
  569. end
  570. function magic(type, thing)
  571.   local magicBlock = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay, t)
  572.     local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe)
  573.     prt.CFrame = cframe
  574.     local msh = mesh("BlockMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  575.     game:GetService("Debris"):AddItem(prt, 8)
  576.     if t == 1 or t == nil then
  577.       table.insert(partEffects, {
  578.         prt,
  579.         "Block1",
  580.         delay,
  581.         x3,
  582.         y3,
  583.         z3,
  584.         msh
  585.       })
  586.     elseif t == 2 then
  587.       table.insert(partEffects, {
  588.         prt,
  589.         "Block2",
  590.         delay,
  591.         x3,
  592.         y3,
  593.         z3,
  594.         msh
  595.       })
  596.     end
  597.   end
  598.   local magicCylinder = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay)
  599.     local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe)
  600.     local msh = mesh("CylinderMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  601.     game:GetService("Debris"):AddItem(prt, 8)
  602.     table.insert(partEffects, {
  603.       prt,
  604.       "Cylinder",
  605.       delay,
  606.       x3,
  607.       y3,
  608.       z3,
  609.       msh
  610.     })
  611.   end
  612.   local magicSphere = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay)
  613.     local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe)
  614.     local msh = mesh("SpecialMesh", prt, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  615.     game:GetService("Debris"):AddItem(prt, 8)
  616.     table.insert(partEffects, {
  617.       prt,
  618.       "Cylinder",
  619.       delay,
  620.       x3,
  621.       y3,
  622.       z3,
  623.       msh
  624.     })
  625.   end
  626.   local magicRing = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay)
  627.     local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe)
  628.     prt.Anchored = true
  629.     prt.CFrame = cframe
  630.     local msh = mesh("SpecialMesh", prt, "FileMesh", 3270017, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  631.     game:GetService("Debris"):AddItem(prt, 2)
  632.     coroutine.resume(coroutine.create(function(Part, Mesh, num)
  633.       for i = 0, 1, delay do
  634.         swait()
  635.         Part.Transparency = i
  636.         Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3)
  637.       end
  638.       Part:Destroy()
  639.     end), prt, msh, (math.random(0, 1) + math.random()) / 5)
  640.   end
  641.   local magicSlash = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay)
  642.     local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", cframe)
  643.     prt.Anchored = true
  644.     prt.CFrame = cframe
  645.     local msh = mesh("SpecialMesh", prt, "FileMesh", 20329976, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  646.     game:GetService("Debris"):AddItem(prt, 2)
  647.     coroutine.resume(coroutine.create(function(Part, Mesh, num)
  648.       for i = 0, 1, delay do
  649.         swait()
  650.         Part.Transparency = i
  651.         Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3)
  652.       end
  653.       Part:Destroy()
  654.     end), prt, msh, (math.random(0, 1) + math.random()) / 5)
  655.   end
  656.   local par = thing[1]
  657.   local brick = thing[2]
  658.   local cframe = thing[3]
  659.   local x1 = thing[4]
  660.   local y1 = thing[5]
  661.   local z1 = thing[6]
  662.   local x3 = thing[7]
  663.   local y3 = thing[8]
  664.   local z3 = thing[9]
  665.   local delay = thing[10]
  666.   local t = thing[11]
  667.   if type == "Block" or type == 1 then
  668.     magicBlock(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
  669.   elseif type == "Cylinder" or type == 2 then
  670.     magicCylinder(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
  671.   elseif type == "Sphere" or type == 3 then
  672.     magicSphere(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
  673.   elseif type == "Ring" or type == 4 then
  674.     magicRing(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
  675.   elseif type == "Slash" or type == 5 then
  676.     magicSlash(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
  677.   end
  678. end
  679. function newFrame(par, bg, transp, size, pos, name)
  680.   local f = Instance.new("Frame", nil)
  681.   f.BackgroundColor3 = bg
  682.   f.BackgroundTransparency = transp
  683.   f.BorderSizePixel = 0
  684.   f.Position = pos
  685.   f.Size = size
  686.   f.Name = name
  687.   f.Parent = par
  688.   return f
  689. end
  690. function newLabel(par, size, pos, text, textsize, text3, textstroke3, scaled, name)
  691.   local l = Instance.new("TextLabel", nil)
  692.   l.BackgroundTransparency = 1
  693.   l.Size = size
  694.   l.Position = pos
  695.   l.Text = text
  696.   l.TextSize = textsize
  697.   l.TextColor3 = text3
  698.   l.TextStrokeColor3 = textstroke3
  699.   if scaled then
  700.     l.TextScaled = scaled
  701.   else
  702.     l.TextScaled = true
  703.   end
  704.   l.TextStrokeTransparency = 0
  705.   l.Name = name
  706.   l.Parent = par
  707.   return l
  708. end
  709. a1t = "Misdirection"
  710. a2t = "Marionette"
  711. a3t = "Luna Clock"
  712. a4t = "Clock Corpse"
  713. backc3 = c3(210, 210, 255)
  714. reloc3 = c3(107, 107, 210)
  715. g = Instance.new("ScreenGui")
  716. f1 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.85, 0), "")
  717. f2 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.76, 0), "")
  718. f3 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.67, 0), "")
  719. f4 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.58, 0), "")
  720. newFrame(f1, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload")
  721. newFrame(f2, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload")
  722. newFrame(f3, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload")
  723. newFrame(f4, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload")
  724. newLabel(f1, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(Z)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key")
  725. newLabel(f2, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(X)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key")
  726. newLabel(f3, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(C)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key")
  727. newLabel(f4, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(V)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key")
  728. newLabel(f1, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a1t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label")
  729. newLabel(f2, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a2t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label")
  730. newLabel(f3, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a3t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label")
  731. newLabel(f4, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a4t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label")
  732. g.Parent = Player.PlayerGui
  733. Reload = {}
  734. Reload[1] = f1.Reload
  735. Reload[2] = f2.Reload
  736. Reload[3] = f3.Reload
  737. Reload[4] = f4.Reload
  738. function newKnife()
  739.   local weapon = Instance.new("Model", Character)
  740.   weapon.Name = "Izayoi"
  741.   local p0 = newPart(weapon, BrickColor.new("Black"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Wedge")
  742.   mesh("SpecialMesh", p0, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.400000036, 0.550000012, 1.29999995))
  743.   local p1 = newPart(weapon, BrickColor.new("Black"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Block")
  744.   mesh("BlockMesh", p1, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.400000095, 0.749999881, 0.699999988))
  745.   local p2 = newPart(weapon, BrickColor.new("Black"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Block")
  746.   mesh("BlockMesh", p2, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.400000095, 0.749999881, 0.699999869))
  747.   local p3 = newPart(weapon, BrickColor.new("Lily white"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Blade")
  748.   mesh("BlockMesh", p3, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.349999994, 5.45000029, 0.999999881))
  749.   local p4 = newPart(weapon, BrickColor.new("Lily white"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Wedge")
  750.   mesh("SpecialMesh", p4, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.350000024, 3.9000001, 1.05000007))
  751.   local p5 = newPart(weapon, BrickColor.new("Black"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Wedge")
  752.   mesh("SpecialMesh", p5, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.400000066, 0.550000012, 1.29999995))
  753.   local p6 = newPart(weapon, BrickColor.new("Black"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Handle")
  754.   mesh("BlockMesh", p6, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.400000036, 3.5999999, 0.699999928))
  755.   local p7 = newPart(weapon, BrickColor.new("Black"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Block")
  756.   mesh("BlockMesh", p7, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.449999988, 0.349999994, 2.29999971))
  757.   weld(p0, p0, p1, CFrame.new(-30.2999763, 2.48997641, 28.180027, 1, 0, 0, 0, 1, -4.37113883E-8, 0, 4.37113883E-8, 1), CFrame.new(30.2999763, 16.1993866, -23.0049038, -1, 0, 0, 0, 0.866025388, 0.49999997, 0, 0.49999997, -0.866025388))
  758.   weld(p1, p1, p2, CFrame.new(30.2999763, 16.1993866, -23.0049038, -1, 0, 0, 0, 0.866025388, 0.49999997, 0, 0.49999997, -0.866025388), CFrame.new(30.2999763, 11.7913561, 25.5498791, -1, 0, 0, 0, -0.866025269, 0.49999997, 0, 0.49999997, 0.866025269))
  759.   weld(p2, p2, p3, CFrame.new(30.2999763, 11.7913561, 25.5498791, -1, 0, 0, 0, -0.866025269, 0.49999997, 0, 0.49999997, 0.866025269), CFrame.new(30.2999763, 26.6550255, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0))
  760.   weld(p3, p3, p4, CFrame.new(30.2999763, 26.6550255, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0), CFrame.new(30.2999763, 25.7200241, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0))
  761.   weld(p4, p4, p5, CFrame.new(30.2999763, 25.7200241, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0), CFrame.new(30.2999763, -2.59997678, 28.180027, -1, 8.74227766E-8, 0, -8.74227766E-8, -1, -4.37113883E-8, -3.82137093E-15, -4.37113883E-8, 1))
  762.   weld(p5, p5, p6, CFrame.new(30.2999763, -2.59997678, 28.180027, -1, 8.74227766E-8, 0, -8.74227766E-8, -1, -4.37113883E-8, -3.82137093E-15, -4.37113883E-8, 1), CFrame.new(30.2999763, 27.6200256, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0))
  763.   weld(p6, p6, p7, CFrame.new(30.2999763, 27.6200256, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0), CFrame.new(30.2999763, 27.2300262, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0))
  764.   return weapon, p6, p3
  765. end
  766. knife1, blade1, handle1 = newKnife()
  767. handleweld1 = Instance.new("Weld", RightArm)
  768. handleweld1.Part1 = RightArm
  769. handleweld1.Part0 = handle1
  770. handle1c0 = CFrame.new(0.2, 0.95, 0) * CFrame.Angles(math.rad(85), math.rad(180), 0)
  771. handle1c1 = CFrame.new(0, -0.95, 0)
  772. handleweld1.C0 = handle1c0
  773. handleweld1.C1 = handle1c1
  774. knife2, blade2, handle2 = newKnife()
  775. handleweld2 = Instance.new("Weld", RightArm)
  776. handleweld2.Part1 = RightArm
  777. handleweld2.Part0 = handle2
  778. handle2c0 = CFrame.new(0, 0.9, 0.15) * CFrame.Angles(math.rad(55), math.rad(180), 0)
  779. handle2c1 = CFrame.new(0, -0.9, 0)
  780. handleweld2.C0 = handle2c0
  781. handleweld2.C1 = handle2c1
  782. knife3, blade3, handle3 = newKnife()
  783. handleweld3 = Instance.new("Weld", RightArm)
  784. handleweld3.Part1 = RightArm
  785. handleweld3.Part0 = handle3
  786. handle3c0 = CFrame.new(-0.2, 0.9, 0.3) * CFrame.Angles(math.rad(25), math.rad(180), 0)
  787. handle3c1 = CFrame.new(0, -0.9, 0)
  788. handleweld3.C0 = handle3c0
  789. handleweld3.C1 = handle3c1
  790. function teleport(k)
  791.   local a, b, c, d, e, f = createBodyTrail()
  792.   table.insert(partEffects, {
  793.     a,
  794.     "Disappear",
  795.     0.05
  796.   })
  797.   table.insert(partEffects, {
  798.     b,
  799.     "Disappear",
  800.     0.05
  801.   })
  802.   table.insert(partEffects, {
  803.     c,
  804.     "Disappear",
  805.     0.05
  806.   })
  807.   table.insert(partEffects, {
  808.     d,
  809.     "Disappear",
  810.     0.05
  811.   })
  812.   table.insert(partEffects, {
  813.     e,
  814.     "Disappear",
  815.     0.05
  816.   })
  817.   table.insert(partEffects, {
  818.     f,
  819.     "Disappear",
  820.     0.05
  821.   })
  822.   local unit = (RootPart.Velocity * Vector3.new(1, 0, 1)).unit
  823.   if k == "e" then
  824.   elseif k == "q" then
  825.     unit = -unit
  826.   end
  827.   local velocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  828.   local hit, pos = rayCast(RootPart.Position, unit, 15, Character)
  829.   if velocity <= 2 then
  830.     unit = RootPart.CFrame.lookVector
  831.     if k == "q" then
  832.       unit = RootPart.CFrame.lookVector * -1
  833.     end
  834.   end
  835.   if pos then
  836.     if hit then
  837.       if hit.Parent:findFirstChild("Humanoid") then
  838.         RootPart.CFrame = CFrame.new(RootPart.CFrame.p + unit * 20)
  839.       else
  840.         if hit.Parent:IsA("Model") and hit.Parent.Parent:findFirstChild("Humanoid") then
  841.           RootPart.CFrame = CFrame.new(RootPart.CFrame.p + unit * 20)
  842.         end
  843.         RootPart.CFrame = CFrame.new(pos)
  844.       end
  845.     else
  846.       RootPart.CFrame = CFrame.new(RootPart.CFrame.p + unit * 20)
  847.     end
  848.   end
  849. end
  850. function attackone()
  851.   attacking = true
  852.   cloak("Uncloak")
  853.   for i = 0, 1, 0.1 do
  854.     swait()
  855.     Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(8), 0, math.rad(-70)), 0.3)
  856.     RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.1 * math.cos(sine / 25)) * CFrame.Angles(0, 0, math.rad(70)), 0.3)
  857.     RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.3 - 0.1 * math.cos(sine / 15), -0.6) * CFrame.Angles(math.rad(80), 0, math.rad(-50)), 0.3)
  858.     LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 15), 0.2) * CFrame.Angles(math.rad(15), math.rad(10), math.rad(-10)), 0.3)
  859.     RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.3)
  860.     LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.3)
  861.     RH.C0 = clerp(RH.C0, CFrame.new(1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(0), math.rad(90) - math.rad(10), math.rad(5)), 0.3)
  862.     LH.C0 = clerp(LH.C0, CFrame.new(-1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(0), -math.rad(90) - math.rad(10), math.rad(5)), 0.3)
  863.     handleweld1.C0 = clerp(handleweld1.C0, handle1c0, 0.3)
  864.     handleweld2.C0 = clerp(handleweld2.C0, handle2c0, 0.3)
  865.     handleweld3.C0 = clerp(handleweld3.C0, handle3c0, 0.3)
  866.   end
  867.   local dir1 = (RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(45)), 0, math.sin(math.rad(45)))).unit
  868.   local dir2 = RootPart.CFrame.lookVector
  869.   local dir3 = (RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(-45)), 0, math.sin(math.rad(-45)))).unit
  870.   local throwknife1 = newKnife()
  871.   throwknife1.Handle.CFrame = CFrame.new(RootPart.CFrame.p, RootPart.CFrame.p + dir1) * CFrame.Angles(math.rad(-90), 0, 0)
  872.   local bv1 = Instance.new("BodyVelocity", throwknife1.Handle)
  873.   bv1.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  874.   bv1.Velocity = dir1 * 30
  875.   local throwknife2 = newKnife()
  876.   throwknife2.Handle.CFrame = CFrame.new(RootPart.CFrame.p, RootPart.CFrame.p + dir2) * CFrame.Angles(math.rad(-90), 0, 0)
  877.   local bv2 = Instance.new("BodyVelocity", throwknife2.Handle)
  878.   bv2.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  879.   bv2.Velocity = dir2 * 30
  880.   local throwknife3 = newKnife()
  881.   throwknife3.Handle.CFrame = CFrame.new(RootPart.CFrame.p, RootPart.CFrame.p + dir3) * CFrame.Angles(math.rad(-90), 0, 0)
  882.   local bv3 = Instance.new("BodyVelocity", throwknife3.Handle)
  883.   bv3.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  884.   bv3.Velocity = dir3 * 30
  885.   thread(function()
  886.     while throwknife1.Parent ~= Effects do
  887.       swait()
  888.       local hit1, pos1
  889.       if throwknife1:findFirstChild("Blade") then
  890.         hit1, pos1 = rayCast(throwknife1.Blade.Position, dir1, 1, Character)
  891.       end
  892.       if hit1 and pos1 then
  893.         local w = weld(hit1, throwknife1.Blade, hit1, throwknife1.Blade.CFrame:toObjectSpace(hit1.CFrame))
  894.         bv1:Destroy()
  895.         if hit1.Parent:findFirstChild("Humanoid") then
  896.           basicDamage(hit1.Parent.Humanoid, 5, BrickColor.new("Fog").Color)
  897.         end
  898.         break
  899.       end
  900.     end
  901.   end)
  902.   thread(function()
  903.     while throwknife2.Parent ~= Effects do
  904.       swait()
  905.       local hit1, pos1
  906.       if throwknife2:findFirstChild("Blade") then
  907.         hit1, pos1 = rayCast(throwknife2.Blade.Position, dir2, 1, Character)
  908.       end
  909.       if hit1 and pos1 then
  910.         local w = weld(hit1, throwknife2.Blade, hit1, throwknife2.Blade.CFrame:toObjectSpace(hit1.CFrame))
  911.         bv2:Destroy()
  912.         if hit1.Parent:findFirstChild("Humanoid") then
  913.           basicDamage(hit1.Parent.Humanoid, 5, BrickColor.new("Fog").Color)
  914.         end
  915.         break
  916.       end
  917.     end
  918.   end)
  919.   thread(function()
  920.     while throwknife3.Parent ~= Effects do
  921.       swait()
  922.       local hit1, pos1
  923.       if throwknife3:findFirstChild("Blade") then
  924.         hit1, pos1 = rayCast(throwknife3.Blade.Position, dir3, 1, Character)
  925.       end
  926.       if hit1 and pos1 then
  927.         local w = weld(hit1, throwknife3.Blade, hit1, throwknife3.Blade.CFrame:toObjectSpace(hit1.CFrame))
  928.         bv3:Destroy()
  929.         if hit1.Parent:findFirstChild("Humanoid") then
  930.           basicDamage(hit1.Parent.Humanoid, 5, BrickColor.new("Fog").Color)
  931.         end
  932.         break
  933.       end
  934.     end
  935.   end)
  936.   delay(10, function()
  937.     if throwknife1 then
  938.       throwknife1:Destroy()
  939.     end
  940.     if throwknife2 then
  941.       throwknife2:Destroy()
  942.     end
  943.     if throwknife3 then
  944.       throwknife3:Destroy()
  945.     end
  946.   end)
  947.   cloak("Cloak")
  948.   for i = 0, 1, 0.1 do
  949.     swait()
  950.     Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(8), math.rad(0), math.rad(0)), 0.3)
  951.     RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(0.2, math.rad(0), math.rad(0)), 0.3)
  952.     RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(90)), 0.3)
  953.     LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.3)
  954.     RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.3)
  955.     LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.3)
  956.     RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.3)
  957.     LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.3)
  958.   end
  959.   attacking = false
  960. end
  961. function attacktwo()
  962.   attackone()
  963. end
  964. function attackthree()
  965.   attackone()
  966. end
  967. function mouse1d()
  968.   if tool.Active == false then
  969.     return
  970.   end
  971.   if attacking == false and attackcounter == 1 then
  972.     attackcounter = 2
  973.     attackone()
  974.   elseif attacking == false and attackcounter == 2 then
  975.     attackcounter = 3
  976.     attacktwo()
  977.   elseif attacking == false and attackcounter == 3 then
  978.     attackcounter = 1
  979.     attackthree()
  980.   end
  981. end
  982. function key(k)
  983.   if tool.Active == false then
  984.     return
  985.   end
  986.   k = k:lower()
  987.   if attacking == false and k == "z" and AttackHas[1] >= AttackNeeded[1] then
  988.   elseif attacking == false and k == "x" and AttackHas[2] >= AttackNeeded[2] then
  989.   elseif attacking == false and k == "c" and AttackHas[3] >= AttackNeeded[3] then
  990.   elseif attacking == false and k == "v" and AttackHas[4] >= AttackNeeded[4] then
  991.   elseif k == "e" then
  992.     teleport("e")
  993.   elseif k == "q" then
  994.     teleport("q")
  995.   end
  996. end
  997. mouse.Button1Down:connect(mouse1d)
  998. mouse.KeyDown:connect(key)
  999. cloaked = false
  1000. function cloak(t)
  1001.   if t == "Cloak" then
  1002.     if cloaked == true then
  1003.       return
  1004.     end
  1005.     cloaked = true
  1006.     magic("Sphere", {
  1007.       Effects,
  1008.       BrickColor.new("Fog"),
  1009.       handle1.CFrame,
  1010.       0.5,
  1011.       0.5,
  1012.       0.5,
  1013.       1,
  1014.       2,
  1015.       1,
  1016.       0.1
  1017.     })
  1018.     magic("Sphere", {
  1019.       Effects,
  1020.       BrickColor.new("Fog"),
  1021.       handle2.CFrame,
  1022.       0.5,
  1023.       0.5,
  1024.       0.5,
  1025.       1,
  1026.       2,
  1027.       1,
  1028.       0.1
  1029.     })
  1030.     magic("Sphere", {
  1031.       Effects,
  1032.       BrickColor.new("Fog"),
  1033.       handle3.CFrame,
  1034.       0.5,
  1035.       0.5,
  1036.       0.5,
  1037.       1,
  1038.       2,
  1039.       1,
  1040.       0.1
  1041.     })
  1042.     for i, v in pairs(knife1:GetChildren()) do
  1043.       v.Transparency = 1
  1044.     end
  1045.     for i, v in pairs(knife2:GetChildren()) do
  1046.       v.Transparency = 1
  1047.     end
  1048.     for i, v in pairs(knife3:GetChildren()) do
  1049.       v.Transparency = 1
  1050.     end
  1051.     handleweld1.C0 = CFrame.new(0, -0.9, 0)
  1052.     handleweld2.C0 = CFrame.new(0, -0.9, 0)
  1053.     handleweld3.C0 = CFrame.new(0, -0.9, 0)
  1054.   elseif t == "Uncloak" then
  1055.     if cloaked == false then
  1056.       return
  1057.     end
  1058.     cloaked = false
  1059.     for i, v in pairs(knife1:GetChildren()) do
  1060.       v.Transparency = 0
  1061.     end
  1062.     for i, v in pairs(knife2:GetChildren()) do
  1063.       v.Transparency = 0
  1064.     end
  1065.     for i, v in pairs(knife3:GetChildren()) do
  1066.       v.Transparency = 0
  1067.     end
  1068.   end
  1069. end
  1070. thread(function()
  1071.   while true do
  1072.     swait()
  1073.     torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1074.     hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  1075.     sine = sine + 1
  1076.     if AttackHas[1] < AttackNeeded[1] and AttackCan[1] == true then
  1077.       AttackHas[1] = AttackHas[1] + 0.03
  1078.     end
  1079.     if AttackHas[2] < AttackNeeded[2] and AttackCan[2] == true then
  1080.       AttackHas[2] = AttackHas[2] + 0.03
  1081.     end
  1082.     if AttackHas[3] < AttackNeeded[3] and AttackCan[3] == true then
  1083.       AttackHas[3] = AttackHas[3] + 0.03
  1084.     end
  1085.     if AttackHas[4] < AttackNeeded[4] and AttackCan[4] == true then
  1086.       AttackHas[4] = AttackHas[4] + 0.03
  1087.     end
  1088.     Reload[1]:TweenSize(UDim2.new(AttackHas[1] / AttackNeeded[1], 0, 1, 0), nil, 1, 0.4)
  1089.     Reload[2]:TweenSize(UDim2.new(AttackHas[2] / AttackNeeded[2], 0, 1, 0), nil, 1, 0.4)
  1090.     Reload[3]:TweenSize(UDim2.new(AttackHas[3] / AttackNeeded[3], 0, 1, 0), nil, 1, 0.4)
  1091.     Reload[4]:TweenSize(UDim2.new(AttackHas[4] / AttackNeeded[4], 0, 1, 0), nil, 1, 0.4)
  1092.     if 1 < RootPart.Velocity.y and hitfloor == nil then
  1093.       if attacking == false then
  1094.         Anim = "Jump"
  1095.         Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-15), 0, math.rad(0)), 0.1)
  1096.         LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2)
  1097.         LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2)
  1098.         RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2)
  1099.         RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2)
  1100.         RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2)
  1101.         RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.2)
  1102.         LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.2)
  1103.         cloak("Cloak")
  1104.       end
  1105.     elseif RootPart.Velocity.y < -1 and hitfloor == nil then
  1106.       if attacking == false then
  1107.         Anim = "Fall"
  1108.         Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(23), 0, 0), 0.2)
  1109.         RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2)
  1110.         RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2)
  1111.         RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2)
  1112.         LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2)
  1113.         LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2)
  1114.         RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(24), math.rad(90), 0), 0.2)
  1115.         LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(-12), -math.rad(90), 0), 0.2)
  1116.       end
  1117.     elseif torvel < 1 and hitfloor ~= nil then
  1118.       if attacking == false then
  1119.         Anim = "Idle"
  1120.         Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(8), 0, math.rad(-25)), 0.1)
  1121.         RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.1 * math.cos(sine / 25)) * CFrame.Angles(0, 0, math.rad(25)), 0.1)
  1122.         RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.3 - 0.1 * math.cos(sine / 15), -0.6) * CFrame.Angles(math.rad(70), 0, math.rad(-45)), 0.2)
  1123.         LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 15), 0.2) * CFrame.Angles(math.rad(15), math.rad(10), math.rad(-10)), 0.2)
  1124.         RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
  1125.         LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
  1126.         RH.C0 = clerp(RH.C0, CFrame.new(1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(0), math.rad(90) - math.rad(10), math.rad(5)), 0.2)
  1127.         LH.C0 = clerp(LH.C0, CFrame.new(-1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(0), -math.rad(90) - math.rad(10), math.rad(5)), 0.2)
  1128.         cloak("Uncloak")
  1129.         handleweld1.C0 = clerp(handleweld1.C0, handle1c0, 0.2)
  1130.         handleweld2.C0 = clerp(handleweld2.C0, handle2c0, 0.2)
  1131.         handleweld3.C0 = clerp(handleweld3.C0, handle3c0, 0.2)
  1132.       end
  1133.     elseif torvel > 2 and hitfloor ~= nil and attacking == false then
  1134.       Anim = "Walk"
  1135.       Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(8), 0, math.rad(-25)), 0.1)
  1136.       RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.1 * math.cos(sine / 25)) * CFrame.Angles(0.1, 0, math.rad(25)), 0.1)
  1137.       RW.C0 = clerp(RW.C0, CFrame.new(1.1, 0.3 - 0.1 * math.cos(sine / 15), -0.6) * CFrame.Angles(math.rad(90), 0, math.rad(-50)), 0.2)
  1138.       LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 15), 0.2) * CFrame.Angles(math.rad(15), math.rad(10), math.rad(-10)), 0.2)
  1139.       RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
  1140.       LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
  1141.       RH.C0 = clerp(RH.C0, CFrame.new(1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(math.cos(sine * 1.2 / 8), math.rad(90) - math.rad(10), math.rad(5)), 0.2)
  1142.       LH.C0 = clerp(LH.C0, CFrame.new(-1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(-math.cos(sine * 1.2 / 8), -math.rad(90) - math.rad(10), math.rad(5)), 0.2)
  1143.       cloak("Uncloak")
  1144.       handleweld1.C0 = clerp(handleweld1.C0, CFrame.new(0.2, 0.95, 0) * CFrame.Angles(math.rad(80), math.rad(180), 0), 0.2)
  1145.       handleweld2.C0 = clerp(handleweld2.C0, CFrame.new(0, 0.95, 0.15) * CFrame.Angles(math.rad(50), math.rad(180), 0), 0.2)
  1146.       handleweld3.C0 = clerp(handleweld3.C0, CFrame.new(-0.2, 0.9, 0.3) * CFrame.Angles(math.rad(20), math.rad(180), 0), 0.2)
  1147.     end
  1148.     if 0 < #partEffects then
  1149.       for e = 1, #partEffects do
  1150.         if partEffects[e] ~= nil then
  1151.           local Thing = partEffects[e]
  1152.           if Thing ~= nil then
  1153.             local Part = Thing[1]
  1154.             local Mode = Thing[2]
  1155.             local Delay = Thing[3]
  1156.             local IncX = Thing[4]
  1157.             local IncY = Thing[5]
  1158.             local IncZ = Thing[6]
  1159.             if 1 >= Thing[1].Transparency then
  1160.               if Thing[2] == "Block1" then
  1161.                 Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1162.                 local Mesh = Thing[1].Mesh
  1163.                 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1164.                 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1165.               elseif Thing[2] == "Block2" then
  1166.                 Thing[1].CFrame = Thing[1].CFrame
  1167.                 local Mesh = Thing[7]
  1168.                 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1169.                 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1170.               elseif Thing[2] == "Cylinder" then
  1171.                 local Mesh = Thing[1].Mesh
  1172.                 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1173.                 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1174.               elseif Thing[2] == "Blood" then
  1175.                 local Mesh = Thing[7]
  1176.                 Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  1177.                 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1178.                 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1179.               elseif Thing[2] == "Elec" then
  1180.                 local Mesh = Thing[1].Mesh
  1181.                 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1182.                 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1183.               elseif Thing[2] == "Disappear" then
  1184.                 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1185.               elseif Thing[2] == "Shatter" then
  1186.                 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1187.                 Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1188.                 Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1189.                 Thing[6] = Thing[6] + Thing[5]
  1190.               end
  1191.             else
  1192.               Part:Destroy()
  1193.               table.remove(partEffects, e)
  1194.             end
  1195.           end
  1196.         end
  1197.       end
  1198.     end
  1199.   end
  1200. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement