SHOW:
|
|
- or go back to the newest paste.
| 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,Mouse,mouse,UserInputService,ContextActionService = owner | |
| 3 | local RealPlayer = Player | |
| 4 | do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end
| |
| 5 | wait(0.016666666666667) | |
| 6 | Anim = nil | |
| 7 | cf = CFrame.new | |
| 8 | function c3(cz, cx, cc) | |
| 9 | return Color3.new(cz / 255, cx / 255, cc / 255) | |
| 10 | end | |
| 11 | angles = CFrame.Angles | |
| 12 | Player = game.Players.LocalPlayer | |
| 13 | Character = Player.Character | |
| 14 | Humanoid = Character.Humanoid | |
| 15 | mouse = Player:GetMouse() | |
| 16 | local LeftArm = Character["Left Arm"] | |
| 17 | RightArm = Character["Right Arm"] | |
| 18 | LeftLeg = Character["Left Leg"] | |
| 19 | RightLeg = Character["Right Leg"] | |
| 20 | Head = Character.Head | |
| 21 | Torso = Character.Torso | |
| 22 | RootPart = Character.HumanoidRootPart | |
| 23 | RootJoint = RootPart.RootJoint | |
| 24 | Humanoid.Animator:Destroy() | |
| 25 | Character:WaitForChild("Animate"):Destroy()
| |
| 26 | NeckCF = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
| 27 | RootCF = angles(-1.57, 0, 3.14) | |
| 28 | LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 29 | LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 30 | RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 31 | RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 32 | RW = Instance.new("Weld")
| |
| 33 | LW = Instance.new("Weld")
| |
| 34 | RH = Torso["Right Hip"] | |
| 35 | LH = Torso["Left Hip"] | |
| 36 | Neck = Torso.Neck | |
| 37 | RSH = Torso["Right Shoulder"] | |
| 38 | LSH = Torso["Left Shoulder"] | |
| 39 | RSH.Parent = nil | |
| 40 | LSH.Parent = nil | |
| 41 | RW.Name = "Right Shoulder" | |
| 42 | RW.Part0 = Torso | |
| 43 | RW.C0 = cf(1.5, 0.5, 0) | |
| 44 | RW.C1 = cf(0, 0.5, 0) | |
| 45 | RW.Part1 = RightArm | |
| 46 | RW.Parent = Torso | |
| 47 | LW.Name = "Left Shoulder" | |
| 48 | LW.Part0 = Torso | |
| 49 | LW.C0 = cf(-1.5, 0.5, 0) | |
| 50 | LW.C1 = cf(0, 0.5, 0) | |
| 51 | LW.Part1 = LeftArm | |
| 52 | LW.Parent = Torso | |
| 53 | Effects = Instance.new("Folder", Character)
| |
| 54 | Effects.Name = "Effects" | |
| 55 | Humanoid.WalkSpeed = 16 | |
| 56 | partEffects, AttackHas, AttackNeeded, AttackCan = {}, {}, {}, {}
| |
| 57 | AttackHas[1], AttackHas[2], AttackHas[3], AttackHas[4] = 1, 1, 1, 1 | |
| 58 | AttackNeeded[1], AttackNeeded[2], AttackNeeded[3], AttackNeeded[4] = 1, 1, 1, 1 | |
| 59 | AttackCan[1], AttackCan[2], AttackCan[3], AttackCan[4] = true, true, true, true | |
| 60 | sine = 0 | |
| 61 | attackcounter = 1 | |
| 62 | energyslashcounter = 1 | |
| 63 | torvel = nil | |
| 64 | attacking = false | |
| 65 | hitfloor, posfloor = nil, nil | |
| 66 | tool = nil | |
| 67 | if script.Parent.ClassName == "HopperBin" then | |
| 68 | tool = script.Parent | |
| 69 | tool.Parent = Player.Backpack | |
| 70 | else | |
| 71 | tool = Instance.new("HopperBin", Player.Backpack)
| |
| 72 | tool.Name = "Toy Knife" | |
| 73 | end | |
| 74 | hitbox = Instance.new("Part")
| |
| 75 | hitbox.BrickColor = BrickColor.Black() | |
| 76 | hitbox.Transparency = 1 | |
| 77 | hitbox.CanCollide = false | |
| 78 | hitbox.Anchored = false | |
| 79 | hitbox.Size = Vector3.new(3, 3, 4) | |
| 80 | meshes = {
| |
| 81 | 3270017, | |
| 82 | 20329976, | |
| 83 | 448386996, | |
| 84 | 1095708, | |
| 85 | 1033714, | |
| 86 | 9756362 | |
| 87 | } | |
| 88 | sounds = {
| |
| 89 | {
| |
| 90 | 320557413, | |
| 91 | 320557453, | |
| 92 | 320557487, | |
| 93 | 320557518, | |
| 94 | 320557537, | |
| 95 | 320557563, | |
| 96 | 233856146, | |
| 97 | 233856140 | |
| 98 | }, | |
| 99 | {
| |
| 100 | 234365549, | |
| 101 | 234365573, | |
| 102 | 231917961, | |
| 103 | 231917950, | |
| 104 | 231917856, | |
| 105 | 231917863, | |
| 106 | 231917871 | |
| 107 | }, | |
| 108 | {
| |
| 109 | 262562442, | |
| 110 | 231917806, | |
| 111 | 231917784 | |
| 112 | }, | |
| 113 | {
| |
| 114 | 262562442, | |
| 115 | 233856048, | |
| 116 | 306247739 | |
| 117 | } | |
| 118 | } | |
| 119 | ArtificialHB = Instance.new("BindableEvent", script)
| |
| 120 | ArtificialHB.Name = "Heartbeat" | |
| 121 | script:WaitForChild("Heartbeat")
| |
| 122 | frame = 0.025 | |
| 123 | tf = 0 | |
| 124 | allowframeloss = true | |
| 125 | tossremainder = false | |
| 126 | lastframe = tick() | |
| 127 | script.Heartbeat:Fire() | |
| 128 | game:GetService("RunService").Heartbeat:connect(function(s, p)
| |
| 129 | tf = tf + s | |
| 130 | if tf >= frame then | |
| 131 | if allowframeloss then | |
| 132 | script.Heartbeat:Fire() | |
| 133 | lastframe = tick() | |
| 134 | else | |
| 135 | for i = 1, math.floor(tf / frame) do | |
| 136 | script.Heartbeat:Fire() | |
| 137 | end | |
| 138 | lastframe = tick() | |
| 139 | end | |
| 140 | if tossremainder then | |
| 141 | tf = 0 | |
| 142 | else | |
| 143 | tf = tf - frame * math.floor(tf / frame) | |
| 144 | end | |
| 145 | end | |
| 146 | end) | |
| 147 | function swait(num) | |
| 148 | if num == 0 or num == nil then | |
| 149 | ArtificialHB.Event:wait() | |
| 150 | else | |
| 151 | for i = 0, num do | |
| 152 | ArtificialHB.Event:wait() | |
| 153 | end | |
| 154 | end | |
| 155 | end | |
| 156 | function thread(f) | |
| 157 | coroutine.resume(coroutine.create(f)) | |
| 158 | end | |
| 159 | function clerp(a, b, t) | |
| 160 | local qa = {
| |
| 161 | QuaternionFromCFrame(a) | |
| 162 | } | |
| 163 | local qb = {
| |
| 164 | QuaternionFromCFrame(b) | |
| 165 | } | |
| 166 | local ax, ay, az = a.x, a.y, a.z | |
| 167 | local bx, by, bz = b.x, b.y, b.z | |
| 168 | local _t = 1 - t | |
| 169 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
| 170 | end | |
| 171 | function QuaternionFromCFrame(cf) | |
| 172 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 173 | local trace = m00 + m11 + m22 | |
| 174 | if trace > 0 then | |
| 175 | local s = math.sqrt(1 + trace) | |
| 176 | local recip = 0.5 / s | |
| 177 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
| 178 | else | |
| 179 | local i = 0 | |
| 180 | if m00 < m11 then | |
| 181 | i = 1 | |
| 182 | end | |
| 183 | if m22 > (i == 0 and m00 or m11) then | |
| 184 | i = 2 | |
| 185 | end | |
| 186 | if i == 0 then | |
| 187 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
| 188 | local recip = 0.5 / s | |
| 189 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
| 190 | elseif i == 1 then | |
| 191 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
| 192 | local recip = 0.5 / s | |
| 193 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
| 194 | elseif i == 2 then | |
| 195 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
| 196 | local recip = 0.5 / s | |
| 197 | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
| 198 | end | |
| 199 | end | |
| 200 | end | |
| 201 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 202 | local xs, ys, zs = x + x, y + y, z + z | |
| 203 | local wx, wy, wz = w * xs, w * ys, w * zs | |
| 204 | local xx = x * xs | |
| 205 | local xy = x * ys | |
| 206 | local xz = x * zs | |
| 207 | local yy = y * ys | |
| 208 | local yz = y * zs | |
| 209 | local zz = z * zs | |
| 210 | 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)) | |
| 211 | end | |
| 212 | function QuaternionSlerp(a, b, t) | |
| 213 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
| 214 | local startInterp, finishInterp | |
| 215 | if cosTheta >= 1.0E-4 then | |
| 216 | if 1 - cosTheta > 1.0E-4 then | |
| 217 | local theta = math.acos(cosTheta) | |
| 218 | local invSinTheta = 1 / math.sin(theta) | |
| 219 | startInterp = math.sin((1 - t) * theta) * invSinTheta | |
| 220 | finishInterp = math.sin(t * theta) * invSinTheta | |
| 221 | else | |
| 222 | startInterp = 1 - t | |
| 223 | finishInterp = t | |
| 224 | end | |
| 225 | elseif 1 + cosTheta > 1.0E-4 then | |
| 226 | local theta = math.acos(-cosTheta) | |
| 227 | local invSinTheta = 1 / math.sin(theta) | |
| 228 | startInterp = math.sin((t - 1) * theta) * invSinTheta | |
| 229 | finishInterp = math.sin(t * theta) * invSinTheta | |
| 230 | else | |
| 231 | startInterp = t - 1 | |
| 232 | finishInterp = t | |
| 233 | end | |
| 234 | 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 | |
| 235 | end | |
| 236 | function rayCast(Pos, Dir, Max, Ignore) | |
| 237 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
| |
| 238 | end | |
| 239 | function newPart(par, brick, transp, anch, canc, size, name, mat, ref) | |
| 240 | local p = Instance.new("Part")
| |
| 241 | p.BrickColor = brick | |
| 242 | p.Transparency = transp | |
| 243 | p.Material = mat and mat or "SmoothPlastic" | |
| 244 | p.Reflectance = ref and ref or 0 | |
| 245 | p.Anchored = anch | |
| 246 | p.CanCollide = canc | |
| 247 | p.Size = size | |
| 248 | p.TopSurface, p.BottomSurface, p.LeftSurface, p.RightSurface, p.FrontSurface, p.BackSurface = 10, 10, 10, 10, 10, 10 | |
| 249 | p.Name = name | |
| 250 | p.CFrame = RootPart.CFrame | |
| 251 | p.Parent = par | |
| 252 | return p | |
| 253 | end | |
| 254 | function mesh(Mesh, part, meshtype, meshid, offset, scale) | |
| 255 | local mesh = Instance.new(Mesh) | |
| 256 | mesh.Parent = part | |
| 257 | if Mesh == "SpecialMesh" then | |
| 258 | mesh.MeshType = meshtype | |
| 259 | if meshid then | |
| 260 | mesh.MeshId = "http://www.roblox.com/asset/?id=" .. meshid | |
| 261 | end | |
| 262 | end | |
| 263 | if offset then | |
| 264 | mesh.Offset = offset | |
| 265 | end | |
| 266 | mesh.Scale = scale | |
| 267 | return mesh | |
| 268 | end | |
| 269 | function weld(parent, part0, part1, c0, c1) | |
| 270 | local weld = Instance.new("Weld")
| |
| 271 | weld.Parent = parent | |
| 272 | weld.Part0 = part0 | |
| 273 | weld.Part1 = part1 | |
| 274 | weld.C0 = c0 | |
| 275 | if c1 then | |
| 276 | weld.C1 = c1 | |
| 277 | end | |
| 278 | return weld | |
| 279 | end | |
| 280 | function randomangles(r) | |
| 281 | local random = math.rad((math.random() - 0.5) * 180) | |
| 282 | local randomangles = CFrame.Angles(random, random, random) | |
| 283 | if r and r == 0 then | |
| 284 | return angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
| 285 | elseif r and r == 1 then | |
| 286 | return math.rad((math.random() - 0.5) * 180) | |
| 287 | elseif r and r == 2 then | |
| 288 | return math.random(-50, 50) | |
| 289 | else | |
| 290 | return randomangles | |
| 291 | end | |
| 292 | end | |
| 293 | function round(num) | |
| 294 | local a, b = math.modf(num) | |
| 295 | if num % 1 ~= 0 then | |
| 296 | return math.floor(num) + math.floor(b * 10 + 0.5) / 10 | |
| 297 | else | |
| 298 | return math.floor(num) | |
| 299 | end | |
| 300 | end | |
| 301 | function sound(id, par, vol, dur, pit) | |
| 302 | coroutine.resume(coroutine.create(function() | |
| 303 | local sou = Instance.new("Sound", par or workspace)
| |
| 304 | sou.Volume = vol | |
| 305 | sou.Pitch = pit or 1 | |
| 306 | sou.SoundId = "http://www.roblox.com/asset/?id=" .. id | |
| 307 | swait() | |
| 308 | sou:play() | |
| 309 | wait(dur) | |
| 310 | sou:Destroy() | |
| 311 | end)) | |
| 312 | end | |
| 313 | function findCloseHumanoid(centre, distance) | |
| 314 | local tab = {}
| |
| 315 | for _, child in pairs(game.Workspace:GetChildren()) do | |
| 316 | if child:findFirstChild("Humanoid") and child:findFirstChild("Humanoid") ~= Humanoid and child:findFirstChild("Torso") then
| |
| 317 | local vtors = child.Torso | |
| 318 | local mag = math.abs((vtors.Position - centre).magnitude) | |
| 319 | if distance >= mag then | |
| 320 | table.insert(tab, child.Humanoid) | |
| 321 | end | |
| 322 | end | |
| 323 | end | |
| 324 | return tab | |
| 325 | end | |
| 326 | function basicDamage(vhum, damage, colour) | |
| 327 | if not vhum or not vhum.Parent:findFirstChild("Humanoid") or vhum.Health <= 0 then
| |
| 328 | return | |
| 329 | end | |
| 330 | vhum.Health = vhum.Health - damage | |
| 331 | local damagepart = Instance.new("Part", Effects)
| |
| 332 | damagepart.Transparency = 1 | |
| 333 | damagepart.Anchored = true | |
| 334 | damagepart.CanCollide = false | |
| 335 | damagepart.Size = Vector3.new(1, 1, 1) | |
| 336 | damagepart.Name = "DamagePart" | |
| 337 | damagepart.CFrame = vhum.Parent.Head.CFrame * CFrame.new(0, 1, 0) | |
| 338 | local g = Instance.new("BillboardGui", damagepart)
| |
| 339 | g.Enabled = true | |
| 340 | g.Adornee = damagepart | |
| 341 | g.Size = UDim2.new(5, 0, 5, 0) | |
| 342 | g.ExtentsOffset = Vector3.new(0, 0, 0) | |
| 343 | g.StudsOffset = Vector3.new(0, 0, 0) | |
| 344 | local t = Instance.new("TextLabel", g)
| |
| 345 | t.BackgroundTransparency = 1 | |
| 346 | t.Font = "ArialBold" | |
| 347 | t.TextSize = 24 | |
| 348 | t.Text = "-" .. round(damage) | |
| 349 | if round(damage) % 1 == 0 then | |
| 350 | t.Text = "-" .. round(damage) .. ".0" | |
| 351 | end | |
| 352 | t.Size = UDim2.new(1, 0, 1, 0) | |
| 353 | t.TextStrokeTransparency = 0 | |
| 354 | t.TextTransparency = 0 | |
| 355 | t.TextScaled = true | |
| 356 | t.TextWrapped = true | |
| 357 | t.TextXAlignment = "Center" | |
| 358 | t.TextYAlignment = "Center" | |
| 359 | t.TextColor3 = colour | |
| 360 | coroutine.resume(coroutine.create(function() | |
| 361 | for i = 1, 50 do | |
| 362 | game:GetService("RunService").Heartbeat:wait()
| |
| 363 | local sinewave = math.sin(i / 500) * 4 | |
| 364 | damagepart.CFrame = damagepart.CFrame * CFrame.new(Vector3.new(0, 0.3 - sinewave, 0)) | |
| 365 | t.TextTransparency = t.TextTransparency + 0.02 | |
| 366 | t.TextStrokeTransparency = t.TextTransparency + 0.02 | |
| 367 | end | |
| 368 | damagepart:Destroy() | |
| 369 | end), t) | |
| 370 | end | |
| 371 | function magic(type, thing) | |
| 372 | local magicBlock = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay, t) | |
| 373 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe) | |
| 374 | prt.CFrame = cframe | |
| 375 | local msh = mesh("BlockMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 376 | game:GetService("Debris"):AddItem(prt, 8)
| |
| 377 | if t == 1 or t == nil then | |
| 378 | table.insert(partEffects, {
| |
| 379 | prt, | |
| 380 | "Block1", | |
| 381 | delay, | |
| 382 | x3, | |
| 383 | y3, | |
| 384 | z3, | |
| 385 | msh | |
| 386 | }) | |
| 387 | elseif t == 2 then | |
| 388 | table.insert(partEffects, {
| |
| 389 | prt, | |
| 390 | "Block2", | |
| 391 | delay, | |
| 392 | x3, | |
| 393 | y3, | |
| 394 | z3, | |
| 395 | msh | |
| 396 | }) | |
| 397 | end | |
| 398 | end | |
| 399 | local magicCylinder = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 400 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe) | |
| 401 | local msh = mesh("CylinderMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 402 | game:GetService("Debris"):AddItem(prt, 8)
| |
| 403 | table.insert(partEffects, {
| |
| 404 | prt, | |
| 405 | "Cylinder", | |
| 406 | delay, | |
| 407 | x3, | |
| 408 | y3, | |
| 409 | z3, | |
| 410 | msh | |
| 411 | }) | |
| 412 | end | |
| 413 | local magicSphere = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 414 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe) | |
| 415 | local msh = mesh("SpecialMesh", prt, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 416 | game:GetService("Debris"):AddItem(prt, 8)
| |
| 417 | table.insert(partEffects, {
| |
| 418 | prt, | |
| 419 | "Cylinder", | |
| 420 | delay, | |
| 421 | x3, | |
| 422 | y3, | |
| 423 | z3, | |
| 424 | msh | |
| 425 | }) | |
| 426 | end | |
| 427 | local magicRing = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 428 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe) | |
| 429 | prt.Anchored = true | |
| 430 | prt.CFrame = cframe | |
| 431 | local msh = mesh("SpecialMesh", prt, "FileMesh", 3270017, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 432 | game:GetService("Debris"):AddItem(prt, 2)
| |
| 433 | coroutine.resume(coroutine.create(function(Part, Mesh, num) | |
| 434 | for i = 0, 1, delay do | |
| 435 | swait() | |
| 436 | Part.Transparency = i | |
| 437 | Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3) | |
| 438 | end | |
| 439 | Part:Destroy() | |
| 440 | end), prt, msh, (math.random(0, 1) + math.random()) / 5) | |
| 441 | end | |
| 442 | local magicSlash = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 443 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", cframe) | |
| 444 | prt.Anchored = true | |
| 445 | prt.CFrame = cframe | |
| 446 | local msh = mesh("SpecialMesh", prt, "FileMesh", 20329976, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 447 | game:GetService("Debris"):AddItem(prt, 2)
| |
| 448 | coroutine.resume(coroutine.create(function(Part, Mesh, num) | |
| 449 | for i = 0, 1, delay do | |
| 450 | swait() | |
| 451 | Part.Transparency = i | |
| 452 | Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3) | |
| 453 | end | |
| 454 | Part:Destroy() | |
| 455 | end), prt, msh, (math.random(0, 1) + math.random()) / 5) | |
| 456 | end | |
| 457 | local par = thing[1] | |
| 458 | local brick = thing[2] | |
| 459 | local cframe = thing[3] | |
| 460 | local x1 = thing[4] | |
| 461 | local y1 = thing[5] | |
| 462 | local z1 = thing[6] | |
| 463 | local x3 = thing[7] | |
| 464 | local y3 = thing[8] | |
| 465 | local z3 = thing[9] | |
| 466 | local delay = thing[10] | |
| 467 | local t = thing[11] | |
| 468 | if type == "Block" or type == 1 then | |
| 469 | magicBlock(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
| 470 | elseif type == "Cylinder" or type == 2 then | |
| 471 | magicCylinder(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
| 472 | elseif type == "Sphere" or type == 3 then | |
| 473 | magicSphere(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
| 474 | elseif type == "Ring" or type == 4 then | |
| 475 | magicRing(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
| 476 | elseif type == "Slash" or type == 5 then | |
| 477 | magicSlash(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
| 478 | end | |
| 479 | end | |
| 480 | function newFrame(par, bg, transp, size, pos, name) | |
| 481 | local f = Instance.new("Frame", nil)
| |
| 482 | f.BackgroundColor3 = bg | |
| 483 | f.BackgroundTransparency = transp | |
| 484 | f.BorderSizePixel = 0 | |
| 485 | f.Position = pos | |
| 486 | f.Size = size | |
| 487 | f.Name = name | |
| 488 | f.Parent = par | |
| 489 | return f | |
| 490 | end | |
| 491 | function newLabel(par, size, pos, text, textsize, text3, textstroke3, scaled, name) | |
| 492 | local l = Instance.new("TextLabel", nil)
| |
| 493 | l.BackgroundTransparency = 1 | |
| 494 | l.Size = size | |
| 495 | l.Position = pos | |
| 496 | l.Text = text | |
| 497 | l.TextSize = textsize | |
| 498 | l.TextColor3 = text3 | |
| 499 | l.TextStrokeColor3 = textstroke3 | |
| 500 | if scaled then | |
| 501 | l.TextScaled = scaled | |
| 502 | else | |
| 503 | l.TextScaled = true | |
| 504 | end | |
| 505 | l.TextStrokeTransparency = 0 | |
| 506 | l.Name = name | |
| 507 | l.Parent = par | |
| 508 | return l | |
| 509 | end | |
| 510 | a1t = "Anger" | |
| 511 | a2t = "Power" | |
| 512 | a3t = "Hate" | |
| 513 | a4t = "Determination" | |
| 514 | backc3 = c3(107, 107, 107) | |
| 515 | reloc3 = c3(62, 62, 62) | |
| 516 | g = Instance.new("ScreenGui")
| |
| 517 | f1 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.85, 0), "") | |
| 518 | f2 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.76, 0), "") | |
| 519 | f3 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.67, 0), "") | |
| 520 | f4 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.58, 0), "") | |
| 521 | newFrame(f1, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload") | |
| 522 | newFrame(f2, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload") | |
| 523 | newFrame(f3, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload") | |
| 524 | newFrame(f4, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload") | |
| 525 | 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") | |
| 526 | 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") | |
| 527 | 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") | |
| 528 | 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") | |
| 529 | 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") | |
| 530 | 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") | |
| 531 | 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") | |
| 532 | 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") | |
| 533 | g.Parent = Player.PlayerGui | |
| 534 | Reload = {}
| |
| 535 | Reload[1] = f1.Reload | |
| 536 | Reload[2] = f2.Reload | |
| 537 | Reload[3] = f3.Reload | |
| 538 | Reload[4] = f4.Reload | |
| 539 | weapon = Instance.new("Model", Character)
| |
| 540 | weapon.Name = "Toy Knife" | |
| 541 | p0 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part")
| |
| 542 | mesh("BlockMesh", p0, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 2.39999986, 6.57500076))
| |
| 543 | p1 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part")
| |
| 544 | mesh("SpecialMesh", p1, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.425000012, 1.70000005))
| |
| 545 | p1 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p1")
| |
| 546 | mesh("SpecialMesh", p1, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.425000012, 1.70000005))
| |
| 547 | p2 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part")
| |
| 548 | mesh("BlockMesh", p2, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.999999881, 3.02500105))
| |
| 549 | p2 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p2")
| |
| 550 | mesh("BlockMesh", p2, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.999999881, 3.02500105))
| |
| 551 | p3 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part")
| |
| 552 | mesh("BlockMesh", p3, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.974999905, 1.70000064))
| |
| 553 | p3 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p3")
| |
| 554 | mesh("BlockMesh", p3, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.974999905, 1.70000064))
| |
| 555 | p4 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part")
| |
| 556 | mesh("SpecialMesh", p4, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 1.32500005))
| |
| 557 | p4 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p4")
| |
| 558 | mesh("SpecialMesh", p4, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 1.32500005))
| |
| 559 | p5 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part")
| |
| 560 | mesh("SpecialMesh", p5, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 0.350000083))
| |
| 561 | p5 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p5")
| |
| 562 | mesh("SpecialMesh", p5, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 0.350000083))
| |
| 563 | p6 = newPart(weapon, BrickColor.new("Really black"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Handle")
| |
| 564 | mesh("SpecialMesh", p6, Enum.MeshType.Cylinder, nil, Vector3.new(0, 0, 0), Vector3.new(5, 0.75, 0.800000012))
| |
| 565 | p6 = newPart(weapon, BrickColor.new("Really black"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p6")
| |
| 566 | mesh("SpecialMesh", p6, Enum.MeshType.Cylinder, nil, Vector3.new(0, 0, 0), Vector3.new(5, 0.75, 0.800000012))
| |
| 567 | weld(p0, p0, p1, CFrame.new(-0.400014997, -2.90028477, 2.71900272, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.400014997, 2.68303514, 3.62925434, -1, 0, 0, 0, -1, 0, 0, 0, 1)) | |
| 568 | weld(p1, p1, p2, CFrame.new(0.400014997, 2.68303514, 3.62925434, -1, 0, 0, 0, -1, 0, 0, 0, 1), CFrame.new(-0.400014997, -3.05428457, 3.77500391, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
| 569 | weld(p2, p2, p3, CFrame.new(-0.400014997, -3.05428457, 3.77500391, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.400014997, -2.83703494, 3.62925434, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
| 570 | weld(p3, p3, p4, CFrame.new(-0.400014997, -2.83703494, 3.62925434, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.400014997, 2.83703494, 3.96200418, -1, 0, 0, 0, -1, 0, 0, 0, 1)) | |
| 571 | weld(p4, p4, p5, CFrame.new(0.400014997, 2.83703494, 3.96200418, -1, 0, 0, 0, -1, 0, 0, 0, 1), CFrame.new(0.400014997, 3.05703473, 4.14625359, -1, 0, 0, 0, -1, 0, 0, 0, 1)) | |
| 572 | weld(p5, p5, p6, CFrame.new(0.400014997, 3.05703473, 4.14625359, -1, 0, 0, 0, -1, 0, 0, 0, 1), CFrame.new(1.48875475, 2.98278475, -0.400014997, 0, 4.37113883E-8, 1, 0, -1, 4.37113883E-8, 1, 0, 0)) | |
| 573 | handleweld = Instance.new("Weld", RightArm)
| |
| 574 | handleweld.Part1 = RightArm | |
| 575 | handleweld.Part0 = p6 | |
| 576 | handlec0 = CFrame.new(0, -0.95, 0) * angles(0, math.pi / 2, math.pi) | |
| 577 | handleweld.C0 = handlec0 | |
| 578 | function attackone() | |
| 579 | attacking = true | |
| 580 | for i = 0, 1, 0.1 do | |
| 581 | swait() | |
| 582 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(60)), 0.4) | |
| 583 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(-60)), 0.4) | |
| 584 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.9, 0) * CFrame.Angles(math.rad(180), 0, math.rad(10)), 0.4) | |
| 585 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
| 586 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 587 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 588 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4) | |
| 589 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4) | |
| 590 | end | |
| 591 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash")
| |
| 592 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
| |
| 593 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(120), math.rad(0)) | |
| 594 | delay(0.1, function() | |
| 595 | table.insert(partEffects, {
| |
| 596 | smp, | |
| 597 | "Disappear", | |
| 598 | 0.05 | |
| 599 | }) | |
| 600 | end) | |
| 601 | sound(sounds[1][1], Character.Head, 1, 4, 1.5) | |
| 602 | local hitb = hitbox.Touched:connect(function(hit) | |
| 603 | if hit.Parent ~= Character and hit.Parent:findFirstChild("Humanoid") then
| |
| 604 | if hit.Parent:findFirstChild("Hit" .. Player.Name) then
| |
| 605 | return | |
| 606 | end | |
| 607 | local str = Instance.new("StringValue", hit.Parent)
| |
| 608 | str.Name = "Hit" .. Player.Name | |
| 609 | game.Debris:AddItem(str, 0.3) | |
| 610 | basicDamage(hit.Parent.Humanoid, math.random(9, 13), Color3.fromRGB(243, 242, 242)) | |
| 611 | end | |
| 612 | end) | |
| 613 | for i = 0, 1, 0.1 do | |
| 614 | swait() | |
| 615 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(80)), 0.4) | |
| 616 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-70)), 0.4) | |
| 617 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(45), math.rad(-65), math.rad(5)), 0.4) | |
| 618 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
| 619 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 620 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 621 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
| 622 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
| 623 | hitbox.Parent = weapon | |
| 624 | hitbox.Size = Vector3.new(2, 5, 8) | |
| 625 | if smp then | |
| 626 | hitbox.CFrame = smp.CFrame | |
| 627 | else | |
| 628 | hitbox.Parent = nil | |
| 629 | end | |
| 630 | end | |
| 631 | hitb:disconnect() | |
| 632 | hitbox.Parent = nil | |
| 633 | attacking = false | |
| 634 | end | |
| 635 | function attacktwo() | |
| 636 | attacking = true | |
| 637 | for i = 0, 1, 0.1 do | |
| 638 | swait() | |
| 639 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.4) | |
| 640 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(80)), 0.4) | |
| 641 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.4) | |
| 642 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
| 643 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 644 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 645 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4) | |
| 646 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4) | |
| 647 | end | |
| 648 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash")
| |
| 649 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
| |
| 650 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(80), math.rad(0)) | |
| 651 | delay(0.1, function() | |
| 652 | table.insert(partEffects, {
| |
| 653 | smp, | |
| 654 | "Disappear", | |
| 655 | 0.05 | |
| 656 | }) | |
| 657 | end) | |
| 658 | sound(sounds[1][2], Character.Head, 1, 4, 1.5) | |
| 659 | local hitb = hitbox.Touched:connect(function(hit) | |
| 660 | if hit.Parent ~= Character and hit.Parent:findFirstChild("Humanoid") then
| |
| 661 | if hit.Parent:findFirstChild("Hit" .. Player.Name) then
| |
| 662 | return | |
| 663 | end | |
| 664 | local str = Instance.new("StringValue", hit.Parent)
| |
| 665 | str.Name = "Hit" .. Player.Name | |
| 666 | game.Debris:AddItem(str, 0.3) | |
| 667 | basicDamage(hit.Parent.Humanoid, math.random(9, 13), Color3.fromRGB(243, 242, 242)) | |
| 668 | end | |
| 669 | end) | |
| 670 | for i = 0, 1, 0.1 do | |
| 671 | swait() | |
| 672 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
| 673 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.4) | |
| 674 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.4) | |
| 675 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
| 676 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 677 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 678 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
| 679 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
| 680 | hitbox.Parent = weapon | |
| 681 | hitbox.Size = Vector3.new(2, 5, 8) | |
| 682 | if smp then | |
| 683 | hitbox.CFrame = smp.CFrame | |
| 684 | else | |
| 685 | hitbox.Parent = nil | |
| 686 | end | |
| 687 | end | |
| 688 | hitb:disconnect() | |
| 689 | hitbox.Parent = nil | |
| 690 | attacking = false | |
| 691 | end | |
| 692 | function attackthree() | |
| 693 | attacking = true | |
| 694 | for i = 0, 1, 0.1 do | |
| 695 | swait() | |
| 696 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.4) | |
| 697 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(20), 0, math.rad(80)), 0.4) | |
| 698 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(-45)) * CFrame.Angles(math.rad(-25), 0, 0), 0.4) | |
| 699 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
| 700 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 701 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 702 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4) | |
| 703 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4) | |
| 704 | end | |
| 705 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash")
| |
| 706 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
| |
| 707 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(-70), math.rad(0)) | |
| 708 | delay(0.1, function() | |
| 709 | table.insert(partEffects, {
| |
| 710 | smp, | |
| 711 | "Disappear", | |
| 712 | 0.05 | |
| 713 | }) | |
| 714 | end) | |
| 715 | sound(sounds[1][3], Character.Head, 1, 4, 1.5) | |
| 716 | local hitb = hitbox.Touched:connect(function(hit) | |
| 717 | if hit.Parent ~= Character and hit.Parent:findFirstChild("Humanoid") then
| |
| 718 | if hit.Parent:findFirstChild("Hit" .. Player.Name) then
| |
| 719 | return | |
| 720 | end | |
| 721 | local str = Instance.new("StringValue", hit.Parent)
| |
| 722 | str.Name = "Hit" .. Player.Name | |
| 723 | game.Debris:AddItem(str, 0.3) | |
| 724 | basicDamage(hit.Parent.Humanoid, math.random(9, 13), Color3.fromRGB(243, 242, 242)) | |
| 725 | end | |
| 726 | end) | |
| 727 | for i = 0, 1, 0.1 do | |
| 728 | swait() | |
| 729 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
| 730 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.4) | |
| 731 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.8, 0.4) * angles(math.rad(0), math.rad(-40), math.rad(120)), 0.4) | |
| 732 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
| 733 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 734 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 735 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
| 736 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
| 737 | hitbox.Parent = weapon | |
| 738 | hitbox.Size = Vector3.new(2, 5, 8) | |
| 739 | if smp then | |
| 740 | hitbox.CFrame = smp.CFrame | |
| 741 | else | |
| 742 | hitbox.Parent = nil | |
| 743 | end | |
| 744 | end | |
| 745 | hitb:disconnect() | |
| 746 | hitbox.Parent = nil | |
| 747 | attacking = false | |
| 748 | end | |
| 749 | function rapidslash() | |
| 750 | attacking = true | |
| 751 | AttackHas[1] = 0 | |
| 752 | AttackCan[1] = false | |
| 753 | for i = 1, 3 do | |
| 754 | swait() | |
| 755 | for i = 0, 1, 0.2 do | |
| 756 | swait() | |
| 757 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(60)), 0.6) | |
| 758 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(-60)), 0.6) | |
| 759 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.9, 0) * CFrame.Angles(math.rad(180), 0, math.rad(10)), 0.6) | |
| 760 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6) | |
| 761 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
| 762 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
| 763 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.6) | |
| 764 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.6) | |
| 765 | end | |
| 766 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
| 767 | do | |
| 768 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash")
| |
| 769 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
| |
| 770 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
| 771 | delay(0.1, function() | |
| 772 | table.insert(partEffects, {
| |
| 773 | smp, | |
| 774 | "Disappear", | |
| 775 | 0.05 | |
| 776 | }) | |
| 777 | end) | |
| 778 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
| 779 | basicDamage(v, 6, c3(243, 242, 242)) | |
| 780 | end | |
| 781 | for i = 0, 1, 0.2 do | |
| 782 | swait() | |
| 783 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(80)), 0.6) | |
| 784 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-70)), 0.6) | |
| 785 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(45), math.rad(-65), math.rad(5)), 0.6) | |
| 786 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6) | |
| 787 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
| 788 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
| 789 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.6) | |
| 790 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.6) | |
| 791 | end | |
| 792 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
| 793 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash")
| |
| 794 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
| |
| 795 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
| 796 | delay(0.1, function() | |
| 797 | table.insert(partEffects, {
| |
| 798 | smp, | |
| 799 | "Disappear", | |
| 800 | 0.05 | |
| 801 | }) | |
| 802 | end) | |
| 803 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
| 804 | basicDamage(v, 6, c3(243, 242, 242)) | |
| 805 | end | |
| 806 | for i = 0, 1, 0.2 do | |
| 807 | swait() | |
| 808 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.6) | |
| 809 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(20), 0, math.rad(80)), 0.6) | |
| 810 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(-45)) * CFrame.Angles(math.rad(-25), 0, 0), 1) | |
| 811 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6) | |
| 812 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
| 813 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
| 814 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.6) | |
| 815 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.6) | |
| 816 | end | |
| 817 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
| 818 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash")
| |
| 819 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
| |
| 820 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
| 821 | delay(0.1, function() | |
| 822 | table.insert(partEffects, {
| |
| 823 | smp, | |
| 824 | "Disappear", | |
| 825 | 0.05 | |
| 826 | }) | |
| 827 | end) | |
| 828 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
| 829 | basicDamage(v, 6, c3(243, 242, 242)) | |
| 830 | end | |
| 831 | for i = 0, 1, 0.2 do | |
| 832 | swait() | |
| 833 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.6) | |
| 834 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(80)), 0.6) | |
| 835 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.6) | |
| 836 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6) | |
| 837 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.6) | |
| 838 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.6) | |
| 839 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.6) | |
| 840 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.6) | |
| 841 | end | |
| 842 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
| 843 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash")
| |
| 844 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
| |
| 845 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
| 846 | delay(0.1, function() | |
| 847 | table.insert(partEffects, {
| |
| 848 | smp, | |
| 849 | "Disappear", | |
| 850 | 0.05 | |
| 851 | }) | |
| 852 | end) | |
| 853 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
| 854 | basicDamage(v, 6, c3(243, 242, 242)) | |
| 855 | end | |
| 856 | for i = 0, 1, 0.2 do | |
| 857 | swait() | |
| 858 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.6) | |
| 859 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.6) | |
| 860 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.6) | |
| 861 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.6) | |
| 862 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
| 863 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
| 864 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.6) | |
| 865 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.6) | |
| 866 | end | |
| 867 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
| 868 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash")
| |
| 869 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
| |
| 870 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
| 871 | delay(0.1, function() | |
| 872 | table.insert(partEffects, {
| |
| 873 | smp, | |
| 874 | "Disappear", | |
| 875 | 0.05 | |
| 876 | }) | |
| 877 | end) | |
| 878 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
| 879 | basicDamage(v, 6, c3(243, 242, 242)) | |
| 880 | end | |
| 881 | end | |
| 882 | end | |
| 883 | AttackCan[1] = true | |
| 884 | attacking = false | |
| 885 | end | |
| 886 | function powerslash() | |
| 887 | attacking = true | |
| 888 | AttackCan[2] = false | |
| 889 | AttackHas[2] = AttackHas[2] - 0.2 | |
| 890 | local orbs = {}
| |
| 891 | if energyslashcounter == 1 then | |
| 892 | energyslashcounter = 2 | |
| 893 | sound(367453005, Character.Head, 1, 4, 1) | |
| 894 | do | |
| 895 | local now = RootPart.CFrame * CFrame.new(0, 0, -10) | |
| 896 | local bo = {
| |
| 897 | BrickColor.new("Bright orange"),
| |
| 898 | BrickColor.new("Toothpaste")
| |
| 899 | } | |
| 900 | local bon = bo[math.random(1, 2)] | |
| 901 | for i = 1, 5 do | |
| 902 | local orb = newPart(Effects, bon, 0, true, false, Vector3.new(), "Orange", "SmoothPlastic", RootPart.CFrame * CFrame.new(0, 0, -15)) | |
| 903 | local omesh = mesh("SpecialMesh", orb, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(5, 5, 5))
| |
| 904 | orb.CFrame = now * CFrame.new((math.random() - 0.5) * 20, 0, (math.random() - 0.5) * 20) | |
| 905 | table.insert(orbs, orb) | |
| 906 | end | |
| 907 | for i = 0, 1, 0.05 do | |
| 908 | swait() | |
| 909 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.15) | |
| 910 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(5), 0, math.rad(80)), 0.15) | |
| 911 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.2) | |
| 912 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
| 913 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
| 914 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
| 915 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.15) | |
| 916 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.15) | |
| 917 | end | |
| 918 | for i = 1, #orbs do | |
| 919 | do | |
| 920 | local orb = orbs[i] | |
| 921 | table.insert(partEffects, {
| |
| 922 | orb, | |
| 923 | "Block2", | |
| 924 | 0.05, | |
| 925 | 10, | |
| 926 | 10, | |
| 927 | 10, | |
| 928 | orb.Mesh | |
| 929 | }) | |
| 930 | thread(function() | |
| 931 | for i = 1, 3 do | |
| 932 | swait(5) | |
| 933 | for i, v in pairs(findCloseHumanoid(orb.Position, 10)) do | |
| 934 | if bon == BrickColor.new("Bright orange") then
| |
| 935 | if (v.Parent.Torso.Velocity * Vector3.new(1, 1, 1)).magnitude < 2 then | |
| 936 | basicDamage(v, 6, BrickColor.new("Bright orange").Color)
| |
| 937 | end | |
| 938 | elseif bon == BrickColor.new("Toothpaste") and (v.Parent.Torso.Velocity * Vector3.new(1, 1, 1)).magnitude > 2 then
| |
| 939 | basicDamage(v, 6, BrickColor.new("Toothpaste").Color)
| |
| 940 | end | |
| 941 | end | |
| 942 | end | |
| 943 | end) | |
| 944 | end | |
| 945 | end | |
| 946 | sound(sounds[1][2], Character.Head, 1, 4, 0.8) | |
| 947 | for i = 0, 1, 0.1 do | |
| 948 | swait() | |
| 949 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
| 950 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(15), math.rad(0), math.rad(-5)), 0.4) | |
| 951 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.4) | |
| 952 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
| 953 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 954 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 955 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
| 956 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
| 957 | end | |
| 958 | end | |
| 959 | elseif energyslashcounter == 2 then | |
| 960 | energyslashcounter = 3 | |
| 961 | sound(306247749, Character.Head, 1, 4, 1) | |
| 962 | local gparts = {}
| |
| 963 | for i = 1, 9 do | |
| 964 | local gpart = newPart(Effects, BrickColor.new("Really red"), 0, true, false, Vector3.new(), "Violet", "SmoothPlastic")
| |
| 965 | local gmesh = mesh("CylinderMesh", gpart, nil, nil, Vector3.new(0, 0, 0), Vector3.new(50, 10, 50))
| |
| 966 | gpart.CFrame = RootPart.CFrame * CFrame.new(math.random(-20, 20), -3, -15 + math.random(-20, 20)) | |
| 967 | table.insert(gparts, gpart) | |
| 968 | end | |
| 969 | for i = 0, 1, 0.05 do | |
| 970 | swait() | |
| 971 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(80)), 0.15) | |
| 972 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(5), 0, math.rad(-80)), 0.15) | |
| 973 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, 0.4) * CFrame.Angles(math.rad(-45), math.rad(0), math.rad(15)) * CFrame.Angles(math.rad(0), 0, 0), 0.2) | |
| 974 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
| 975 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
| 976 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
| 977 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.15) | |
| 978 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.15) | |
| 979 | end | |
| 980 | for i = 1, #gparts do | |
| 981 | local gpart = gparts[i] | |
| 982 | table.insert(partEffects, {
| |
| 983 | gpart, | |
| 984 | "Block2", | |
| 985 | 0.05, | |
| 986 | -1, | |
| 987 | 50, | |
| 988 | -1, | |
| 989 | gpart.Mesh | |
| 990 | }) | |
| 991 | for i, v in pairs(findCloseHumanoid(gpart.Position, 10)) do | |
| 992 | basicDamage(v, 15, BrickColor.new("Dark blue").Color)
| |
| 993 | local bv = Instance.new("BodyVelocity", v.Parent.Torso)
| |
| 994 | game.Debris:AddItem(bv, 1) | |
| 995 | bv.Velocity = Vector3.new(0, 40, 0) | |
| 996 | bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge) | |
| 997 | end | |
| 998 | end | |
| 999 | sound(sounds[1][3], Character.Head, 1, 4, 0.8) | |
| 1000 | for i = 0, 1, 0.1 do | |
| 1001 | swait() | |
| 1002 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-80)), 0.4) | |
| 1003 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(15), math.rad(0), math.rad(80)), 0.4) | |
| 1004 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, -0.4) * angles(math.rad(125), math.rad(-40), math.rad(60)), 0.4) | |
| 1005 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
| 1006 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 1007 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 1008 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
| 1009 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
| 1010 | end | |
| 1011 | elseif energyslashcounter == 3 then | |
| 1012 | energyslashcounter = 1 | |
| 1013 | for i = 0, 1, 0.05 do | |
| 1014 | swait() | |
| 1015 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(80)), 0.15) | |
| 1016 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(5), 0, math.rad(-80)), 0.15) | |
| 1017 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.2) | |
| 1018 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
| 1019 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
| 1020 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
| 1021 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.15) | |
| 1022 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.15) | |
| 1023 | end | |
| 1024 | sound(sounds[2][5], Character.Head, 1, 4, 0.8) | |
| 1025 | thread(function() | |
| 1026 | for i = 1, 6 do | |
| 1027 | swait() | |
| 1028 | sound(438149153, Character.Head, 1, 4, 0.8) | |
| 1029 | do | |
| 1030 | local prt = newPart(Effects, BrickColor.new("Bright yellow"), 0, false, false, Vector3.new(), "Yellow", "SmoothPlastic", RootPart.CFrame)
| |
| 1031 | local mesh = mesh("SpecialMesh", prt, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(5, 5, 2.5))
| |
| 1032 | prt.CFrame = RootPart.CFrame * CFrame.new(math.random(-3, 3), math.random(-1, 1), math.random(-3, 3)) | |
| 1033 | local bv = Instance.new("BodyVelocity", prt)
| |
| 1034 | bv.Velocity = RootPart.CFrame.lookVector * 150 | |
| 1035 | bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge) | |
| 1036 | game.Debris:AddItem(bv, 6) | |
| 1037 | local orlook = RootPart.CFrame.lookVector | |
| 1038 | thread(function() | |
| 1039 | while prt do | |
| 1040 | swait() | |
| 1041 | local hitpart, pospart = rayCast(prt.Position, orlook, 4, Character) | |
| 1042 | if hitpart and pospart then | |
| 1043 | prt:Destroy() | |
| 1044 | do | |
| 1045 | local ref = newPart(Effects, BrickColor.Black(), 1, true, false, Vector3.new(), "") | |
| 1046 | ref.CFrame = CFrame.new(pospart) | |
| 1047 | sound(142070127, ref, 1, 4, 1) | |
| 1048 | delay(4, function() | |
| 1049 | ref:Destroy() | |
| 1050 | end) | |
| 1051 | magic("Block", {
| |
| 1052 | Effects, | |
| 1053 | BrickColor.new("Bright yellow"),
| |
| 1054 | CFrame.new(pospart), | |
| 1055 | 0.2, | |
| 1056 | 0.2, | |
| 1057 | 0.2, | |
| 1058 | 0.9, | |
| 1059 | 0.9, | |
| 1060 | 0.9, | |
| 1061 | 0.05, | |
| 1062 | 1 | |
| 1063 | }) | |
| 1064 | magic("Block", {
| |
| 1065 | Effects, | |
| 1066 | BrickColor.new("Bright yellow"),
| |
| 1067 | CFrame.new(pospart), | |
| 1068 | 0.2, | |
| 1069 | 0.2, | |
| 1070 | 0.2, | |
| 1071 | 0.9, | |
| 1072 | 0.9, | |
| 1073 | 0.9, | |
| 1074 | 0.05, | |
| 1075 | 1 | |
| 1076 | }) | |
| 1077 | if hitpart.Parent:findFirstChild("Humanoid") then
| |
| 1078 | basicDamage(hitpart.Parent.Humanoid, 12, BrickColor.new("Bright yellow").Color)
| |
| 1079 | end | |
| 1080 | break | |
| 1081 | end | |
| 1082 | end | |
| 1083 | end | |
| 1084 | end) | |
| 1085 | end | |
| 1086 | end | |
| 1087 | end) | |
| 1088 | end | |
| 1089 | attacking = false | |
| 1090 | AttackCan[2] = true | |
| 1091 | end | |
| 1092 | function leftright() | |
| 1093 | attacking = true | |
| 1094 | AttackCan[3] = false | |
| 1095 | for i = 0, 1, 0.1 do | |
| 1096 | swait() | |
| 1097 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.4) | |
| 1098 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(80)), 0.4) | |
| 1099 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.4) | |
| 1100 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
| 1101 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 1102 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 1103 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4) | |
| 1104 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4) | |
| 1105 | end | |
| 1106 | thread(function() | |
| 1107 | local laser = newPart(nil, BrickColor.new("Bright red"), 0.5, true, false, Vector3.new(), "Laser", "SmoothPlastic")
| |
| 1108 | local lmsh = mesh("BlockMesh", nil, nil, nil, Vector3.new(0, 0, 0), Vector3.new(5, 5, 5))
| |
| 1109 | local lasers = {}
| |
| 1110 | local keypoints1, keypoints2, keypoints3, keypoints4, keypoints5, keypoints6 = {}, {}, {}, {}, {}, {}
| |
| 1111 | local radius = 10 | |
| 1112 | local num = 12 | |
| 1113 | for i = 1, num do | |
| 1114 | table.insert(keypoints1, {
| |
| 1115 | RootPart.CFrame.p, | |
| 1116 | RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num) * i), 0, math.sin(math.rad(360 / num) * i)) | |
| 1117 | }) | |
| 1118 | table.insert(keypoints2, {
| |
| 1119 | RootPart.CFrame.p, | |
| 1120 | RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num + 45 * i) * i), 0, math.sin(math.rad(360 / num + 45 * i) * i)) | |
| 1121 | }) | |
| 1122 | table.insert(keypoints3, {
| |
| 1123 | RootPart.CFrame.p, | |
| 1124 | RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num + 90 * i) * i), 0, math.sin(math.rad(360 / num + 90 * i) * i)) | |
| 1125 | }) | |
| 1126 | table.insert(keypoints4, {
| |
| 1127 | RootPart.CFrame.p, | |
| 1128 | RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num + 135 * i) * i), 0, math.sin(math.rad(360 / num + 135 * i) * i)) | |
| 1129 | }) | |
| 1130 | end | |
| 1131 | local keypointstotal = {
| |
| 1132 | keypoints1, | |
| 1133 | keypoints2, | |
| 1134 | keypoints3, | |
| 1135 | keypoints4 | |
| 1136 | } | |
| 1137 | for ii = 1, #keypointstotal do | |
| 1138 | swait(5) | |
| 1139 | do | |
| 1140 | local currpoint = keypointstotal[ii] | |
| 1141 | for i = 1, #currpoint do | |
| 1142 | do | |
| 1143 | local start = currpoint[i][1] | |
| 1144 | local look = currpoint[i][2] | |
| 1145 | local laserc = laser:Clone() | |
| 1146 | local lmshc = lmsh:Clone() | |
| 1147 | local hit, pos = rayCast(start, look, 100000, Character) | |
| 1148 | laserc.CFrame = CFrame.new((start + pos) / 2, pos) * angles(math.rad(90), 0, 0) | |
| 1149 | local mag = (laserc.Position - pos).magnitude * 2 | |
| 1150 | lmshc.Scale = Vector3.new(2, mag * 5, 2) | |
| 1151 | laserc.Parent = Effects | |
| 1152 | lmshc.Parent = laserc | |
| 1153 | thread(function() | |
| 1154 | table.insert(partEffects, {
| |
| 1155 | laserc, | |
| 1156 | "Block2", | |
| 1157 | 0.025, | |
| 1158 | -0.1, | |
| 1159 | 0, | |
| 1160 | -0.1, | |
| 1161 | lmshc | |
| 1162 | }) | |
| 1163 | local start = currpoint[i][1] | |
| 1164 | local look = currpoint[i][2] | |
| 1165 | look = CFrame.new(start, start + look).lookVector | |
| 1166 | local hit, pos = rayCast(start, look, 100000, Character) | |
| 1167 | repeat | |
| 1168 | swait() | |
| 1169 | until laserc.Parent == nil | |
| 1170 | local lpart = newPart(Effects, BrickColor.new("Black"), 0.5, true, false, Vector3.new(), "Cut", "SmoothPlastic")
| |
| 1171 | sound(406913243, Head, 0.6, 4, 1) | |
| 1172 | local lpartm = mesh("BlockMesh", lpart, nil, nil, Vector3.new(0, 0, 0), Vector3.new(5, mag * 5, 5))
| |
| 1173 | lpart.CFrame = laserc.CFrame * CFrame.new(0, 0, 0) | |
| 1174 | table.insert(partEffects, {
| |
| 1175 | lpart, | |
| 1176 | "Block2", | |
| 1177 | 0.05, | |
| 1178 | 1, | |
| 1179 | 0, | |
| 1180 | 1, | |
| 1181 | lpartm | |
| 1182 | }) | |
| 1183 | local lpart = newPart(Effects, BrickColor.new("Lily white"), 0.5, true, false, Vector3.new(), "Cut", "SmoothPlastic")
| |
| 1184 | local lpartm = mesh("BlockMesh", lpart, nil, nil, Vector3.new(0, 0, 0), Vector3.new(8, mag * 5, 8))
| |
| 1185 | lpart.CFrame = laserc.CFrame * CFrame.new(0, 0, 0) | |
| 1186 | table.insert(partEffects, {
| |
| 1187 | lpart, | |
| 1188 | "Block2", | |
| 1189 | 0.05, | |
| 1190 | 1, | |
| 1191 | 0, | |
| 1192 | 1, | |
| 1193 | lpartm | |
| 1194 | }) | |
| 1195 | local hit, pos = rayCast(start, look, 100000, Character) | |
| 1196 | if hit ~= nil then | |
| 1197 | if hit.Parent.ClassName == "Accessory" or hit.Parent.ClassName == "Hat" then | |
| 1198 | if hit.Parent.Parent:findFirstChild("Humanoid") then
| |
| 1199 | basicDamage(hit.Parent.Parent.Humanoid, 20, BrickColor.new("Bright red").Color)
| |
| 1200 | end | |
| 1201 | elseif hit.Parent:findFirstChild("Humanoid") then
| |
| 1202 | basicDamage(hit.Parent.Humanoid, 20, BrickColor.new("Bright red").Color)
| |
| 1203 | end | |
| 1204 | end | |
| 1205 | end) | |
| 1206 | end | |
| 1207 | end | |
| 1208 | end | |
| 1209 | end | |
| 1210 | end) | |
| 1211 | for i = 0, 1, 0.1 do | |
| 1212 | swait() | |
| 1213 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
| 1214 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.4) | |
| 1215 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.4) | |
| 1216 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
| 1217 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 1218 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
| 1219 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
| 1220 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
| 1221 | end | |
| 1222 | AttackCan[3] = true | |
| 1223 | attacking = false | |
| 1224 | end | |
| 1225 | function mouse1d() | |
| 1226 | if tool.Active == false then | |
| 1227 | return | |
| 1228 | end | |
| 1229 | if attacking == false and attackcounter == 1 then | |
| 1230 | attackcounter = 2 | |
| 1231 | attackone() | |
| 1232 | elseif attacking == false and attackcounter == 2 then | |
| 1233 | attackcounter = 3 | |
| 1234 | attacktwo() | |
| 1235 | elseif attacking == false and attackcounter == 3 then | |
| 1236 | attackcounter = 1 | |
| 1237 | attackthree() | |
| 1238 | end | |
| 1239 | end | |
| 1240 | function key(k) | |
| 1241 | if tool.Active == false then | |
| 1242 | return | |
| 1243 | end | |
| 1244 | k = k:lower() | |
| 1245 | if attacking == false and k == "z" and AttackHas[1] >= AttackNeeded[1] then | |
| 1246 | rapidslash() | |
| 1247 | elseif attacking == false and k == "x" and AttackHas[2] >= 0.2 then | |
| 1248 | powerslash() | |
| 1249 | elseif attacking == false and k == "c" and AttackHas[3] >= AttackNeeded[3] then | |
| 1250 | leftright() | |
| 1251 | elseif attacking ~= false or k ~= "v" or AttackHas[4] >= AttackNeeded[4] then | |
| 1252 | end | |
| 1253 | end | |
| 1254 | asdasd = mouse.Button1Down:connect(mouse1d) | |
| 1255 | asdasdf = mouse.KeyDown:connect(key) | |
| 1256 | Humanoid.Died:connect(function() | |
| 1257 | asdasd:disconnect() | |
| 1258 | asdasdf:disconnect() | |
| 1259 | end) | |
| 1260 | thread(function() | |
| 1261 | while true do | |
| 1262 | swait() | |
| 1263 | torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
| 1264 | hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character) | |
| 1265 | sine = sine + 1 | |
| 1266 | if AttackHas[1] < AttackNeeded[1] and AttackCan[1] == true then | |
| 1267 | AttackHas[1] = AttackHas[1] + 0.005 | |
| 1268 | end | |
| 1269 | if AttackHas[2] < AttackNeeded[2] and AttackCan[2] == true then | |
| 1270 | AttackHas[2] = AttackHas[2] + 0.005 | |
| 1271 | end | |
| 1272 | if AttackHas[3] < AttackNeeded[3] and AttackCan[3] == true then | |
| 1273 | AttackHas[3] = AttackHas[3] + 0.005 | |
| 1274 | end | |
| 1275 | if AttackHas[4] < AttackNeeded[4] and AttackCan[4] == true then | |
| 1276 | AttackHas[4] = AttackHas[4] + 0.005 | |
| 1277 | end | |
| 1278 | Reload[1]:TweenSize(UDim2.new(AttackHas[1] / AttackNeeded[1], 0, 1, 0), nil, 1, 0.4) | |
| 1279 | Reload[2]:TweenSize(UDim2.new(AttackHas[2] / AttackNeeded[2], 0, 1, 0), nil, 1, 0.4) | |
| 1280 | Reload[3]:TweenSize(UDim2.new(AttackHas[3] / AttackNeeded[3], 0, 1, 0), nil, 1, 0.4) | |
| 1281 | Reload[4]:TweenSize(UDim2.new(AttackHas[4] / AttackNeeded[4], 0, 1, 0), nil, 1, 0.4) | |
| 1282 | if 1 < RootPart.Velocity.y and hitfloor == nil then | |
| 1283 | if attacking == false then | |
| 1284 | Anim = "Jump" | |
| 1285 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-15), 0, math.rad(0)), 0.1) | |
| 1286 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2) | |
| 1287 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
| 1288 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2) | |
| 1289 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
| 1290 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2) | |
| 1291 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.2) | |
| 1292 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.2) | |
| 1293 | end | |
| 1294 | elseif RootPart.Velocity.y < -1 and hitfloor == nil then | |
| 1295 | if attacking == false then | |
| 1296 | Anim = "Fall" | |
| 1297 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(23), 0, 0), 0.2) | |
| 1298 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2) | |
| 1299 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2) | |
| 1300 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
| 1301 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2) | |
| 1302 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
| 1303 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(24), math.rad(90), 0), 0.2) | |
| 1304 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(-12), -math.rad(90), 0), 0.2) | |
| 1305 | end | |
| 1306 | elseif torvel < 1 and hitfloor ~= nil then | |
| 1307 | if attacking == false then | |
| 1308 | Anim = "Idle" | |
| 1309 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-5), 0, math.rad(15)), 0.1) | |
| 1310 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.2 * math.cos(sine / 25)) * CFrame.Angles(math.rad(10), 0, math.rad(-15)), 0.1) | |
| 1311 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(5), math.rad(-15), math.rad(10) + 0.1 * math.cos(sine / 25)), 0.2) | |
| 1312 | LW.C0 = clerp(LW.C0, CFrame.new(-1.4, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(-5), math.rad(15), math.rad(-10) - 0.1 * math.cos(sine / 25)), 0.2) | |
| 1313 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
| 1314 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
| 1315 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1.1 - 0.2 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(10), math.rad(105), math.rad(-5)) * CFrame.Angles(math.rad(-4), 0, math.rad(-5)), 0.2) | |
| 1316 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1 - 0.2 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(10), -math.rad(75), math.rad(-2)) * CFrame.Angles(math.rad(-13), 0, 0), 0.2) | |
| 1317 | end | |
| 1318 | elseif torvel > 2 and hitfloor ~= nil and attacking == false then | |
| 1319 | Anim = "Walk" | |
| 1320 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-5), 0, math.rad(0)), 0.1) | |
| 1321 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.2 * math.cos(sine / 25)) * CFrame.Angles(math.rad(10), 0, math.rad(0)), 0.1) | |
| 1322 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(5), math.rad(-15), math.rad(10) + 0.1 * math.cos(sine / 25)), 0.2) | |
| 1323 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(-5), math.rad(15), math.rad(-10) - 0.1 * math.cos(sine / 25)), 0.2) | |
| 1324 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
| 1325 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
| 1326 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.cos(sine * 1.2 / 8), math.rad(90), 0), 0.3) | |
| 1327 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(-math.cos(sine * 1.2 / 8), -math.rad(90), 0), 0.3) | |
| 1328 | end | |
| 1329 | if 0 < #partEffects then | |
| 1330 | for e = 1, #partEffects do | |
| 1331 | if partEffects[e] ~= nil then | |
| 1332 | local Thing = partEffects[e] | |
| 1333 | if Thing ~= nil then | |
| 1334 | local Part = Thing[1] | |
| 1335 | local Mode = Thing[2] | |
| 1336 | local Delay = Thing[3] | |
| 1337 | local IncX = Thing[4] | |
| 1338 | local IncY = Thing[5] | |
| 1339 | local IncZ = Thing[6] | |
| 1340 | if 1 >= Thing[1].Transparency then | |
| 1341 | if Thing[2] == "Block1" then | |
| 1342 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
| 1343 | local Mesh = Thing[1].Mesh | |
| 1344 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1345 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1346 | elseif Thing[2] == "Block2" then | |
| 1347 | Thing[1].CFrame = Thing[1].CFrame | |
| 1348 | local Mesh = Thing[7] | |
| 1349 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1350 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1351 | elseif Thing[2] == "Cylinder" then | |
| 1352 | local Mesh = Thing[1].Mesh | |
| 1353 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1354 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1355 | elseif Thing[2] == "Blood" then | |
| 1356 | local Mesh = Thing[7] | |
| 1357 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0) | |
| 1358 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1359 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1360 | elseif Thing[2] == "Elec" then | |
| 1361 | local Mesh = Thing[1].Mesh | |
| 1362 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
| 1363 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1364 | elseif Thing[2] == "Disappear" then | |
| 1365 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1366 | elseif Thing[2] == "Shatter" then | |
| 1367 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1368 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
| 1369 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
| 1370 | Thing[6] = Thing[6] + Thing[5] | |
| 1371 | end | |
| 1372 | else | |
| 1373 | Part:Destroy() | |
| 1374 | table.remove(partEffects, e) | |
| 1375 | end | |
| 1376 | end | |
| 1377 | end | |
| 1378 | end | |
| 1379 | end | |
| 1380 | end | |
| 1381 | end) |